similar to: data.frame as argument to data.frame

Displaying 20 results from an estimated 80000 matches similar to: "data.frame as argument to data.frame"

2003 Oct 27
2
[[<-.data.frame with POSIXt replacement (PR#4808)
Hi, The following seems to be a bug introduced with version 1.8.0 (it worked without error on my installation of version 1.7.0): > test <- data.frame(time = I(c("2003-08-19:22:55:57"))) > test[["time"]] <- strptime(test[["time"]], format = "%Y-%m-%d:%H:%M:%S") Error in "[[<-.data.frame"(`*tmp*`, "time", value =
2003 Feb 01
2
Apparent parser problem (PR#2520)
Let me first admit: I am experiencing this bug on a precompiled binary of R for windows, and I know these are not supported. I am not asking for support, but I thought the R developers would want to know about this. # Define: foo.page <- function(x) x # Then, foo.page("a") # actually invokes the pager (!) on object named "a" (if one is defined). # same thing happens
2002 Sep 11
1
.Renviron and Renviron.site (on Windows XP)
Hello, Could someone please tell me why the following doesn't work: I have a file C:\Program Files\R\rw1051\etc\Renviron.site, which contains the line: R_LIBS= "C:/Jim/LocalR-Libraries/FromCran"; "C:/Jim/LocalR-Libraries/Cantata" >From the documentation, I gather that I have put this file in the default location, but to be safe I also explicitly set the R_ENVIRON
2002 Dec 06
2
Mutiple page trellis plots with relation = "free" or "sliced"
Hello, Has anyone out there encountered a problem like this: xyplot(Plasma ~ Serum | Analyte, data = sp.df, aspect = 1, layout = c(1, 1, 200), scales = list(relation = "free") ) Gives the error: Error in pretty(x[is.finite(x)], ...) : x must be numeric On the other hand, this works (but I don't want the default of having everything on the same
2003 Apr 29
1
Specifying search position for attached package
When I load an add-on package, is there any way to specify where it ends up in the search path (as with the pos argument to attach())? From the documentation for library(), this doesn't seem like an option. (I know I can detach packages and then reload them in the order I want; I'm looking for a less clumsy way.) Thanks, Jim James A. Rogers, Ph.D. <rogers at cantatapharm.com>
2006 Nov 10
1
Problem with as.data.frame when an extra attribute is present
I have a problem when one of the vectors in a list needs to be replicated to have the appropriate length, and an attribute is present. > w <- list(a=1, b=2:3) > as.data.frame(w) a b 1 1 2 2 1 3 > attr(w$a,'label') <- 'foo' > as.data.frame(w) Error in data.frame(a = 1, b = c(2, 3), check.names = TRUE) : arguments imply differing number of rows:
2003 Oct 28
0
data.frame replacement (PR#4820)
When replacing all elements of a column in a data.frame, a corrupt data.frame will be generated if the replacer is "short": test> bbb <- data.frame( x=1:2) test> bbb[,'x'] <- 3 # should fill the column test> bbb x 1 3 2 <NA> Warning message: corrupt data frame: columns will be truncated or padded with NAs in: format.data.frame(x, digits = digits)
2007 Dec 10
2
bug in by.data.frame, R-2.6.1 (PR#10506)
by() fails for 1-column matrices and dataframes: X <- data.frame(a=1:10) g <- gl(2,5) by(X, g, colMeans) Suggested fix: --- by-old.R 2007-12-10 15:26:22.501086600 +0100 +++ by.R 2007-12-10 15:25:58.390477200 +0100 @@ -26,7 +26,7 @@ IND[[1]] <- INDICES names(IND) <- deparse(substitute(INDICES))[1] } else IND <- INDICES - FUNx <-
2019 Sep 11
0
'==' operator: inconsistency in data.frame(...) == NULL
>>>>> Hilmar Berger >>>>> on Wed, 4 Sep 2019 15:25:46 +0200 writes: > Dear all, > I just stumbled upon some behavior of the == operator which is at least > somewhat inconsistent. > R version 3.6.1 (2019-07-05) -- "Action of the Toes" > Copyright (C) 2019 The R Foundation for Statistical Computing > Platform:
2002 Sep 12
0
(PR#2005) R_HOME/etc/Renviron.site not interpreted on windows
ligges@statistik.uni-dortmund.de wrote: > > Was on R-help: > > Subject: Re: [R] .Renviron and Renviron.site (on Windows XP) > Date: Thu, 11 Sep 2002 > From: "James Rogers" <jrogers@cantatapharm.com> > > At least on the windows version of R the file > ...../etc/Renviron.site > won't be interpreted as mentioned in, e.g., ?.Renviron. >
2003 Oct 17
1
as.matrix does not turn data frame into character matrix
The as.matrix function behaves in a puzzling manner. The help file says: "`as.matrix' is a generic function. The method for data frames will convert any non-numeric column into a character vector using `format' and so return a character matrix." But this does not appear to be the case in the following example. Instead, as.matrix turns a data.frame into a list, not a
2019 Sep 18
0
'==' operator: inconsistency in data.frame(...) == NULL
>>>>> Martin Maechler >>>>> on Wed, 18 Sep 2019 10:35:42 +0200 writes: >>>>> Hilmar Berger >>>>> on Sat, 14 Sep 2019 13:31:27 +0200 writes: >> Dear all, >> I did some more tests regarding the == operator in Ops.data.frame (see >> below).? All tests done in R 3.6.1
2008 Jan 14
0
illegal data frame produced by [<-.data.frame (PR#10574)
> x <- data.frame(a=1:3,b=2:4) > x[,3] <- x Warning message: In `[<-.data.frame`(`*tmp*`, , 3, value = list(a = 1:3, b = 2:4)) : provided 2 variables to replace 1 variables > x a b a.1 b.1 1 1 2 1 NULL 2 2 3 2 <NA> 3 3 4 3 <NA> Warning message: In format.data.frame(x, digits = digits, na.encode = FALSE) : corrupt data frame: columns will be truncated or
2010 Dec 23
2
data frame with nested data frame
Dear R-users, I am somewhat puzzled by how R treats data frames with nested data frames. Below are a couple of examples, maybe someone could help explain what the guiding logic here is. ## construct plain data frame > z <- data.frame(x=1) ## add a data frame member > z$y <- data.frame(a=1,b=2) ## puzzle 1: z is apparently different from a straightforward construction of the
2006 Nov 07
0
rbind with auto-row-named data.frame + list (PR#9346)
There's a problem new to R2.4.0 when rbinding an auto-row-named data.frame to a list: > rbind( data.frame( x=1), list( x=2)) Error in attr(value, "row.names") <- rlabs : row names must be 'character' or 'integer', not 'double' Works OK with 2 data.frames or 2 lists. Mark Bravington CSIRO Mathematical & Information Sciences Marine
2008 Aug 20
0
row.names in data.frame with row.names NULL
Dear R-devel, It appears that data.frame ignores row.names=NULL argument if it can guess the names from the first column. This behavior seems to contradict what the help page says, see the last sentence: If row names are not supplied in the call to 'data.frame', the row names are taken from the first component that has suitable names, for example a named vector or a matrix
2009 Oct 19
0
weird warning in [.data.frame with 2.10
I'm getting the following warnings under 2.10 v50082 but not v49613 >> In addition: Warning messages: 1: In `[.data.frame`(df, -(1:nrow(df)), , drop = FALSE) : named arguments other than 'drop' are discouraged 5: In `[.data.frame`(object, !omit, , drop = FALSE) : >> named arguments other than 'drop' are discouraged In neither case are there any named arguments,
2008 Feb 09
1
bad variable names when printing a data frame containing a matrix (PR#10730)
library(glmpath) data(heart.data) # heart.data is a list, $y a vector, $x a matrix data <- data.frame(x=I(heart.data$x), y = heart.data$y) > data[1:2,] x.1 x.2 x.3 x.4 x.5 x.6 x.7 x.8 x.9 y 1 160 12 5.73 23.11 1 49 25.3 97.2 52 1 2 144 0.01 4.41 28.61 0 55 28.87 2.06 63 1 > dimnames(heart.data$x)[[2]] [1] "sbp"
2016 May 31
2
data.frame colname igraph
Estimados Tengo un problema, creo que sencillo, pero hay algo que hice mal, coloco el código, básicamente desde igraph se realiza un análisis, y se me ocurre tener un data.frame para ordenar los resultados, pero justo en ese punto aparece un problema. ¿Alguna sugerencia? > version _ platform x86_64-w64-mingw32 arch x86_64
2011 Aug 31
1
Convert List of Data.Frames to Data.Frame when List has NULL
Dear R gurus, I trying to convert a list of data frames to one data frame, but one of the values within the list is NULL, so I get the error "arguments imply differing number of rows." Do you know of a quick way to tell R to combine all that are not null? Here is a simple example: >