Category "r"

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

How to get rownames to barplot?

I'm new to R, so I'm doing association rule mining using R, where I want to display the foods in the items column on the x axis of the barplot. They should also

how to find where the interval of continuous numbers starts and ends?

I have a vector vec <- c(2, 3, 5, 6, 7, 8, 16, 19, 22, 23, 24) The continuous numbers are: c(2, 3) c(5, 6, 7, 8) c(22, 23, 24) So the first vector starts a

R: Summary statistics for groups / subsets within panel data - code and layout

I have the following data (posted in the comment): Now I would like to have summary statistics. I only need the mean and the number of observations. The summary

Append Radio Button inputs on UI upon User textInput in R shiny

I'm trying to get the textInput from the user and upon submitting it through an action button,I need to update the choices (Append the user input to already exi

(CLOSED) Generating faceted pie charts to indicate weightages

I am looking to build a visual with multiple pie charts to showcase different sleeping conditions and their weightage across a week. Here's my dataset: structur

What code could recreate this excel bar graph in R? (Don't worry about the positive.or.negative column)

Here is the table in Excel: Here is my head(df) in R: Here is my Code: ##Import CSV df<-read.csv("Sentiment Matrix.csv") ##Check top of df > dput(head(d