[R] How to make 'step' faster?

2010-08-19 Thread sambit rath
Dear all, I am fairly new to R. I would like to perform a step-wise logit regression aiming to select a model on the basis of AIC. I am using some large datasets (up to a million rows and 97 variables). It is taking the 'step' function just too long to complete a single routine. Now, I have tried

Re: [R] Latex no where to be seen

2010-08-19 Thread Barry Rowlingson
On Fri, Aug 20, 2010 at 5:18 AM, Donald Paul Winston wrote: > > I'm experimenting using R as a report writer. I'm told LaTex is the > destination for my quest. But ?latex() gives me an error. The package > manager does not have it. The package installer can't find it. Where is it? Have you tried

Re: [R] which one give clear picture-pdf, jpg or tiff?

2010-08-19 Thread Jeff Newmiller
I use Rgui and copy/paste special windows metafile. "Roslina Zakaria" wrote: >Hi, > >I need some opinion.� I would like to use graph that I generate from R code >and >save it into word document.� Which�format is better? pdf, jpeg or tiff? > >Thank you. > > > > [[alternative HTML v

Re: [R] Fatal Error

2010-08-19 Thread Joshua Wiley
Renaming the .RData file will suffice and is less extreme...I should have said that in the first place. On Thu, Aug 19, 2010 at 10:44 PM, Joshua Wiley wrote: > Hi Sheikh, > > The error suggests that the file .RData file may be corrupted.  Unless > you have data saved in it that you need, try dele

Re: [R] which one give clear picture-pdf, jpg or tiff?

2010-08-19 Thread Jeremy Miles
PNG is better for black and white graphs, tiff better for more colors, but gives a big file. JPG has a lossy compression, and is good with detailed colors (like photos) if you want a smaller file. You can't import (AFAIK) a PDF into word. On 19 August 2010 20:32, Roslina Zakaria wrote: > Hi, >

Re: [R] Fatal Error

2010-08-19 Thread Joshua Wiley
Hi Sheikh, The error suggests that the file .RData file may be corrupted. Unless you have data saved in it that you need, try deleting that file and then see if R will start properly. Maybe it is just me, but it seems like problems with the .RData file are happening frequently enough to possibly

[R] Rserve (Anyone?)

2010-08-19 Thread Donald Paul Winston
REXP has an asBytes() method. Will this capture the output of an R plot function if a proper graphics device is used? It appears R insists on sending plot output to a file. Kind of strange since it insists on loading all your data into memory before it can do anything. If so then does anyone know

[R] Latex no where to be seen

2010-08-19 Thread Donald Paul Winston
I'm experimenting using R as a report writer. I'm told LaTex is the destination for my quest. But ?latex() gives me an error. The package manager does not have it. The package installer can't find it. Where is it? It amazes me that there's not a built in "report" function that can produce the sam

[R] Fatal Error

2010-08-19 Thread sheik faisal
Hi, I tried to lauch R2.8.1 version on Windows platform after closing down one session but now i get this message in an Information Dialogue Box: "Fatal error: unable to restore saved data in .RData". When i click on OK in the dialogue box, R shuts down and wouldn’t let me do anything. I later do

[R] Inquiry about dea program

2010-08-19 Thread atsuo
Dear All, Nice to talk to you. My name is Atsuo Hashimoto. I am studying DEA in Japan. Also I'm teaching commercial at high school. Today, I send you this mail to ask you one thing for my further study. I'd like to know the way to find efficiency of NDRS' model of DEA under input orientat

Re: [R] Converting sparse matrix to data.frame in Matrix package

2010-08-19 Thread David Winsemius
On Aug 19, 2010, at 7:56 PM, erickso...@aol.com wrote: Is there a way to get the coordinate list vectors back from the matrix a without any prior knowledge? a [,1] [,2] [,3] [,4] [,5] [1,]00010 [2,]21000 [3,]00301 How to ge

[R] which one give clear picture-pdf, jpg or tiff?

2010-08-19 Thread Roslina Zakaria
Hi, I need some opinion.  I would like to use graph that I generate from R code and save it into word document.  Which format is better? pdf, jpeg or tiff? Thank you. [[alternative HTML version deleted]] __ R-help@r-project.org mailin

Re: [R] several Filled.contour plots on the same device...

2010-08-19 Thread Billy.Requena
Hi Alexis! I had the same problem you faced and the solution I found was modifying the layout function. That’s an example: f1 <- function (a, x) {2.15*a -0.25*x} f2 <- function (a,x) {exp(2.36*a - 0.04*x)} a1 <- seq(from=5.2, to=6.2, by=(6.2-5.2)/19) b1 <- seq(0,32) zeros <- rep(0, length(a)*len

Re: [R] Converting sparse matrix to data.frame in Matrix package

2010-08-19 Thread ericksonsm
Is there a way to get the coordinate list vectors back from the matrix a without any prior knowledge? a [,1] [,2] [,3] [,4] [,5] [1,]00010 [2,]21000 [3,]00301 How to get: r = c(1,2,2,3,3) c = c(4,1,2,3,5) v = c(1,2,1,3,1)

[R] How to execute an expression as well as a .R file with Rscript?

2010-08-19 Thread thmsfuller...@gmail.com
Hello All, I'm trying to supply both an expression and a .R file to Rscript. But it seems that it is not possible with the first approach (see below) and I'll have to use the second approach (see below). I'm wondering if it is a bug in Rscript not to support both a .R file and an expression. $ ca

Re: [R] Can't read/write to _nonfi

2010-08-19 Thread minh
Mr. William, Thank you very much for the reply. You are the first person i have an opportunity to talk to about my issue. In answering to your questions, i have reply item one through four 1) My Splus 8.0 Workbench version is 3.2 2) Sorry about the previous error messages, the precise

Re: [R] probabilities from predict.svm

2010-08-19 Thread Watling,James I
Hi Steve-- I spent some more time tuning the model with alternative gamma and cost values, but still kept coming back to the same issue re: probabilities. I spent some more time playing around with the code, and realized that the error did indeed have to do with the ifelse() function I used to

Re: [R] Aspect Ratio

2010-08-19 Thread r.ookie
Well-stated. On Aug 19, 2010, at 4:31 PM, Spencer Graves wrote: The 'fortunes' package contains the following: library(fortunes) fortune('rtfm') This is all documented in TFM. Those who WTFM don't want to have to WTFM again on the mailing list. RTFM. -- Barry Rowlingson R-help (October

Re: [R] Converting sparse matrix to data.frame in Matrix package

2010-08-19 Thread Phil Spector
This seems to work, although it eliminates the sparseness of the storage: dimnames(a) = list(NULL,letters[1:5]) as.data.frame(as.matrix(a)) a b c d e 1 0 0 0 1 0 2 2 1 0 0 0 3 0 0 3 0 1 - Phil Spector Statistic

Re: [R] Aspect Ratio

2010-08-19 Thread Spencer Graves
The 'fortunes' package contains the following: library(fortunes) fortune('rtfm') This is all documented in TFM. Those who WTFM don't want to have to WTFM again on the mailing list. RTFM. -- Barry Rowlingson R-help (October 2003) I see two problems with this: 1.

[R] Converting sparse matrix to data.frame in Matrix package

2010-08-19 Thread ericksonsm
I am able to create a coordinate list sparse matrix this way: r = c(1,2,2,3,3) c = c(4,1,2,3,5) v = c(1,2,1,3,1) a = sparseMatrix(i=r,j=c,x=v) However, this results in an object that looks like this: a 3 x 5 sparse Matrix of class "dgCMatrix" [1,] . . . 1 . [2,] 2 1 . . . [

[R] aggregate with cummax ??

2010-08-19 Thread skan
Hello I have a time series (with index of type chron) and I need to calculate the cummax(mydata)-mydata on every day separately. I've tried this aggregate(mydata, as.date, cummax) but aggregate can only produce a single scalar result for each subset instead of a vector. I've tried with tapply

Re: [R] csv vs. data frame

2010-08-19 Thread r.ookie
I have no doubt that Bret has been a huge contributor and my comment was (not) directed at him, nor in direct reply to his. My comment was a general statement that he (I don't recall his name) should not be offended because there is going to be hostility in any environment, and that I personally

Re: [R] AIC in MuMIn

2010-08-19 Thread Gavin Simpson
On Fri, 2010-08-20 at 06:31 +0800, elaine kuo wrote: > > > Oh, actually, I suppose you could automate this, so it will > return all > models with single variable: > > dd <- dredge(lm1) > parms <- !is.na(dd[, -c(1, (ncol(dd) - c(0:7

Re: [R] Aspect Ratio

2010-08-19 Thread r.ookie
Thanks for your example as well. Ted's example was exactly what I needed. On Aug 19, 2010, at 3:18 PM, Gavin Simpson wrote: On Thu, 2010-08-19 at 14:28 -0700, r.ookie wrote: > Well, I had to look further into the documentation to see 'If asp is a > finite positive value then the window is set up

Re: [R] Aspect Ratio

2010-08-19 Thread r.ookie
This example definitely clarified a situation where 'asp' is useful/helpful. Thanks! On Aug 19, 2010, at 3:05 PM, (Ted Harding) wrote: Spencer, you came up with your example just as I finished making mine: set.seed(54321); X <- rnorm(200) ; Y <- 0.25*X+0.25*rnorm(200) ##Compare: plot(X,Y,pch=

Re: [R] AIC in MuMIn

2010-08-19 Thread elaine kuo
> >> > > Please kindly advise if it is possible to show the singular model with > > only one certain variable using the command subset. (or maybe others) > > I tried the command "subset=X3" but it returned multiple models > > including X3. > > > > > > The above demand might look unnecessary when vi

Re: [R] logistic regression tree

2010-08-19 Thread Achim Zeileis
On Thu, 19 Aug 2010, Gavin Simpson wrote: On Thu, 2010-08-19 at 13:42 -0700, Kay Cichini wrote: hello everyone, i sampled 100 stands at 20 restoration sites and presence of 3 different invasive plant species. i came across logistic regression trees and wonder if this is suited for my purpose -

Re: [R] Aspect Ratio

2010-08-19 Thread Gavin Simpson
On Thu, 2010-08-19 at 14:28 -0700, r.ookie wrote: > Well, I had to look further into the documentation to see 'If asp is a > finite positive value then the window is set up so that one data unit > in the x direction is equal in length to asp * one data unit in the y > direction' > > Okay, so in wh

Re: [R] csv vs. data frame

2010-08-19 Thread Gavin Simpson
On Thu, 2010-08-19 at 14:02 -0700, r.ookie wrote: > I agree with you Duncan because I sense the hostility too, but, in any > environment, there are going to be those who 'don't play well with > others.' I just delete and read the next posting. I'm personally here > to learn :) If you knew Bert's c

Re: [R] Aspect Ratio

2010-08-19 Thread r.ookie
I understand Joshua, it's a way to display the plotted data in a graph. I've been using 'ylim = c()' and 'xlim = c()' so far but it's nice to be aware of 'asp' too. On Aug 19, 2010, at 2:58 PM, Joshua Wiley wrote: On Thu, Aug 19, 2010 at 2:46 PM, r.ookie wrote: > I'm asking to get people's int

Re: [R] Aspect Ratio

2010-08-19 Thread r.ookie
plot(1:3) # usual way to view plot(1:3, asp = 2) # convenient way to apply horizontal compression for visibility plot(1:3, xlim = c(0, 4)) # but if you have information on what the graph looks like, you can manually apply the same horizontal compression Was I going through some sort of "gang i

Re: [R] Aspect Ratio

2010-08-19 Thread Ted Harding
Spencer, you came up with your example just as I finished making mine: set.seed(54321); X <- rnorm(200) ; Y <- 0.25*X+0.25*rnorm(200) ##Compare: plot(X,Y,pch="+",col="blue") ##with: plot(X,Y,pch="+",col="blue",asp=1.0) With R left to choose the X and Y limits by itself, the first plot gives

Re: [R] Aspect Ratio

2010-08-19 Thread Joshua Wiley
On Thu, Aug 19, 2010 at 2:46 PM, r.ookie wrote: > I'm asking to get people's interpretation and also whether they've > encountered situations where it was useful, helpful, etc. In general, it would probably help your responses on this list if you were clearer in the first place then. For instan

Re: [R] logistic regression tree

2010-08-19 Thread Gavin Simpson
On Thu, 2010-08-19 at 13:42 -0700, Kay Cichini wrote: > hello everyone, > > i sampled 100 stands at 20 restoration sites and presence of 3 different > invasive plant species. > i came across logistic regression trees and wonder if this is suited for my > purpose - predicting presence of these pro

Re: [R] Aspect Ratio

2010-08-19 Thread Spencer Graves
The documentation is not clear. It would help if it had an example like the following: plot(1:2, 1:2/10) plot(1:2, 1:2/10, asp=1) Does looking at these two plots answer the question? Spencer Graves On 8/19/2010 2:36 PM, David Winsemius wrote: On Aug 19, 2010, at 5:28

Re: [R] Aspect Ratio

2010-08-19 Thread r.ookie
I'm asking to get people's interpretation and also whether they've encountered situations where it was useful, helpful, etc. On Aug 19, 2010, at 2:36 PM, David Winsemius wrote: On Aug 19, 2010, at 5:28 PM, r.ookie wrote: > Well, I had to look further into the documentation to see 'If asp is a

Re: [R] meta-analysis in R

2010-08-19 Thread Jeremy Miles
> > > I am trying to explore the citation bias by perfroming meta-analysis. I need > to plot a forest plot > on some other proportions other than the usual effect > size OR,RR, RD. > For meta-analsysis, it does not matter what the effect size is (usually). One calculates the effect size, and one

Re: [R] Aspect Ratio

2010-08-19 Thread David Winsemius
On Aug 19, 2010, at 5:28 PM, r.ookie wrote: Well, I had to look further into the documentation to see 'If asp is a finite positive value then the window is set up so that one data unit in the x direction is equal in length to asp * one data unit in the y direction' Okay, so in what situa

Re: [R] csv vs. data frame

2010-08-19 Thread Duncan Murdoch
On 19/08/2010 4:15 PM, Bert Gunter wrote: Do not post such questions to this list. Read an Introduction to R first, please. I think that's a bit harsh: Bruce is trying to help R users, but doesn't necessarily want to learn to be one. -- Bert On Thu, Aug 19, 2010 at 12:55 PM, Bruce Como

Re: [R] Aspect Ratio

2010-08-19 Thread r.ookie
Well, I had to look further into the documentation to see 'If asp is a finite positive value then the window is set up so that one data unit in the x direction is equal in length to asp * one data unit in the y direction' Okay, so in what situations is the 'asp' helpful? On Aug 19, 2010, at 2:2

Re: [R] Aspect Ratio

2010-08-19 Thread David Winsemius
On Aug 19, 2010, at 5:13 PM, r.ookie wrote: set.seed(1) x <- rnorm(n = 1000, mean = 0, sd = 1) plot(x = x, asp = 2000) Could someone please explain what the 'asp' parameter is doing? You want us to read the help page to you? -- David Winsemius, MD West Hartford, CT ___

Re: [R] Aspect Ratio

2010-08-19 Thread Joshua Wiley
Hi, >From the documentation for ?plot 'asp' the y/x aspect ratio, see 'plot.window'. Here is a little demonstration of what different values would look like: # set.seed(1) x <- rnorm(n = 1000, mean = 0, sd = 1) # so that four plots can be in one window for comparison par(mfcol=c(2,

[R] Aspect Ratio

2010-08-19 Thread r.ookie
set.seed(1) x <- rnorm(n = 1000, mean = 0, sd = 1) plot(x = x, asp = 2000) Could someone please explain what the 'asp' parameter is doing? __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Aggregate Help

2010-08-19 Thread Gabor Grothendieck
On Thu, Aug 19, 2010 at 4:45 PM, Hall, Ken (CDC/OSELS/NCPHI) wrote: > Please let me know if this is or is not the right place to ask these > types of questions. > > Warning: I am new to R by two days. > > I have a simple dataset. > I have loaded the dataset successfully using the following code: >

[R] decision tree display

2010-08-19 Thread Olga Shaganova
I am using "plot" and "text" commands to display the decision tree I built, here is the code: plot(fit, compress=TRUE) text(fit, use.n=TRUE) but the the result of this code is not readable. Text doesn't get fully displayed (missing on the margines and overlapping in the middle). Where can I get

[R] logistic regression tree

2010-08-19 Thread Kay Cichini
hello everyone, i sampled 100 stands at 20 restoration sites and presence of 3 different invasive plant species. i came across logistic regression trees and wonder if this is suited for my purpose - predicting presence of these problematic invasive plant species (one by one) by a set of recorded

Re: [R] csv vs. data frame

2010-08-19 Thread r.ookie
I agree with you Duncan because I sense the hostility too, but, in any environment, there are going to be those who 'don't play well with others.' I just delete and read the next posting. I'm personally here to learn :) On Aug 19, 2010, at 1:42 PM, Duncan Murdoch wrote: On 19/08/2010 4:15 PM, B

Re: [R] Aggregate Help

2010-08-19 Thread David Winsemius
On Aug 19, 2010, at 4:45 PM, Hall, Ken (CDC/OSELS/NCPHI) wrote: Please let me know if this is or is not the right place to ask these types of questions. Warning: I am new to R by two days. I have a simple dataset. I have loaded the dataset successfully using the following code: Filepath=(C:\

Re: [R] Aggregate Help

2010-08-19 Thread Phil Spector
Ken - Try aggregate(Pilot$Count,list(Date=Pilot$Date,illness=Pilot$illness),sum) If you don't want to keep typing "Pilot", use with(Pilot,aggregate(Count,list(Date=Date,illness=illness),sum)) Notice that the aggregated variable will be called "x" in the output data frame from aggregate.

[R] Gathering different data types for aov etc

2010-08-19 Thread Bryan Hanson
Hello List Folks. I¹m trying to do manova using a function which assembles the response (LHS) and factors (RHS) from different sources. When I do so, the model routines complain that I'm passing a list for the RHS when I don't think I am. Here's a toy example: r <- matrix(rnorm(30), ncol = 3) #

[R] Aggregate Help

2010-08-19 Thread Hall, Ken (CDC/OSELS/NCPHI)
Please let me know if this is or is not the right place to ask these types of questions. Warning: I am new to R by two days. I have a simple dataset. I have loaded the dataset successfully using the following code: Filepath=(C:\temp\\pilot\dataset1.txt") Pilot=read.table(filepath, header=TRUE)

Re: [R] csv vs. data frame

2010-08-19 Thread Erik Iverson
Bruce Como wrote: Hi, I am neither a statistician nor a user of R. I am a programmer trying to provide my users (both statisticians and R users) data in a format that works best for them. It sounds like they would be the best ones to ask then. What is a data frame? Is source data ea

Re: [R] Can't read/write to _nonfi

2010-08-19 Thread William Dunlap
Min, For S+-specific questions the S-news mailing list would be better. s-n...@wubios.wustl.edu Unlike R, S+ stores its data objects in files, one file per object. The ___nonfi (___nonfiles) file contains a mapping for object names to file names, for those objects whose names cannot be unambi

Re: [R] csv vs. data frame

2010-08-19 Thread Bert Gunter
Do not post such questions to this list. Read an Introduction to R first, please. -- Bert On Thu, Aug 19, 2010 at 12:55 PM, Bruce Como wrote: > Hi, > > I am neither a statistician nor a user of R.  I am a programmer trying to > provide my users (both statisticians and R users) data in a format t

Re: [R] Can't read/write to _nonfi

2010-08-19 Thread stephen sefick
I don't think I understand what the problem is... The code that you provided works just fine without the for loop statement. as for the can't access... The example that you provided doesn't address this. Unless I am totally misunderstanding. R is an interpreted language not compiled. Please, a

[R] Can't read/write to _nonfi

2010-08-19 Thread minh
Good afternoon, Hope you all have a wonderful day. I am glad to be here. Hope you could help me with the following errors that i have been trying to figure it all out since last week. I am using Splus from Insightful, and as i read, R and Splus are very similar. So hope you could help me.

[R] meta-analysis in R

2010-08-19 Thread zhangweiwei
Dear Sir or Madam, I am trying to explore the citation bias by perfroming meta-analysis. I need to plot a forest plot on some other proportions other than the usual effect size OR,RR, RD. I still do not have any idea after searching google and reading relevant books. Can anyone kindly help

[R] How to include trend (drift term) in arima.sim

2010-08-19 Thread StephenRichards
I have been trying to simulate from a time series with trend but I don't see how to include the trend in the arima.sim() call. The following code illustrates the problem: # Begin demonstration program x <- c(0.168766559, 0.186874000, 0.156710548, 0.151809531, 0.144638812, 0.142106888,

[R] csv vs. data frame

2010-08-19 Thread Bruce Como
Hi, I am neither a statistician nor a user of R. I am a programmer trying to provide my users (both statisticians and R users) data in a format that works best for them. What is a data frame? Is source data easier to work with in this format or a csv file? Or yet another format? Thanks for

Re: [R] plotmath question

2010-08-19 Thread array chip
David, yes, I now see how it worked. Thanks again, John - Original Message From: David Winsemius To: array chip Cc: baptiste auguie ; r-h...@stat.math.ethz.ch Sent: Thu, August 19, 2010 12:12:46 PM Subject: Re: [R] plotmath question On Aug 19, 2010, at 2:46 PM, array chip wrote:

Re: [R] plotmath question

2010-08-19 Thread David Winsemius
On Aug 19, 2010, at 2:46 PM, array chip wrote: Thanks David! I see that I didn't produce the "correct" answer, but perhaps I'm being thanked for something that was generalizable in that direction. Better would have ben one of these: plot(1, ylab= bquote(italic(P) *.(b)*","*~A) ) plo

Re: [R] Pass By Value Questions

2010-08-19 Thread Matt Shotwell
On Thu, 2010-08-19 at 14:27 -0400, Duncan Murdoch wrote: > On 19/08/2010 12:57 PM, li...@jdadesign.net wrote: > > I understand R is a "Pass-By-Value" language. I have a few practical > > questions, however. > > > > I'm dealing with a "large" dataset (~1GB) and so my understanding of the > > nuances

Re: [R] plotmath question

2010-08-19 Thread array chip
Thanks David! John - Original Message From: David Winsemius To: array chip Cc: baptiste auguie ; r-h...@stat.math.ethz.ch Sent: Thu, August 19, 2010 11:34:07 AM Subject: Re: [R] plotmath question On Aug 19, 2010, at 2:24 PM, array chip wrote: > Thanks, yes it worked! > > What abou

Re: [R] plotmath question

2010-08-19 Thread David Winsemius
On Aug 19, 2010, at 2:24 PM, array chip wrote: Thanks, yes it worked! What about if I want to print as "P2, A" where A is just letter A and 2 is from variable b. ?plotmath plot(1, ylab= bquote(italic(P) *","*.(b)~A) ) John - Original Message From: baptiste auguie To: arr

Re: [R] Automated plot and linear regression line/data

2010-08-19 Thread Greg Snow
?pairs ?lattice::splom ?lattice::panel.xyplot pairs( state.x77, panel=function(x,y){ points(x,y) abline(lm(y~x), col='red') }) library(lattice) splom( ~state.x77, type=c('p','r') ) -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imai

Re: [R] Pass By Value Questions

2010-08-19 Thread Duncan Murdoch
On 19/08/2010 12:57 PM, li...@jdadesign.net wrote: I understand R is a "Pass-By-Value" language. I have a few practical questions, however. I'm dealing with a "large" dataset (~1GB) and so my understanding of the nuances of memory usage in R is becoming important. In an example such as: > d <-

Re: [R] plotmath question

2010-08-19 Thread array chip
Thanks, yes it worked! What about if I want to print as "P2, A" where A is just letter A and 2 is from variable b. John - Original Message From: baptiste auguie To: array chip Cc: r-h...@stat.math.ethz.ch Sent: Thu, August 19, 2010 11:08:10 AM Subject: Re: [R] plotmath question Tr

Re: [R] Trimmed Sample

2010-08-19 Thread Greg Snow
You can look at the code for mean.default and see how it does the trimming, then you can use that to create your own trimmed version to pass to other functions. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Me

Re: [R] plotmath question

2010-08-19 Thread David Winsemius
On Aug 19, 2010, at 2:02 PM, array chip wrote: Hi all, let me give a simple example: b<-20 I would like to print ylab as "P20" where "P" is printed in Italic font. When I do the following: plot(1, ylab=expression(paste(italic("P"),b,sep=""))) I got y axis label printed as "Pb" instead of

Re: [R] plotmath question

2010-08-19 Thread baptiste auguie
Try this, b = 20 plot(1, ylab= bquote(italic(P) * .(b)) ) HTH, baptiste On 19 August 2010 20:02, array chip wrote: > Hi all, let me give a simple example: > > b<-20 > I would like to print ylab as "P20" where "P" is printed in Italic font. When > I > do the following: > > plot(1, ylab=expre

[R] plotmath question

2010-08-19 Thread array chip
Hi all, let me give a simple example: b<-20 I would like to print ylab as "P20" where "P" is printed in Italic font. When I do the following: plot(1, ylab=expression(paste(italic("P"),b,sep=""))) I got y axis label printed as "Pb" instead of "P20". What is the best solution to print platmath s

Re: [R] assign multiple variables at once

2010-08-19 Thread Hosack, Michael
R community, Brian generously provided the following code (see below) but I could not get it to run and it produced this error (after a few minutes of run time): Error: evaluation nested too deeply: infinite recursion / options(expressions=)? I am using Tinn-R and on the IO screen I also receiv

Re: [R] R reports

2010-08-19 Thread Greg Snow
Your question brings up a bit of a philosophical issue (or possibly economic theory). The idea is the contrast between specialization and generalization. A purely specialized program will only do one thing (but hopefully do that one thing well), the ultimate generalized program will do everyth

[R] Pass By Value Questions

2010-08-19 Thread lists
I understand R is a "Pass-By-Value" language. I have a few practical questions, however. I'm dealing with a "large" dataset (~1GB) and so my understanding of the nuances of memory usage in R is becoming important. In an example such as: > d <- read.csv("file.csv"); > n <- apply(d, 1, sum); must "

Re: [R] creation package

2010-08-19 Thread Michael Dewey
At 13:57 19/08/2010, anderson nuel wrote: Dear r-help, I don't use namespace. Well, as I said in my original reply, it would be a good idea to do so. How can I make asia available? Without knowing where asia is that is quite a tough call. How do you access it when you test your code befo

Re: [R] Linear regression equation and coefficient matrix

2010-08-19 Thread Greg Snow
Here is a quick example: c1 <- cor(iris[,-5]) s1 <- sqrt(diag(var(iris[,-5]))) betas <- diag( s1 ) %*% c1 %*% diag( 1/s1 ) # now compare: coef( lm( Sepal.Length ~ Sepal.Width, data=iris ) )[2] betas[1,2] But if you cannot work that out on your own, then you really should review linear algeb

Re: [R] Why does Bootstrap work for one of similar models but not for the other?

2010-08-19 Thread Bert Gunter
In future, when posting data in your message use dput() or textConnection() so that helpeRs can more easily load them. I was not able to replicate your results. Here's what I got: Bootstrap Statistics : originalbiasstd. error t1* 0.99975370 0.0044205644 0.04110232 t2* -0.06

Re: [R] ifelse command

2010-08-19 Thread Greg Snow
It would help us help you if you could give a description of what your ultimate goal is here. Is it to simulate the dice? Then you may want to just use the dice function in the TeachingDemos package (or you can animate the rolling with plot.rgl.die and roll.rgl.die in the same package). Or is

Re: [R] probabilities from predict.svm

2010-08-19 Thread Watling,James I
Hi Steve-- Thanks for your interest in helping me figure this out. I think the problem has to do with the values of the probabilities returned from the use of the model to predict occurrence in a new dataframe. The svm model I referenced in the original message (svm.model) does a good job cla

Re: [R] functions and multiple levels

2010-08-19 Thread chris20
Thanks for the replies, it wasn't quite what I wanted but it has given me some more code for working out averages. I have managed to construct something that nearly works level.1 level.2 observation 1 1 0.5 1 1

Re: [R] Quick q. on lists

2010-08-19 Thread Jorge Ivan Velez
Hi Jonathan, Try this: # list of data frames mylist <- list(d1 = matrix(rnorm(100), ncol = 10), d2 = matrix(rnorm(100), ncol = 5), d3 = matrix(rnorm(100), ncol = 20)) # max number of rows max(do.call(c, lapply(mylist, nrow))) # [1] 20 HTH, Jorge O

Re: [R] Quick q. on lists

2010-08-19 Thread ONKELINX, Thierry
You need sapply max(sapply(myList, nrow)) Thierry ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek team Biometrie & Kwaliteitszorg Gaverstraat 4 9500 Geraardsbergen Belgium Research Institute for Nature and

Re: [R] Quick q. on lists

2010-08-19 Thread Erik Iverson
Jonathan wrote: Hi All, Anyone know how to quickly query some summary information on the components of a list? For example, I have a list that contains dataframes (originally generated by using split() on one large data frame). I simply want to know the number of rows in the longest data

Re: [R] ROCR predictions

2010-08-19 Thread Frank Harrell
At the heart of this you have a problem in incomplete conditioning. You are computing things like Prob(X > x) when you know X=x. Working with a statistician who is well versed in probability models will undoubtedly help. Frank Frank E Harrell Jr Professor and ChairmanSchool of Me

[R] Quick q. on lists

2010-08-19 Thread Jonathan
Hi All, Anyone know how to quickly query some summary information on the components of a list? For example, I have a list that contains dataframes (originally generated by using split() on one large data frame). I simply want to know the number of rows in the longest dataframe from the list.

Re: [R] (no subject)

2010-08-19 Thread Ben Bolker
Kalaivani Mani yahoo.co.in> writes: > To >   > R group > Help Desk (We're not the "help desk" (!!) You can buy support from various companies if you want ...)   > I am a user of R software.  I am facing a problem while using > "frailtyPenal" command in R.2.11.1. When I use > these command,

Re: [R] How to measure correlations in terms of distance and draw them on a 2-dimmentional plot?

2010-08-19 Thread Kjetil Halvorsen
You could also try RSiteSearch("correlation circle") Kjetil On Thu, Aug 19, 2010 at 11:31 AM, weijian21cn wrote: > > Thank you all a lot for all the suggestion! > -- > View this message in context: > http://r.789695.n4.nabble.com/How-to-measure-correlations-in-terms-of-distance-and-draw-them-on

Re: [R] probabilities from predict.svm

2010-08-19 Thread Steve Lianoglou
On Thu, Aug 19, 2010 at 10:56 AM, Watling,James I wrote: > Hi Steve-- > > Thanks for your interest in helping me figure this out.  I think the problem > has to do with the values of the probabilities returned from the use of the > model to predict occurrence in a new dataframe. Ok, so if you're

Re: [R] How to measure correlations in terms of distance and draw them on a 2-dimmentional plot?

2010-08-19 Thread weijian21cn
Thank you all a lot for all the suggestion! -- View this message in context: http://r.789695.n4.nabble.com/How-to-measure-correlations-in-terms-of-distance-and-draw-them-on-a-2-dimmentional-plot-tp2330413p2331408.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Correlograms and linear regression

2010-08-19 Thread Kevin Wright
Just define your own panel function. Here I modified the panel.ellipse function and called it panel.lm library(corrgram) data(baseball) vars2 <- c("Assists","Atbat","Errors","Hits","Homer","logSal", "Putouts","RBI","Runs","Walks","Years") panel.lm <- function(x, y, ...){ dfn <-

Re: [R] Adding lines to xyplot with abline

2010-08-19 Thread David Winsemius
On Aug 19, 2010, at 10:31 AM, wrote: Is it kosher to add, say, horizontal lines to a lattice xyplot using abline(h=xxx)? The lines don't appear at the right value, that is, if h=150, the line might appear at h=140? Correct. The coordinate systems are not shared between lattice and base gr

Re: [R] zoo. window

2010-08-19 Thread Achim Zeileis
On Thu, 19 Aug 2010, wyd...@msn.com wrote: Hi, I have a dataset including monthly date from 1971-01-01 to 2009-01-01. The dates are character variables. I would suggest to use a more suitable class for the index, such as "yearmon" (if you only want to indicate the month anyway) or "Date" (if

[R] solution

2010-08-19 Thread Alex Levitchi
Hello I am not sure about your general aim, but from my previous experience on combination of treatments, it can be more useful to create a matrix or data.frame, which you can fulfill either with 1s and 0s, or with the values of treatment, especially if you will need this data later for the ana

Re: [R] error with bitmap, please help

2010-08-19 Thread Prof Brian Ripley
On Thu, 19 Aug 2010, kayj wrote: Hi All I still have a problem with “bitmap” function in R, I have downloaded ghostscript 8.71 and added the path to the executable to the path environment variable, by going to the control panel , system, advanced system settings, added C:\Program Files(x86)\g

[R] Adding lines to xyplot with abline

2010-08-19 Thread Jeffrey.Morris
Is it kosher to add, say, horizontal lines to a lattice xyplot using abline(h=xxx)? The lines don't appear at the right value, that is, if h=150, the line might appear at h=140? Jeff This communication, including any attachments, is intended solely for the use of the addressee and may contain

Re: [R] R reports

2010-08-19 Thread Spencer Graves
The "sos" package is designed to search the help pages of all contributed packages and return the results in a data.frame sorted to put first the package with the most matches. It also has a vignette, which appeared in last December's issue of "The R Journal". This can be used to search in a

Re: [R] probabilities from predict.svm

2010-08-19 Thread Steve Lianoglou
Hi James, I'd like to help you out, but I'm not sure I understand what the problem is. Does the problem lie with building a predictive SVM, or getting the right values (class probabilities) to land in the right place on your map/plot? -steve On Wed, Aug 18, 2010 at 3:09 PM, Watling,James I wro

Re: [R] Does R always insist on sending plot output to a file?

2010-08-19 Thread Matt Shotwell
Donald, I was able to 'trick' R into writing plot data to a GNU Linux fifo. I had forgotten that the fifo will block until there is a process at either end (a writer and a reader): At one terminal, create a fifo and set a program to catch output $ mkfifo Rfifo $ cat Rfifo At a second terminal

Re: [R] R reports

2010-08-19 Thread peter dalgaard
On Aug 19, 2010, at 3:49 PM, Frank Harrell wrote: > What do low level proc print and proc report have on Sweave or > http://biostat.mc.vanderbilt.edu/wiki/pub/Main/StatReport/summary.pdf? > If proc print and proc report are 4G, let's move back a generation. Er, no... AFAIK, 4GL just means that

  1   2   >