How do I delete rows in a data frame??

I have a data frame named "mydata" that looks like this this: A B C D 1. 5 4 4 4 2. 5 4 4 4 3. 5...

Extract year from date?

How can I remove the first elements from a variable, especially if this variable has a special characters. For examp...

Replace all 0 values to NA?

I have a dataframe with some numeric columns. Some row has a 0 value which should be considered as null in statistic...

R dates “origin” must be supplied?

My code: axis.Date(1,sites$date, origin="1960-10-01") Error: Error in as.Date.numeric(x) : 'origin' must be supp...

What does the error “object not interpretable as a factor” mean??

This: vect <- C(1, NA, 2, 3, 4, NA, 5, NA, 6, 7, 8, NA, 9) Produces this error: object not interpretable as a...

Error: ggplot2 doesn't know how to deal with data of class matrix??

How can I make ggplot work with this data I tried normal plotting and it works just fine, but I want better visualiz...

starting R: Error: '\U' used without hex digits in character string starting “”C:\U"?

I have the following problem when starting RStudio and when I try to compile a PDF from a .rnw format: Error: '\U' ...

how to increase the limit for max.print in R?

I am using the Graph package in R for maxclique analysis of 5461 items. The final output item which I get is very ...

Create an empty data.frame?

I'm trying to initialize a data.frame without any rows. Basically, I want to specify the data types for each column ...

Warning: non-integer #successes in a binomial glm! (survey packages)?

I am using the twang package to create propensity scores, which are used as weights in a binomial glm using survey::...

promise already under evaluation: recursive default argument reference or earlier problems??

Here is my R code. The functions are defined as: f <- function(x, T) { 10 * sin(0.3 * x) * sin(1.3 * x ^ 2) + ...

How to flatten a deeply and irregularly nested list/JSON in R?

I'm trying to flatten a deeply/irregularly nested list/JSON object to a dataframe in R. The key names are consisten...

How does one reorder columns in a data frame??

How would one change this input (with the sequence: time, in, out, files): Time In Out Files 1 2 3 ...

Creating a comma separated vector?

I have a numeric vector, one, which I'm trying to turn into a character vector where each element is separated by c...

How can I fit the randon effect in the gamm (or gamm4) in r??

I would like to know if my response variable (y) is significantly affected by a categorical variable ("x"), with two...