How to apply strsplit to a dataframe in R?

R
I have a very similar question to this one, but I have a more complicated situation. Here is my sample code: test = data.frame(x = c(1:4), ...
11 months ago

R: how to store message from verbose = TRUE

R
library(nlme) fm1 <- nlme(height ~ SSasymp(age, Asym, R0, lrc), data = Loblolly, fixed = Asym + R0 + lrc ~ 1, ...
11 months ago

How to convert data frame to contingency table in R?

R
I have a simple question. How to convert a data frame into a contingency table for Fisher's Exact Test? I have data having about 19000 rows: head(da...
11 months ago

Top quintiles for several categorical values

R
In general, I want to get the top quintile of a data frame of the distribution of one column. However, it needs to be the top quintile for every uniqu...
11 months ago

Applying group_by and summarise on data while keeping all the columns' info

R
I have a large dataset with 22000 rows and 25 columns. I am trying to group my dataset based on one of the columns and take the min value of the other...
11 months ago

R - How to find the Intersection fo 2 Functions

R
I have 2 functions and I would like to find the values at which their intersect and plot it on the graph. How can I best achieve this? Does anyone kno...
11 months ago

Accessing columns of a dataframe withing a large list of dataframes in R

R
So I've been struggling to figure this out. I'm still quite new to R and haven't found a solution here yet. I have a data.frame which looks like this...
11 months ago

Shiny: Issues with conditional update of SelectizeInput choices

R
I would like to select an option which has an effect on the output. Here there are two options: Car, Cylinders to choose. Based on the selected option...
11 months ago

aggregating when values appear in bidirectional order in data.frame in R

R
I have table where I have been able to use aggregate when both my columns had data in an (A to B direction) but I was wondering is there a way to aggr...
11 months ago

Efficient sub-string search over large dataset

R
I have a large dataset tPro1 (~500k points). Seen below, the variable of interest is tPro1$Path. Path Row ...
11 months ago

Real-time anomaly detection

R
I would like to do anomaly detection in R on real-time stream of sensor data. I would like to explore use of either the Twitter anomalyDetection or a...
11 months ago

Is there an equivalent of strip() from python in R?

R
I have some data that was inputed by researchers with unwanted spaces so for example "Sample 1" is inputed as "Sample 1 " and it is messing with my ab...
11 months ago

How can list elements be used as factor names in R?

R
I have a list, e.g. mylist=c("A","B","C"), and I wish to use list elements to extract factors of a data frame in R. If MyDataFrame has a column name ...
11 months ago

Predict for wider range

R
I would like to fit the data and predict y values for wider x range. Lets assume I have 'iris' data set and use following data for prediction from th...
11 months ago

Substituting all instances of words in one vector with words specified in a second vector

R
I am trying to find an efficient way to remove all instances of a set of words in an input list with the words in the removal list. vectorOfWordsTo...
11 months ago

Coercing GLMs into list

R
I'm writing a function that produces 3 different models as output and want the function to return all three models so the user can see the output. Cur...
11 months ago

How to modify the legend of my barplot in R?

R
In this barplot, the legend is blocking off a portion of it. How can I reduce the size of the legend? My code: `work.gender.marriage.table = table(w...
11 months ago

serializing C# objects with JavaScriptSerializer produces invalid bytes in UTF8 string

R
I am serializing a C# object with the following code: var serializer = new JavaScriptSerializer(); var serializedResult = ser...
11 months ago

Aggregate by column and compare the text

R
I have two dataframes: VESSELNO Equip 12234 503 12234 504 12234 505 12234 506 ...
11 months ago

Math symbol error in geom_text

R
Inserting a math symbol to the text should not be so complicated I supposed! OTH, even looking similar examples ggplot2 facet_wrap with mathematical...
11 months ago