similar to: illegal data frame produced by [<-.data.frame (PR#10574)

Displaying 20 results from an estimated 10000 matches similar to: "illegal data frame produced by [<-.data.frame (PR#10574)"

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"
2008 Jan 05
3
is(x, "parent") returns FALSE when class(x) is c("child", "parent") (PR#10549)
is() does not catch parent S3 classes: > library(splines) > temp <- bs(1:99, df=5) > class(temp) [1] "bs" "basis" > is(temp, "basis") [1] FALSE In contrast, is() does catch parent S4 classes: > library(copula) > norm.cop <- ellipCopula("normal", param = c(0.5, 0.6, 0.7), + dim = 3, dispstr = "un")
2007 Nov 28
2
help("R_LIBS") brings up the wrong help file (PR#10475)
Doing help("R_LIBS") brings up a help file (the same one as help(library)), but the help file doesn't mention R_LIBS. It does have a link to .libPaths, which does document R_LIBS. The quickest fix would be for help("R_LIBS") to bring up the .libPaths help file. --please do not edit the information below-- Version: platform = i386-pc-mingw32 arch = i386 os = mingw32
2012 Nov 07
0
rJava not loading on Windows
Hi, I've successfully used it on a Linux setup, but when I try to load rJava on Windows 7 64-bit (session info below) I get: % R --vanilla > library("rJava") Error : .onLoad failed in loadNamespace() for 'rJava', details: call: dirname(this$RuntimeLib) error: a character vector argument expected Error: package/namespace load failed for 'rJava' >
2006 Mar 17
3
Open .ssc .S ... files in R (PR#8690)
----- Quick summary: In the File:Open dialog, please change "S files (*.q)" to "S files (*.q, *.ssc, *.S)" and show the corresponding files (including .SSC and .s files). ----- Background This is motivated by the following query to R-help: >Date: Thu, 16 Mar 2006 22:44:11 -0600 >From: "xpRt.wannabe" <xprt.wannabe at gmail.com> >Subject: [R] Is
2013 Feb 20
0
Simultaneously adding rows and columns by '[<-.data.frame' may fail
I saw the following in R help page "Extract.data.frame". The replacement methods can be used to add whole column(s) by specifying non-existent column(s), in which case the column(s) are added at the right-hand edge of the data frame and numerical indices must be contiguous to existing indices. On the other hand, rows can be added at any row after the current
2009 May 26
1
Bug in "$<-.data.frame" yields corrupt data frame (PR#13724)
Full_Name: Steven McKinney Version: 2.9.0 OS: Mac OS X 10.5.6 Submission from: (NULL) (142.103.207.10) A corrupt data frame can be constructed as follows: 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]
2005 Nov 09
0
R CMD Rdconv file.Rd --type=Ssgm \code{x} should use <code> (PR#8290)
I'm trying: R CMD Rdconv file.Rd --type=Ssgm If file.Rd contains \code{x} then this is currently translated as <s-expression>x</s-expression> I suggest instead translating to <code>x</code> (provided that R CMD Sd2Rd is changed to support the <code> tag; I just submitted that bug separately). Note that this is an enhancement, not a bug. This change would
2009 Sep 04
1
How should a SelfStart function handle illegal parameter values?
Hi Everyone, I'm trying to write selfStart non-linear models for use with nls. In these models some combinations of parameter values are illegal; the function value is undefined. That's OK when calling the function directly [e.g. SSmodel(x, pars...)]; I return an appropriate non-value such as NA or Inf. However, when called from nls [e.g. nls(y~SSmodel(x, pars...), ...)] those
2006 Jul 06
1
comment causes browser() to exit (PR#9063)
I'm trying to step through some code using browser(), executing one line at a time. Unfortunately, whenever I execute a comment line, the browser exits. I previously reported a similar problem with blank lines. These problems are a strong incentive to write poor code -- uncommented code with no blank lines to improve readability -- so that I can use browser() without it exiting at
2013 May 03
1
untar() error
Dear List, I have a list of 600+ *.gz files that I would like to extract and read the geotiffs contained within them. I tried using the untar() function to simplify this task but I am stumped by an error. I've combed the Internet for a solution without luck. The details are below, and any help in solving this matter is appreciated. > files = list.files(path = "J:/GIMMS/NDVI",
2013 Apr 24
1
Floating point precision causing undesireable behaviour when printing as.POSIXlt times with microseconds?
Dear list, When using as.POSIXlt with times measured down to microseconds the default format.POSIXlt seems to cause some possibly undesirable behaviour: According to the code in format.POSIXlt the maximum accuracy of printing fractional seconds is 1 microsecond, but if I do; options( digits.secs = 6 ) as.POSIXlt( 1.000002 , tz="", origin="1970-01-01") as.POSIXlt( 1.999998 ,
2008 Feb 22
0
R CMD check for glmpath on Windows (PR#10823)
The problem first appeared in R 2.6.1 and is still there in R 2.6.2 On Windows running R CMD check command for glmpath package fails. The reason seems to be that when R is running the examples file (glmpath-Ex.R), it skips about 50 lines and as a result gives a syntax error. I'm working with a modified version of the CRAN glmpath 0.94. My version happens to give a more clear example of a
2007 Sep 04
1
data.frame loses name when constructed with one column
Not sure why the data.frame function does not capture the name of the column field when its being built with only one column. Can anyone help? > data out pred1 predd2 1 1 2.0 3.0 2 2 3.5 5.5 3 3 5.5 11.0 > data1=data.frame(data[,1]) > data1 data...1. 1 1 2 2 3 3 > data1=data.frame(data[,1:2]) > data1 out pred1 1 1 2.0 2 2
2009 Aug 28
1
names<- in data.frame (PR#13916)
Full_Name: Spinu Vitalie Version: 2.9.0 OS: Windows Submission from: (NULL) (130.115.113.15) In assignment of "zero length" names to data.frame: > tdf <- data.frame(rbind(c(1, 2), c(1, 2))) > names(tdf) <- c("", "") > tdf structure(c("1", "1"), class = "AsIs") structure(c("2", "2"), class =
2009 Feb 22
1
Filtering a data frame using a string for colum header
Hi all, I was just radomly playing with R and got the following error when trying to filter a data frame using a string: > Angel <- c(7,8,6,9,10) > Buffy <- c(8,9,4,9,10) > Firefly <- c(9,9,10,10,10) > DrHorrible <- c(10,9,9,10,10) > my.df <- data.frame(Angel, Buffy, Firefly, DrHorrible) > my.df["DrHorrible"] DrHorrible 1 10 2 9 3
2008 Aug 21
2
data.frame() creates list?
I obviously don't know what I'm doing. I want to create "ByEBNum" as a data frame, but it comes out as a list. How do I make it a data frame? > EBNumStn <- c(673.65, 800, 1000, 1000, 800, 700, 600, 500, 400, 200, 50, 50 ) > ByEBNum <- data.frame(c(1:12),EBNumStn) > typeof(EBNumStn) [1] "double" > typeof(c(1:12)) [1]
2008 Feb 06
0
Suggestions for R-intro manual (PR#10701)
Some suggestions for R-intro: -------------------------------------------------- Section 9.2.2, change: (Note the function split() which produces a list of vectors obtained by splitting a larger vector according to the classes specified by a factor. This is a useful function, mostly used in connection with boxplots. See the help facility for further details.) Warning: for() loops are used in
2008 Mar 03
1
Losing attributes in data.frame() (PR#10873)
Folks: Problem: [<-.data,frame() is losing attributes under certain curcumstances shown below. I think this is a bug, at least in documentation, as I was unable to find explicit documentation of the behavior. Indeed, the only documentation I found told me attributes are preserved. Here is a detailed description: > df <- data.frame(a=1:3, b=letters[1:3]) > attr(df,"foo")
2009 Oct 21
1
formula and model.frame
Suppose I have the following function myFun <- function(formula, data){ f <- formula(formula) dat <- model.frame(f, data) dat } Applying it with this sample data yields a new dataframe: qqq <- data.frame(grade = c(3, NA, 3,4,5,5,4,3), score = rnorm(8), idVar = c(1:8)) dat <- myFun(score ~ grade, qqq) However, what I would like is for the resulting dataframe (dat) to include