Quantcast
Channel: Active questions tagged r - Stack Overflow
Browsing all 201839 articles
Browse latest View live
↧

Image may be NSFW.
Clik here to view.

papaja: modify spacing under headings

I am using the package papaja to write an APA-formatted manuscript with R markdown. I would like to modify the default spacing under headings (it's presently too large for my taste). As shown on the...

View Article


Convert Nested Loop to lapply

I am using two loops. In the second loop, I am incrementing value by 1 and then applying filter based on that and converting it to data.matrix so that matrix multiplication can be done in later steps....

View Article


Spread data to create unique rows

I have a data frame that I want to reshape so that for each medid, there is only one row. I know that I can use spread to accomplish this, but it's not looking at all how I want to look and I just...

View Article

Permutation test error for likelihood ratio test of mixed model in R:...

I would like to test the main effect of a categorical variable using a permutation test on a likelihood ratio test. I have a continuous outcome and a dichotomous grouping predictor and a categorical...

View Article

Image may be NSFW.
Clik here to view.

Problem in creating boxplots with R shiny app

I'm very new to the Shiny app R. I'm trying to make simple boxplots in the Shiny R app for some dataset.Here I am showing some example data in a file df.csv. The data looks like below. Showing the dput...

View Article


R: Test for overlap of name values in dataframe

I have a dataframe filled with names.For a given row in the dataframe, I'd like to compare that row to every row above it in the df and determine if the number of matching names is less than or equal...

View Article

In R, how do I select all variables from one data frame that are in another...

I have two data frames a and b (with more variables). Now I would like to keep all the variables from b and combine a and b together. How should I do? Will appreciate any wise solutions.

View Article

Get all sourced functions

In R, I am using source() to load some functions:source("functions.R") Is it possible to get the list of all functions defined in this file? As function names. (Maybe source() itself can somehow return...

View Article


How do I install RODBC so that is uses unixODBC?

After installing and configuring FreeTDS and unixODBC and confirming they are working correctly, I am trying to configure RODBC. However, I am getting the following results when attempting to view the...

View Article


Filtering by specific timeframe in R

I have a column with the full date and time ie 2019-01-01 00:00:00. How do I filter between specific time frames regardless of date. For example only displaying data that falls between 07:30:00 and...

View Article

Resize absolute panel and text inside it on different screens (Desktop,...

My shiny application has different absolute panels, but their appearance is different on different screens. In particular, I noticed that the size of the panel and the text inside it, usually present...

View Article

R knitr: use spin() with R and Python code

With the advent of reticulate, combining R and Python in a single .Rmd document has become increasingly popular among the R community (myself included). Now, my personal workflow usually starts with an...

View Article

Changing boxplot in graphics to bwplot in lattice

I have a problem changing boxplot in the graphics package to an equivalent in the lattice package.graphics:xx1 <- rnorm(20, mean = 3, sd = 3.6) xx2 <- rpois(40, lambda = 3.5) xx3 <- rchisq(31,...

View Article


How can I get the key labels in legend match with the end values in a...

I tried scale_x_continous and guides(fill=guide_legend) but can't get it to work. The legend need to match the end order of the lines which end in the year 2016. So: Action, Role-Playing or a pink line...

View Article

Image may be NSFW.
Clik here to view.

Unexpected change of column name to V1

When running my code I have 2 issues when executing the code after the line "View(df)". Firstly, I try to delete the first two empty rows, but instead everything gets deleted. EDIT: The selection of...

View Article


Image may be NSFW.
Clik here to view.

What's wrong with edit in R?

I'm a beginner in R I recently learned about the function called edit in internet class. they show the R in Window OS but, my computer is MAC OS I think that's the problem. But I don't know how to fix...

View Article

Image may be NSFW.
Clik here to view.

Plots (ggplot2) in Rmarkdown PDF cropped

Within R I use the ggplot2 plotting library to create plots. I output a bunch of them and also print \n\n in between them such that they become their own paragraph in the PDF (via LaTeX). Lately (new R...

View Article


Plot a graph without NA's

Apartment_no <- c('1-SV','1-SH','3-SV','3-SH','5-SV','5-SH','7-SV','7-SH') January <- c('', '', '3','5','9','','15','19') February <- c('5', '', '3','5','','15','','19') March <- c('5', '',...

View Article

Change orientation of data frame for panel data in R [duplicate]

This question already has an answer here:Reshaping data.frame from wide to long format 7 answersI would like to change the orientation of my data frame. I have following data:df <-...

View Article

how to get weekly. quarterly and monthly count from a daily data set of a year

I ave data yearly set with daily login data of 4440 employee. i wan to get the weekly, quarterly insight and monthly insights, but i am not bale to understand how do i get this count in R. i have 4400...

View Article
Browsing all 201839 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>