Re: [R] how do I plot a regression curve with the data?

2009-10-27 Thread Peter Ehlers
Ken Ervin wrote: I have a data set of 6 or so ordered pairs, and I've been able to graph them and have decided to use a high-order polynomial regression. I've used the following piece of code: regression <- function(x,y) { x <- c(insert_numbers_here) y <- c(insert_other_numbers_here)

Re: [R] Cannot activate chm help in R 2.10

2009-10-27 Thread Ulrike Groemping
Charles, not quite in response to your question, but I think a better message in R 2.10 would be to suggest use of help_type="html" (which can of course be included in Rprofile.site). While chm is no longer supported, html has been substantially improved and provides new linking facilities betwee

Re: [R] "ipredknn" - How may I find values?

2009-10-27 Thread David Winsemius
On Oct 27, 2009, at 8:37 PM, Grzes wrote: I'm sorry David, this is my code once again: library(klaR) library(ipred) library(mlbench) data(PimaIndiansDiabetes2) dane=na.omit(PimaIndiansDiabetes2)[,c(2,5,9)] dane[,2]=log(dane[,2]) dane[,1:2]=scale(dane[,1:2]) zbior.uczacy=sample(1:nrow(dane),nr

[R] need help explain the routine input parameters for seROC and cROC found in the R archive

2009-10-27 Thread Waverley @ Palo Alto
Please help. I found the code in the archive. The author of this script says: "The first function (seROC) calculate the standard error of ROC curve, the second function (cROC) compare ROC curves." Can some one explain to me what are the na, nn and r parameters which are used as the input to the

Re: [R] Help - Probability scale on an ECDF plot

2009-10-27 Thread Don MacQueen
You need to tell the mailing list what you have tried. That way you will get better help. Here is one solution. foo <- rnorm(1000) probs <- seq(0,1,.1) foo <- rnorm(1000) bah <- quantile(foo,probs) plot(bah,probs) But it turns out that ?ecdf tells you there is an ecdf function. And t

Re: [R] Aggregate and cross tabulation

2009-10-27 Thread jim holtman
FIRST: PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. If you expect an answer, please provide the data. Here is one way of doing it: > N <- 30 > x <- data.frame(A=sample(1:3, N, TRUE), B=sample(1:2,

Re: [R] re gression with multiple dependent variables?

2009-10-27 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Rnewb > Sent: Tuesday, October 27, 2009 6:44 PM > To: r-help@r-project.org > Subject: [R] re gression with multiple dependent variables? > > > i have a series of regressions i n

Re: [R] re gression with multiple dependent variables?

2009-10-27 Thread Daniel Malter
Hi, cbind the dependent variables such as in: x=rnorm(100) e1=rnorm(100) e2=rnorm(100) e3=rnorm(100) y1=2*x+e1 y2=-1*x+e2 y3=0.7*x+e3 reg=lm(cbind(y1,y2,y3)~x) summary(reg) Cheers, Daniel - cuncta stricte discussurus - -Ursprüngliche Nachr

Re: [R] cox regression extract strata as numeric

2009-10-27 Thread Steven McKinney
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > project.org] On Behalf Of ?e???da? ?pa?t?? > Sent: Tuesday, October 27, 2009 3:51 PM > To: r-help@r-project.org > Subject: [R] cox regression extract strata as numeric > > > Hi there, > > I perform a s

Re: [R] automatically adjusting axis limits

2009-10-27 Thread Greg Snow
If you really want to update the range of the plot axes after plotting, there is the zoomplot function in the TeachingDemos package. You will need to update the y-range each time through the loop and pass that to zoomplot. But, matplot is the better overall solution as has been pointed out alr

Re: [R] Porting Custom Packages from Linux to Windows

2009-10-27 Thread David Lubbers
You guys are awesome, thanks! On Tue, 2009-10-27 at 20:40 -0500, Marc Schwartz wrote: > On Oct 27, 2009, at 8:32 PM, Duncan Murdoch wrote: > > > Marc Schwartz wrote: > >> On Oct 27, 2009, at 6:20 PM, David Lubbers wrote: > >> > >> > >>> On my linux workstation I have a nice, very little project i

[R] running aov() and lme() on 64-bit

2009-10-27 Thread Emily Deomano
Good day, I'm ran aov () and lme() on a split-plot using a 64-bit machine. For aov() I don't see the values for ErrorA, F-value and p-value in the output. For lme(), output is different from results from a 32-bit. Please see codes used and corresponding output. Is my code wrong and/or not su

Re: [R] Cannot activate chm help in R 2.10

2009-10-27 Thread Charles Annis, P.E.
R-insiders: While trying to be clever I inserted these lines in ..\Rprofile.site (which works in R2.9.2 and earlier) # to prefer Compiled HTML help options(chmhelp=TRUE) but upon re-starting R2.10.0 I learned that chmhelp = TRUE is no longer supported: use help_type ="text" I'm sure this was

Re: [R] PDF Corrupted?

2009-10-27 Thread p_connolly
Quoting rkevinbur...@charter.net: I am running R 2.9.2 and creating a PDF that I am trying to open with Adobe Reader 9.2 but when I try to open it the reader responds with "There was an error opening this document. The file is damaged and cannot be repaired.: I am using the R command(s): p

[R] re gression with multiple dependent variables?

2009-10-27 Thread Rnewb
i have a series of regressions i need to run where everything is the same except for the dependent variable, e.g.: lm(y1 ~ x1+x2+x3+x4+x5, data=data) lm(y2 ~ x1+x2+x3+x4+x5, data=data) lm(y3 ~ x1+x2+x3+x4+x5, data=data) is it possible to run all these regs with a single command? given that the

Re: [R] "ipredknn" - How may I find values?

2009-10-27 Thread Grzes
I'm sorry David, this is my code once again: library(klaR) library(ipred) library(mlbench) data(PimaIndiansDiabetes2) dane=na.omit(PimaIndiansDiabetes2)[,c(2,5,9)] dane[,2]=log(dane[,2]) dane[,1:2]=scale(dane[,1:2]) zbior.uczacy=sample(1:nrow(dane),nrow(dane)/2,F) klasyfikatorKNN=ipredk

[R] cox regression extract strata as numeric

2009-10-27 Thread Λεωνίδας Μπαντής
Hi there, I perform a stratified cox and then I need the strata as a  numeric array "straft.ln" ft.ln <- coxph(Surv(times,deaths)~ages+chemos+chemos:f1+chemos:f2+horms+horms:f1+horms:f2+grades+grades:f1+grades:f2+positives+positives:f1+positives:f2+sizes+sizes:f1+sizes:f2+strata(stra),data=ddd)

Re: [R] re gression with multiple dependent variables?

2009-10-27 Thread Ben Bolker
Rnewb wrote: > > i have a series of regressions i need to run where everything is the same > except for the dependent variable, e.g.: > > lm(y1 ~ x1+x2+x3+x4+x5, data=data) > lm(y2 ~ x1+x2+x3+x4+x5, data=data) > lm(y3 ~ x1+x2+x3+x4+x5, data=data) > > is it possible to run all these regs with

Re: [R] Porting Custom Packages from Linux to Windows

2009-10-27 Thread Marc Schwartz
On Oct 27, 2009, at 8:32 PM, Duncan Murdoch wrote: Marc Schwartz wrote: On Oct 27, 2009, at 6:20 PM, David Lubbers wrote: On my linux workstation I have a nice, very little project in a directory called "mystuff" I installed "mystuff" into site-library with R CMD build, R CMD check and

Re: [R] Porting Custom Packages from Linux to Windows

2009-10-27 Thread Duncan Murdoch
Marc Schwartz wrote: On Oct 27, 2009, at 6:20 PM, David Lubbers wrote: On my linux workstation I have a nice, very little project in a directory called "mystuff" I installed "mystuff" into site-library with R CMD build, R CMD check and R CMD install. This was all with the file mystuff.tar.

[R] New variables "remember" how they were created?

2009-10-27 Thread Skipper Seabold
Hello all, I hope this question is appropriate for this ML. Basically, I am wondering if when you create a new variable, if the variable holds some information about how it was created. Let me explain, I have the following code to replicate an example in a textbook (Greene's Econometric Analysis

Re: [R] how do I plot a regression curve with the data?

2009-10-27 Thread andrew
Hi Ken, Perhaps something like plot(x,y) lines(sort(x), fit$fitted.values[order(x)]) should do what I think you want. I think you have to be a bit careful on the ordering of the fitted values so that they match up with the order of the x variable, otherwise you get an odd looking line plot. Re

Re: [R] PDF Corrupted?

2009-10-27 Thread Simon Blomberg
Try doing dev.off() after you finish the plot. That will close the device and should make it available for viewing. Cheers, Simon. On Tue, 2009-10-27 at 17:42 -0700, rkevinbur...@charter.net wrote: > I am running R 2.9.2 and creating a PDF that I am trying to open with Adobe > Reader 9.2 but wh

Re: [R] PDF Corrupted?

2009-10-27 Thread Jorge Ivan Velez
Hi Kevin, Close the device once the plot is completed: pdf(...) plots go here dev.off() HTH, Jorge On Tue, Oct 27, 2009 at 8:42 PM, <> wrote: > I am running R 2.9.2 and creating a PDF that I am trying to open with Adobe > Reader 9.2 but when I try to open it the reader responds with > > "There

Re: [R] PDF Corrupted?

2009-10-27 Thread Bryan Hanson
Looks like you need to do dev.off() after the plot to properly close the file. Bryan * Bryan Hanson Acting Chair Professor of Chemistry & Biochemistry DePauw University, Greencastle IN USA On 10/27/09 8:42 PM, "rkevinbur...@charter.net" wrote: > I am running R 2.9.2 and creating a

Re: [R] PDF Corrupted?

2009-10-27 Thread Marc Schwartz
On Oct 27, 2009, at 7:42 PM, rkevinbur...@charter.net wrote: I am running R 2.9.2 and creating a PDF that I am trying to open with Adobe Reader 9.2 but when I try to open it the reader responds with "There was an error opening this document. The file is damaged and cannot be repaired.:

Re: [R] [BioC] Is there a package similar to mogene10stprobeset.db by for Affymetrix Exon Arrays?

2009-10-27 Thread Peng Yu
mogene10stprobeset.db is generated with AnnotationDbi for mouse gene array. I don't find a package that seems generated by AnnotationDbi for exon arrays on the webpage you mentioned. Is it correct? On Tue, Oct 27, 2009 at 7:00 PM, Marc Carlson wrote: > Hi Peng, > > I am not completely clear from

[R] PDF Corrupted?

2009-10-27 Thread rkevinburton
I am running R 2.9.2 and creating a PDF that I am trying to open with Adobe Reader 9.2 but when I try to open it the reader responds with "There was an error opening this document. The file is damaged and cannot be repaired.: I am using the R command(s): pdf(file="cat.pdf", title="Historical

Re: [R] Porting Custom Packages from Linux to Windows

2009-10-27 Thread Rolf Turner
On 28/10/2009, at 12:20 PM, David Lubbers wrote: On my linux workstation I have a nice, very little project in a directory called "mystuff" I installed "mystuff" into site-library with R CMD build, R CMD check and R CMD install. This was all with the file mystuff.tar.gz. Now I want to instal

Re: [R] Porting Custom Packages from Linux to Windows

2009-10-27 Thread Marc Schwartz
On Oct 27, 2009, at 6:20 PM, David Lubbers wrote: On my linux workstation I have a nice, very little project in a directory called "mystuff" I installed "mystuff" into site-library with R CMD build, R CMD check and R CMD install. This was all with the file mystuff.tar.gz. Now I want to instal

[R] Aggregate and cross tabulation

2009-10-27 Thread Jonathan Greenberg
R-helpers: I have a data frame containing 4 factor variables (let's say A,B,C, and D) and 1 numerical variable (N). I would like to produce a cross-tabulated data frame in which A,B,C are individual columns, each factor of D is its own column, and the field is calculated as a given functi

[R] Help - Probability scale on an ECDF plot

2009-10-27 Thread Jessica Goin
Hello; Can anyone tell me how to set my y-axis to a probability scale on an ECDF plot? Or alternatively, how to generate a plot of percent cumulative probability against concentration? DASplusR does this and calls it a CP plot, but I would like to be able to generate this outside of DASplusR- T

Re: [R] Antropometrics with R

2009-10-27 Thread David Winsemius
On Oct 27, 2009, at 7:27 PM, Orvalho Augusto wrote: Hey greate ones, is there any way to have something similar to stata zanthro on R? I suppose it is possible that someone will know what is in that stata package, but it would make more sense if you were to summarize what features would b

[R] Porting Custom Packages from Linux to Windows

2009-10-27 Thread David Lubbers
On my linux workstation I have a nice, very little project in a directory called "mystuff" I installed "mystuff" into site-library with R CMD build, R CMD check and R CMD install. This was all with the file mystuff.tar.gz. Now I want to install "mystuff" on my windows workstation. Can I use the

Re: [R] option to control the spac between columns in data frame

2009-10-27 Thread David Winsemius
On Oct 27, 2009, at 3:51 PM, Subodh Acharya wrote: Hello, I have a question regarding a way to control the appreance of output exported by R when I use capture.output( x, file = "Directory/file.txt") , I get a text file which when I paste to a word file looks like the first table below. T

Re: [R] column names of a correlation matrix

2009-10-27 Thread David Winsemius
On Oct 27, 2009, at 10:54 AM, Lee William wrote: Hi! All, I am working on a correlation matrix of 4217x4217 named 'cor_expN'. I wish to obtain pairs with highest correlation values. So, I did this b=matrix(data=NA,nrow=4217,ncol=1) rownames(b)=rownames(cor_expN) for(i in 1:4217){b[i,]=max(c

Re: [R] "ipredknn" - How may I find values?

2009-10-27 Thread David Winsemius
On Oct 27, 2009, at 10:18 AM, Grzes wrote: Yes, I want to know which points in my picture are in red or green area. For example: .glucose..insulin.diabetes 609 0.95177272 1.139969011 - I want to know that it's for example: black point in red area red ar

[R] Antropometrics with R

2009-10-27 Thread Orvalho Augusto
Hey greate ones, is there any way to have something similar to stata zanthro on R? I want a package that contains functions to give antropometric values, at least for the children. Caveman __ R-help@r-project.org mailing list https://stat.ethz.ch/mailm

Re: [R] How to clear colnames?

2009-10-27 Thread Henrique Dallazuanna
Try unname also. On Tue, Oct 27, 2009 at 8:09 PM, Peng Yu wrote: > I only see how to assign values to colnames() in help. Is there a way > to remove colnames? > > colnames(x) <- value > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/m

[R] Rjava, RImageJ, and/or S4 question.

2009-10-27 Thread Robert Baer
I am out of my league with this question. The following code starts the java imaging program ImageJ from within R, and displays an image (assuming ImageJ is installed on your computer). library(RImageJ) img <- IJ$openImage( file.choose() ) #pick an available .tif file img$show()# make

Re: [R] How to express a tree?

2009-10-27 Thread Duncan Temple Lang
Jim Lemon wrote: > On 10/28/2009 04:06 AM, Hesen Peng wrote: >> Hello everybody, >> >> I'm write a function whose output represents a tree. Can anyone please >> recommend me some data structure in R which are good for expressing a >> tree? The possible idea I'm having in my mind is to represent t

Re: [R] How to express a tree?

2009-10-27 Thread Jim Lemon
On 10/28/2009 04:06 AM, Hesen Peng wrote: Hello everybody, I'm write a function whose output represents a tree. Can anyone please recommend me some data structure in R which are good for expressing a tree? The possible idea I'm having in my mind is to represent the whole tree as a list in which

Re: [R] Why I get this error? Error in close.connection(f) : invalid connection

2009-10-27 Thread baptiste auguie
Hi, >From ?read.csv "Alternatively, file can be a readable text-mode connection (which will be opened for reading if necessary, and if so closed (and hence destroyed) at the end of the function call)" HTH, baptiste 2009/10/27 Peng Yu : > I don't understand why I can not close 'f'. This may b

Re: [R] Why I get this error? Error in close.connection(f) : invalidconnection

2009-10-27 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Peng Yu > Sent: Tuesday, October 27, 2009 3:22 PM > To: r-h...@stat.math.ethz.ch > Subject: [R] Why I get this error? Error in > close.connection(f) : invalidconnection > > I do

Re: [R] How to clear colnames?

2009-10-27 Thread Daniel Malter
x=rnorm(100) y=rnorm(100) mydata=data.frame(x,y) names(mydata)=("I.am.x","I.am.y") head(mydata) names(mydata)=c(NULL,NULL) head(mydata) names(mydata) They technically don't exist if you null them. Daniel - cuncta stricte discussurus - -Ursprün

Re: [R] How to clear colnames?

2009-10-27 Thread Peng Yu
'all_annotation' is a data.frame. Somehow, rownames can not be clear. Why is it like that? > rownames(all_annotation)<-NULL > rownames(all_annotation) [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" > class(all_annotation) [1] "data.frame" On Tue, Oct 27, 2009 at 5:20 PM, Benilton Carvalh

[R] Why I get this error? Error in close.connection(f) : invalid connection

2009-10-27 Thread Peng Yu
I don't understand why I can not close 'f'. This may be very simple, but I don't see why. Could somebody let me know? $ cat gzfile.csv "","V1","V2","V3","V4","V5" "1",1,5,9,13,17 "2",2,6,10,14,18 "3",3,7,11,15,19 "4",4,8,12,16,20 $ Rscript gzfile.R > f = file("gzfile.csv") > A = read.csv(f) > A

Re: [R] How to clear colnames?

2009-10-27 Thread Benilton Carvalho
colnames(x) <- NULL On Oct 27, 2009, at 8:09 PM, Peng Yu wrote: I only see how to assign values to colnames() in help. Is there a way to remove colnames? colnames(x) <- value __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo

[R] How to clear colnames?

2009-10-27 Thread Peng Yu
I only see how to assign values to colnames() in help. Is there a way to remove colnames? colnames(x) <- value __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/po

Re: [R] Non-normal residuals.

2009-10-27 Thread Ben Bolker
[Taking the liberty of posting back to r-help] I'd be curious what the particular objections were. I have one of those annoying "it depends" answers. In general, transformation can (1) change [(de)stabilize] variance across groups/gradients; (2) (non)normalize residuals; (3) chang

Re: [R] Year and Month extraction from Date object.

2009-10-27 Thread Prof Brian Ripley
?weekdays contains Note: Other components such as the day of the month or the year are very easy to compute: just use ‘as.POSIXlt’ and extract the relevant component. (d <- Sys.Date()) 1900 + as.POSIXlt(d)$year 1 + as.POSIXlt(d)$mon should get you started. On Tue, 27 Oct 2009,

Re: [R] explalinig the output of my linear model analysis

2009-10-27 Thread Tal Galili
I second Rolf. On Tue, Oct 27, 2009 at 8:48 PM, Rolf Turner wrote: > > On 27/10/2009, at 7:58 PM, Peter Ehlers wrote: > > ... if one doesn't understand the output of lm(), then one's >> >> knowledge of statistics is insufficient to warrant using lm(). >> > > I nominate this as a fortune. > >

[R] Year and Month extraction from Date object.

2009-10-27 Thread rkevinburton
Hello, I have seen much discussion on Date. But I can't seem to do this simple operation. I can convert a string to a date: d <- as.Date(DATE, format="%m/%d/%Y") But what I want to do is extract the year and month so I can construct an element in a ts object. Ideally I would like to see d$year

Re: [R] tk_choose.files without multiple selection?

2009-10-27 Thread Prof Brian Ripley
This depends on the version of Tk you have installed. The Tk 8.5.7 ChangeLog has 2008-08-25 Todd M. Helfter The patch is associated with the bug tracker id: 1936220 library/tkfbox.tcl : fix the multiple selection error for tk_getOpenFile -multiple 1 which fails on all

Re: [R] Cbind() on the right-side of a formula in xYplot()

2009-10-27 Thread Dylan Beaudette
On Monday 26 October 2009, Frank E Harrell Jr wrote: > Dylan Beaudette wrote: > > Hi, > > > > Using the latest rms package I am able to make nice plots of model > > predictions +/- desired confidence intervals like this: > > > > # need this > > library(rms) > > > > # setup data > > d <- data.frame(

Re: [R] Non-normal residuals.

2009-10-27 Thread Ben Bolker
rkevinburton wrote: > > Hello, > > I asked a question about what the most likely process to follow if after a > time-series fit is performed the residuals are found to be non-normal. One > peron responded and offered to help if I supplied a sample data set. > Unfortunately now that I have a sa

Re: [R] Warning message when Loading package svMisc in R 2.10.0

2009-10-27 Thread Uwe Ligges
Richardson, Patrick wrote: svMisc was built and submitted to CRAN under 2.9.2. If you are trying to use it within TINN, TINN will still work. The package needs to be built under 2.10 and resubmitted. I'm sure Phillipe will get to it in due time. No, that's nonsense. It does *not* need to b

[R] anova interaction contrasts: crossing helmert and linear contrasts

2009-10-27 Thread Katie Surrence
I am new to statistics, R, and this list, so apologies in advance for the errors etiquette I am certain to make (in spite of reading the posting guide, help on various commands, etc.).  Any help is greatly appreciated. Here is my data: fatigue = c(3,2,2,3,2,3,4,3,2,4,5,3,3,2,4,5,4,5,5,6,4,6,9,8,

Re: [R] Cannot activate chm help in R 2.10

2009-10-27 Thread Ulrike Groemping
Uwe Ligges-3 wrote: > > > > Duncan Murdoch wrote: >> On 10/27/2009 10:56 AM, Ulrike Groemping wrote: >>> >>> >>> Duncan Murdoch-2 wrote: Ulrike Groemping wrote: ... > My system is Windows XP, German locale computer. On installation, I > was > asked to decide for tex

Re: [R] MLE for lambda of Poisson distribution using fitdistr

2009-10-27 Thread Peter Ehlers
Ankush Bhargava wrote: Thank you everyone for responding. David, 3.75 in my example was equivalent to the mean of the values, which i thought was too much a coincidence... What do you think the significance of "(0.03343)". What is this value? Kjetil, Are you saying that mean(x) is same as the

[R] newbie: grading an histogram for several classes of the same discipline

2009-10-27 Thread Mauricio Ortiz Calvao
Hi there Sorry for the simple question, but I have been unable to find an answer. I am the coordinator of a basic discipline in a university; we have several classes taking this discipline and I would like to compare the grades, via a histogram for the distinct classes. Concretely, I have fi

[R] How to quit unwanted execution immediately?

2009-10-27 Thread Peng Yu
Occasionally, I start a command (taking long time to finish) that I did not really want to start. I type 'ctrl+C' to try to quit the execution. However, R does not quit the execution of the command immediately. I'm wondering if R could response to ctrl+C immediately. __

[R] option to control the spac between columns in data frame

2009-10-27 Thread Subodh Acharya
Hello, I have a question regarding a way to control the appreance of output exported by R when I use capture.output( x, file = "Directory/file.txt") , I get a text file which when I paste to a word file looks like the first table below. The following table has its clumns spaced closely so when I

Re: [R] sm.regression

2009-10-27 Thread Peter Ehlers
Val wrote: Hi all, I was looking for a non parametric survival analysis and I came up with the following sample from the web. However, I could not run it. Which library or function does "sm.regression" require? Time to install package 'sos'. It would quickly tell you that you'll find sm.reg

[R] Non-normal residuals.

2009-10-27 Thread rkevinburton
Hello, I asked a question about what the most likely process to follow if after a time-series fit is performed the residuals are found to be non-normal. One peron responded and offered to help if I supplied a sample data set. Unfortunately now that I have a sample I have lost the emai addressl.

Re: [R] Sandard deviation calculation

2009-10-27 Thread marcos carvajalino
Yup you're right, after posting i took a better look at the subsetting, found the problem and post again, my bad... 2009/10/27 Duncan Murdoch : > On 27/10/2009 2:58 PM, marcos carvajalino wrote: >> >> Dear ms. >> >> The most possible reason for this: >> >>> Dear all >>> I am trying to learn R >>>

Re: [R] explalinig the output of my linear model analysis

2009-10-27 Thread Kingsford Jones
...which would complement the apropos fortune from John Fox: > library(fortunes) > fortune('dangerous') If you give people a linear model function you give them something dangerous. -- John Fox useR! 2004, Vienna (May 2004) On Tue, Oct 27, 2009 at 12:48 PM, Rolf Turner wrote: > > On

Re: [R] Sandard deviation calculation

2009-10-27 Thread Duncan Murdoch
On 27/10/2009 2:58 PM, marcos carvajalino wrote: Dear ms. The most possible reason for this: Dear all I am trying to learn R I was trying to calculate standard deviation here are the commands and outputs in R sd(Ht_cm[type=='SD'])[1] 3.283605> sd(Ht_cm[from_treeline=='above'])[1] 16.83289> >

Re: [R] Detection Times and Poisson Distribution

2009-10-27 Thread Ben Bolker
Lorenzo Isella wrote: > > Dear All, > Apologies if my questions are too basic for this list. > I am given a set of data corresponding to list of detection times (real, > non-integer numbers in general) for some events, let us say nuclear > decays to fix the ideas. > It is a small dataset, cor

Re: [R] Exclude rows in xyplot

2009-10-27 Thread Dieter Menne
Joel Fürstenberg-Hägg wrote: > > > > Now I'm trying to make xyplots to compare the result from three different > categories: > > # Plot Pro against Glc for each of the three categories > xyplot(Pro ~ Glc | Categories_BBCH_ID, data=fieldTrial0809, pch="°", > layout=c(1, 3), aspect=1, inde

Re: [R] MLE for lambda of Poisson distribution using fitdistr

2009-10-27 Thread Ankush Bhargava
Thank you everyone for responding. David, 3.75 in my example was equivalent to the mean of the values, which i thought was too much a coincidence... What do you think the significance of "(0.03343)". What is this value? Kjetil, Are you saying that mean(x) is same as the MLE for the poisson lamb

[R] how do I plot a regression curve with the data?

2009-10-27 Thread Ken Ervin
I have a data set of 6 or so ordered pairs, and I've been able to graph them and have decided to use a high-order polynomial regression. I've used the following piece of code: regression <- function(x,y) { x <- c(insert_numbers_here) y <- c(insert_other_numbers_here) fit <- lm(y ~ x +

Re: [R] Sandard deviation calculation

2009-10-27 Thread marcos carvajalino
Hi ms. also try this: sd(Ht_cm[type=='SD' && from_treeline=='above']) cause i think you can't use [][] two apply 2 conditions to a data frame, in that cases you should use an AND (&&) conector like above 2009/10/27 marcos carvajalino : > Dear ms. > > The most possible reason for this: > >>Dear

Re: [R] Print several xyplots to the same page in a pdf file

2009-10-27 Thread Dieter Menne
Joel Fürstenberg-Hägg wrote: > > > I'm using the lattice package and the xyplot to make several graphs like > below. However, I can just print the three grouped plots onto one page as > I'm putting them into a pdf-file, which gives me a huge amount Check the documentation and examples for pr

Re: [R] automatically adjusting axis limits

2009-10-27 Thread John Kane
PLEASE provide commented, minimal, self-contained, reproducible code. particularly a sample data.set. At the moment it sounds like you have one variable (Wavelength) with a length of 56 and Reflectance with a length of 5,000. What format(s) are the data in? Data.frames? Clearly this is not

Re: [R] automatically adjusting axis limits

2009-10-27 Thread Ben Bolker
Sac-6 wrote: > > Dear R users, > > I am a newbie. Just switched from MATLAB. So thanks a lot for your > patience. > > I have 5 spectra collected in field. Each spectra has two columns : > Wavelength (56) and the actual measurement. > > Each measurement came in a different .txt file on

Re: [R] automatically adjusting axis limits

2009-10-27 Thread Ben Bolker
Sac-6 wrote: > > Dear R users, > > I am a newbie. Just switched from MATLAB. So thanks a lot for your > patience. > > I have 5 spectra collected in field. Each spectra has two columns : > Wavelength (56) and the actual measurement. > > Each measurement came in a different .txt file on

Re: [R] Sandard deviation calculation

2009-10-27 Thread marcos carvajalino
Dear ms. The most possible reason for this: >Dear all >I am trying to learn R >I was trying to calculate standard deviation >here are the commands and outputs in R >> sd(Ht_cm[type=='SD'])[1] 3.283605> sd(Ht_cm[from_treeline=='above'])[1] >> 16.83289> >sd(Ht_cm[type=='SD'][from_treeline=='above'

[R] Print several xyplots to the same page in a pdf file

2009-10-27 Thread Joel Fürstenberg-Hägg
Hello everybody, I'm using the lattice package and the xyplot to make several graphs like below. However, I can just print the three grouped plots onto one page as I'm putting them into a pdf-file, which gives me a huge amount of pages... Is it possible to put them all, or at least more than o

Re: [R] explalinig the output of my linear model analysis

2009-10-27 Thread Rolf Turner
On 27/10/2009, at 7:58 PM, Peter Ehlers wrote: ... if one doesn't understand the output of lm(), then one's knowledge of statistics is insufficient to warrant using lm(). I nominate this as a fortune. cheers, Rolf Turner ###

[R] Exclude rows in xyplot

2009-10-27 Thread Joel Fürstenberg-Hägg
Hi all, I'm searching for a way to exclude outliers from my dataset while making xyplots. While plotting using pairs(), I exclude specific row in my data frame and save the settings as a variable which I later include as an argument: # Discard outliers and save settings as idx idx=with(fieldTr

Re: [R] lasso plot using LARS

2009-10-27 Thread Kingsford Jones
Within the plot.lars code, change the type argument to matplot from 'b' to 'l': library(lars) myplot.lars <- edit(plot.lars) #change type = 'b' to type = 'l' in the call to matplot data(diabetes) object <- with(diabetes, lars(x,y)) myplot.lars(object, lty = 1, breaks = FALSE) hth, Kingsford Jon

Re: [R] User input when running R code in batch mode

2009-10-27 Thread Martin Maechler
> Barry Rowlingson > on Tue, 27 Oct 2009 10:17:24 +0100 writes: > On Tue, Oct 27, 2009 at 9:20 AM, Kaushik Krishnan > wrote: >> $ r --vanilla < test.r >>> a <- scan(what='character',n=1); a >> 1: Read 0 items >> character(0) >> >> Now it's not wo

Re: [R] Stack overflow in R 2.10.0 with sub()

2009-10-27 Thread Kenneth Roy Cabrera Torres
El mar, 27-10-2009 a las 10:47 -0700, Phil Spector escribió: > What happens if you type > > Sys.setlocale('LC_ALL','C') > > before using gsub or grep? When I do that, R hangs and don't show any message. > > - Phil Spector >

[R] automatically adjusting axis limits

2009-10-27 Thread Servet Ahmet Cizmeli
Dear R users, I am a newbie. Just switched from MATLAB. So thanks a lot for your patience. I have 5 spectra collected in field. Each spectra has two columns : Wavelength (56) and the actual measurement. Each measurement came in a different .txt file on disk (5 files in total). I wrote

Re: [R] operations on sparse matrices, and dense intermediary steps

2009-10-27 Thread Martin Maechler
Hi Jose, > "JQ" == Jose Quesada > on Sat, 24 Oct 2009 23:49:08 +0200 writes: JQ> -BEGIN PGP SIGNED MESSAGE- JQ> Hash: SHA1 JQ> Hi, JQ> I'm doing some basic operations on large sparse matrices, for example JQ> getting a row. JQ> it takes close to 30

Re: [R] RPostgreSQL package and libpq.dll file

2009-10-27 Thread christiaan pauw
Update to R 2.9 As far as I know the RPostgreSQL package doesn't work in R 2.8 2009/9/14 Lore M > > It still doesn't work. Now, R is asking me for the SSLEAY32.dll. If I > download it from the internet, and then put it in the file > \R-2.8.1\library\RPostgreSQL\libs, now they ask me for the VSIN

[R] sm.regression

2009-10-27 Thread Val
Hi all, I was looking for a non parametric survival analysis and I came up with the following sample from the web. However, I could not run it. Which library or function does "sm.regression" require? x <- runif(100,-2, 2) y <- x^2 + rnorm(50) sm.regression(x, y, h=0.5) Error: could not find fu

Re: [R] Stack overflow in R 2.10.0 with sub()

2009-10-27 Thread Kenneth Roy Cabrera Torres
Thank you very much for your interest. I make this: x <- as.character(alumnos$AL_NUME_ID) x <- x[-seq_len(length(x)/2)] save(x, file="x.RData") I exit form R, and then restart R and I make this: load("x.RData") y <- gsub("(^ +)|( +$)","",x) It shows me: Error en gsub("(^ +)|( +$)", "", x) :

Re: [R] New vector based on if/else statement within for loop?

2009-10-27 Thread Duncan Murdoch
On 10/27/2009 1:14 PM, Douglas M. Hultstrand wrote: Hello, I am trying to create a new vector (w) that is based on comparing two vectors (P and Z). The compaison is simple (I created a for loop that reassigns w based on if statement), all Z values >= 24 and P values <=1, w=88 else w=77. I

Re: [R] What is the difference between anova {stats} and aov?

2009-10-27 Thread Chuck Cleland
On 10/27/2009 1:06 PM, Peng Yu wrote: > There are anova {stats} and aov in R. It seems that anova takes an > object returned by a model fitting function. But I don't see any > examples for anova. Can somebody give me a simple example on anova? > What is the difference between anova and aov? http:/

Re: [R] Stack overflow in R 2.10.0 with sub()

2009-10-27 Thread Duncan Murdoch
On 10/27/2009 1:05 PM, Kenneth Roy Cabrera Torres wrote: Thank you very much for your interest. I make this: x <- as.character(alumnos$AL_NUME_ID) x <- x[-seq_len(length(x)/2)] save(x, file="x.RData") I exit form R, and then restart R and I make this: load("x.RData") y <- gsub("(^ +)|( +$)",""

[R] New vector based on if/else statement within for loop?

2009-10-27 Thread Douglas M. Hultstrand
Hello, I am trying to create a new vector (w) that is based on comparing two vectors (P and Z). The compaison is simple (I created a for loop that reassigns w based on if statement), all Z values >= 24 and P values <=1, w=88 else w=77. I am not getting the correct results for w, see examp

[R] lasso plot using LARS

2009-10-27 Thread Russell Ivory
When plotting a lars object, I cannot find a way to plot solid lines. Even when the arguments breaks=F and lty="solid" are used, the vertical lines at the break points do not plot but asterisks indicating the breaks still plot as part of each path leaving solid lines broken up by asterisks at the b

[R] How to express a tree?

2009-10-27 Thread Hesen Peng
Hello everybody, I'm write a function whose output represents a tree. Can anyone please recommend me some data structure in R which are good for expressing a tree? The possible idea I'm having in my mind is to represent the whole tree as a list in which a sublist (an element to the main list) cont

[R] What is the difference between anova {stats} and aov?

2009-10-27 Thread Peng Yu
There are anova {stats} and aov in R. It seems that anova takes an object returned by a model fitting function. But I don't see any examples for anova. Can somebody give me a simple example on anova? What is the difference between anova and aov? __ R-hel

[R] Detection Times and Poisson Distribution

2009-10-27 Thread Lorenzo Isella
Dear All, Apologies if my questions are too basic for this list. I am given a set of data corresponding to list of detection times (real, non-integer numbers in general) for some events, let us say nuclear decays to fix the ideas. It is a small dataset, corresponding to about 400 nuclear decay

Re: [R] Code improvement

2009-10-27 Thread Sebastien Bihorel
Hi Baptisti, Sorry for the late reply. I wanted to thank you for putting me on the right track. I finally got something to work not really by extracting the legend from a xyplot call, but by building my own legend grid.frame and passing it to my low-level function. Understanding Grobs and gri

Re: [R] Cannot activate chm help in R 2.10

2009-10-27 Thread Uwe Ligges
Duncan Murdoch wrote: On 10/27/2009 10:56 AM, Ulrike Groemping wrote: Duncan Murdoch-2 wrote: Ulrike Groemping wrote: ... My system is Windows XP, German locale computer. On installation, I was asked to decide for text or html help and chose html (there was no radio button for chm help).

Re: [R] User input when running R code in batch mode

2009-10-27 Thread Bernd Kreuss
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Kaushik Krishnan wrote: > Is there any way to make R stop for the user to enter values when > running in batch mode either by changing the way I invoke scan() or > readLines() or by using any other function? At least on linux this works: be...@t40:~/

  1   2   >