Category "r"

Issues with accent when using the "separate" function from tidyverse

I am using the separate function from tidyverse to split the first column of this tibble : # A tibble: 6,951 x 9 Row.names Number_of_ana

How to send query with variables from Rstudio to Mongo database?

I'm trying to send query to my Mongo database depending on a variable producted in my R code. Unfortunately, Mongo query needs double quotes and the function "p

Flatten nested list and retain all parent keys for each bottom-level element

I need to flatten an arbitrarily nested list to a data frame and retain the path of keys / indices in one column, while extracting each element on the bottom le

How to flag time-varying indicators with overlapping dates in a longitudinal data set?

I have a simulated data set with 5 rows, each representing a block of person-time, each with its own start and end date ('start' and 'end'). Each row has a visi

Is it there something wrong with tensorflow?

Hello I have being using tensorflow and keras for a while. I use this packages to build neural networks. As I work on CPU I was used to recive a message like th

Editable Table functionality in R-Mobile Shiny

I see that datatable works well with Shiny web to have editable cells or rows/columns. They are caught using cell_edit events. But I cant find a similar thing f

Apply smoothing (get.smooth, smooth.spline)

Data set looks like this head(tcata.df) X NJ stimulus factor_attribute time_0s time_1s time_2s time_3s time_4s time_5s time_6s time_7s time_8s time_9s time_10s

Improve if else statement

I have the following function in R. It is working fine, however, I think that must be a better way to run this function. values <- c("a","b") print <- f

Shiny Apps, ioslides (or just Rmarkdown), and Github

I have an ioslides/rmarkdown file with an embedded Shiny app. I was hoping to put this presentation on my github account but when I do the app stops running.

Is abind console output incorrect?

I am trying to combine multiple 2d vectors to obtain a 3dvector, the 3d vector should be [rows, columns, 2dvectors]. So far I have only worked with 3d vectors m

Split 600 columns into 2 new columns for each one, with old and new column names in vectors

I want to split 600 columns (listed in a vector) at a delimiter (in this case a /) into 2 new columns for each one (also listed as vectors). I've worked out bas

Pooled-AUC meta-analysis using metafor in R

I'm conducting a meta-analysis concerning prediction studies that report AUC's with CI's. I'd like to create a forest plot that pools the AUC's together. I have

R: Test for serial correlation after having used felm

I would like to test if serial correlation is present in my model. I have a large panel data set and I run the regression with felm and let's call the model fel

Error when using regr() command: undefined columns selected

I get the following error when trying to run the regr() command from the yhat package: Error in `[.data.frame`(new.data, , c(DV, IVx)) : undefined columns se

Extract cells values of a matrix within a circle (in R)

In a matrix I would like to select a cell having a certain value (3 in the following example) and determine the number of cells having a value of 1 and 2, withi

RMarkdown YAML section add author's hyperlink email to footer

In the YAML section of the RMarkdown file, I want write the author's name and email address and have that only appear in the footer of the document. Here is an

How to filter all rows between two values containing a certain pattern for a list of data frames in R?

I have a large list of about thousand data frames and want to filter all the rows from between two values which contain a string pattern VALUE1 and VALUE2 in th

How to generate a map for property cluster

Could you help me make a graph in R similar to the one I inserted in the image below, which shows the properties on a map, differentiating by cluster. See in my

yfR:Error in download.Error in `vec_slice()`: ! `x` must be a vector, not NULL

I am sure I have installed the latest packages include "quantomd":(devtools::install_github("joshuaulrich/quantmod", ref = "358-getsymbols-new.session")) But st

Convert processed format with stm into dtm (Structural topic modeling)

I have used the textProcessor and the prepDocuments functions from the stm package to clean a corpus. Now I would like to convert the resulting object (list of