similar to: inconsistency with names on call object

Displaying 20 results from an estimated 30000 matches similar to: "inconsistency with names on call object"

2009 Sep 18
1
inconsistency in attaching attributes to NULL
In R-devel (svn 49628) and back to at least R 2.7.0 we get inconsistent results when attempting to attach attributes to a variable with the value NULL. If we use attributes<- it finishes but changes the value to list(). > a<-NULL > attributes(a)<-list(attr1="First attribute", attr2=2+2i) > a list() attr(,"attr1") [1] "First
2009 Sep 18
0
Error: length(f1) == length(f2) is not TRUE (fwd)
---------- Forwarded Message ---------- Date: 18 September 2009 19:24 +0100 From: A Singh <bzwas at bristol.ac.uk> To: William Dunlap <wdunlap at tibco.com> Subject: RE: [R] Error: length(f1) == length(f2) is not TRUE Yup, they are all factors- and its still doesn't work. Getting to the stage where I can use 'summary()' is the problem- the error stalls the process before a
2018 Dec 21
0
formula(model.frame(..)) is misleading
I don't have a copy of SV4 (or SV3, where model.frame was introduced), but S+ 8.3 (based on SV4) puts the class "model.frame" on model.frame()'s return value but has no methods (in the default packages) for class "model.frame". Perhaps that is why R omitted the class. However, S+ 8.3's (and problably S's) formula.data.frame did look for a "terms"
2011 Apr 11
3
sort.int(S3object) strips class but not the is.object flag
If x has an S3 class then sort.int(x) returns a value without an S3 class but which has the is.object flag set, which, I think, causes identical() give a false/misleading report: > x <- structure(1:3, class="unrecognizedClass") > y <- sort.int(x) > t <- 1:3 > identical(y, t) # expect TRUE [1] FALSE > identical(as.vector(y), as.vector(t)) # expect
2008 Nov 03
0
row.names(data.frame(matrixWithDimnames)) depends on first (PR#13244)
On Thu, 30 Oct 2008, wdunlap at tibco.com wrote: > Full_Name: Bill Dunlap > Version: R version 2.9.0 Under development (unstable) (2008-10-29 r46795) > OS: Linux > Submission from: (NULL) (76.28.245.14) > > > When data.frame() is given a matrix with rownames, then the type of the output > row names depends on whether the first element of the input row names is ""
2009 Sep 18
1
what should names(x) be padded with when length(x) is increased?
R version 2.10.0 Under development (unstable) (2009-09-08 r49628) Here are two somewhat related questions. First, when we attach a too short names vector to a vector the names vector is padded with NA's to the length of the main vector: E.g., > x<-1:3 > names(x)<-c("One","Two") > str(x) Named int [1:3] 1 2 3 - attr(*, "names")=
2009 Nov 09
2
Negative integer subscripts in [[?
Should negative subscripts be outlawed in x[[subscript]] ? Currently, if subscript is a scalar then it can only be negative if length(x)==1 (otherwise [[ throws an error). If length(subscript)>1 then it gets treated as an attempt to recursively extract an element of a nested list. > list(10,20)[[-1]] # get the last element out of 2 [1] 20 > list(10,20,30)[[-(1:2)]] # get the last
2008 Oct 30
1
row.names(data.frame(matrixWithDimnames)) depends on first rowname being "" or not. (PR#13230)
Full_Name: Bill Dunlap Version: R version 2.9.0 Under development (unstable) (2008-10-29 r46795) OS: Linux Submission from: (NULL) (76.28.245.14) When data.frame() is given a matrix with rownames, then the type of the output row names depends on whether the first element of the input row names is "" or not. The other elements of the input row names don't affect things. E.g.,
2008 Nov 12
0
Splus-specific entries in pkg/DESCRIPTION files
In the past few years we have been working on making it possible to use packages in both R and Spotfire S+ (previously officially called S-PLUS). One problem was that certain lines in the DESCRIPTION file of a package needed to be specific to R or Spotfire S+. E.g., if your package used the xyplot() function then the package would depend upon lattice in R and trellis in Spotfire S+, or a package
2011 May 16
0
Fwd: Re: rbind with partially overlapping column names
I had meant to copy the list on this; must have hit 'Reply' instead of 'Reply All'. P Ehlers -------- Original Message -------- Subject: Re: [R] rbind with partially overlapping column names Date: Mon, 16 May 2011 11:14:11 -0600 From: Peter Ehlers <ehlers at ucalgary.ca> To: Jonathan Flowers <jonathanmflowers at gmail.com> On 2011-05-16 08:56, Jonathan Flowers wrote:
2010 Mar 12
1
symbol name caching bug: attributes get tied to symbol names
In R versions 2.10.1 and "2.11.0 Under development (unstable) (2010-03-07 r51225)" on Windows I get the following if I type the commands at the start of the session. Note how the attribute attached to the name "Response" by the initial call to structure() seems to get tied to that name for the remainder of the session: > z <- structure(quote(Response),
2009 Jun 03
1
Still can't find missing data - How do I get NA in xtabs with factors?
The problem here is Table doesn't seem to have a way to weigh the data. > ToyData Data1 Data2 Data3 Weight 101 Sam Red Banana 1.1 102 Sam Green Banana 2.1 103 Sam Blue Orange 2.1 104 Fred Red Orange 2.1 105 Fred Green Guava 2.1 106 Fred Blue Guava 2.1 107 <NA> Red Pear 50.1 108 <NA> Green Pear 50.1 109 <NA> Blue
2010 Nov 29
2
FW: how to use by() ?
Thank you for the suggestion, Bill. The result is not quite what I would like. Here's sample code for you or anyone else who may be interested: Al1 = c('A','C','C','C') Al2 = c('G','G','G','T') Freq1 = c(0.0078,0.0567,0.9434,0.9908) MAF = c(0.0078,0.0567,0.0566,0.0092) m1 = data.frame(Al1=Al1,
2010 Aug 26
1
No [[<-.factor()
Should there be a [[<-.factor() that either throws an error or acts like [<-.factor() to avoid making an illegal object of class factor? > z <- factor(c("Two","Two","Three"), levels=c("One","Two","Three")) > z [1] Two Two Three Levels: One Two Three > str(z) Factor w/ 3 levels
2011 Sep 23
1
should dir(all=TRUE) return "." and ".."?
dir(all=TRUE) returns the file names "." and ".." while dir(recursive=TRUE, all=TRUE, include.dirs=TRUE) does not. I always filter out the "." and ".." entries and was wondering if anyone would mind if dir(all=TRUE) just omitted them? It might make recursive file operations like cleaning out a directory safer, as unlink(recursive=TRUE, dir(all=TRUE,
2012 Oct 11
1
simplify2array edge case
Should simplify2array(higher=TRUE) treat 1 by 1 matrices differently than others? I expected a 3-dimensional array from all of the following 3 examples, not just the last 2. > str(simplify2array(list(array(11,c(1,1)), array(21,c(1,1))), higher=TRUE)) num [1:2] 11 21 > str(simplify2array(list(array(11:13,c(3,1)), array(21:23,c(3,1))), higher=TRUE)) int [1:3, 1, 1:2] 11 12 13 21 22
2011 Mar 25
2
two minor bugs in rowsum()
(a) In R 2.12.2 rowsum can overflow if given an integer input: > rowsum(c(2e9L, 2e9L), c("a", "a")) [,1] a -294967296 > 2^32 + .Last.value [,1] a 4e+09 Should it be changed to coerce its x argument to numeric (double precision) so it always returns a numeric output? (b) When rowsum is given an x containing both NaN and NA it appears to use the last
2011 Jan 19
1
buglet in weighted.residuals(mlmObject)
When weighted.residuals() is given a fitted model object with several responses (class mlm) and some zero weights it returns a vector instead of a matrix. It looks like it is doing resids[ weights != 0 ] instead of resids[ weights != 0, , drop=FALSE] in the multi-response case. E.g., > d4 <- data.frame(y1=1:4, y2=2^(0:3), wt=log(1:4), fac=LETTERS[c(1,1,2,2)]) > fit <-
2011 Sep 01
1
"\088" is legal syntax?
Is it intentional that the digit 8 is allowed in octal escape sequences in character literals? > "\110" == "\088" [1] TRUE > "\8" == "\b" [1] TRUE 9's are rejected, so I'd expected 8's to be illegal as well. > "\9" Error: '\9' is an unrecognized escape in character string starting "\9" >
2010 Mar 12
1
problem with parse(text=quote(name))
Calling parse(text=quote(name)) or text=as.name("name") makes parse() prompt for input from the command line and then it returns a parse of the initial characters of 'name' (depending on how many characters were typed at the prompt). E.g., > parse(text=quote(myName)) ?1/3 expression(myN) attr(,"srcfile") <text> >