Re: [R] return unique values from date/time class object

2005-08-15 Thread Prof Brian Ripley
On Tue, 16 Aug 2005, McClatchie, Sam (PIRSA-SARDI) wrote: > Background: > OS: Linux Mandrake 10.1 > release: R 2.1.1 > editor: GNU Emacs 21.3.2 > front-end: ESS 5.2.3 > - > > Thanks to Brian Ripley (I've upgraded from source, thanks for the reminder) > and Petr Pika

Re: [R] How to repeat code snippet for several variables in a data frame?

2005-08-15 Thread Uwe Ligges
Sander Oom wrote: > Dear all, > > I have a data frame containing the results of an experiment. Like this: > > a<-seq(1,4,by=1) > b<-seq(1,2,by=1) > test<-expand.grid(b,a,a) > colnames(test)<-c("replicates","bins", "groups") > test$abc <- rnorm(32) > test$def <- rnorm(32) > test$ghi <- rnorm(32)

Re: [R] How to repeat code snippet for several variables in a data frame?

2005-08-15 Thread Sean O'Riordain
Sander, consider writing a function to do your plotting, then pass in the dataframe name so... something along the lines of... # create a function which takes two arguments # mydf - a dataframe of a particular format... eg. the abc column is number 4 # i the column we want to aggregate and plot t

Re: [R] Extracting some rows from a data frame - lapses into a vector

2005-08-15 Thread Dieter Menne
Ajay Narottam Shah mayin.org> writes: > > I have a data frame with one column "x": > > > str(data) > `data.frame': 20 obs. of 1 variable: > $ x: num 0.0495 0.0986 0.9662 0.7501 0.8621 ... > Here, it looks like the operation > data[1:10,] > has converted it from type data frame i

[R] Extracting some rows from a data frame - lapses into a vector

2005-08-15 Thread Ajay Narottam Shah
I have a data frame with one column "x": > str(data) `data.frame': 20 obs. of 1 variable: $ x: num 0.0495 0.0986 0.9662 0.7501 0.8621 ... Normally, I know that the notation dataframe[indexes,] gives you a new data frame which is the specified set of rows. But I find: > str(data[1:10,]) num

[R] merge warning is.na(out$h)

2005-08-15 Thread Fulton, Brent
Hi, Does anyone know how to interpret this merge warning and whether it's critical to fix? The merge seemed to work fine, but I am concerned. data3<-merge(data1, data2, by="ID", all=TRUE) Warning messages: 1: is.na() applied to non-(list or vector) in: is.na(out$h) Error in cat(list(...), fi

[R] Image from bytes streams

2005-08-15 Thread Márcio de Medeiros Ribeiro
Hello! I'm trying to get an array of bytes from graphic images generated by R. Here, you can see my Java code: -- Process p = Runtime.getRuntime().exec("C:/Arquivos de programas

[R] data manipulation help

2005-08-15 Thread roberto munguia
Hellow everybody, I have a dataframe with 468 individuals (rows) that I captured at least once during 28 visits (columns), it looks like: mortality[1:10,] X18.10.2004 X20.10.2004 X22.10.2004 X24.10.2004 X26.10.2004 X28.10.2004 X30.10.2004 X01.11.2004 X03.11.2004 X07.11.2004 1

[R] Conditional Matrices

2005-08-15 Thread ISAIAH SHALWITZ
This seems like a simple problem but I can't figure it out: I have two identical DIMENSION matrices. Both contain only binary values NOT identical between matrices. What I want to do: If in cell (1,1) the value in the first matrix (x) equals 1, then I keep the value in cell (1,1) in the secon

[R] return unique values from date/time class object

2005-08-15 Thread McClatchie, Sam (PIRSA-SARDI)
Background: OS: Linux Mandrake 10.1 release: R 2.1.1 editor: GNU Emacs 21.3.2 front-end: ESS 5.2.3 - Thanks to Brian Ripley (I've upgraded from source, thanks for the reminder) and Petr Pikal for their suggestions, but I have not made clear the form of my data: Bro

Re: [R] randomForest Error passing string argument

2005-08-15 Thread Liaw, Andy
If all you need the formula interface for is auto deletion of NAs, I'd suggest doing something like: varlist <- c("fruit", "apples", "oranges", "blueberries") fruits.nona <- na.omit(fruits.data[varlist]) model.rf <- randomForest(fruits.data[-1], fruits.data[[1]], ...) If you want to know the cal

Re: [R] How to get a list work in RData file

2005-08-15 Thread Liaw, Andy
If you want to keep track of the function call that produced an object, usually you need to do that inside the function that's being called, e.g., > test.xy <- function(x,y) { + xy <- x+y + attr(xy, "Call") <- match.call() + xy + } > xyadd <- test.xy(x=2, y=3) > xyadd [1] 5 attr(,"Call

[R] Overall Legend

2005-08-15 Thread Juned Siddique
Hello. I am using R version 2.1.1 on Windows 2000. I am using a par(mfrow=c(2,2)) statement to produce 4 plots on one screen. I want a single horizontal legend to appear at the top of the four plots. My code is something like this: par(mfrow=c(2,2)) plot(x,y1) lines(x,y2) lines(x,y3) plot(x,z

Re: [R] Anything like dir.choose (similar to file.choose) in R?

2005-08-15 Thread Liaw, Andy
If you can use the `tcltk' package, Prof. John Fox had pointed this out to me before: dir <- tclvalue(tkchooseDirectory()) Andy > From: Earl F. Glynn > > Does R have a dir.choose function? > > I can use file.choose like this as a kludge to get something like a > dir.choose, but a real dir.choo

Re: [R] queer data set

2005-08-15 Thread Ted Harding
On 15-Aug-05 S.O. Nyangoma wrote: > I have a dataset that is basically structureless. Its dimension > varies from row to row and sep(s) are a mixture of tab and semi > colon (;) an example is > HEADER1 HEADER2 HEADER3 HEADER3 A1 B1 C1 X11;X12;X13 A2 B2 C2 X21;X2

Re: [R] How to get a list work in RData file

2005-08-15 Thread Xiyan Lon
Dear Prof. Brian, Why I need to know, because I lost my work and code which I used in my project. Lucky I always save my work which RData file. But I forgot which list, function, initial, etc I used. Xiyan Lon Prof Brian Ripley wrote: > On Mon, 15 Aug 2005, Xiyan Lon wrote: > >> Dear R-Helper,

Re: [R] queer data set

2005-08-15 Thread Tony Plate
Here's one way of working with the data you gave: > x <- read.table(file("clipboard"), fill=T, header=T) > x HEADER1 HEADER2 HEADER3 HEADER3.1 1 A1 B1 C1 X11;X12;X13 2 A2 B2 C2 X21;X22;X23;X24;X25 3 A3 B3 C3 4 A4 B4

Re: [R] Manually Calculating Odds from POLR Model

2005-08-15 Thread John Fox
Dear Tate, Your question pertains generally to the treatment of factors in model formulas and is not particular to polr(). For a brief explanation, see Section 11.1, "Defining statistical models; formulae," and in particular Section 11.1.1 on "Contrasts" in the manual An Introduction to R, which i

[R] queer data set

2005-08-15 Thread S.O. Nyangoma
I have a dataset that is basically structureless. Its dimension varies from row to row and sep(s) are a mixture of tab and semi colon (;) and example is HEADER1 HEADER2 HEADER3 HEADER3 A1 B1 C1 X11;X12;X13 A2 B2 C2 X21;X22;X23;X24;X25 A3 B3 C3

[R] Anything like dir.choose (similar to file.choose) in R?

2005-08-15 Thread Earl F. Glynn
Does R have a dir.choose function? I can use file.choose like this as a kludge to get something like a dir.choose, but a real dir.choose would be better: cat("Select one of files in directory to process:\n") filename <- gsub("", "/", file.choose()) basepath <- dirname(filename) Windows

Re: [R] R CMD check failure on minimal code

2005-08-15 Thread Douglas Bates
On 8/15/05, Sean Davis <[EMAIL PROTECTED]> wrote: > I have a peculiar problem that I'm sure is a simple one, but I can't figure > out what my mistake is. Can someone enlighten me? I have a simple file, > class.R: > > ## > setClass("abc",representation(a = "character", b = "ANY")) > > I have a p

Re: [R] R CMD check failure on minimal code

2005-08-15 Thread Prof Brian Ripley
Did you remember to declare a dependency on package 'methods'? I suspect not. Please see `Writing R Extensions'. setClass is not part of base R, and those checks are being run with base R only. I expect your package will not load when R is run with no default packages. (Quite a few people r

Re: [R] How to get a list work in RData file

2005-08-15 Thread Prof Brian Ripley
On Mon, 15 Aug 2005, Xiyan Lon wrote: > Dear R-Helper, (There are quite a few of us.) > I want to know how I get a list work which I saved in RData file. For > example, I don't understand that at all, but it looks as if you want to save an unevaluated call, in which case see ?quote and use som

[R] R CMD check failure on minimal code

2005-08-15 Thread Sean Davis
I have a peculiar problem that I'm sure is a simple one, but I can't figure out what my mistake is. Can someone enlighten me? I have a simple file, class.R: ## setClass("abc",representation(a = "character", b = "ANY")) I have a package directory ExpressCGH1 made with package.skeleton. The pack

Re: [R] Manually Calculating Odds from POLR Model

2005-08-15 Thread Tate Avery
John, Thank you, the document was very helpful. I can now calculate the same values generated by predict() when I am using purely numeric input data. Another small question arises when I look at the example using 'housing' in the polr() documentation page: Running the example produces the fol

[R] How to repeat code snippet for several variables in a data frame?

2005-08-15 Thread Sander Oom
Dear all, I have a data frame containing the results of an experiment. Like this: a<-seq(1,4,by=1) b<-seq(1,2,by=1) test<-expand.grid(b,a,a) colnames(test)<-c("replicates","bins", "groups") test$abc <- rnorm(32) test$def <- rnorm(32) test$ghi <- rnorm(32) test The following code snippet aggregat

[R] How to get a list work in RData file

2005-08-15 Thread Xiyan Lon
Dear R-Helper, I want to know how I get a list work which I saved in RData file. For example, > test.xy <- function(x,y) { +xy <- x+y +xy + } > > xyadd <- test.xy(x=2, y=3) > xyadd [1] 5 > x1 <- c(2,43,60,8) > y1 <- c(91,7,5,30) > > xyadd1 <- test.xy(x=x1, y=y1) > xyadd1 [1] 93

Re: [R] randomForest Error passing string argument

2005-08-15 Thread Uwe Ligges
mmv wrote: > I'm attempting to pass a string argument into the function > randomForest but I get an error: > > state <- paste(list("fruit ~", "apples+oranges+blueberries", > "data=fruits.data, mtry=2, do.trace=100, na.action=na.omit, > keep.forest=TRUE"), sep= " ", collapse="") I really don't u

[R] randomForest Error passing string argument

2005-08-15 Thread mmv
I'm attempting to pass a string argument into the function randomForest but I get an error: state <- paste(list("fruit ~", "apples+oranges+blueberries", "data=fruits.data, mtry=2, do.trace=100, na.action=na.omit, keep.forest=TRUE"), sep= " ", collapse="") model.rf <- randomForest(state) Error in

Re: [R] monte carlo simulations/lmer

2005-08-15 Thread Douglas Bates
On 8/13/05, Eduardo Leoni <[EMAIL PROTECTED]> wrote: > Hi - I am doing some monte carlo simulations comparing bayesian (using > Plummer's jags) and maximum likelihood (using lmer from package lme4 > by Bates et al). > > I would like to know if there is a way I can flag nonconvergence and > excepti

Re: [R] How to insert a certain model in SVM regarding to fixed kernels

2005-08-15 Thread Amir Safari
Dear David, Dear Gabor , Dear All, Many thanks for your reply and informative emails. Actually I think it is difficult to define for example a regression model within a SVM framework theoretically and experimentaly. What we have to do is that we work on input data to construct model befor ente

Re: [R] Compilation failures: mgcv, spatstat, Matrix, cluster

2005-08-15 Thread Douglas Bates
On 8/13/05, Paul Roebuck <[EMAIL PROTECTED]> wrote: > On Sat, 13 Aug 2005, Michael Kubovy wrote: > > > With Version 2.1.1 (2005-06-20) on Power Mac G5 running Mac OS X > > 10.4.2 (8C46): > > > > Some compilations work (e.g., MatchIt, RGraphics, Zelig), and some > > don't, e.g., mgcv, spatstat, a

Re: [R] Re-sort list of vectors

2005-08-15 Thread Adaikalavan Ramasamy
Here is one possible and ugly hack. mylist <- list("1"=c(a=1, b=2, c=3), "2"=c(d=4, b=5, e=6)) myvec <- unlist( mylist ) 1.a 1.b 1.c 2.d 2.b 2.e 1 2 3 4 5 6 mymat <- sapply( strsplit( names(myvec) , split="\\." ) , c ) [,1] [,2] [,3] [,4] [,5] [,6] [1,] "1"

Re: [R] paste / system mystery

2005-08-15 Thread Uwe Ligges
[EMAIL PROTECTED] wrote: > Dear R wizards: > > under R-2.1.0: > > eargs <- 3:5; > line <- paste(c("echo A B", eargs)); > cat("executing from R: '", line, "'\n"); > system(line); > > Oddly, only "A" and "B" are echoed, not the eargs. I had hoped that > line would be one string at this point, a

Re: [R] paste / system mystery

2005-08-15 Thread Douglas Bates
On 8/15/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Dear R wizards: > > under R-2.1.0: > > eargs <- 3:5; > line <- paste(c("echo A B", eargs)); > cat("executing from R: '", line, "'\n"); > system(line); > > Oddly, only "A" and "B" are echoed, not the eargs. I had hoped that > line wou

Re: [R] paste / system mystery

2005-08-15 Thread Thomas Lumley
On Mon, 15 Aug 2005 [EMAIL PROTECTED] wrote: > > Dear R wizards: > > under R-2.1.0: > > eargs <- 3:5; > line <- paste(c("echo A B", eargs)); > cat("executing from R: '", line, "'\n"); > system(line); > > Oddly, only "A" and "B" are echoed, not the eargs. I had hoped that > line would be one strin

Re: [R] PCA problem in R

2005-08-15 Thread Prof Brian Ripley
On Mon, 15 Aug 2005, Dennis Shea wrote: > [SNIP]>> On Sat, 13 Aug 2005, Alan Zhao wrote: > When I have more variables than units, say a 195*10896 matrix which has > 10896 variables and 195 samples. prcomp will give only 195 principal > components. I checked in the help, but t

Re: [R] Re-sort list of vectors

2005-08-15 Thread jim holtman
Not that I like loops, but here is a quick and dirty way of doing it: Result <- list() for (i in names(x)){ for (j in names(x[[i]])){ Result[[j]][[i]] <- x[[i]][[j]] } } On 8/15/05, Liaw, Andy <[EMAIL PROTECTED]> wrote: > You could try using one of the sparse representations of m

[R] paste / system mystery

2005-08-15 Thread ivo_welch-rstat8303
Dear R wizards: under R-2.1.0: eargs <- 3:5; line <- paste(c("echo A B", eargs)); cat("executing from R: '", line, "'\n"); system(line); Oddly, only "A" and "B" are echoed, not the eargs. I had hoped that line would be one string at this point, and for printing this seems to be true. Howeve

Re: [R] Re-sort list of vectors

2005-08-15 Thread Liaw, Andy
You could try using one of the sparse representations of matrices in the SparseM or Matrix packages. Both packages have vignettes. Andy > From: Jan Hummel > > Thanks a lot! But unfortunately I will not know the > dimensions of both lists. And further, the lists may be > (partly) disjoint as:

Re: [R] PCA problem in R

2005-08-15 Thread Liaw, Andy
> From: Dennis Shea > > [SNIP]>> > >>>On Sat, 13 Aug 2005, Alan Zhao wrote: > >>> > When I have more variables than units, say a 195*10896 > matrix which has > 10896 variables and 195 samples. prcomp will give only > 195 principal > components. I checked in the help, but there is no

Re: [R] PCA problem in R

2005-08-15 Thread Berton Gunter
You are wrong. No covariance matrix is computed. Please don't "speculate" -- read the Help file which clearly states: "The calculation is done by a singular value decomposition of the (centered and possibly scaled) data matrix, not by using eigen on the covariance matrix. This is generally the pre

Re: [R] Re-sort list of vectors

2005-08-15 Thread Jan Hummel
Thanks a lot! But unfortunately I will not know the dimensions of both lists. And further, the lists may be (partly) disjoint as: x <- list("1"=c(a=1, b=2, c=3), "2"=c(d=4, b=5, e=6)). And last but not least I'm really have to have access to the names of the named list items. The problem I dea

[R] Testing.

2005-08-15 Thread Rolf Turner
Please ignore this message; I apologise for the annoyance. cheers, Rolf __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! htt

Re: [R] PCA problem in R

2005-08-15 Thread Dennis Shea
[SNIP]>> >>>On Sat, 13 Aug 2005, Alan Zhao wrote: >>> When I have more variables than units, say a 195*10896 matrix which has 10896 variables and 195 samples. prcomp will give only 195 principal components. I checked in the help, but there is no explanation that why this happen. [

Re: [R] retrieving large columns using RODBC

2005-08-15 Thread Prof Brian Ripley
On Mon, 15 Aug 2005, bogdan romocea wrote: > This appears to be an SQL issue. Look for a way to speed up your > queries in Postgresql. I presume you haven't created an index on > 'index', which means that every time you run your SELECT, Postgresql > is forced to do a full table scan (not good). If

[R] relation between cex.axis and pointsize in graphics device

2005-08-15 Thread Knut Krueger
I am not able to see the relation between this parameters. Will I get the same result with pointsize=24 and cex.axis=1 and pointsize=12 and cex.axis=2 It seems that the fonts will be only scaled when I am changing the pointsize after printing and it seem that they will be drawn in a better re

Re: [R] PCA problem in R

2005-08-15 Thread Berton Gunter
To add to Brian Ripley's note: All but possibly the first few (1-3, say) PC's are very likely random numbers. You need to either consult references or get statistical help to understand why. May I also suggest that you add Prof Ripley's book on PATTERN RECOGNITION AND NEURAL NETWORKS to your read

Re: [R] retrieving large columns using RODBC

2005-08-15 Thread bogdan romocea
This appears to be an SQL issue. Look for a way to speed up your queries in Postgresql. I presume you haven't created an index on 'index', which means that every time you run your SELECT, Postgresql is forced to do a full table scan (not good). If the index doesn't solve the problem, look for some

Re: [R] boot error: Error in statistic(data, original, ...) : unused argument(s) ( ...)

2005-08-15 Thread Thomas Lumley
On Sat, 13 Aug 2005, Prof Brian Ripley wrote: > I suspect you want > > AdjForBase2 <- function (data, inds) > > and to refer to data[inds, 1] and data[inds, 2], but since your code is > completely devoid of spaces and indentation, I have paid it little > attention. http://msr.uwaterloo.ca/msr2005/

Re: [R] Using nonlinear regression

2005-08-15 Thread Spencer Graves
Do you want to estimate the parameters of a lognormal distribution or learn how to do nonlinear regression in R? If the former, as far as I know, the best known method is maximum likelihood, for which the answer is to compute mean and standard deviations of the logs. This a

Re: [R] Way to make R idle for some time and try something again later

2005-08-15 Thread Don MacQueen
At 6:44 AM +0100 7/30/05, Prof Brian Ripley wrote: >This depends on what else is going on. My guess is that you are >running the Aqua GUI, and it is servicing the GUI which is taking >the time, not R itself. Actually, no, I am not using the Aqua GUI. Not even a "framework" build: ../source

Re: [R] stepAIC invalid scope argument

2005-08-15 Thread Prof Brian Ripley
On Mon, 15 Aug 2005, Adaikalavan Ramasamy wrote: > You are right, it works fine with a different name. Its a bad habit that > I need to shake off. > > The error message said that the second argument was invalid. The second > argument in stepAIC and addterm is 'scope' and thus the title. OK, we'll

Re: [R] Re-sort list of vectors

2005-08-15 Thread Liaw, Andy
If all vectors in the list have the same length, why not use a matrix? Then you'd just transpose the matrix if you need to. If you really have to have it as a list, here's one possibility: > x <- list("1"=c(a=1, b=2, c=3), "2"=c(a=4, b=5, c=6)) > x $"1" a b c 1 2 3 $"2" a b c 4 5 6 > as.lis

[R] Re-sort list of vectors

2005-08-15 Thread Jan Hummel
Hi. Can anyone suggest a simple way to re-sort in R a list of vectors of the following form? input $"1" a b c 1 2 3 $"2" a b c 4 5 6 Output should be something like: "a" "1" 1 "2" 4 "b" "1" 2

Re: [R] scratch a figure

2005-08-15 Thread Duncan Murdoch
吴 昊 wrote: > Hi, > I have generated a figure using rgl.surface(),how can I scratch this > figure? thanks a lot. Which version of rgl are you using? Current is 0.65. What does "scratch" mean? There are functions rgl.close(), rgl.clear(), rgl.pop(). You can also just close the window; a new one

Re: [R] stepAIC invalid scope argument

2005-08-15 Thread Adaikalavan Ramasamy
You are right, it works fine with a different name. Its a bad habit that I need to shake off. The error message said that the second argument was invalid. The second argument in stepAIC and addterm is 'scope' and thus the title. Thank you again. Regards, Adai On Mon, 2005-08-15 at 15:23 +0100

Re: [R] stepAIC invalid scope argument

2005-08-15 Thread Prof Brian Ripley
In case it is unclear why in this case there is a problem: you are running a function (here model.frame) in the stats namespace and so it looks in the stats namespace before the workspace when looking for 'df'. On Mon, 15 Aug 2005, Prof Brian Ripley wrote: > Try not to use the name of an R obje

Re: [R] stepAIC invalid scope argument

2005-08-15 Thread Prof Brian Ripley
Try not to use the name of an R object ... the error is caused by using 'df' as the second argument to eval(). It works with DF in place of df. I don;t understand your subject line: that is not the error message you received. On Mon, 15 Aug 2005, Adaikalavan Ramasamy wrote: > I am trying to r

Re: [R] Vector comparison to matrix

2005-08-15 Thread Ravi Varadhan
Hi Todd, Here is a function that was suggested to me by Gabor Grothendieck. This function counts the number of times each row of a matrix B occurs in another matrix A. rowmatch.count <- function(a,b) { f <- function(...) paste(..., sep=":") a2 <- do.call("f", as.data.frame(a)) b2 <-

[R] error in predict glm (new levels cause problems)

2005-08-15 Thread K. Steinmann
Dear R-helpers, I try to perform glm's with negative binomial distributed data. So I use the MASS library and the commands: model_1 = glm.nb(response ~ y1 + y2 + ...+ yi, data = data.frame) and predict(model_1, newdata = data.frame) So far, I think everything should be ok. But when I want to pe

[R] stepAIC invalid scope argument

2005-08-15 Thread Adaikalavan Ramasamy
I am trying to replicate the first example from stepAIC from the MASS package with my own dataset but am running into error. If someone can point where I have gone wrong, I would appreciate it very much. Here is an example : set.seed(1) df <- data.frame( x1=rnorm(1000), x2=rnorm(1000), x3=rn

[R] Semicolons (was: clip to keep coordinate system?)

2005-08-15 Thread Jan T. Kim
On Tue, Aug 09, 2005 at 07:49:36AM -0700, Thomas Lumley wrote: > On Tue, 9 Aug 2005 [EMAIL PROTECTED] wrote: > > > > > dear R wizards: > > > > plot( 1, 1, ylim=(2,10), xlim=(2,10), type="n"); > > rect( -1, -1, 12, 12, col=gray(0.99) ); > > > > unfortunately wipes out the border axes around the plo

Re: [R] Problem with lme4

2005-08-15 Thread Peter Ho
I did as you suggested by just running just R (--vanilla) and that seemed to work. Not sure what the problem was though. Thanks Peter Douglas Bates wrote: >On 8/12/05, Peter Ho <[EMAIL PROTECTED]> wrote: > > >>Hi, >> >>I cannot seem to get lme4 to work. I have installed the lme4 and Matrix >

Re: [R] return unique values from date/time class object

2005-08-15 Thread Prof Brian Ripley
On Mon, 15 Aug 2005, McClatchie, Sam (PIRSA-SARDI) wrote: > Background: > OS: Linux Mandrake 10.1 > release: R 2.0.0 Time for an update. > editor: GNU Emacs 21.3.2 > front-end: ESS 5.2.3 > - > Colleagues > > I have a wind speed time series with a normal frequency

Re: [R] return unique values from date/time class object

2005-08-15 Thread Petr Pikal
Hi Sam It works for me: ss<-Sys.time() sss<-rep(ss,5) ss<-Sys.time() sss<-c(sss,ss) > sss [1] "2005-08-15 10:04:02 Střední Evropa (letní čas)" "2005-08-15 10:04:02 Střední Evropa (letní čas)" [3] "2005-08-15 10:04:02 Střední Evropa (letní čas)" "2005-08-15 10:04:02 Střední Evropa (letní čas)" [

Re: [R] Vector comparison to matrix

2005-08-15 Thread Prof Brian Ripley
On Mon, 15 Aug 2005, Prof Brian Ripley wrote: > Probably you use the idea from unique.matrix, that is > > 1) form a string from each row and > 2) call match() to see which strings match your pattern row. If your matrix A really does have short rows like c(1,2,3) and millions of them, another ide

[R] return unique values from date/time class object

2005-08-15 Thread McClatchie, Sam (PIRSA-SARDI)
Background: OS: Linux Mandrake 10.1 release: R 2.0.0 editor: GNU Emacs 21.3.2 front-end: ESS 5.2.3 - Colleagues I have a wind speed time series with a normal frequency distribution and a spike in the 5 metres/second bin. The most likely explanation is that the inst