similar to: Error in data.frame(srcfile = NA_character_ ...) using R CMD check

Displaying 20 results from an estimated 2000 matches similar to: "Error in data.frame(srcfile = NA_character_ ...) using R CMD check"

2011 Feb 03
1
bug in codetools/R CMD check?
Hi Mr Tierney, I have noticed an error message from R 1.12.x's CMD check for a while (apparently prof Ripley completely rewrote CMD check in R 1.12+) e.g.: http://bioconductor.org/checkResults/2.7/bioc-LATEST/snpMatrix/lamb2-checksrc.html ---------------- * checking R code for possible problems ... NOTE Warning: non-unique value when setting 'row.names': ?new? Error in
2019 Mar 09
0
POSIXlt$zone and $gmtoff questions
I've been searching for patterns in why some POSIXlt objects have the zone and gmtoff components and some don't and why gmtoff is sometimes NA when the zone is known. Is there a pattern or is it just that the additional fields and workarounds were added in an ad hoc way? E.g., as.POSIXlt adds the zone and gmtoff components for all strings and logical NA inputs if the time zone is not
2017 May 23
0
Inconsistency in handling of numeric input with %d by sprintf
Astute observation. And of course we should be passing integer when we use %d. It's an edge case in how we printed ITime objects in data.table: On Tue, May 23, 2017 at 11:53 AM, Joris Meys <jorismeys at gmail.com> wrote: > I initially thought this is "documented behaviour". ?sprintf says: > > Numeric variables with __exactly integer__ values will be coerced to >
2017 May 23
0
Inconsistency in handling of numeric input with %d by sprintf
Yes, what Joris posts about is exactly what I noted in my March 9th post to R-devel. The behaviour is sort of documented, but not in the clearest manner (in my opinion). Like I say, my ultimate conclusion was that the silent coercion of numerics to integers by sprintf() was a handy convenience, but not one that should be relied about to always work predictably. On Tue, May 23, 2017 at 10:02 AM,
2011 Jul 04
1
Prevent 'R CMD check' from reporting "NA"/"NA_character_" missmatch?
Hello, I'm writing a package am running 'R CMD check' on it. Is there any way to make 'R CMD check' not warn about a missmatch between 'NA_character_' (in the function definition) and 'NA' (in the documentation)? Thanks for any help. Sincerely, Joh
2007 Jul 13
1
parse(text=...) and the srcfile attribute
Hi, I'm trying to understand whether the new source file references can help me with something I want to do. Let's say I have foo <- parse(text = " a <- 1; b <- 2**2 a + b ") I now wish to recover the sources for the parsed expressions. I can get them one at a time: > foo[[2]] b <- 2^2 > as.character(attr(foo, "srcref")[[2]]) [1] "b <-
2023 Nov 08
1
c(NA, 0+1i) not the same as c(as.complex(NA), 0+1i)?
So, to summarize, the open questions are: (1) Should as.complex(NA_character_) give complex(r=NA_real_, i=0) instead of NA_complex_? (2) Should the first argument in c(NA, x) and c(NA_integer_, x), where typeof(x) == "complex", be promoted to complex(r=NA_real_, i=0) instead of NA_complex_? My opinions: (1) No. The imaginary part of the
2023 Nov 09
1
c(NA, 0+1i) not the same as c(as.complex(NA), 0+1i)?
>>>>> Mikael Jagan >>>>> on Wed, 8 Nov 2023 11:13:18 -0500 writes: > So, to summarize, the open questions are: > (1) Should as.complex(NA_character_) give complex(r=NA_real_, i=0) > instead of NA_complex_? > (2) Should the first argument in c(NA, x) and c(NA_integer_, x), > where typeof(x) == "complex", be promoted
2017 May 23
2
Inconsistency in handling of numeric input with %d by sprintf
I initially thought this is "documented behaviour". ?sprintf says: Numeric variables with __exactly integer__ values will be coerced to integer. (emphasis mine). Turns out this only works when the first value is numeric and not NA, as shown by the following example: > sprintf("%d", as.numeric(c(NA,1))) Error in sprintf("%d", as.numeric(c(NA, 1))) : invalid
2016 Jul 16
1
sample() fails with double or integer NA input of length one
Hi, I have discovered that sample() fails with an uninformative error message when the x argument is a single NA of type double or integer. I can reproduce the problem with the following code: base::sample(NA) # NA is of logical type above base::sample(NA_character_) base::sample(NA_complex_) base::sample(NA_real_) base::sample(NA_integer_) The last two lines throw the following error: Error
2017 May 23
2
Inconsistency in handling of numeric input with %d by sprintf
https://github.com/Rdatatable/data.table/issues/2171 The fix was easy, it's just surprising to see the behavior change almost on a whim. Just wanted to point it out in case this is unknown behavior, but Evan seems to have found this as well. On Tue, May 23, 2017 at 12:00 PM, Michael Chirico <michaelchirico4 at gmail.com > wrote: > Astute observation. And of course we should be
2013 Dec 12
2
Status of reserved keywords and builtins
According to http://cran.r-project.org/doc/manuals/r-release/R-lang.html#Reserved-words if else repeat while function for in next break TRUE FALSE NULL Inf NaN NA NA_integer_ NA_real_ NA_complex_ NA_character_ ... ..1 ..2 etc. are all reserved keywords. However, in R 3.0.2 you can do things like: `if` <- function(cond, val1, val2) val2 after which if(TRUE) 1 else 2 returns 2.
2008 Oct 09
1
YALAQ - Yet Another LApply Question
Hello, Two lapply questions (system info and sample data below): 1) Why does the first form of command1 add the name of y _after_ the str() output rather than before as does the second (preferred) form? # command1 version1 invisible(lapply(ls(pattern='bn'), function(y) cat(y, "\n", str(get(y)), "\n") )) # command1 version2 (preferred output)
2013 Oct 30
0
disculpe las molestias ...ayuda con MICE
Amalia, No obtengo tus resultados. Corrí tus formulas y datos y el resultado es x <- structure(list(ï..psraid = c(202517L, 202518L, 202520L, 202523L, + 202527L, 202537L, 202543L, 202544L, 202551L, 202566L, 202570L, + 202571L, 202606L, 202619L, 202624L, 202629L, 202631L, 202632L, + 202633L, 202648L, 202657L, 202663L, 202676L, 202683L, 202685L, + 202706L, 202708L, 202709L, 202710L, 202734L,
2008 Dec 09
2
assign()ing within apply
Hello, I'm trying to convert a character column in several dataframes to lower case. ### # # Sample data and 'spp' column summaries: # dput(ban.ovs.1993[sample(row.names(ban.ovs.1993), 20), 1:4]) ban.ovs.93 <- structure(list(oplt = c(43L, 43L, 38L, 26L, 35L, 8L, 39L, 1L, 34L, 50L, 10L, 29L, 31L, 24L, 18L, 12L, 27L, 49L, 28L, 51L), rplt = c(NA_integer_, NA_integer_,
2013 Oct 30
1
disculpe las molestias ...ayuda con MICE
Muchas gracias, pero claro en una muestra de 50 datos se ejecuta, en la muestra original de 1000 registros me tira error :( 2013/10/30 daniel <daniel319@gmail.com> > Amalia, > > No obtengo tus resultados. Corrí tus formulas y datos y el resultado es > x <- structure(list(ï..psraid = c(202517L, 202518L, 202520L, 202523L, > + 202527L, 202537L, 202543L, 202544L, 202551L,
2011 Apr 28
1
Extract complete rows by group and maximum
Hi I'm trying to extract complete rows from a dataframe by group based on the maximum in a column within that group. Thus I have a dataframe: cvd_basestudy ... es_time ... _____________ study1 ... 0.3091667 study2 ... 0.3091667 study2 ... 0.2625000 study3 ... 0.3033333 study3 ... 0.2625000 __________ etc I can extract the basestudy and the max(es_time)
2013 Oct 30
2
disculpe las molestias ...ayuda con MICE
Saludo gente, antes que nada gracias por la ayuda que puedan aportarme, soy iniciante en R, estoy usando el paquete Mice para realizar imputaciones múltiples sobre variables en su mayoría categóricas. El problema está que cuando expresó este comando imp <- mice(dataset,method="polr",maxit=1) donde el dataset es un data.frame me tirá este error : iter imp variable 1 1 pial1a
2009 Jun 03
2
Create a time interval from a single time variable
I am trying to set up a data set for a survival analysis with time-varying covariates. The data is already in a long format, but does not have a variable to signify the stopping point for the interval. The variable DaysEnrolled is the variable I would like to use to form this interval. This is what I have now: ID Age DaysEnrolled HAZ WAZ WHZ Food onARV
2017 Oct 13
0
Populate one data frame with values from another dataframe for rows that match
Hello, Try the following. myDF1$studyno <- as.character(myDF1$studyno) myDF2$studyno <- as.character(myDF2$studyno) i1 <- which(names(myDF1) == "pf_mcl") merge(myDF1[-i1], myDF2, by = "studyno") Hope this helps, Rui Barradas Em 13-10-2017 20:09, Kevin Wamae escreveu: > I'm trying to populate the column ?pf_mcl? in myDF1 with values from myDF2, where rows