Category "r"

RcppEigen package "#pragma clang diagnostic pop" warnings

I am having some trouble when trying to use the RcppEigenpackage. I used the example posted here. The function worked, but R generated a series of similar warni

Identifying lead/lags using multivariate regression analysis

I have three time-series variables (x,y,z) measured in 3 replicates. x and z are the independent variables. y is the dependent variable. t is the time variable

Is there a way to convert Python to R?

Hey I am trying to convert my python code to R and can't seem to figure out the last part of the recursion. If anyone who has experience in both languages could

Is there a way to convert Python to R?

Hey I am trying to convert my python code to R and can't seem to figure out the last part of the recursion. If anyone who has experience in both languages could

Replace values conditionally, better way

I have a large dataframe with city names and many are misspelled. Right now I have corrected then manually, one by one, using the following code: geo <- geo

sparkR sql() returns string

We have parquet data saved on a server and I am trying to use SparkR sql() function in the following ways df <- sql("SELECT * FROM parquet.`<path to parq

Cache data in Shiny Server on Docker

I am currently trying to implement caching on my dockerized shiny app, but i am facing troubles, the app doesn't work and there's no log to trace the problem: S

Add 'total' row for each group in a column in df

I have a dataframe where the column size can be grouped. When the dataframe is arranged by size, I would like to show the totals of each column for each group a

R shiny datable with styleColorBar not aligning the data on the left hand side

I have the following code and my goal is to add styleColorBar to the WGT column, aligning the yellow bars on the left hand side of the column. df = data.frame(W

Fitting a line to the mean values of a multilevel variable using geom_smooth

I have this dataframe. I create a plot representing on the y-axis "value" and on the x-axis each of the levels of "Column_S", which contains levels from S1 to S

Replace NA only within specific range of time series object

I have the following data stored as zoo object: A B C 2017-05-31 NA NA 3.1 2017-06-30 2.5 2.4 3.2 2017-07-

How to change TOC depth in R Bookdown (GitBook)?

I use GitBook format through R bookdown. I need to use at least four levels in the table of contents (TOC). The default is three. How can I change the depth of

How to convert months as factors while still maintaining the months in sequence?

I have a original data frame (df) containing data of around 10 years(1994-2003). The head(df) is as shown below: Sl.no Date Year Month Season

If I imported my dataframe in R and can run associate() why is ALL_CORRELATION giving me an error?

All I have is a simple dataframe with 27 columns and 100 rows I continue to get the following error although the simple line of code works with other example of

Create several folders in a directory with a loop to write the names R

I am trying to create several subfolder in a parent folder. I created this code but it does not create my subfolders. I would like to create subfolders in the f

How to merge output of lapply iterated function into 1 dataframe? [duplicate]

I have a function responses to process some data that is subset into different data frames. I also have a list of these data frames partylist.

Parallelize st_union from R's sf package

I have some large shapefiles with multiple millions of polygons that I need to dissolve. Depending upon the shapefile I need to either dissolve by group or jus

Getting plots from R to powerpoint

I use "ggplot2" to create beautiful plots in R. I want to distribute them; I use "ReporteRs" get them into PowerPoint. When I do this the formatting is somehow

R R6 Inheritance with roxygen2 - class "ParentClass" is not exported by 'namespace:ParentPackage'

I am running into an issue with R6 inheritance. I am writing 2 packages (work related so I have to use fake code but I'll try to keep it accurate). In ParentPac

How to implement regressors in a Hierarchical Series in R, with the Fable package?

I am new to exploring the fable package, and I was wanting to implement Regressors in a Hierarchical Time Series model. How should the Dimensionality of the dat