similar to: Bug in "$<-.data.frame" yields corrupt data frame (PR#13724)

Displaying 20 results from an estimated 5000 matches similar to: "Bug in "$<-.data.frame" yields corrupt data frame (PR#13724)"

2009 Apr 29
1
Corrupt data frame construction - bug?
Hi useRs, A recent coding infelicity along these lines yielded a corrupt data frame. foo <- matrix(1:12, nrow = 3) bar <- data.frame(foo) bar$NewCol <- foo[foo[, 1] == 4, 4] bar lapply(bar, length) > foo <- matrix(1:12, nrow = 3) > bar <- data.frame(foo) > bar$NewCol <- foo[foo[, 1] == 4, 4] > bar X1 X2 X3 X4 NewCol 1 1 4 7 10 <NA> 2 2 5 8 11
2015 Jun 08
2
Bug in loadNamespace?
I am seeing very strange behaviour in R 3.2.0 patched (r68272) and a new build of R-devel. The sessioninfo() from the former is below. Here's what I see: If I set the locale, and trigger a namespace load, a version comparison gives NA, and I get an error. For example, in a new session started with R --vanilla from the terminal: > Sys.setlocale(locale='en_US.UTF-8');grid::gpar()
2007 Aug 03
4
FW: Selecting undefined column of a data frame (was [BioC] read.phenoData vs read.AnnotatedDataFrame)
Hi all, What are current methods people use in R to identify mis-spelled column names when selecting columns from a data frame? Alice Johnson recently tackled this issue (see [BioC] posting below). Due to a mis-spelled column name ("FileName" instead of "Filename") which produced no warning, Alice spent a fair amount of time tracking down this bug. With my fumbling fingers
2013 Feb 08
2
Can not melt data.frame
I realize it's -12C and we're having the next best thing to a blizzard but why can I not melt this data frame. I am missing something terribly obvious but I just don't understand what the error message is saying. John Kane Kingston ON Canada Code and aata below #================================================# library(reshape2) melt(mydata, id.vars = c("date"))
2015 Jun 08
3
Bug in loadNamespace?
On 07/06/2015 9:14 PM, Dirk Eddelbuettel wrote: > > On 7 June 2015 at 20:46, Duncan Murdoch wrote: > | I am seeing very strange behaviour in R 3.2.0 patched (r68272) and a new > | build of R-devel. The sessioninfo() from the former is below. > | > | Here's what I see: If I set the locale, and trigger a namespace load, a > | version comparison gives NA, and I get an
2012 Jan 18
1
png cairo device problems on Mac 10.6.8
Hi all, I have been having problems generating png files on a Mac running OS X 10.6.8. Here's a simple example > png("foo.png", type = "cairo"); plot(1:10); dev.off(); null device 1 libpng warning: Application built with libpng-1.2.26 but running with 1.5.2 The resultant file is of size 0 Kb. Is this the proper place to report this issue? Or should
2010 May 17
1
suggestions/improvements for recoding strategy
I am recoding some data. Many values that should be 1.5 are recorded as 1-2. Some example data and my solution is below. I am curious about better approaches or any other suggestions. Thanks! # example input data myData <- read.table(textConnection("id, v1, v2, v3 a,1,2,3 b,1-2,,3-4 c,,3,4"),header=TRUE,sep=",") closeAllConnections() # the first column is IDs so remove
2007 May 17
1
model.matrix bug? Nested factor yields singular design matrix.
Hi all, I believe this is a bug in the model.matrix function. I'd like a second opinion before filing a bug report. If I have a nested covariate B with multiple values for just one level of A, I can not get a non-singular design matrix out of model.matrix > df <- data.frame(A = factor(c("a", "a", "x", "x"), levels = c("x",
2009 Jun 02
2
formal argument "envir" matched by multiple actual arguments
Hi list, This looks similar to the problem reported here https://stat.ethz.ch/pipermail/r-devel/2006-April/037199.html by Henrik Bengtsson a long time ago. It is very sporadic and non-reproducible. Henrik, do you remember if your code was using reg.finalizer()? I tend to suspect it but I'm not sure. I've been hunting this bug for months but today, and we the help of other Bioconductor
2018 Apr 15
0
Adding a new conditional column to a list of dataframes
> On Apr 15, 2018, at 4:08 AM, Allaisone 1 <Allaisone1 at hotmail.com> wrote: > > > Hi all .., > > > I have a list of 7000 dataframes with similar column headers and I wanted to add a new column to each dataframe based on a certain condition which is the same for all dataframes. > > > When I extract one dataframe and apply my code it works very well as
2018 Apr 15
4
Adding a new conditional column to a list of dataframes
Hi all .., I have a list of 7000 dataframes with similar column headers and I wanted to add a new column to each dataframe based on a certain condition which is the same for all dataframes. When I extract one dataframe and apply my code it works very well as follows :- First suppose this is my first dataframe in the list > OneDF <- Mylist[[1]] > OneDF ID Pdate
2012 Dec 15
3
Cannot build custom locale with utf-8 charset
I am trying, without success, to compile a custom locale for the utf-8 character set. I have issued this command: localedef --no-archive -f UTF-8 -i /usr/share/i18n/locales/en_CA at yyyy-mmm-dd en_CA at yyyy-mmm-dd.utf8 which produces the requisite files without reporting an error but which none-the-less insists on using the iso-8859-1 charset: LC_ALL=en_CA at yyyy-mm-dd locale charmap
2015 Jun 08
0
Bug in loadNamespace?
On 7 June 2015 at 20:46, Duncan Murdoch wrote: | I am seeing very strange behaviour in R 3.2.0 patched (r68272) and a new | build of R-devel. The sessioninfo() from the former is below. | | Here's what I see: If I set the locale, and trigger a namespace load, a | version comparison gives NA, and I get an error. For example, in a new | session started with R --vanilla from the terminal: |
2010 Aug 18
2
'panel.smooth' error
Hi, The following call: xyplot(incidence ~ year, melanoma, panel=panel.smooth) produces a blank plot region with an error message: Error using packet 1 plot.new has not been called yet > sessionInfo() R version 2.11.1 (2010-05-31) x86_64-pc-linux-gnu locale: [1] LC_CTYPE=en_CA.UTF-8 LC_NUMERIC=C LC_TIME=en_CA.UTF-8 LC_COLLATE=en_CA.UTF-8 LC_MONETARY=C
2009 Nov 02
1
two small wishes (with code sugegstions) for R-core
Dear R developers, It would be great if you could implement the two minor code changes suggested below, which would help processing large objects in R. Jens Oehlschl?gel # Wish no. 1: let [.AsIs return the class AFTER subsetting, not the class of the original object # Wish no. 2: adjust write.csv and write.csv2 for multiple calls in chunked writing # Rationale no. 1: a couple of packages
2007 Jun 27
1
error message from lmer
Hi, I've begun to use the lme4 package, rather than nlme, for more flexibility during modelling, and running the examples in lmer I receive this error message: ---<---------------cut here---------------start-------------->--- R> (fm1 <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy)) Error in printMer(object) : no slot of name "status" for this object of class
2008 Jul 01
1
[.data.frame speedup
Below is a version of [.data.frame that is faster for subscripting rows of large data frames; it avoids calling duplicated(rows) if there is no need to check for duplicate row names, when: i is logical attr(x, "dup.row.names") is not NULL (S+ compatibility) i is numeric and negative i is strictly increasing "[.data.frame" <- function (x, i, j,
2024 Apr 25
1
[External] View() segfaulting ...
I saw it also on some of my Ubuntu builds, but the issue went away after a make clean/make, so maybe give that a try. Best, luke On Wed, 24 Apr 2024, Ben Bolker wrote: > I'm using bleeding-edge R-devel, so maybe my build is weird. Can anyone > else reproduce this? > > View() seems to crash on just about anything. > > View(1:3) > *** stack smashing detected ***:
2006 Oct 27
2
POSIXct time zone and daylight savings issues
Hello, Suppose we need a function that takes a POSIXct object and need to calculate the time difference between it and GMT time: gmtDiff <- function(time) { time.gmt <- as.POSIXct(format(time, tz="GMT")) time.plt <- as.POSIXlt(time) dlstime <- ifelse(time.plt$isdst > 0, 1, 0) timezone <- as.numeric(difftime(time, time.gmt, units="hours"))
2011 Dec 09
3
bug in sum() on integer vector
Hi, x <- c(rep(1800000003L, 10000000), -rep(1200000002L, 15000000)) This is correct: > sum(as.double(x)) [1] 0 This is not: > sum(x) [1] 4996000 Returning NA (with a warning) would also be acceptable for the latter. That would make it consistent with cumsum(x): > cumsum(x)[length(x)] [1] NA Warning message: Integer overflow in 'cumsum'; use