I am a beginner to R, I have a file like below. state population Alabama 4779736 Alaska 710231 Arizona 6392017
for (i in 1:25) { pid.means[,i] = apply(get(paste("pid.tf",i,sep="")), 1, mean, na.rm = TRUE) } I understand the function of this for loop, but i can't fin
I am creating a grouped bar plot using plotly. As level of my values differ I am using two y axes. I would like to split a legend (idea presented on a picture
I have a dataframe (df) in R and I want to create a new column (city1_n) that contains a line stored in the list key whenever there is a partial match between c
My code runs a model in R directly from Excel. I want to simplify installation so instead of: path = """C:\Program Files\R\R-4.1.1\bin\Rscript.exe"" C:\Users\di
I tried to download the latest version (4.2.0) of R on my windows computer and received this error message upon trying to open the program. "Fatal error: 'R_Te
I'm trying to make a pre-post change plot for three groups. In my data frame, pre data and post data are stored as two different variables like this. pre_treat
Following the thread from Tried p + scale_fill_discrete(name = "New Legend Title") but legend title still not changing, I now only want to generate line plot wi
I have the following data: week <- c(1,2,3,4,1,2,3,4,1,2,3,4) product <- c("A", "A", "A", "A", "B", "B", "B", "B", "C", "C", "C", "C") price <- c(5,5,6
I'm trying to define different margins for x-axis labels in ggplot2 using css syntax, as allowed by ggtext package. I created an object with the CSS selector an
In R, I have a data frame with several values. I would like to have a data frame that transforms the data frame into a data frame with just on
I am trying to publish a shiny app, you can see the source code here, it was being deployed correctly until I tried using the shinysense package This is the err
I have a data frame and I did a linear model. I want to extract the coefficients and store each coefficient into a variable using R. This is my data frame df &l
I have a data frame, like so: data.frame(director = c("Aaron Blaise,Bob Walker", "Akira Kurosawa", "Alan J. Pakula", "Alan Parker", "A
I have two dataframes df1 # var1 var2 # 1 X01 Red # 2 X02 Green # 3 X03 Red # 4 X04 Yellow # 5 X05 Red # 6 X06 Green df2 # X01 X02
I am working on a larger RMarkdown-site. Due to the size of images on the pages I implemented lazy loading for images using the loading="lazy"attribute of the &
Many are familiar with foreach() to assign a loop across many cores in parallel using %dopar%. However, in R how do you send a single job request for a variety
I have multi-level data and want to fit a mixed-effect model in python due to parallelization potential. But I am not able to compile the formula in 'statsmodel
I'm trying to use packages that require Rcpp in R on my M1 Mac, which I was never able to get up and running after purchasing this computer. I updated it to Mon
My goal is to extract strings of digits with fixed length (8 digits) from multiple text files in several folders after matching a certain pattern. I have spent