similar to: " Error in "names<-.default"

Displaying 20 results from an estimated 10000 matches similar to: "" Error in "names<-.default""

2006 Oct 04
2
convert vector to matrix
Hi All, I have vector containing 10 elements(odservations). I need to put this into a matrix, where the matrix should contain only one column. I need this to be done using the cbind command because in the final table I should have a column of attributes( from adifferent vector) and a column of vectors from the matrix above Please suggest me how this can be done Thanks and
2006 Sep 26
2
creation of new variables
Hello All, I have 8 variables named a b c d e f g h I need to create four variables from these 8 vraibles in R. the new variables are ab,cd,ef,gh. Can anyone pleas help me thanks, Pratap --------------------------------- [[alternative HTML version deleted]]
2006 Oct 31
3
one problem about how to hold graphic with R
Sorry to disturb you, but can you help me to solve one little problem? I want to draw a graphic after another with R but I cannot find the first one after that. Do you know the command to hold the graphic with R? I remember with Matlab you may use "hold on". Thanks. -- Baohua Yang Email:yangbaohua@gmail.com [[alternative HTML version deleted]]
2004 Nov 04
3
sub- and superscript in plot labels
Dear List, I need to add a subscript and a superscript to some of the ions in the labels on some plots. I have got to here but now I'm stuck: plot(1:10, xlab = expression(paste("nm SO"[4], " ", mu, "eq cm"^{-2}, " yr"^{-1}))) Which gives almost what I require. No matter what I tried, however, I could not get bot a sub script *and* a superscript
2005 Aug 16
2
problem using model.frame()
Hi I'm having a problem with model.frame, encapsulated in this example: y1 <- matrix(c(3,1,0,1,0,1,1,0,0,0,1,0,0,0,1,1,0,1,1,1), nrow = 5, byrow = TRUE) y1 <- as.data.frame(y1) rownames(y1) <- paste("site", 1:5, sep = "") colnames(y1) <- paste("spp", 1:4, sep = "") y1 model.frame(~ y1) Error in model.frame(formula, rownames,
2005 Nov 03
4
merging dataframes
Dear List, I often have to merge two or more data frames containing unique row names but with some columns (names) common to the two data frames and some columns not common. This toy example will explain the kind of setup I am talking about: mat1 <- as.data.frame(matrix(rnorm(20), nrow = 5)) mat2 <- as.data.frame(matrix(rnorm(20), nrow = 4)) rownames(mat1) <- paste("site",
2005 Aug 16
4
as.character and a formula
Dear list, given this formula: > fmla <- formula(y1 ~ spp1 + spp2 + spp3 + spp5) > fmla[[3]] spp1 + spp2 + spp3 + spp5 is this the intended behaviour of as.character: > as.character(fmla[[3]]) [1] "+" "spp1 + spp2 + spp3" "spp5" ? Where does the extra "+" come from? > as.character(fmla) [1] "~"
2008 Jan 29
1
Form Pairs of Variables for a paired t-test
Hi Users, This is regarding the paired t-test. I have 5 variables (say) Data$v1,Data$v2,Data$v3,Data$v4,Data$v5 in my data frame. Now, I need to perform a paired t-test on all the possible 10 pairs.How do I set up the pairs table directly and pass those variables in to t-test. Thanks in advance, Pratap --------------------------------- Now you can chat without
2005 Aug 03
1
deparse(substitute(x)) and S3 methods
Dear List, I have the following function: coca <- function(x, ...) { if(is.null(class(x))) class(x) <- data.class(x) UseMethod("coca", x) } and a default method coca.default <- function(x, y, method = c("predictive", "symmetric"), reg.method = c("simpls", "eigen"), weights = NULL,
2005 Aug 02
1
problem using evaluating a formula
##data y1 <- matrix(c(3,1,0,1,0,1,1,0,0,0,1,0,0,0,1,1,0,1,1,1), nrow = 5, byrow = TRUE) y2 <- matrix(c (3,0,10,3,3,0,0,1,1,0,0,0,0,0,1,0,1,0,0,2,1,0,1,1,0,2,1,1,4,1), nrow = 5, byrow = TRUE) y1 <- as.data.frame(y1) y2 <- as.data.frame(y2) rownames(y1) <- rownames(y2) <- paste("site", 1:5, sep = "") colnames(y1) <-
2003 Feb 11
1
Dynamic Linear Models for Times Series - Implemented?
Hi, I was wondering whether a package that can perform dynamic linear models on times series data was available for R? Many Thanks, Gavin Simpson %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% Gavin Simpson [T] +44 (0)20 7679 5522 ENSIS Research Fellow [F] +44 (0)20 7679 7565 ENSIS Ltd. & ECRC [E] gavin.simpson at
2005 Apr 06
1
axis.Date problem, bug(?)
Dear List, I have the following problem with axis.Date, here is an artificial example: dates <- scan(what = "character") "25/03/2000" "26/03/2000" "27/03/2000" "28/03/2000" "29/03/2000" "30/03/2000" "31/03/2000" "01/04/2000" "02/04/2000" "03/04/2000" "04/04/2000"
2006 Sep 19
4
How to draw a per mille symbol?
Dear list, Following advice posted to this list a while back by Prof Ripley [1], I have been trying to draw a per mille character [2] in an axis label. This should give the correct character: plot(1:10, ylab = "\u2030") but all I get is '"S'. I'm running linux (FC5) and have fonts installed that have the correct character (viewed in the Gnome character map at least).
2006 Mar 11
6
is there a formatted output in R?
something like "sprintf" in C? so I can do: print(sprintf("the correct result is %3.4f\n", myresult)); ------- Also, I am desperately looking for a "clear console screen" function in R... thanks a lot! [[alternative HTML version deleted]]
2005 Aug 17
3
do glm with two data sets
I have two data sets: File1.txt: Name id1 id2 id3 ... N1 0 1 0 ... N2 0 1 1 ... N3 1 1 -1 ... ... File2.txt: Group id1 id2 id3 ... G1 1.22 1.34 2.44 ... G2 2.33 2.56 2.56 ... G3 1.56 1.99 1.46 ... ... I like to do: x1<-c(0,1,0,...) y1<-c(1.22,1.34, 2.44, ...)
2006 Jan 21
1
Bug in xy.coords() or documentation error?
Hi, I noticed the following problem with xy.coords() in R 2.2.1-patched (version info at the foot of this email) and R 2.3.0 unstable (subversion no: r37123): > xy.coords(x = matrix(1:20, ncol = 2)) Error in xy.coords(x = matrix(1:20, ncol = 2)) : argument "y" is missing, with no default > xy.coords(x = matrix(1:20, ncol = 2), y = NULL) $x [1] 1 2 3 4 5 6 7 8 9
2003 Apr 03
1
ts function
hello I read "Practical Time Series" (Gareth Janacek; 2001) and they presented e.g the smoothing functions msmooth(x,k) or the bivariate function crosscorr(x,y,k), but both didn't work on my machine. I only load the ts library, is another library necessary or did this function change since 2001? Is there a more recent and detailed manual for ts? thanks, cheers Martin -- Martin
2004 Jun 08
2
Computting statistics on a matrix with 2 factor column
Hello, I suppose this is a basic question but couldn't find a solution.: I have a large matrix with let say 3 columns: V1 V2 V3 a x 2 a x 4 a y 8 b z 16 and I want to compute some statistics based on the levels resulting form the combination of the two first columns e.g.: SUM-> V1 V2 V3 a x 6 a y 8 b z 16 Thanks for your hints . Marc
2004 Jun 11
2
Sweave and multiple graphs
Dear list, I am using Sweave to build a small report. I want to produce a series of figures, each figure containing a number of plots and then have them included in the Sweave file. An example would be to : postscript(file = "ANCbwplot%03d.eps", onefile = FALSE, other options...) oldpar <- par(mfrow = c(2,2)) .... do lots of plots to produce a number of eps files .... par(oldpar)
2007 Oct 10
2
Deleting the White Space in an R graph
Hi All, Is there a way we can delete the empty white space around when we generate any graph/map using R? The final output should be onaly a picture with no white spaces all around. Cheers, Pratap --------------------------------- 5, 50, 500, 5000 - Store N number of mails in your inbox. Click here. [[alternative HTML version deleted]]