[R] lrm-function: Interpretation and error message

2009-07-29 Thread Martin Kellner
I have a set of data that is not normally distributed and for which I need to build a model. So, I tried the lrm function from the design-package. The first run went well, and I got the following results: Wald Statistics Response: RVCL2PROC.mott Factor

[R] Structure of SEM

2009-07-29 Thread Stein, Luba (AIM SE)
Hello, how does exactly the function looks like that estimates the parameters in SEM? What methods are used? Thank you, Luba [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

[R] Importing time series

2009-07-29 Thread Bogaso
I have a time series dataset, saved in a csv file. However date-formatting is : 7/2/1982 7/6/1982 7/7/1982 7/8/1982 7/13/1982 7/14/1982 However if I use following zoo-code, it is not reading data: read.zoo(file=F:/data.csv, format=%m/%d/%y, header=F) Error is Error in read.zoo(file

Re: [R] dumping data objects

2009-07-29 Thread Martin Maechler
WQM == William Q Meeker wqmee...@iastate.edu on Tue, 28 Jul 2009 14:58:26 -0500 writes: WQM While .deparseOpts(control=S_compatible) dump(foo) WQM did not work as I had expected, WQM dump(foo,control=S_compatible) WQM did work OK. yes, of course (at least in

Re: [R] quetions about dimensions

2009-07-29 Thread Jie TANG
interting , when I modified bj2=bjerrdata$tyerr[bjyearnum[2]:bjyearnum[3]] the length of bj2 is correct . It seems that can not put a fomula in the dimension description . 2009/7/29 Jie TANG totang...@gmail.com hi ,everyone, I have a script shown as below:

Re: [R] partially sorting?

2009-07-29 Thread Dominik.Cullmann
x - + matrix(c(1239,10,10,10,10,1234,10,10,10,10,1500,11,11,11,11,1001,11,11,11,11, + + 1009,11,11,11,11,1344,12,12,12,12,1349,12,12,12,12,1458,13,13,13,13),8,5,byrow + = T) x[order(x[,1]),] [,1] [,2] [,3] [,4] [,5] [1,] 1001 11 11 11 11 [2,] 1009 11 11 11 11

Re: [R] Summarising Data for Forrest Plots

2009-07-29 Thread Viechtbauer Wolfgang (STAT)
Are n.FD and n.RD the number of people who received the full/reduced dose and surv.FD and surv.RD the number of people that survived? And are the people who received the full dose different from the people who received the reduced dose? And what exactly is it that you want to plot in the forest

Re: [R] Importing time series

2009-07-29 Thread Achim Zeileis
On Wed, 29 Jul 2009, Bogaso wrote: I have a time series dataset, saved in a csv file. However date-formatting is : 7/2/1982 7/6/1982 7/7/1982 7/8/1982 7/13/1982 7/14/1982 However if I use following zoo-code, it is not reading data: read.zoo(file=F:/data.csv, format=%m/%d/%y, header=F)

Re: [R] Importing time series

2009-07-29 Thread Gabor Grothendieck
The format for the year should be %Y, not %y; however, without a reproducible example (see last line to every message on R help) we can't be sure that that is the whole story. On Wed, Jul 29, 2009 at 3:00 AM, Bogasobogaso.christo...@gmail.com wrote: I have a time series dataset, saved in a csv

Re: [R] Installing lme4 package in Windows Vista

2009-07-29 Thread ONKELINX, Thierry
Dear Angela, lme() is a part of the nlme package. The lme4 package has the function lmer() which is the equivalent of lme() from nlme. Both function differ in their capabilities. Briefly: lmer() can (easly) do crossed random effects and GLMM, lme() can handle variance and correlation structures.

Re: [R] Importing time series

2009-07-29 Thread Bogaso
Thanks for reply. However still problem is there. Here I am giving some parts of the data : ss - 7/2/1982312.7212.0618.397471390.4 + 7/6/1982311208.4518.227521392.2 + 7/7/1982306.7206.4118.327381385 + 7/8/1982313.5207.1918.567221392.6 + 7/13/1982352.5205.7918.857301485.7 +

[R] Adding picture to graph?

2009-07-29 Thread Rainer M Krug
Hi while teaching R, the question came up if it would be possible to add a picture (saved on the HDD) to a graph (generated by plot()), which we could not answer. It might easily kill a clean graph, but: is there a way of doing this, even one should not do it? On a similar line of thought:

[R] Newbie in R: Reading .txt files and storing the 'numbers' in a vector

2009-07-29 Thread Patrick Schorderet
Hello everybody, I'm a newbie in R and just went through an introduction class recently. Here's my problem. I have 2 text files (.txt) with plain numbers ('doubles' for those who know c++) ordered into 2 columns as below: coordinate1 value1 coordinate2 value2

Re: [R] Newbie in R: Reading .txt files and storing the 'numbers' in avector

2009-07-29 Thread ONKELINX, Thierry
Have a look at ?read.table HTH, Thierry ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest Cel biometrie, methodologie en kwaliteitszorg / Section biometrics,

Re: [R] Importing time series

2009-07-29 Thread Gabor Grothendieck
There are no delimiters between your fields! read.table and friends require such delimiters. As the input is ambiguous we have assumed the field widths shown in the read.fwf statement and you can modify it appropriately to use the correct field widths. Also, evidently your data has errors in

Re: [R] Adding picture to graph?

2009-07-29 Thread Gabor Grothendieck
See: http://wiki.r-project.org/rwiki/doku.php?id=tips:graphics-misc:translucency On Wed, Jul 29, 2009 at 4:27 AM, Rainer M Krugr.m.k...@gmail.com wrote: Hi while teaching R, the question came up if it would be possible to add a picture (saved on the HDD) to a graph (generated by plot()),

Re: [R] quetions about dimensions

2009-07-29 Thread xavier . chardon
Try this: bj2=bjerrdata$tyerr[ (bjyearnum[2]+1):bjyearnum[3] ] I think it's more like what you meant to do. I believe what you wrote actually did: bjyearnum[2]+(1:bjyearnum[3]) So the problem was with arithmetic priorities, in my opinion (: having a higher priority than +). Check this:

Re: [R] A hiccup when using anova on gam() fits.

2009-07-29 Thread Martin Maechler
RT == Rolf Turner r.tur...@auckland.ac.nz on Wed, 29 Jul 2009 11:57:20 +1200 writes: RT I stumbled across a mild glitch when trying to compare the RT result of gam() fitting with the result of lm() fitting. RT The following code demonstrates the problem: RT library(gam)

[R] Showing time progression on (triangle) plots

2009-07-29 Thread JS Walker
Hi, I have made some nice triangle plots showing the projected airborne, landborne and oceanborne fraction of anthropogenic emitted carbon dioxide at 10 year intervals for the next century. Currently all ten points on my plot are identical so I can't distinguish between them. I would like

[R] R Packages and Permanent Datasets creation

2009-07-29 Thread rajclinasia
Our Query: Actually while opening R console and R commander we see some packages like car and datasets. In these packages we have default datasets. For example: Women and Prestige so on. Now we created a Sales dataset importing either from excel, xml or text file. Now we are trying to store

Re: [R] SystemFit

2009-07-29 Thread Ferdogan
Ferdogan wrote: Hi, I have two products which are substitudes. I try to fix a system as below to mydata. Demand1 = A1 -B1*Price1 + C1*Price2 Demand2 = A2 +B2*Price1 - C2*Price2 I would expect C1 B2 to be symmetric, If they are truly substitude. How can I enforce this symmetry

Re: [R] Adding picture to graph?

2009-07-29 Thread Jonathan Baron
I had to do this recently, and I finally gave up trying to do it with R alone. Instead, I used the LaTeX overpic package. For the result, see Figure 1 in http://journal.sjdm.org/9417/jdm9417.pdf or (screenshot of it) in http://journal.sjdm.org/9417/jdm9417.html and the .tex file

Re: [R] How to do poisson distribution test like this?

2009-07-29 Thread Ted Harding
On 29-Jul-09 03:28:24, glen_b wrote: Corrected links (the originals somehow aquired an extra space, sorry) Paper: http://www.plantphysiol.org/cgi/content/full/148/3/1189 Table I: http://www.plantphysiol.org/cgi/content/full/148/3/1189/TBL1 I think I've cracked it (using the informationm in

Re: [R] Adding picture to graph?

2009-07-29 Thread Mark Difford
Hi Rainer, the question came up if it would be possible to add a picture (saved on the HDD) to a graph (generated by plot()), which we could not answer. Yes. Look at package pixmap and, especially, at the examples sub s.logo() in package ade4. Regards, Mark. Rainer M Krug-6 wrote: Hi

[R] Add a line in a Pairs2 and mark the axis length

2009-07-29 Thread Jose Narillos de Santos
Hi, I have finally installed TeachingDemos trough zip file and installed on lbrary. One new question: I want to draw a line (like abline) on diagonal or the result of running a ols. How can I do it. On the other hand, I want to mark the length on each sub plot y axis. It is possible? My

[R] Subtract matrices within arrays along indices

2009-07-29 Thread Christian Langkamp
I have the following array: 3 dimensional object, one dimension being year. Object is 3*3*3 library(plyr, reshape) a1-rep(c(2007,2008,2009),9) a2-c(rep(a,9),rep(b,9),rep(c,9)) a3-c(rep(c(rep(1,3),rep(2,3),rep(3,3)),3)) a4 - rnorm(27) A-data.frame(cbind(comp=a2,val=a3, year=a1, a4)) A1-melt(A,

[R] Similar package like SEM

2009-07-29 Thread Stein, Luba (AIM SE)
Hello, is there a similar package like SEM. In fact, I am looking for a package where I as input several given vector variables which are part of an autoregressive model. Then I would like to obtan parameters for so called latent variables. Thank you, Luba [[alternative HTML

Re: [R] How to do poisson distribution test like this?

2009-07-29 Thread Ted Harding
Follow-up: On 29-Jul-09 03:28:24, glen_b wrote: Corrected links (the originals somehow aquired an extra space, sorry) Paper: http://www.plantphysiol.org/cgi/content/full/148/3/1189 Table I: http://www.plantphysiol.org/cgi/content/full/148/3/1189/TBL1 -- I have now scanned though the Paper,

Re: [R] Adding picture to graph?

2009-07-29 Thread baptiste auguie
several options are listed here: http://wiki.r-project.org/rwiki/doku.php?id=tips:graphics-misc:display-images baptiste Rainer M Krug schrieb: Hi while teaching R, the question came up if it would be possible to add a picture (saved on the HDD) to a graph (generated by plot()), which

Re: [R] lrm-function: Interpretation and error message

2009-07-29 Thread Frank E Harrell Jr
Martin Kellner wrote: I have a set of data that is not normally distributed and for which I need to build a model. So, I tried the lrm function from the design-package. The first run went well, and I got the following results: Wald Statistics Response: RVCL2PROC.mott Factor

[R] regexpr virtue

2009-07-29 Thread Petr PIKAL
Hi all I have got something like that (actually those are column names) [51] X19.2.300b...80 X19.2.400v...80 X19.2.400b...80 X19.2.300v...90 X19.2.300b...90 [56] X19.2.400v...90 X19.2..400b..90 X19.2.300v...100 X19.2.300b...100 X19.2.400v...100 in

[R] (no subject)

2009-07-29 Thread Øistein Harsem
HiI am contacting you regarding a problem with downloading R. I cannot seen to manage because my computer language is in Norwegian. DO you know if there is R that can deal with Norwegian letters? Øistein Harsem _ Show them the way!

[R] Transporting data in different R windows

2009-07-29 Thread Bogaso
Hi, I am working with multiple R-windows opened and would like to transport some variables from one to another. Is there any direct way to do this without saving them in hard-disk? Thanks -- View this message in context:

Re: [R] regexpr virtue

2009-07-29 Thread Gabor Grothendieck
Here are a couple of possibilities: sub(.*\\., , s) library(gsubfn) strapply(s, [0-9]*$, simplify = c) On Wed, Jul 29, 2009 at 9:10 AM, Petr PIKALpetr.pi...@precheza.cz wrote: Hi all I have got something like that (actually those are column names) [51] X19.2.300b...80          

Re: [R] regexpr virtue

2009-07-29 Thread Petr PIKAL
Thanks If somebody does not come with more elaborated solution I will adapt yours. After strsplit I can get not only 3 but several chunks. If the last chunk is every time the one I need then sapply(strsplit(names(foto),\\...), length) [1] 2 6 6 6 6 5 5 6 5 3 3 3 3 3 3 3 3 3 3 4 3 3 4 4 3 3 3

Re: [R] Subtract matrices within arrays along indices

2009-07-29 Thread Etienne B. Racine
Hi Christian, Christian Langkamp wrote: I have the following array: 3 dimensional object, one dimension being year. Object is 3*3*3 library(plyr, reshape) # reshape won't be loaded that way, use separate library() Christian Langkamp wrote: a1-rep(c(2007,2008,2009),9)

Re: [R] regexpr virtue

2009-07-29 Thread Petr PIKAL
Thank you Gabor Grothendieck ggrothendi...@gmail.com napsal dne 29.07.2009 15:20:40: Here are a couple of possibilities: sub(.*\\., , s) This seems to be the target. Can you be so kind and translate for me what it really does? .* matches several dots? \\. what is this? I thought sub

[R] Drawing lines in margins

2009-07-29 Thread Alan Cohen
Hi all, Quick question: What function can I use to draw a line in the margin of a plot? segments() and lines() both stop at the margin. In case the answer depends on exactly what I'm trying to do, see below. I'm using R v. 2.8.1 on Windows XP. Cheers, Alan I'm trying to make a horizontal

Re: [R] Adding picture to graph?

2009-07-29 Thread David Winsemius
I'm not sure if you can consider grid graphics. If so, then Murrell has some nice worked examples in: http://www.stat.auckland.ac.nz/~paul/Talks/gddg.pdf On Jul 29, 2009, at 4:27 AM, Rainer M Krug wrote: while teaching R, the question came up if it would be possible to add a picture (saved

Re: [R] R Packages and Permanent Datasets creation

2009-07-29 Thread Gavin Simpson
On Tue, 2009-07-28 at 23:13 -0700, rajclinasia wrote: Our Query: Actually while opening R console and R commander we see some packages like car and datasets. In these packages we have default datasets. For example: Women and Prestige so on. Now we created a Sales dataset importing either

Re: [R] (no subject)

2009-07-29 Thread Philipp Pagel
On Wed, Jul 29, 2009 at 03:12:02PM +0200, Øistein Harsem wrote: HiI am contacting you regarding a problem with downloading R. I cannot seen to manage because my computer language is in Norwegian. DO you know if there is R that can deal with Norwegian letters? I have never seen a download to

Re: [R] R Packages and Permanent Datasets creation

2009-07-29 Thread Philipp Pagel
On Tue, Jul 28, 2009 at 11:13:11PM -0700, rajclinasia wrote: Actually while opening R console and R commander we see some packages like car and datasets. In these packages we have default datasets. For example: Women and Prestige so on. Now we created a Sales dataset importing either from

Re: [R] Drawing lines in margins

2009-07-29 Thread Nutter, Benjamin
Look at the xpd option in ?par. If you set par(xpd=TRUE) you should be able to add a segment for what you want. But please let me know if someone gives you a better way to do this. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of

[R] predict

2009-07-29 Thread serbring
I have found a regression model, and i would like to predict value in different points. I have tried to use predict function but it doesn't work. I have used predict function like this: newdata-seq(from=0.1, to=0.32,by=0.02) data-predict(fm,newdata) where fm is a regression model. The predict

Re: [R] Package norm has been removed. What to use for Maximum Likelihood Missing Data Imputation?

2009-07-29 Thread KathyKlein
Hello, I also used the norm-package for data with missing values. Are there no possibilities to fix it (its not under GPL?), or is here anyone able to get the negotiation for the maintainership for this package? Another question: I have read, taht mice would be an alternative instead of using

Re: [R] predict

2009-07-29 Thread ONKELINX, Thierry
Newdata needs to be a dataframe with the same variable names as the explanatory variables in your models. Model - lm(y ~ x, data = dataset) Newdata - data.frame(x = seq(from=0.1, to=0.32,by=0.02)) Newdata$y - predict(Model, newdata = Newdata) HTH, Thierry

Re: [R] predict

2009-07-29 Thread David Winsemius
You need to create the variable names in newdata (which is generally a dataframe) that match those used in constructing fm. Surely there must be a worked example that illustrates this on the help page? On Jul 29, 2009, at 9:30 AM, serbring wrote: I have found a regression model, and i

[R] visualizzazione colonne

2009-07-29 Thread sabrina.michielin
ciao, ho aperto un file in R di classe data frame di 15000 righe e 29 colonne. Nella console però sono visualizzate solo la prima e l'ultima colonna e le ultime 8000 righe circa. E' possibile una visualizzazione completa? Grazie Sabrina [[alternative HTML version deleted]]

[R] Package with function for plots with embedded hyperlinks?

2009-07-29 Thread Don MacQueen
Some years ago, if I recall correctly, I learned of a package that included a function that would write a plot to a file so that one could associate hyperlinks with elements of the plot, such as points. Then, when the plot was displayed in a browser, one could click on (for example) a point,

[R] (senza oggetto)

2009-07-29 Thread sabrina.michielin
Ciao, ho aperto con R un file di classe data frame con 15000 righe e 29 colonne. Nella console però sono visualizzate solo la prime e l'ultima colonna e le ultime 8000 righe circa. E' possibile una visualizzazione completa? Grazie Sabrina [[alternative HTML version deleted]]

[R] n-way table of aggregate statistics

2009-07-29 Thread Yoav Kessler
Hi, I'm doing my first steps in R. I wonder how can I create an n-way table of aggregate statistics, something like what aggregate.table does, but with an unlimited number of grouping factors. Thanks, Yoav Kessler __ R-help@r-project.org mailing list

Re: [R] Package with function for plots with embedded hyperlinks?

2009-07-29 Thread Don MacQueen
Never mind, just after I sent this I finally did the right search. It is RSVGTipsDevice -Don At 8:30 AM -0700 7/29/09, Don MacQueen wrote: Some years ago, if I recall correctly, I learned of a package that included a function that would write a plot to a file so that one could associate

Re: [R] (senza oggetto)

2009-07-29 Thread Uwe Ligges
Um Antwort von der R Mailinglite zu bekommen, verwenden Sie bitte eine aussagekräftige Betreff-Zeile und formulieren Sie Ihre Anfrage in *Englisch* - nachdem Sie den posting guide gelesen haben. MfG, Uwe Ligges sabrina.michie...@alice.it wrote: Ciao, ho aperto con R un file di classe data

Re: [R] Make my plots bigger and reduce white space around panels?

2009-07-29 Thread Greg Snow
It still was not attached, but you can reduce the white space by reducing the margins using par(mar=c(...)). If you do par(mar=c(0,0,0,0)), then there will be no space between the plots, using values larger than 0 will give space. But beware, you need to either suppress the plotting of axis

Re: [R] regexpr virtue

2009-07-29 Thread Gabor Grothendieck
dot means any character and * repeats it for as many times as possible so it replaces eveything (.*) up to the last dot (\\.) with nothing. On Wed, Jul 29, 2009 at 9:43 AM, Petr PIKALpetr.pi...@precheza.cz wrote: Thank you Gabor Grothendieck ggrothendi...@gmail.com napsal dne 29.07.2009

Re: [R] dot plot with several points for 2 categories

2009-07-29 Thread jaregi
Hi Michael, Steve, and 1Rnwb, I'm very impressed by the quick replies on the mailer. Thanks a lot for your suggestions. They worked very well. In general, I have to say that I'm a bit disappointed that in R, like in Excel, one basically needs to hack to get a dot blot with categories by adding

Re: [R] Add a line in a Pairs2 and mark the axis length

2009-07-29 Thread Greg Snow
I am not sure what you mean by mark the length on each sub plot y axis, but here is an example of the other parts (and if you know how to mark the length on a single regular plot, then just add that code to the panel function): pairs2( iris[,1], iris[,2:4], panel=function(x,y,...) {

[R] vector

2009-07-29 Thread Inchallah Yarab
Hi , i have a vector A=(a1,a2,a3,a4) and i want to create another vector B=(a1,a1,a2,a2,a3,a3,a4,a4) !!! i know that it is simple but i begin with R so i nned your help!! thank you for your help !!! [[alternative HTML version deleted]]

[R] visualizing columns

2009-07-29 Thread sabrina.michielin
hi, i've opened a file with R which data are data.frame. It has 15000 rows and 29 columns. On the console i only can see the first and the last columns and the last 8000 rows. Is it possible to visualize the entire data set? Thanks Sabrina Da:

Re: [R] vector

2009-07-29 Thread Linlin Yan
rep(A, each=2) On Thu, Jul 30, 2009 at 12:15 AM, Inchallah Yarabinchallahya...@yahoo.fr wrote: Hi , i have a vector A=(a1,a2,a3,a4) and i want to create another vector B=(a1,a1,a2,a2,a3,a3,a4,a4) !!! i know that it is simple but i begin with R so i nned your help!! thank you for your help

Re: [R] Adding picture to graph?

2009-07-29 Thread Greg Snow
In addition to the other responses, you may want to look at the subplot function in the TeachingDemos package for a way to place the image at a location within the plot (the other answers so far use the image as a full background), see the last example on the help page for a way to use the R

Re: [R] Drawing lines in margins

2009-07-29 Thread Greg Snow
In addition to Benjamin's response (which is the best way that I know of), you may also want to look at the grconvertX and grconvertY functions for ways to find the coordinates in the margins to plot at. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare

Re: [R] dot plot with several points for 2 categories

2009-07-29 Thread Steve Lianoglou
Hi, On Jul 29, 2009, at 12:11 PM, jaregi wrote: Hi Michael, Steve, and 1Rnwb, I'm very impressed by the quick replies on the mailer. Thanks a lot for your suggestions. They worked very well. In general, I have to say that I'm a bit disappointed that in R, like in Excel, one basically

Re: [R] visualizing columns

2009-07-29 Thread Greg Snow
Try the View function (note capitol V), does that do what you want? -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- project.org] On

Re: [R] Summarising Data for Forrest Plots

2009-07-29 Thread Polwart Calum (County Durham and Darlington NHS Foundation Trust)
Are n.FD and n.RD the number of people who received the full/reduced dose Yes - but I don't have the data structured like that YET - thats what I want to get to because thats what forest plot seems to be wanting. and surv.FD and surv.RD the number of people that survived? Mmm... was more

[R] - counting factor occurrences within a group: tapply()

2009-07-29 Thread Ian Chidister
Dear List, I'm an [R] novice starting analysis of an ecological dataset containing the basal areas of different tree species in a number of research plots. Example data follow: Trees-data.frame(SppID=as.factor(c(rep('QUEELL',2), rep('QUEALB',3), 'CORAME', 'ACENEG', 'TILAME')), BA=c(907.9,

Re: [R] Summarising Data for Forrest Plots

2009-07-29 Thread Polwart Calum (County Durham and Darlington NHS Foundation Trust)
What I want to do is do a forrest (forest) plot for subgroups within my single dataset as a test of heterogeniety. I have a dataset who received either full dose(FD) or reduced dose(RD) treatment, and a number of characteristics about those subjects: age, sex, renal function, weight,

Re: [R] (senza oggetto)

2009-07-29 Thread Jorge Ivan Velez
Caro Sabrina, Take a look at ?options, especially the max.print parameter. Ciao, Jorge 2009/7/29 sabrina.michie...@alice.it Ciao, ho aperto con R un file di classe data frame con 15000 righe e 29 colonne. Nella console perň sono visualizzate solo la prime e l'ultima colonna e le ultime

[R] Re : vector thank you it works

2009-07-29 Thread Inchallah Yarab
I'm very impressed by the quick replies on the mailer. Thanks a lot for your suggestions. They worked very well. De : Linlin Yan yanlinli...@gmail.com Cc : r-help@r-project.org Envoyé le : Mercredi, 29 Juillet 2009, 18h26mn 32s Objet : Re: [R] vector rep(A,

Re: [R] - counting factor occurrences within a group: tapply()

2009-07-29 Thread jim holtman
This is probably what you want; you need to count the number of unique instances: tapply(Trees$SppID, Trees$PlotID, function(x) length(unique(x))) BU3F10 BU3F11 BU3F12 1 2 4 On Wed, Jul 29, 2009 at 12:57 PM, Ian Chidisterian.chidis...@gmail.com wrote: Dear List, I'm an [R]

Re: [R] - counting factor occurrences within a group: tapply()

2009-07-29 Thread Daniel Malter
does length instead of nlevels do what you want to do? with(Trees,tapply(SppID,PlotID,unique)) daniel - cuncta stricte discussurus - -Ursprüngliche Nachricht- Von: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] Im

[R] side-by-side Barplot newbie question

2009-07-29 Thread Brindha Selvaraj
Hi, I am new to R and I hope someone can help me with my problem. I am trying to draw a side by side barplot. There is a main experiment and there are many sub experiments within the main experiment. I would like to draw a bar plot showing the number of sub_experiments done for each main_exp.

[R] Side by Side Barplot Newbie Question

2009-07-29 Thread Brindha Selvaraj
Hi, Many apologies for sending this twice. I accidentally hit the send button before I finished writing my mail. I am new to R and I hope someone can help me with my problem. I am trying to draw a side by side barplot. There is a main experiment and there are many sub experiments within the

Re: [R] Determine the dimension-names of an element in an array in R

2009-07-29 Thread Poersching
Hey, i have forgotten to generalize the code so Correl-Correl[1:4,,,] must be Correl-Correl[1:length(c),,,] it's because the comparison levels. I think you don't want the correlation betweeen A1, B1, D1 and A2, C1, D1 , but between A1, B1, D1 and A1, C1, D1 or between A1, B1, D1 and A1, C2,

Re: [R] - counting factor occurrences within a group: tapply()

2009-07-29 Thread Ian Chidister
Hi All- Thanks for your quick responses. I was looking for unique instances, so Jim's and Daniel's suggestions got the job done. Using length alone didn't discriminate between multiple occurrences of the same species and multiple species. I do have one followup question- my full data set (not

Re: [R] - counting factor occurrences within a group: tapply()

2009-07-29 Thread jim holtman
One way is to exclude the NAs from consideration by creating a new object without NAs in that column: newTrees - Trees[!is.na(Trees$SppID),] tapply(newTrees$SppID, newTrees$PlotID, function(x) length(unique(x))) On Wed, Jul 29, 2009 at 2:13 PM, Ian Chidisterian.chidis...@gmail.com wrote: Hi

Re: [R] - counting factor occurrences within a group: tapply()

2009-07-29 Thread jim holtman
Or even easier: tapply(Trees$SppID, Trees$PlotID, function(x) length(unique(na.omit(x On Wed, Jul 29, 2009 at 2:13 PM, Ian Chidisterian.chidis...@gmail.com wrote: Hi All- Thanks for your quick responses.  I was looking for unique instances, so Jim's and Daniel's suggestions got the job

Re: [R] - counting factor occurrences within a group: tapply()

2009-07-29 Thread Ian Chidister
Jim- That did the trick- thanks so much for taking the time to help me out. Sincerely, Ian Chidister On Wed, Jul 29, 2009 at 11:57 AM, Ian Chidister ian.chidis...@gmail.comwrote: Dear List, I'm an [R] novice starting analysis of an ecological dataset containing the basal areas of

[R] Systematic resampling (in sequential Monte Carlo)

2009-07-29 Thread Giovanni Petris
Dear all, Here is a little coding problem. It falls in the category of how can I do this efficiently? rather than how can I do this? (I know how to do it inefficiently). So, if you want to take the challenge, keep reading, otherwise just skip to the next post - I won't be offended by that ;-)

[R] Watching tune parameters for SVM?

2009-07-29 Thread Noah Silverman
Hi, I'm switch over from RapidMiner to R. (The learning curve is steep, but there is so much more I can do with R and it runs much faster overall.) In RapidMiner, I can tune a parameter of my svm in a nice cross validation loop. The process will print out the progress as it goes. So for a

[R] how to compute other columns without a column for sample name

2009-07-29 Thread sandsky
Data has the first row for variable name and the first column for sample name. I want to take Log for all data, but how to compute without the first column for sample name. log.raw_data=log(raw_data,base=2) Error in Math.data.frame(list(sample_id = c(1L, 2L, 3L, 4L, 5L, 6L, 7L, :

[R] Side by Side Barplot newbie question

2009-07-29 Thread Brinda S
Hi, Many apologies for sending this twice. I accidentally hit the send button before I finished writing my mail. I am new to R and I hope someone can help me with my problem. I am trying to draw a side by side barplot. There is a main experiment and there are many sub experiments

[R] standard error of median in MASS library

2009-07-29 Thread Lisa Wang
Hello all, I wonder which function in MASS library is calculating the standard error of median? thank you very much in advance, Lisa __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] regexpr virtue

2009-07-29 Thread Chuck Taylor
Petr, Here is a different approach. It, in effect, works from the end of the string backwards, rather than from the beginning of the string forwards. substring(x, regexpr([0-9]+$, x)) The regular expression [0-9]+$ finds a string of 1 or more (+) digits ([0-9]) followed by the end of the

Re: [R] Installing lme4 package in Windows Vista

2009-07-29 Thread Angela Radulescu
Thanks everyone! It works now :) Cheers, a. ONKELINX, Thierry wrote: Dear Angela, lme() is a part of the nlme package. The lme4 package has the function lmer() which is the equivalent of lme() from nlme. Both function differ in their capabilities. Briefly: lmer() can (easly) do

[R] Standard error of Median in MASS library

2009-07-29 Thread Lisa Wang
Dear All, I wonder which function in MASS library calculates and output the standard error of median. Thank you in advance for your help Lisa Wang Biostatistics, Princess Margaret hospital, toronto, On __ R-help@r-project.org mailing list

Re: [R] how to skip a numeric column for averaging other columns?

2009-07-29 Thread Steve Lianoglou
Hi, On Jul 29, 2009, at 3:02 PM, sandsky wrote: Data has the first row for variable name and the first column for sample name. I want to take Log for all data, but how to compute without the first column for sample name. That is, column 1: sample ID column 2-10: data I think one

Re: [R] how to skip a numeric column for averaging other columns?

2009-07-29 Thread John Kane
log.raw.data - log(raw.data[,2:10]) I think but I don't understand the Data has the first row for variable name comment --- On Wed, 7/29/09, sandsky realst...@hotmail.com wrote: From: sandsky realst...@hotmail.com Subject: [R] how to skip a numeric column for averaging other columns?

Re: [R] Transporting data in different R windows

2009-07-29 Thread Tal Galili
In the useR 2009 conference there was a lecture on how to use bigmemory to create and object (a matrix I guess) - and then be able to access it from two R sessions. Consider searching for that :) Tal On Wed, Jul 29, 2009 at 4:15 PM, Bogaso bogaso.christo...@gmail.com wrote: Hi, I am

Re: [R] Side by Side Barplot Newbie Question

2009-07-29 Thread Tal Galili
Hi Brindha Does this answer your question: http://onertipaday.blogspot.com/2007/05/make-many-barplot-into-one-plot.html ? Cheers, Tal On Wed, Jul 29, 2009 at 8:48 PM, Brindha Selvaraj brindharh...@gmail.comwrote: Hi, Many apologies for sending this twice. I accidentally hit the send

Re: [R] Standard error of Median in MASS library

2009-07-29 Thread Greg Snow
Well the MASS package is support for a book, the details for most of functions in the package are detailed in the book, so if you really want to know, either look at the code, or read the book. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org

Re: [R] Superscripts and rounding

2009-07-29 Thread ehux
library(RODBC) library(HYDAT) You will need to install HYDAT (the zip file) from http://www.geog.ubc.ca/~rdmoore/Rcode.htm Below is my current code - which works. The [[]] is the way i am accessing the columns from the data frame. thanks again for all your help # load HYDAT data

Re: [R] Package with function for plots with embedded hyperlinks?

2009-07-29 Thread John Kane
Don't leave us hanging! What is it? --- On Wed, 7/29/09, Don MacQueen m...@llnl.gov wrote: From: Don MacQueen m...@llnl.gov Subject: Re: [R] Package with function for plots with embedded hyperlinks? To: r-help@r-project.org Received: Wednesday, July 29, 2009, 11:43 AM Never mind, just

[R] R programming class - Boston USA area - or online

2009-07-29 Thread Boucher, Mike
Hello - I am just beginning to look into R Programming and have written some basic R code. Do you know of anyone in the Boston-USA area that might be offering any courses on R Programming? Or possibly a course online? Many thanks Mike Boucher Michael Boucher | Quantitative Analyst

Re: [R] Transporting data in different R windows

2009-07-29 Thread Patrick Connolly
On Wed, 29-Jul-2009 at 06:15AM -0700, Bogaso wrote: | | Hi, | | I am working with multiple R-windows opened and would like to | transport some variables from one to another. Is there any direct | way to do this without saving them in hard-disk? With so little information given, I can't tell

Re: [R] Newbie in R: Reading .txt files and storing the 'numbers' in a vector

2009-07-29 Thread Patrick Connolly
On Wed, 29-Jul-2009 at 10:29AM +0200, Patrick Schorderet wrote: Hello everybody, I'm a newbie in R and just went through an introduction class recently. Did you get the distinction between a vector and a dataframe? Here's my problem. I have 2 text files (.txt) with plain numbers

Re: [R] xtable formatting: RED for negative numbers?

2009-07-29 Thread cameron.bracken
Ken-JP wrote: Is there a way to modify this code to generate RED numbers inside xtable for negative results in x.ts? This post would probably have been better for R-help. Anyway, you can do it easily by modifying print.xtable.R in the xtable package. If it is easier, make a copy of

[R] Object equality for S4 objects

2009-07-29 Thread Stavros Macrakis
To test two environments for object equality (Lisp EQ), I can use 'identity': e1 - environment(local(function()x)) e2 - environment(local(function()x)) identical(e1,e2) # compares object identity [1] FALSE identical(as.list(e1),as.list(e2))# compares values as

[R] Which CRAN mirror is the fastest ?

2009-07-29 Thread Tal Galili
Hi dear R help group. I was wondering how can I find out which CRAN mirror would be the fastest for me (I leave in Israel and therefore don't have a CRAN mirror for our country to go to by default) Thanks, Tal -- -- My contact information:

Re: [R] Side by Side Barplot Newbie Question

2009-07-29 Thread John Kane
I think your data is set up incorrectly. With your data below as xx try this. # Dotcharts are often better than barplots so you might want to # try this library(reshape) mm - melt(xx, id=c(1:2)); mm bb - as.matrix(cast(mm, tt

  1   2   >