similar to: NA rownames in dataframes

Displaying 20 results from an estimated 10000 matches similar to: "NA rownames in dataframes"

2002 Aug 13
2
Misalignment of <NA> in rownames (PR#1905)
An NA in the rownames of a matrix (or dataframe) causes misalignment when the matrix is printed: R> x <- matrix(1:12, 3,4, dimnames=list(letters[1:3], LETTERS[1:4])) R> rownames(x)[2] <- NA R> x A B C D a 1 4 7 10 <NA> 2 5 8 11 c 3 6 9 12 The bug is in function Rstrlen, in src/main/printutils.c. MatrixRowLabel and MatrixColumnLabel (same file) rely on Rstrlen
2002 Aug 01
1
Non-alignment of <NA> in rownames
Hello everyone, Apologies in advance if you have received this multiple times! On a thread similar to that posted by Don MacQueen (http://www.r-project.org/nocvs/mail/r-help/2002/3455.html): is there any way to nicely format NA's when listed as rownames? When NA's are part of rownames, the alignment is thrown off: > z <- matrix(c(100, 200, 300)) > z [,1] [1,] 100 [2,]
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.,
2002 Jul 15
1
Suppressing "creating new generic" and "expanding the signature" messages
Hi all, I am building a R package which defines a class. I have overloaded methods for this class using setMethod, and now, when I require my package, I get diagnostic messages. setMethod("[", signature(x = "portfolio"), function(x, i, j, ...) { # ... }) > require(portfolio) Loading required package: portfolio [... loading other required packages ...] Creating a new
2002 Jun 25
5
Sourcing files with library
Hi everyone, I have written a class with methods that extend generic functions such as as.data.frame or show. When I load this package, I want to ensure that these methods - along with the other functions in the file - are added to R's search path or updated, if necessary. I have made a package using check/build/INSTALL. Will a simple library() call on the package accomplish this? I
2002 Apr 30
3
rbind'ing empty rows in dataframes in 1.4.1 versus 1.5.0
Hi, In 1.4.1, I was able to create extra "empty" rows in a dataframe as so: > x <- data.frame(a = letters[1:3], b = 1:3) > x a b 1 a 1 2 b 2 3 c 3 > x[4,] a b NA NA NA > rbind(x, x[4,]) a b 1 a 1 2 b 2 3 c 3 NA NA NA > R.version _ platform sparc-sun-solaris2.6 arch sparc os solaris2.6
2002 May 20
0
is.na<- coerces character vectors to be factors within dataframes (PR#1577)
I am not sure if this is a bug within is.na<- or if it lies deeper in the dataframe construction process. Indeed, perhaps it is not a bug at all (in which case I would suggest that the help page for NA be provided with a warning for unsuspecting users (like me)). When used on a character vector within a dataframe, is.na<- coerces the vector to factor. > x <- data.frame(var =
2002 Apr 30
2
display of character NA's in a dataframe in 1.5.0
I understand that NA's in character vectors are displayed differently than NA's in factor vectors. > c("x", NA, "y") [1] "x" NA "y" > as.factor(c("x", NA, "y")) [1] x <NA> y Levels: x y That seems sensible enough. But shouldn't I see the same behavior in a dataframe? > test <- data.frame(a =
2002 May 11
1
vector(NA, 3) (PR#1541)
I don't seem to be able to initialize a vector of NAs. I hope this is a bug and not a new feature (I realize I have not paid much attention to a lot of recent discussion about NA): platform sparc-sun-solaris2.6 arch sparc os solaris2.6 system sparc, solaris2.6 status major 1 minor 5.0 year
2002 Aug 15
1
order(1, na.last=NA) fails (PR#1913)
R> order(1, na.last=NA) Error in apply(sapply(z, is.na), 1, any) : dim(X) must have a positive length This bug appears unrelated to PR#1906, and so the fix of 8/15 doesn't help. It comes from the line inside order(): ok <- !apply(sapply(z, is.na), 1, any) where z=list(1) in my example. sapply() returns a single-element vector, not a matrix, making apply() unhappy. This might
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 ""
2016 Dec 11
2
TableGen - Help to implement a form of gather/scatter operations for Mips MSA
Hello. Will, thanks a lot for pointing me to the MaskedGatherSDNode and mgatherv4i32. I have to say that the definition of the "multiclass avx512_gather" from lib/Target/X86/X86InstrAVX512.td is difficult to follow and I prefer not to use it. I currently have some serious problems with TableGen - it gives an assertion failure:
2001 Sep 26
1
Characters vectors, NA's and "" in merges
I often use merge with dataframes that contain character vectors which have elements that are sometimes "NA" (meaning the string NA, not the same thing, obviously, as NA in a numeric or factor vector). For example, the stock ticker for Nabisco was "NA". Unfortunately (for me), it seems like merge insists on inserting "NA" for missing values. My question: Is there some
2010 Sep 16
2
question about converting a matrix to a dataframe
First I have a matrix called stocks1: > class(stocks1) [1] "matrix" Here are the first 5 rows of the last 4 columns: > stocks1[1:5,2:5] [,1] [,2] [,3] [,4] [1,] 80.73 31.95 25.4 25.69 [2,] 83.66 31.95 27.12 25.2 [3,] 83.27 32.93 28.74 26.29 [4,] 83.9 34.07 29.77 26.6 [5,] 82.74 35.18 30.24 27.41 Now, why can't I convert this into a dataframe?
2003 Mar 05
1
printing POSIXct values in table labels
Hi, I think that there is something that I am misunderstanding in creating tables using dates that are of class POSIXct. Consider: > x <- data.frame(date = as.POSIXct(strptime(c(rep("2002-10-17", 4), rep("1999-12-08", 2)), format = "%Y-%m-%d"))) > x date 1 2002-10-17 2 2002-10-17 3 2002-10-17 4 2002-10-17 5 1999-12-08 6 1999-12-08 > table(x$date)
2016 Dec 12
0
TableGen - Help to implement a form of gather/scatter operations for Mips MSA
Hello. I wanted to inform that I fixed the bug from the previous email. The main reason for the bug was that I thought that the SDNode masked_gather is returning only 1 value, but it returns 2 (hence, I guess, the earlier reported, difficult to follow, error: "Assertion `New->getNumTypes() == 1"). masked_gather returns 2 values because: // SDTypeProfile -
2002 May 29
1
warning message for setAs when using class AsIs
This seemed too advanced for r-help and is related to the recent discussion of character vectors in dataframes. Following Brian Ripley's most excellent advice, we are moving to a world in which character vectors in dataframes are always of class AsIs. The cool way of doing this seemed to be the following: > cat(c("x", "y", "z"), file = "test.txt",
2000 Jul 05
2
eigen function on Solaris2.6 (PR#595)
Full_Name: Sharon Kuhlmann Version: 0.99 OS: solaris2.6 Submission from: (NULL) (129.16.167.231) When I use the function > eigen(x), it gives me a "Process R bus error", and the program quits. I'm running the following R version: platform sparc-sun-solaris2.6 arch sparc os solaris2.6 system sparc, solaris2.6 status Patched
2000 Jan 11
1
Figure margins too large
I seem to remember an error like this being mentioned before, but if it wasn't: > zz <- density(rnorm(100)) > plot(zz) Error in plot.new() : Figure margins too large > version _ platform sparc-sun-solaris2.6 arch sparc os solaris2.6 system sparc, solaris2.6 status major 0 minor 90.1 year 1999 month December day 15 language R Paul Gilbert
2003 Apr 28
1
ylab in time series plot (PR#2869)
You get a warning message when you specify a ylab parameter while plotting data whose x's are POSIXct values. Apparently the `axis.POSIXct' method tries to reset the ylab---via the ... parameter---after it has already been set by higher level methods. Here is a function that illustrates the problem. ylabProblem <- function() { x <- ISOdate(2003, 4, 1:10) # POSIXct