Re: [R] Randomization tests, grouped data

2008-01-11 Thread Tom Backer Johnsen
Johannes Hüsing wrote: > Tom Backer Johnsen <[EMAIL PROTECTED]> [Fri, Jan 11, 2008 at 06:57:41PM CET]: > [...] >>> Are there something that can handle this in R? > > Have you considered the coin package? I'll have a look at it. > >> After a few hours thinking on and off about the problem, I sus

Re: [R] Scripting issues

2008-01-11 Thread Greg Snow
How about making a list of data frames, then you can use either a loop (mylist[[i]]) or often simpler to use the lapply and sapply functions. From: [EMAIL PROTECTED] on behalf of dave mitchell Sent: Fri 1/11/2008 11:14 AM To: r-help@r-project.org Subject: [R] Scr

Re: [R] Is R on Windows multi-threaded

2008-01-11 Thread Greg Snow
Someone else suggested the snow package, but I don't think it is available for windows. I have been able to get the nws package to work on a duel core machine using windows and it did speed up my tests (and was fairly straight forward to use). From: [EMAIL PRO

Re: [R] how to make read-only data frames?

2008-01-11 Thread Greg Snow
I think what you want to do is define your data frame(s) in an environment that is not on the standard search path and then create your functions so that they use the same environment or their environments inherit from the one with the data frames. For large projects the best way to do this is

Re: [R] Randomization tests, grouped data

2008-01-11 Thread Greg Snow
Tom, I don't think the question was stupid (silly depends on what you consider silly), but you are right that the distinction probably does not matter that much. If you go back to basic probability then remember that there are n! possible permutations (n is total number of observations). Th

[R] haralick tetures on Biocon/EBImage

2008-01-11 Thread Milton Cezar Ribeiro
Dear all, Following a suggestion by Henrik Bengtsson I installed EBImage/biocondutor package. I also installed ImageMagick and GTK software because EBImage need it. After look at EBImage I find a function that compute Haralick texture on images. I tryed to run it with following simulated image,

Re: [R] matching values in a list

2008-01-11 Thread dxc13
That's a very creative way to get the results! I haven't used the "table" call before, but that certainly made it much easier. Thanks! Gabor Grothendieck wrote: > > The first line was missing. It should be: > > mat <- do.call(rbind, a) > sapply(apply(mat, 2, table), function(x) mean(as.numer

Re: [R] Scripting issues

2008-01-11 Thread jim holtman
Could you explain a little more about exactly what you are trying to do, or provide some sample code. How are you creating the subsets? Can you put them in a list and then process them from the list, or you could use an 'lapply'. So some details would be helpful. On 1/11/08, dave mitchell <[EMAI

Re: [R] 4 dimensional graphics

2008-01-11 Thread Michael A. Miller
> "Petr" == Petr PIKAL <[EMAIL PROTECTED]> writes: > Thank you Basically I have a rectangular space (like an > aquarium) in which I made some analysis. I can make > image(lat, long, value) for each height but what I dream > about is to make something like scatterplot3d(lat, lo

Re: [R] matching values in a list

2008-01-11 Thread Gabor Grothendieck
The first line was missing. It should be: mat <- do.call(rbind, a) sapply(apply(mat, 2, table), function(x) mean(as.numeric(names(x))[x == length(a)])) On Jan 11, 2008 7:23 PM, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > Assume that no component matrix can have repeated values. > > First we

Re: [R] matching values in a list

2008-01-11 Thread Gabor Grothendieck
Assume that no component matrix can have repeated values. First we apply table to mat yielding a list of named counts. To each component of that we sapply the indicated function which picks out those that occur length(a) times (so they are in every column), converts the name to numeric and average

Re: [R] pairwise cross tabulation tables

2008-01-11 Thread AndyZon
Another question: Is it possible to make 3-variable cross tabulations (I mean, plus another dichotomous variable), such as 2*3*3, 3*2*3, or 3*3*2? Can we do it in similar ways as just 2-variables? Thank you very much! Andy Charles C. Berry wrote: > > On Thu, 10 Jan 2008, AndyZon wrote: >

Re: [R] glht() and contrast() comparison

2008-01-11 Thread Gang Chen
With the example you provided, it seems both glht() and contrast() work fine. Based on my limited experience with contrast(), if you encounter such an error message you just mentioned, check > dat.lme$apVar You might see something like this [1] "Non-positive definite approximate variance

[R] matching values in a list

2008-01-11 Thread dxc13
useR's, I want to match the real number elements of a list that has 3 matrices as its elements and then average those numbers. I think I am close, but I can't get it to quite work out. For example, > a <- list(matrix(c(10,NA,NA,12,11, > 10,13,NA,14,12),ncol=2),matrix(c(10,12,15,13,11, > 13,NA,

Re: [R] How to calculate the mean of all values in a list or dataframe

2008-01-11 Thread John Kane
?lapply in the case of a list. test=list(a=1:5, b=1:4) lapply(test, mean) --- "B. Bogart" <[EMAIL PROTECTED]> wrote: > Hello all, > > I've scoured the archives and google and I can't > figure out how to > amalgamate a set of vectors of differing lengths in > such a way as I can > calculate the

[R] glht() and contrast() comparison

2008-01-11 Thread array chip
Hi, I have been trying glht() from multcomp package and contrast() from contrast package to test a contrast that I am interested in. With the following simulated dataset (fixed effect "type" with 3 levels (b, m, t), and random effect "batch" of 4 levels, a randomized block design with interaction

Re: [R] Randomization tests, grouped data

2008-01-11 Thread Charles C. Berry
On Fri, 11 Jan 2008, Johannes H??sing wrote: Tom Backer Johnsen <[EMAIL PROTECTED]> [Fri, Jan 11, 2008 at 06:57:41PM CET]: [...] Are there something that can handle this in R? Have you considered the coin package? After a few hours thinking on and off about the problem, I suspect that the

Re: [R] pairwise cross tabulation tables

2008-01-11 Thread AndyZon
Thanks a million, Chuck! I think I got it. Have a good weekend! Andy Charles C. Berry wrote: > > On Thu, 10 Jan 2008, AndyZon wrote: > >> >> Thank you so much, Chuck! >> >> This is brilliant, I just tried some dichotomous variables, it was really >> fast. > > > Yes, and if you are on a mu

Re: [R] lattice color problem with symbols: bug?

2008-01-11 Thread Stefan Grosse
On Friday 11 January 2008 10:12:03 pm you wrote: DS> It's a change in behaviour (in the sense that the default fill is no DS> longer transparent). Otherwise there doesn't seem to be any bug. The DS> whole point of using par.settings is so that you can use auto.key, and DS> DS> xyplot(x~u,groups=g,

[R] [R-pkgs] New version of ggplot2: 0.5.7

2008-01-11 Thread hadley wickham
ggplot2 ggplot2 is a plotting system for R, based on the grammar of graphics, which tries to take the good parts of base and lattice graphics and avoid bad parts. It takes care of many of the fiddly details that make plotting a hassle (l

Re: [R] lattice color problem with symbols: bug?

2008-01-11 Thread John Kane
When I tryyyour code I am getting unfilled symbols, no colour. --- Stefan Grosse <[EMAIL PROTECTED]> wrote: > Dear useR's, > > I have a problem with the lattice plotting of some > symbols: > > library(lattice) > > test<-data.frame(x=c(2,3,1,5),u=c(rep(1,2),rep(2,2)),g=c(rep(c(1,2),2))) > > xyp

Re: [R] Count unique rows/columns in a matrix

2008-01-11 Thread Gabor Csardi
Hmmm, maybe i wasn't clear enough. So, i need the number of occurences for each row/column in the matrix. For your matrix the desired output would be something like a matrix 1 2 3 4 5 6 1 3 2 1 1 1 and the number of occurences for each row: 2 2 1 1 I know some solutions like https://stat.eth

Re: [R] Cycle Regression Analysis in R?

2008-01-11 Thread Greg Snow
Here are a couple of thoughts, The basic idea of the sine function is: y = a + b * sin( c + d*x ) where: a is a vertical offset from 0 b is the amplitude c is the phase shift d is related to the period. You could put this function into nls or other non-linear optimization problem, however

Re: [R] Randomization tests, grouped data

2008-01-11 Thread Johannes Hüsing
Tom Backer Johnsen <[EMAIL PROTECTED]> [Fri, Jan 11, 2008 at 06:57:41PM CET]: [...] > > Are there something that can handle this in R? > Have you considered the coin package? > After a few hours thinking on and off about the problem, I suspect > that the question may be stupid or silly (or bot

Re: [R] lattice color problem with symbols: bug?

2008-01-11 Thread Deepayan Sarkar
On 1/11/08, Stefan Grosse <[EMAIL PROTECTED]> wrote: > Dear useR's, > > I have a problem with the lattice plotting of some symbols: > > library(lattice) > > test<-data.frame(x=c(2,3,1,5),u=c(rep(1,2),rep(2,2)),g=c(rep(c(1,2),2))) > > xyplot(x~u,groups=g, > data=test, > par.settings=list( > su

[R] Oddities with RSiteSearch?

2008-01-11 Thread Zembower, Kevin
[If I knew who to report this to privately, I would. Sorry to embarrass anyone who's just trying to contribute to the R-project.] There seems to be some oddities with the RSiteSearch web page. When I enter 'RSiteSearch("console")' I'm taken to http://search.r-project.org/cgi-bin/namazu.cgi?query=c

Re: [R] communicate from Rterm

2008-01-11 Thread Prof Brian Ripley
I think the confusion may be the assumption that Microsoft's use of 'shell' has anything to do with 'shell' as used in the Unix/POSIX world. For MinGW C executables (like Rterm.exe), redirection is expected to be handled by a shell, not by the executable. (Other Windows runtimes may handle red

Re: [R] GLMMs fitted with lmer (R) & glimmix (SAS

2008-01-11 Thread Andrea Previtali
Thanks for your responses. I knew that when you include an interaction term in a model you must include the main effects of each of the factors. Therefore, I assumed that SAS will do that by default. In most statistical packages, as in R, the main effects are automatically added when you include

Re: [R] How to calculate the mean of all values in a list or dataframe

2008-01-11 Thread Bert Gunter
?unlist mean(unlist(test)) Bert Gunter Genentch Nonclinical Statistics -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of B. Bogart Sent: Friday, January 11, 2008 11:29 AM To: r-help@r-project.org Subject: [R] How to calculate the mean of all values in a

Re: [R] Entropy/KL-Distance question

2008-01-11 Thread David Hewitt
> I have the CDF of a discrete probability distribution. I now observe a > change in this CDF at one point. I would like to find a new CDF such that > it has the shortest Kullback-Leibler Distance to the original CDF and > respects my new observation. Is there an existing package in R which w

[R] clipping a large image on R

2008-01-11 Thread Milton Cezar Ribeiro
Dear all, I have a so large image (43,000 x 18,000 pixels) and I need clip this image with a smallest one (1000x1000 pixels). I can read the second image using rgdal package. But the first image can´t be read on my system because if memory limitation (I have about 2GB availabe). So I would li

[R] nlme model specification (revisit)

2008-01-11 Thread Tao Shi
Hi List, While using 'nlme' function, I have encountered the similar problem Dr. Stevens and Dr. Graves observed (please see the posts: https://stat.ethz.ch/pipermail/r-help/2006-May/105832.html ). I have tried Dr. Stevens's original example, the problem is still there, > mod.lis <- nlsList

Re: [R] How to disable output messages (prints or cats) from functions in R?

2008-01-11 Thread Henrik Bengtsson
See capture.output(). /H On 11/01/2008, Miguel Ratón Almansa <[EMAIL PROTECTED]> wrote: > Hi everybody, > > I have to use a function that shows an output message like "# nonzero > coefficients ..." followed with a lot of numbers depending on the input. > This is very annoying because I have to run

[R] How to calculate the mean of all values in a list or dataframe

2008-01-11 Thread B. Bogart
Hello all, I've scoured the archives and google and I can't figure out how to amalgamate a set of vectors of differing lengths in such a way as I can calculate the mean easily. The following dummy example contains vectors of length 1, but my data has vectors of various lengths. R> test = list();

Re: [R] lattice color problem with symbols: bug?

2008-01-11 Thread Bert Gunter
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Stefan Grosse Sent: Friday, January 11, 2008 10:04 AM To: R help (E-mail) Subject: [R] lattice color problem with symbols: bug? Dear useR's, I have a problem with the lattice plotting of some symbols:

[R] glm.nb

2008-01-11 Thread Wensui Liu
dear listers, i tried to use glm.nb to estimate a nega. binomial but have no luck to get the result. here is the code: model <- glm.nb(Y ~ ., data = mydata) I am not sure if I have missed anything. thanks for your insight! wensui __ R-help@r-project.or

Re: [R] lattice color problem with symbols: bug?

2008-01-11 Thread Sundar Dorai-Raj
Stefan Grosse said the following on 1/11/2008 10:04 AM: > Dear useR's, > > I have a problem with the lattice plotting of some symbols: > > library(lattice) > > test<-data.frame(x=c(2,3,1,5),u=c(rep(1,2),rep(2,2)),g=c(rep(c(1,2),2))) > > xyplot(x~u,groups=g, > data=test, > par.settings=list(

[R] Re-Casting

2008-01-11 Thread Kondamani, Arjun (GMI - NY Corporate Bonds)
R-experts, I have a bunch of files (by date) that I can read into dataframes as below. df$today: identifier rtgmdy rtgmdy_dt rtgmdy_watchrtgmdy_nowatch rtgmdy_watch_dt rtgsp rtgsp_dt 31031 Aa3 20050701

[R] How to disable output messages (prints or cats) from functions in R?

2008-01-11 Thread Miguel Ratón Almansa
Hi everybody, I have to use a function that shows an output message like "# nonzero coefficients ..." followed with a lot of numbers depending on the input. This is very annoying because I have to run that function several times and I don't want to show this information. What I want is to disa

[R] Scripting issues

2008-01-11 Thread dave mitchell
Users, I am currently running scripts on a rather large dataset. Many times I sort the data into smaller datasets and must analyze them individually. My instincts are to make a for loop, but I can't seem to find a way to index each sub-dataset (data frames as the case would have it). I would mak

[R] lattice color problem with symbols: bug?

2008-01-11 Thread Stefan Grosse
Dear useR's, I have a problem with the lattice plotting of some symbols: library(lattice) test<-data.frame(x=c(2,3,1,5),u=c(rep(1,2),rep(2,2)),g=c(rep(c(1,2),2))) xyplot(x~u,groups=g, data=test, par.settings=list( superpose.symbol=list(pch=c(22, 23),cex=c(1.7,1.6),col="black") ), key

Re: [R] Randomization tests, grouped data

2008-01-11 Thread Tom Backer Johnsen
Tom Backer Johnsen wrote: > The other day I was looking into one of the classics in resampling, > Eugene Edgington's "Randomization Tests". This type of test is simple > to do in R with things like a simple correlation, the sample () > function is perfect for the purpose. > > However, things a

Re: [R] [R-sig-Geo] clipping a large image on R

2008-01-11 Thread Roger Bivand
On Fri, 11 Jan 2008, Henrik Bengtsson wrote: Try the EBImage package (utilizes ImageMagick and is available via Bioconductor.org) - not sure if it well help though. If not, try to clip the larger image by calling ImageMagick outside R. First, please only write to one list at a time - this rep

Re: [R] clipping a large image on R

2008-01-11 Thread Henrik Bengtsson
Try the EBImage package (utilizes ImageMagick and is available via Bioconductor.org) - not sure if it well help though. If not, try to clip the larger image by calling ImageMagick outside R. /HB On 11/01/2008, Milton Cezar Ribeiro <[EMAIL PROTECTED]> wrote: > Dear all, > > I have a so large imag

Re: [R] Extracting last time value

2008-01-11 Thread Gabor Grothendieck
There were errors in the code I posted. Here it is again. See my prior post in this thread for comments. Lines <- "Datetimevalue 2011062011:18:007 2011062011:39:009 2011062111:41:008 2011062111:40:006 20110622

[R] autocorrelation by group in mixed model

2008-01-11 Thread Irene Mantzouni
Hi all! (How) is it possible to fit a mixed model with group specific auto-correlation structure ? For instance, not all my groups display auto-correlation so I would like to use a corMatrix (corAR1) only for the auto-correlated ones. If I construct manually a the corMatrix, is it possible to

Re: [R] communicate from Rterm

2008-01-11 Thread Duncan Murdoch
On 1/11/2008 10:14 AM, stephen bond wrote: > I try with: > > ret = Shell(exestr) > > and it starts R, but the source file is not executed That's a VBA issue. VBA isn't handling the input redirection "< m.in.R > out.txt". I don't know how to set that up: you'll need to contact Microsoft te

Re: [R] Extracting last time value

2008-01-11 Thread Kondamani, Arjun (GMI - NY Corporate Bonds)
Thank you, Gabor, Jim, and Achim!! All of your suggestions/pointers were extremely useful. -Original Message- From: Gabor Grothendieck [mailto:[EMAIL PROTECTED] Sent: Thursday, January 10, 2008 7:46 PM To: Kondamani, Arjun (GMI - NY Corporate Bonds) Cc: r-help@r-project.org Subject: Re: [

Re: [R] is there something like or() ?

2008-01-11 Thread Thomas Lumley
The or() function is called any(). Similarly, the function you might expect to be called and() is all(). -thomas On Mon, 7 Jan 2008, Sebastian Leuzinger wrote: hi, this may be trivial, but we can't seem to find anything adequate, (although there is a work around with match() ). We

Re: [R] How to add rowSums into list?

2008-01-11 Thread Henrik Bengtsson
On 11/01/2008, Lauri Nikkinen <[EMAIL PROTECTED]> wrote: > Thanks, one further question: how to order these matrices using these row > sums? > > lapply(a, function(x) order(x[,5])) #produces only indeces ...which you can use as row indices 'idxs' to reorder the rows of matrix 'x' by x[idxs,]. /H

Re: [R] How to add rowSums into list?

2008-01-11 Thread Peter Dalgaard
Lauri Nikkinen wrote: > Thanks, one further question: how to order these matrices using these row > sums? > > lapply(a, function(x) order(x[,5])) #produces only indeces > > lapply(a, function(x) x[order(x[,5]),]) > -Lauri > > 2008/1/11, Henrique Dallazuanna <[EMAIL PROTECTED]>: > >> lappl

[R] Behaviour of standard error estimates in lmRob and the like

2008-01-11 Thread S Ellison
I am looking at MM-estimates for some interlab comparison work. The usual situation in this particular context is a modest number of results from very expensive methods with abnormally well-characterised performance, so for once we have good "variance" estimates (which can differ substantially for

Re: [R] How to add rowSums into list?

2008-01-11 Thread Lauri Nikkinen
Thanks, one further question: how to order these matrices using these row sums? lapply(a, function(x) order(x[,5])) #produces only indeces -Lauri 2008/1/11, Henrique Dallazuanna <[EMAIL PROTECTED]>: > lapply(a, addmargins, 2) > > On 11/01/2008, Lauri Nikkinen <[EMAIL PROTECTED]> wrote: > > Hi R-

Re: [R] communicate from Rterm

2008-01-11 Thread stephen bond
I try with: ret = Shell(exestr) and it starts R, but the source file is not executed inside R > a=commandArgs() > a [1] "Rterm" "--restore" "--save" "--args" "2005-02-03" #correct date passed [6] "<" "m.in.R" ">" "out.txt" > it restores the correct workspace, but then it fails to sourc

[R] R 中国BBS论坛 (R China Forum)

2008-01-11 Thread Guohui Ding
¸÷λºÃ£¬ http://rbbs.biosino.org/Rbbs/ ÏÖÔÚÔÚ²âÊÔ£¬»¶Ó­Òâ¼û¡£ -- ADDRESS: Bioinformatics Center, Shanghai Institutes for Biological Sciences, Chinese Academy of Sciences 320 Yueyang Road, Shanghai 200031, P.R.China [[alternative HTML version deleted]] _

Re: [R] Is R on Windows multi-threaded

2008-01-11 Thread Duncan Murdoch
On 1/11/2008 9:28 AM, Rees, David wrote: > Hi, > > A previous thread suggests that R on Windows is multi-threaded > > http://tolstoy.newcastle.edu.au/R/help/03b/6946.html Rgui is normally single threaded. Rterm runs two threads in order to keep graphics windows updated. Most computation happe

Re: [R] how to make read-only data frames?

2008-01-11 Thread Gabor Csardi
Hmmm, the only *perfect* way i know is to store the data internally in a package, and implement all operations accessing it via public functions. (Of course the data object itself is not exported from the package.) This might be overkill, but it really works. But there might be other ways, i'm not

[R] interactive plot spec.pgram?

2008-01-11 Thread stephen sefick
I would like to identify the x-value of a spectral density plot produced using spec.pgram. Is there such a thing? Can you pass it over to another package? thanks Stephen Sefick -- Let's not spend our time and resources thinking about things that are so little or so large that all they really d

Re: [R] how to make read-only data frames?

2008-01-11 Thread Don MacQueen
I don't know of one. But you could use save() to save the dataframe to a different file, then remove the dataframe from .GlobalEnv, then attach the different file. While not strictly speaking read-only, that should provide good protection against accidental changes to the dataframe in the norma

Re: [R] Is R on Windows multi-threaded

2008-01-11 Thread Uwe Ligges
Rees, David wrote: > Hi, > > A previous thread suggests that R on Windows is multi-threaded > > http://tolstoy.newcastle.edu.au/R/help/03b/6946.html > > When I'm running R 2.5.1 on a dual core pc I get Rgui.exe uses up to 50% > of the available cpu and the rest is not used. i.e. it only uses o

Re: [R] communicate from Rterm

2008-01-11 Thread Duncan Murdoch
On 1/11/2008 9:18 AM, stephen bond wrote: > Please, help with announcing an error from Rterm: > > I am calling R from an Excel VBA and noticed that if there is an error > nothing conspicuous happens. I would like just a popup window when R > cannot finish cleanly. The "ret " value returned from

[R] Is R on Windows multi-threaded

2008-01-11 Thread Rees, David
Hi, A previous thread suggests that R on Windows is multi-threaded http://tolstoy.newcastle.edu.au/R/help/03b/6946.html When I'm running R 2.5.1 on a dual core pc I get Rgui.exe uses up to 50% of the available cpu and the rest is not used. i.e. it only uses one cpu. I'm soon going to get a nice

Re: [R] how to make read-only data frames?

2008-01-11 Thread ONKELINX, Thierry
Dan, You could write a function that just creates the data. And call this function each time you need the data. HTH, Thierry ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature

[R] communicate from Rterm

2008-01-11 Thread stephen bond
Please, help with announcing an error from Rterm: I am calling R from an Excel VBA and noticed that if there is an error nothing conspicuous happens. I would like just a popup window when R cannot finish cleanly. The "ret " value returned from Shell is useless in determining what happened. Tha

Re: [R] Histogram from frequency table?

2008-01-11 Thread Duncan Murdoch
On 1/11/2008 8:55 AM, Brian Nguyen wrote: > Hi, I've had some trouble figuring out how to produce a histogram in R > directly given a frequency table or relative frequency table. I've looked > through the documentation and mailing list, and have only found information > on producing histograms g

[R] how to make read-only data frames?

2008-01-11 Thread Dan Kelley
QUESTION: is there a way to make objects (e.g. data frames) read-only? BACKGROUND: I am writing some functions that use a data frame (frequencies of tidal constituents) that I want to be read-only. I can see how to accomplish this within a single function (just define the data in the function),

[R] Histogram from frequency table?

2008-01-11 Thread Brian Nguyen
Hi, I've had some trouble figuring out how to produce a histogram in R directly given a frequency table or relative frequency table. I've looked through the documentation and mailing list, and have only found information on producing histograms given the original data set. Any help would be appr

[R] filtering data frame based on two columns

2008-01-11 Thread sun
Hi, I have a data frame df with column names a,b and c. Now I want to get a subset of df that satified the condition a == 1 and b == 2, how do I specify this. For one condition like a == 1 I can use subdf = df[,df$a==1] to get the right answer, but subdf = df[,df$a==1 && df$b ==2] does not

Re: [R] How to add rowSums into list?

2008-01-11 Thread Henrique Dallazuanna
lapply(a, addmargins, 2) On 11/01/2008, Lauri Nikkinen <[EMAIL PROTECTED]> wrote: > Hi R-users, > > I have a list > > a <- list(one=matrix(rnorm(20), 5, 4), two=matrix(rnorm(20, 3, 0.5),5,4)) > > How to add rowSums (calculated using lapply) to corresponding matrix > in this list > > lapply(a, func

Re: [R] How to add rowSums into list?

2008-01-11 Thread ONKELINX, Thierry
a <- list(one=matrix(rnorm(20), 5, 4), two=matrix(rnorm(20, 3, 0.5),5,4)) lapply(a, function(x){ cbind(x, rowSums(x)) }) Cheers, Thierry ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Insti

[R] How to add rowSums into list?

2008-01-11 Thread Lauri Nikkinen
Hi R-users, I have a list a <- list(one=matrix(rnorm(20), 5, 4), two=matrix(rnorm(20, 3, 0.5),5,4)) How to add rowSums (calculated using lapply) to corresponding matrix in this list lapply(a, function(x) rowSums(x)) ?? -Lauri __ R-help@r-project.or

Re: [R] filtering data frame based on two columns

2008-01-11 Thread sun
Thanks, Jim. Works fine. "jim holtman" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Use a single "&" __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-projec

Re: [R] Fwd: about the assignment

2008-01-11 Thread jim holtman
I ran the example from the help file and it runs fine on my computer. You did not provide a commented, minimal, self-contained, reproducible code, so try out the example and see if it works. What system are you on and what is your output graphical device? On Jan 11, 2008 6:44 AM, Moise Alain <[E

[R] question about xreg of arima

2008-01-11 Thread tom soyer
Hi, I am trying to understand exactly what xreg does in arima. The documentation for xreg says:"xreg Optionally, a vector or matrix of external regressors, which must have the same number of rows as x." What does this mean with regard to the action of xreg in arima? Apparently somehow xreg made t

Re: [R] filtering data frame based on two columns

2008-01-11 Thread jim holtman
Use a single "&" subdf = df[(df$a==1) & (df$b ==2),] On Jan 11, 2008 7:26 AM, sun <[EMAIL PROTECTED]> wrote: > > "sun" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Hi, > > > > I have a data frame df with column names a,b and c. > sorry for some typos. > > should be subdf = df

[R] Randomization tests, grouped data

2008-01-11 Thread Tom Backer Johnsen
The other day I was looking into one of the classics in resampling, Eugene Edgington's "Randomization Tests". This type of test is simple to do in R with things like a simple correlation, the sample () function is perfect for the purpose. However, things are more complex if you have grouped da

Re: [R] filtering data frame based on two columns

2008-01-11 Thread sun
"sun" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > I have a data frame df with column names a,b and c. sorry for some typos. should be subdf = df[df$a==1,] and subdf = df[df$a==1 && df$b ==2,] __ R-help@r-project.org mailing l

Re: [R] Fwd: multinomial regression for clustered data

2008-01-11 Thread Jukka Jokinen
> From: " Niccol? Bassani " <[EMAIL PROTECTED]> > > Hello dear R-users, > does any of you know a way to perform a multinomial regression with > clustered data (i.e. repeated measurements)? I made the first analysis > with Stata option vce cluster in the mlogit command but was looking for a > simila

Re: [R] Error cannot allocate vector of size...

2008-01-11 Thread Duncan Murdoch
Rod wrote: > On Jan 8, 2008 3:40 PM, Duncan Murdoch <[EMAIL PROTECTED]> wrote: > >> On 1/8/2008 8:49 AM, Rod wrote: >> >>> On Jan 8, 2008 12:41 PM, Duncan Murdoch <[EMAIL PROTECTED]> wrote: >>> Rod wrote: > Hello, > > I have a memory problem when I run

[R] Fwd: about the assignment

2008-01-11 Thread Moise Alain
Hi, My name is Moise; I am trying to create a jittered stripchart of the average profit per employee. I enter the following code > stripchart(AvgProfitPerEmployee, method = "jitter", pch = 1, main="Average Profit in dollars per person", xlab = "Number of Employees", ylab = "Profit per Employee") >

Re: [R] Error cannot allocate vector of size...

2008-01-11 Thread Rod
On Jan 8, 2008 3:40 PM, Duncan Murdoch <[EMAIL PROTECTED]> wrote: > > On 1/8/2008 8:49 AM, Rod wrote: > > On Jan 8, 2008 12:41 PM, Duncan Murdoch <[EMAIL PROTECTED]> wrote: > >> > >> Rod wrote: > >> > Hello, > >> > > >> > I have a memory problem when I run package WinBUGS with R (2.6.1). > >> > Unt

[R] Tabulations in command-line under linux

2008-01-11 Thread Eric Elguero
Hi everybody, I'm trying to use R (2.4.1) undr Linux (debian) and a thing bothers me: sometimes I paste lines from a text editor into the R command line and tabulations are catched by the completing-names function of the csh. How could this behaviour be inhibited? thanks in advance Eric Elguero

Re: [R] 4 dimensional graphics

2008-01-11 Thread Jim Lemon
Petr PIKAL wrote: > Thank you > > Basically I have a rectangular space (like an aquarium) in which I made > some analysis. I can make > > image(lat, long, value) for each height but what I dream about is to make > something like scatterplot3d(lat, long, height) with points set according > to a

Re: [R] Error: Bad value

2008-01-11 Thread Prof Brian Ripley
Please don't multiple post: https://stat.ethz.ch/pipermail/r-help/2008-January/150004.html is the same message. As you didn't follow the posting guide, you did not get a reply from me the first time (and nor it seems from anyone else). On Fri, 11 Jan 2008, Sven Garbade wrote: > Hi list, > > f

Re: [R] Error: Bad value

2008-01-11 Thread Sven Garbade
Sorry for sending my email twice, first I used "[EMAIL PROTECTED]" and thought this was wrong. R version is 2.6.1 (2007-11-26). Thanks, Sven On Fri, 2008-01-11 at 10:16 +0100, Martin Maechler wrote: > > "SG" == Sven Garbade <[EMAIL PROTECTED]> > > on Fri, 11 Jan 2008 09:47:39 +0100 w

Re: [R] Error: Bad value

2008-01-11 Thread Martin Maechler
> "SG" == Sven Garbade <[EMAIL PROTECTED]> > on Fri, 11 Jan 2008 09:47:39 +0100 writes: SG> Hi list, SG> from time to time I got an "Error: bad value" and must restart R. The SG> mail archives suggests memory corruption, but I do not run "special" C SG> code, only base

[R] Count unique rows/columns in a matrix

2008-01-11 Thread Gabor Csardi
Dear List, i know there are some solutions for this in the archive, but they're not very good for numeric matrices, since they usually convert rows/columns to character strings. Is there an easy way to do $subject for numeric matrices properly, or i need to do it by hand? Thanks, Gabor ___

Re: [R] Error on distance matrix

2008-01-11 Thread Marc Moragues
Thanks for your help! It is working fine. Marc. -Original Message- From: Gavin Simpson [mailto:[EMAIL PROTECTED] Sent: 10 January 2008 14:17 To: Marc Moragues Cc: r-help@r-project.org Subject: Re: [R] Error on distance matrix On Thu, 2008-01-10 at 10:48 +, Marc Moragues wrote: > Hi,

[R] Error: Bad value

2008-01-11 Thread Sven Garbade
Hi list, from time to time I got an "Error: bad value" and must restart R. The mail archives suggests memory corruption, but I do not run "special" C code, only base R calls. I use R release 2.6.22 on a Debian GNU/Linux (version "testing") on a i686 machine with 2 GB RAM, kernel version 2.6.22.

Re: [R] RODBC, postgresql on Linux

2008-01-11 Thread Prof Brian Ripley
On Thu, 10 Jan 2008, Poizot Emmanuel wrote: > Dear all, > > I facing pbs using RODBC library. > I'm working on a Linux (Ubuntu Gutsy) os, with R version 2.5.1. > I've got Postgresql 8.2.5 installed with the odbc-postgresql package. > I try to connect in a R session to a postgresql database using:

Re: [R] The R book

2008-01-11 Thread Tom Backer Johnsen
Christofer wrote: > Hi Tom, > > Do you have a soft copy of that? Can I get a copy of that book? As far as I know, you have to buy it. That is what I did. Tom > > Regards, > > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On > Behalf Of Tom Backer Johnsen > Sen