Re: [R] Installing R in Ubuntu

2008-08-12 Thread Shreyasee Pradhan
Hi, Thanks for that. the way I tried is as follows: 1) Downloaded the r-base package 2) went in that directory where the r-base package was downloaded from command line 3) entered the command sudo apt-get install r-base But got the error, that Couldn't find r-base command. I don't underst

Re: [R] aligned memory allocation in C

2008-08-12 Thread Prof Brian Ripley
On Tue, 12 Aug 2008, Jeffrey Horner wrote: Christophe Dutang1 wrote: Hi, I'm currently R porting SF Mersenne Twister algorithm of Matsumoto and Saito. To get the full power of their code, I want to use their fonction fill_array32 which need aligned memory. That is to say I need to use the C

Re: [R] Installing R in Ubuntu

2008-08-12 Thread Senthil Kumar M
On Tue, Aug 12, 2008 at 9:24 PM, Shreyasee Pradhan <[EMAIL PROTECTED]> wrote: > Hi, > > I am running Ubuntu on my Windows OS through VMware. > I am trying to install R in Ubuntu, but not getting with those commands, > which are there on the site. > Can anyone please tell me how to install it, stepw

Re: [R] Update Package on CRAN

2008-08-12 Thread Uwe Ligges
stephen sefick wrote: To update a package on CRAN I just update all of the version information stuff etc. and then upload it to the ftp site? Stephen Sefick Yes, just build the package and submit it to CRAN as before, but with an increased version number. Uwe Ligges _

Re: [R] manova: R vs SAS...need some clarification

2008-08-12 Thread Prof Brian Ripley
Please see the footer of this message: we need to know what you did. Also, SAS may have made some assumptions for you without telling you (for example used a numerically ill-conditioned covariance matrix), and we don't know what you did in SAS, either. On Tue, 12 Aug 2008, Pedro Mardones wrot

Re: [R] Lattice wireframe: How to avoid drawing lines around polygons when using shade=TRUE

2008-08-12 Thread Oliver M. Haynold
On Wed, 2008-07-30 at 16:40 -0700, Deepayan Sarkar wrote: > Does the rendering improve if you unset the "smooth line art" option > in Acrobat's settings? Yes, it does! Thanks. There still is a problem, though, in that the charts so generated won't display and print well for users with the default

Re: [R] issue building dataframes with matrices.

2008-08-12 Thread Bill.Venables
It's a feature and it's been there forever. (It's even present in another system not unlike R.) Suppose you set y <- matrix(1:3) and construct dfr <- data.frame(x=1:3, y) Then you invoke the constructor function, data.frame, which by default simplifies things like matrices to single columns,

[R] Installing R in Ubuntu

2008-08-12 Thread Shreyasee Pradhan
Hi, I am running Ubuntu on my Windows OS through VMware. I am trying to install R in Ubuntu, but not getting with those commands, which are there on the site. Can anyone please tell me how to install it, stepwise, with commands to be used. As I m new to Ubuntu as well, I am not aware of the comman

Re: [R] Naming dataframes, vectors etc within a loop

2008-08-12 Thread jim holtman
First consider using a list: test <- list() for (i in 1:10) test[[i]] <- i If you really want to create variables, then look at "assign" for (i in 1:10) assign(paste("test.", i, sep=""), i) On Tue, Aug 12, 2008 at 7:49 PM, Gareth Campbell <[EMAIL PROTECTED]> wrote: > Hi there, > > I know this i

Re: [R] Naming dataframes, vectors etc within a loop

2008-08-12 Thread Henrik Bengtsson
See help(list) and help("[[") ...and 'An Introduction to R'. /Henrik On Tue, Aug 12, 2008 at 7:49 PM, Gareth Campbell <[EMAIL PROTECTED]> wrote: > Hi there, > > I know this is probably a really simple question, but without the correct > keywords, or knowledge of the correct function it is hard to

Re: [R] which(df$name=="A") takes ~1 second! (df is very large), but can it be speeded up?

2008-08-12 Thread Henrik Bengtsson
To simplify: n <- 2.7e6; x <- factor(c(rep("A", n/2), rep("B", n/2))); # Identify 'A':s t1 <- system.time(res <- which(x == "A")); # To compare a factor to a string, the factor is in practice # coerced to a character vector. t2 <- system.time(res <- which(as.character(x) == "A")); # Interesting

[R] summary.manova rank deficiency error + data

2008-08-12 Thread Pedro Mardones
Dear R-users; Previously I posted a question about the problem of rank deficiency in summary.manova. As somebody suggested, I'm attaching a small part of the data set. #*** "test" <- structure(.Data = list(structure(.Data = c(rep(1,3),rep(2,18),re

Re: [R] aligned memory allocation in C

2008-08-12 Thread Jeffrey Horner
Christophe Dutang1 wrote: Hi, I'm currently R porting SF Mersenne Twister algorithm of Matsumoto and Saito. To get the full power of their code, I want to use their fonction fill_array32 which need aligned memory. That is to say I need to use the C function memalign on windows, posix_memalign

Re: [R] ignoring zeros or converting to NA

2008-08-12 Thread Charles C. Berry
On Tue, 12 Aug 2008, stephen sefick wrote: I have been reading this thread and I am having a hard interpreting what these mean. I know that the result is that all of the values that are zero in a are replaced by NA. Let me try and write it out is.na(a[a==0] ) <- TRUE you pull out of a all of

[R] Naming dataframes, vectors etc within a loop

2008-08-12 Thread Gareth Campbell
Hi there, I know this is probably a really simple question, but without the correct keywords, or knowledge of the correct function it is hard to search for on the net or within R. How do I increment a dataframe (or similar) name within a loop and assign data? A simple example would be: for(i in

Re: [R] ignoring zeros or converting to NA

2008-08-12 Thread Steven McKinney
The help page for is.na() is worth reading repeatedly. > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > On Behalf Of stephen sefick > Sent: Tuesday, August 12, 2008 6:53 PM > To: Charles C. Berry > Cc: Mike Prager; [EMAIL PROTECTED] > Subject: Re: [R] ignori

Re: [R] X11 plotting error

2008-08-12 Thread Jeffrey Horner
Hmmm... the short answer is that your call to png() is requiring X11 to generate the plot. Don't know what version you're running, but prior to R 2.7.0, all png() calls needed access to the X server to create the plots (on Unix). But with 2.7.0 and later, png() can be called with type='cairo' t

Re: [R] which(df$name=="A") takes ~1 second! (df is very large), but can it be speeded up?

2008-08-12 Thread Peter Cowan
Emmanuel, On Tue, Aug 12, 2008 at 4:35 PM, Emmanuel Levy <[EMAIL PROTECTED]> wrote: > Dear All, > > I have a large data frame ( 270 lines and 14 columns), and I would like to > extract the information in a particular way illustrated below: > > > Given a data frame "df": > >> col1=sample(c(0,1)

[R] issue building dataframes with matrices.

2008-08-12 Thread Daryl Morris
Hello, Is this a bug or a feature? I am using R 2.7.1 on Apple OS X. > y <- matrix(1:3,nrow=3) # y is a single-column matrix > df <-data.frame(x=1:3,y=y) > sapply(df,data.class) x y "numeric" "numeric" > df$yy <- y > sapply(df,data.class) x yyy "numeric

Re: [R] ignoring zeros or converting to NA

2008-08-12 Thread stephen sefick
I have been reading this thread and I am having a hard interpreting what these mean. I know that the result is that all of the values that are zero in a are replaced by NA. Let me try and write it out is.na(a[a==0] ) <- TRUE you pull out of a all of the times that are equal to zero then is.na te

Re: [R] Senging commands to the GUI in Windows through a script

2008-08-12 Thread Henrik Bengtsson
With AutoIt [http://www.autoitscript.com/] you can setup scripts that send keyboard and mouse events, wait for windows to open and more. It is quite powerful. /Henrik On Tue, Aug 12, 2008 at 4:51 AM, <[EMAIL PROTECTED]> wrote: > OK thanks, Tolga > > > > Prof Brian Ripley <[EMAIL PROTECTED]> > 1

Re: [R] arima forecast function

2008-08-12 Thread Gabor Grothendieck
forecast must be quoted: install.packages("forecast") and in this case its actually part of the forecasting bundle so we could also do this: install.packages("forecasting") Look at ?install.packages and note the way it works for different values of the dependencies argument. On Tue, Aug 12, 20

Re: [R] arima forecast function

2008-08-12 Thread warthog29
I initially input the following commands, and got the corresponding errors: install.packages(forecast) Error in install.packages(forecast) : object "forecast" not found > library(forecast) Error in library(forecast) : there is no package called 'forecast' I was finally able to get it installed

[R] which(df$name=="A") takes ~1 second! (df is very large), but can it be speeded up?

2008-08-12 Thread Emmanuel Levy
Dear All, I have a large data frame ( 270 lines and 14 columns), and I would like to extract the information in a particular way illustrated below: Given a data frame "df": > col1=sample(c(0,1),10, rep=T) > names = factor(c(rep("A",5),rep("B",5))) > df = data.frame(names,col1) > df names

Re: [R] arima forecast function

2008-08-12 Thread Nordlund, Dan (DSHS/RDA)
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of warthog29 > Sent: Tuesday, August 12, 2008 3:40 PM > To: r-help@r-project.org > Subject: [R] arima forecast function > > > hi: > > I am trying to fit prediction intervals for an arima object. > My s

[R] arima forecast function

2008-08-12 Thread warthog29
hi: I am trying to fit prediction intervals for an arima object. My search led me to the link: http://finzi.psych.upenn.edu/R/library/forecast/html/forecast.Arima.html which has the function "forecast", as I wanted. However, when I try to run it in R, I get the message: Error in plot(forecast(

Re: [R] ignoring zeros or converting to NA

2008-08-12 Thread Charles C. Berry
On Tue, 12 Aug 2008, Mike Prager wrote: rcoder <[EMAIL PROTECTED]> wrote: I have a matrix that has a combination of zeros and NAs. When I perform certain calculations on the matrix, the zeros generate "Inf" values. Is there a way to either convert the zeros in the matrix to NAs, or only perfor

Re: [R] Problem with using read.csv with web address

2008-08-12 Thread Barry Rowlingson
2008/8/12 Aiste Aistike <[EMAIL PROTECTED]>: > Hello, > > I have a problem with using read.csv(). I want to read a table from the ONS > neighborhood statistics website which has an address: > > http://www.neighbourhood.statistics.gov.uk/dissemination/LeadTableView.do?a=3&b=5940246&c=Stoke&d=14&e=7&

Re: [R] dixon test

2008-08-12 Thread Fernando Marmolejo-Ramos
hi giov about the dixon test... i just run a simple test with a sample of 40 and I got: Error in dixon.test(x) : Sample size must be in range 3-30 So it seems that most of the test in the "outliers" package are designed for small samples. See also the Rnews article published in May 2006 (vol 6/

Re: [R] separate maps in one figure

2008-08-12 Thread Paul Murrell
Hi John P. Burkett wrote: > My aim is to create a figure consisting of three maps: Alaska in the > upper left corner, the 48 contiguous US states in the center right, and > Hawaii in the lower left corner. In some ways the figure I'm trying to > create is analogous to figure 1.5 in Paul Murre

[R] aligned memory allocation in C

2008-08-12 Thread Christophe Dutang1
Hi, I'm currently R porting SF Mersenne Twister algorithm of Matsumoto and Saito. To get the full power of their code, I want to use their fonction fill_array32 which need aligned memory. That is to say I need to use the C function memalign on windows, posix_memalign on linux and classic

[R] X11 plotting error

2008-08-12 Thread cls59
Hey everyone, I'm part of a team working at NOAA and we have developed a swan script that analyzes data and generates plots for the forecasters. We are ready to put the script on the cron and call it a summer but a technical issue has popped up which has us puzzled. When we run the script as an

Re: [R] Between the values

2008-08-12 Thread Ling, Gary (Electronic Trading)
# between (a,b) a <- 0 b <- 1 x <- rnorm(10) x unclass(cut(x, breaks=c(-Inf,a,b,Inf)))==2 -gary -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Shubha Vishwanath Karanth Sent: Tuesday, August 12, 2008 7:46 AM To: [EMAIL PROTECTED] Subject: [R] Between the

Re: [R] ignoring zeros or converting to NA

2008-08-12 Thread Mike Prager
rcoder <[EMAIL PROTECTED]> wrote: > I have a matrix that has a combination of zeros and NAs. When I perform > certain calculations on the matrix, the zeros generate "Inf" values. Is > there a way to either convert the zeros in the matrix to NAs, or only > perform the calculations if not zero (i.e.

Re: [R] perl expression question

2008-08-12 Thread Gabor Grothendieck
It can be done like this with strapply in gsubfn. See home page at http://gsubfn.googlecode.com . strapply is like apply except the string to be operated on replaces the matrix and the regexp replaces the margin number and the function can be omitted if you are only returning one item.Its like

Re: [R] Multiple column/row names?

2008-08-12 Thread jim holtman
Exactly what are you asking? Can you provide an example of the output you would expect. On Tue, Aug 12, 2008 at 1:21 AM, Hesen Peng <[EMAIL PROTECTED]> wrote: > Hi all, > > I wonder if there is a way to create a matrix with two (or even more) > column/row names? Thank you very much. > > Have a ni

[R] Problem with using read.csv with web address

2008-08-12 Thread Aiste Aistike
Hello, I have a problem with using read.csv(). I want to read a table from the ONS neighborhood statistics website which has an address: http://www.neighbourhood.statistics.gov.uk/dissemination/LeadTableView.do?a=3&b=5940246&c=Stoke&d=14&e=7&f=73&g=401878&i=1001x1003x1004x1005&l=145&o=1&m=0&r=1&s

[R] manova: R vs SAS...need some clarification

2008-08-12 Thread Pedro Mardones
Dear all; working with a 'fat' data set (700 variables / 50 samples) and trying to run a manova test on it (I'm aware that it's not the best option for this kind of data set) I got the error in the summary.manova function about the rank of the residuals (rank < # variables). Ok. The thing that I do

Re: [R] perl expression question

2008-08-12 Thread jim holtman
Will this do it: > fileName<-"Agg.20.20.20-all-01" > sub(".*\\.(\\d+\\.\\d+\\.\\d+).*", "\\1", fileName, perl=TRUE) [1] "20.20.20" > sub(".*-([^-]+)-.*", "\\1", fileName, perl=TRUE) [1] "all" > On Tue, Aug 12, 2008 at 4:18 PM, <[EMAIL PROTECTED]> wrote: > I have a string such as > > fileName<-"

Re: [R] ANOVA tables - storing F values

2008-08-12 Thread Greg Snow
You need to store the result of the summary function: > sfit <- summary(fit) Then look at the structure of the sfit (or whatever you call it) object (depending on the fit, it may be different). You can do this with the 'str' function or the 'TkListView' function in the TeachingDemos package fo

[R] perl expression question

2008-08-12 Thread markleeds
I have a string such as fileName<-"Agg.20.20.20-all-01". All I want to do is pull the "20.20.20" and the "all" as strings. Obviously, they aren't always those values. The "20.20.20" can be "30.30.30" but it's always after the . which is next to the second g in Agg and it's always the same len

Re: [R] converting rgb() output to 0-255

2008-08-12 Thread Henrique Dallazuanna
Try this: col2rgb("#2C312C") On Tue, Aug 12, 2008 at 4:22 PM, rostam shahname <[EMAIL PROTECTED]> wrote: > Hi, > I have three matrices, Red, Green and Blue. I would like to produce a matrix > which is the combined values of Red, Green and Blue matrices. > I know rgb() does the job, but the value

Re: [R] Changing design matrix in glm

2008-08-12 Thread Greg Snow
?C, ?contrasts, ?options (section on contrasts), ?contr.sum Hope that helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] (801) 408-8111 > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Adam Gr

Re: [R] Parsing array data

2008-08-12 Thread Altaweel, Mark R.
Great, that works. Thank you. Mark -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tue 8/12/2008 2:49 PM To: Altaweel, Mark R. Cc: [EMAIL PROTECTED]; r-help@r-project.org Subject: RE: [R] Parsing array data Hi: you can do result<-lapply(agg, function(.df) {

Re: [R] Parsing array data

2008-08-12 Thread markleeds
Hi: you can do result<-lapply(agg, function(.df) { mean(.df$Discharge) }) this will give you the mean of the Discharge column in the various dataframes. aggregate s used more when you want to do calculations on various subset by another variable. if you want to do that, you can. like say ther

[R] Update Package on CRAN

2008-08-12 Thread stephen sefick
To update a package on CRAN I just update all of the version information stuff etc. and then upload it to the ftp site? Stephen Sefick -- Let's not spend our time and resources thinking about things that are so little or so large that all they really do for us is puff us up and make us feel like

[R] converting rgb() output to 0-255

2008-08-12 Thread rostam shahname
Hi, I have three matrices, Red, Green and Blue. I would like to produce a matrix which is the combined values of Red, Green and Blue matrices. I know rgb() does the job, but the values are not between 0-255, they are in the following format: "#2C312C" I would like to have the values between 0-255.

Re: [R] produce variable on the fly

2008-08-12 Thread Thomas Lumley
On Tue, 12 Aug 2008, Ben Bolker wrote: jimineep hotmail.com> writes: Hi guys, I want to create variable on the fly: for example for (i in 1:10) { cat(paste("VAR",i,sep="")) } Will print VAR1, VAR2 etc up to VAR10. However I want to make these into variables, and then give them a value

Re: [R] Anova

2008-08-12 Thread milton ruser
Dear Daniel, Are you really interested on the analyzis of the effect of ML on Grup, our on the effect of Grup on ML? I reproduce your sample database, but "changed" some Grup values from 1 to 2 to allow an analysis of variance. See the example below. Vale! miltinho astronaura Brazil GBM<-re

Re: [R] ignoring zeros or converting to NA

2008-08-12 Thread stephen sefick
when you read it in na.string=0 On Tue, Aug 12, 2008 at 1:43 PM, rcoder <[EMAIL PROTECTED]> wrote: > > Hi everyone, > > I have a matrix that has a combination of zeros and NAs. When I perform > certain calculations on the matrix, the zeros generate "Inf" values. Is > there a way to either convert

Re: [R] tilde on a spanish keyboard?

2008-08-12 Thread Henrik Bengtsson
Since as long as I can remember, on Windows there is something called "Alt [Key Numeric] Codes", which allows you to enter many symbols that are not directly accessible via a single key, cf. http://en.wikipedia.org/wiki/Alt_codes For lists of Alt codes, see for instance http://www.usefulshor

Re: [R] Anova

2008-08-12 Thread Prof Brian Ripley
You are trying to do ANOVA on a categorical response. How can I solve this? Use a more appropriate model. Did you mean ML to be the response and Grup the group rather than v.v.? Then try aov(ML ~ Grup, data = GBM) On Tue, 12 Aug 2008, Dani Valverde wrote: Hello, I am trying to perform

Re: [R] No answer in anova.nls

2008-08-12 Thread Prof Brian Ripley
On Tue, 12 Aug 2008, Nazareno Andrade wrote: Thanks for both answers. I'll look into that. I understand I can take do a qualitative evaluation of the fits using visual tests, but a problem I have is that I'd like to quantify in how many out of hundreds of downloads each model fits better the da

Re: [R] Parsing array data

2008-08-12 Thread Altaweel, Mark R.
Hi, Great, that does solve most of my problem. I loaded the files, and did this: a <-agg[[1]] meanD=mean(a[['Discharge']]) # returning the mean of the variable discharge for the first data element in agg Now, if I wanted to get the mean or just aggregate the variable "Discharge" of the entire

[R] Changing design matrix in glm

2008-08-12 Thread Adam Green
I'm sure this is an easy thing to do, but I can't seem to get it right. My first question is: Is there a way to set the intercept of a glm to be an overall average of the response variable, as opposed to the coefficient for a particular term. For example, let's say there are 2 variables (1 an

[R] Anova

2008-08-12 Thread Dani Valverde
Hello, I am trying to perform an ANOVA on a dataframe like this: ID Grup ML PC mI Gly Glx X373.txt 11 0.004685889 0.05994939 0.004589104 0.007144027 0.02042549 X373bis.txt 21 0.004685889 0.0599494 0

Re: [R] AOV and Error

2008-08-12 Thread Prof Brian Ripley
See the reference on ?aov, and MASS (the book, see the FAQ). I think you need to understand the underlying theory first, and that is no longer (even for my time) part of a statistical education. I learnt it from Bill Venables who has educated in the 1960s -- so his account in MASS comes with

[R] 3 Courses*** R/Splus Fundamentals and Programming Techniques: September 2008 at 3 locations by XLSolutions Corp

2008-08-12 Thread [EMAIL PROTECTED]
XLSolutions Corporation (www.xlsolutions-corp.com) is proud to announce our*** R/Splus Fundamentals and Programming Techniques***course at 3 USA locations for September 2008. (1) R/Splus Fundamentals and Programming Techniques http://www.xlsolutions-corp.com/Rfund.htm * San Francisco

Re: [R] VAR question

2008-08-12 Thread John C Frain
I presume that your problem is in quantitative macroeconomics and that your sample size is limited. Are your variables stationary. If not you may need to use a VECM or if there is no cointegration work in first differences. My choice of variables would in the first instance be determined by eco

Re: [R] Finishing details of dotplot

2008-08-12 Thread Ben Bolker
John Poulsen zoo.ufl.edu> writes: > > Hello, > > I am trying to create a dotplot, and have run into a couple of snags > with the finishing details. The below code creates the dotplot, but I > cannot figure out how to: 1) change the color of the CI bars to black, > not blue, 2) delete the

[R] AOV and Error

2008-08-12 Thread Brett Magill
Hello all, Does anyone know of any good resources on specifying anova models in R with aov. I particular, I am interesting in the details and functioning of the Error() structure. I could not find anything in the documentation and help(Error) bounced me into the aov() help pages. Thank you. Br

Re: [R] No answer in anova.nls

2008-08-12 Thread Gabor Grothendieck
You can compare non-nested nls fits using the AIC command. Although that does not give a formal hypothesis test there are rules of thumb for using the AIC. On Tue, Aug 12, 2008 at 2:13 AM, Nazareno Andrade <[EMAIL PROTECTED]> wrote: > Dear R-helpers, > > I am trying to check whether a model of the

[R] ignoring zeros or converting to NA

2008-08-12 Thread rcoder
Hi everyone, I have a matrix that has a combination of zeros and NAs. When I perform certain calculations on the matrix, the zeros generate "Inf" values. Is there a way to either convert the zeros in the matrix to NAs, or only perform the calculations if not zero (i.e. like using something simila

Re: [R] No answer in anova.nls

2008-08-12 Thread Nazareno Andrade
Thanks for both answers. I'll look into that. I understand I can take do a qualitative evaluation of the fits using visual tests, but a problem I have is that I'd like to quantify in how many out of hundreds of downloads each model fits better the data. I have some a hypothesis that there are two

[R] Possible buglet (wart ?) of odfWeave 0.7.6 (with workaround)

2008-08-12 Thread Emmanuel Charpentier
Dear List, I have had problems inserting some (not all !) figures via odfWeave (using print(someLatticeFunction)...). The figure was correctly displayed in a R device window but the resulting ODF document displayed the correct space for the figure and an empty frame with a "broken image" icon and

[R] Parsing array data

2008-08-12 Thread Altaweel, Mark R.
Hi, I read in csv files with the following code: res <- vector(mode="list",length=3) for(i in 1: length(res)) res[[i]]<-read.csv(file=paste("/Users/markaltaweel/Desktop/Output/HydroDataOutput",i,".csv",sep=""),header=T,sep=",") This allows me to load the data into an array of length 3, with the

[R] Possible buglet (wart ?) of odfWeave 0.7.6 (with workaround)

2008-08-12 Thread Emmanuel Charpentier
Dear List, I have had problems inserting some (not all !) figures via odfWeave (using print(someLatticeFunction)...). The figure was correctly displayed in a R device window but the resulting ODF document displayed the correct space for the figure and an empty frame with a "broken image" icon and

Re: [R] tilde on a spanish keyboard?

2008-08-12 Thread Prof Brian Ripley
On Tue, 12 Aug 2008, Michael R. Head wrote: On Tue, 2008-08-12 at 14:11 +0100, Prof Brian Ripley wrote: On Tue, 12 Aug 2008, Michael R. Head wrote: On Tue, 2008-08-12 at 07:15 -0400, Martin Henry H. Stevens wrote: Thanks Henrique. We need to use the tilde in formula statements as in, lm(y ~

[R] Finishing details of dotplot

2008-08-12 Thread John Poulsen
Hello, I am trying to create a dotplot, and have run into a couple of snags with the finishing details. The below code creates the dotplot, but I cannot figure out how to: 1) change the color of the CI bars to black, not blue, 2) delete the horizontal dotplot lines, and 3) arrange the parame

Re: [R] tilde on a spanish keyboard?

2008-08-12 Thread Michael R. Head
On Tue, 2008-08-12 at 14:11 +0100, Prof Brian Ripley wrote: > On Tue, 12 Aug 2008, Michael R. Head wrote: > > > On Tue, 2008-08-12 at 07:15 -0400, Martin Henry H. Stevens wrote: > >> Thanks Henrique. We need to use the tilde in formula statements as in, > >> lm(y ~ x) > >> > >> Any ideas? > > > >

Re: [R] No answer in anova.nls

2008-08-12 Thread Bert Gunter
To add to Brian's points (which you should heed!) -- you **may** find it also useful to look at (possibly smoothed) residuals to compare lack of fit from your alternative models. If any shows up, some subject matter knowledge might lead you to choose one or the other of your models -- or neither.

Re: [R] No answer in anova.nls

2008-08-12 Thread Nazareno Andrade
(sorry if this arrives multiple times, I sent it from the wrong email address to the r-help the first time) Thanks for both answers. I'll look into that. I understand I can take do a qualitative evaluation of the fits using visual tests, but a problem I have is that I'd like to quantify in how ma

Re: [R] Between the values

2008-08-12 Thread Gabor Grothendieck
SQL has a between operator and via sqldf you can do this using the built in data frame BOD as an example: > library(sqldf) > BOD Time demand 118.3 22 10.3 33 19.0 44 16.0 55 15.6 67 19.8 > sqldf("select demand between 15 and 17 from BOD") demand between 15

Re: [R] Geodata object border

2008-08-12 Thread Rubén Roa-Ureta
imicola wrote: Sorry, this is probably quite an easy question, but I'm new to R and couldn't find the answer anywhere. I'm using geoR and geoRglm, but can't figure out how to get a border in my geodata object. Does this need to be defined when I'm importing my data, or afterwards, and how do I

Re: [R] unable to start device JPEG in linux

2008-08-12 Thread Prof Brian Ripley
On Tue, 12 Aug 2008, Bachas wrote: I have half a solution: bitmap(file="filename.jpg",type="jpeg"); works to generate a jpeg file. However, I want my plots to be stored in single jpeg files and I can't get this to work: bitmap(file="Rplot%03d.jpg",onefile=FALSE,type="jpeg"); it overwrites my R

Re: [R] produce variable on the fly

2008-08-12 Thread Ben Bolker
jimineep hotmail.com> writes: > > > Hi guys, > > I want to create variable on the fly: for example > > for (i in 1:10) { > cat(paste("VAR",i,sep="")) > } > Will print VAR1, VAR2 etc up to VAR10. However I want to make these into > variables, and then give them a value, for example: > > v

[R] VAR question

2008-08-12 Thread Zhang Yanwei - Princeton-MRAm
Hi all, I got another VAR question here and really appreciate if somebody would help me out :) I have five time series, say A,B,C,D,E. My objective is to predict the series A using the rest, that is, B, C, D and E. A Vector Autoregression Model should work here. But first of all, I should select

Re: [R] X11 png jpeg cledit false when running from script

2008-08-12 Thread Bachas
I had the same problem and my conclusion was also that the problem was that our server was not running an X server. I also found that bitmap(file="filename.jpg",type="jpeg"); works.. However I want to store my plots in single jpeg files.. Unfortunately bitmap(file="Rplot%03d.jpeg",onefile=FALSE,t

Re: [R] dynamically extract data from a list

2008-08-12 Thread Gabor Grothendieck
> eval(parse(text = "iris[iris$Sepal.Width > 4,]")) Sepal.Length Sepal.Width Petal.Length Petal.Width Species 16 5.7 4.4 1.5 0.4 setosa 33 5.2 4.1 1.5 0.1 setosa 34 5.5 4.2 1.4 0.2 setosa >

Re: [R] produce variable on the fly

2008-08-12 Thread Charles C. Berry
On Tue, 12 Aug 2008, jimineep wrote: Hi guys, I want to create variable on the fly: for example See ?assign HTH, Chuck for (i in 1:10) { cat(paste("VAR",i,sep="")) } Will print VAR1, VAR2 etc up to VAR10. However I want to make these into variables, and then give them a val

Re: [R] Memory allocation problem

2008-08-12 Thread Roland Rau
Jamie Ledingham wrote: becomes too much to handle by the time the loop reaches 170. Has anyone had any experience of this problem before? Is it possible to 'wipe' R's memory at the end of each loop - all results are plotted and saved or written to text file at the end of each loop so this may b

Re: [R] Between the values

2008-08-12 Thread Charles C. Berry
On Tue, 12 Aug 2008, Shubha Vishwanath Karanth wrote: ThanksDidn't mean actually using '&', but not bigger than that too... I usually see something done much better in R-help by a code which I don't know at all. So, wanted to know if I am missing somewhere in using some codes which I am n

Re: [R] dynamically extract data from a list

2008-08-12 Thread Gabor Grothendieck
The code I posted does work if you use it as I explained, not as you changed it. Executing strings is probably not a very R-ish thing to do but if that's your aim use eval and parse: s <- "iris["iris$Sepal.Width > 4,]" eval(parse(text = s)) On Tue, Aug 12, 2008 at 10:35 AM, Dries Knapen <[EMAIL

Re: [R] Eclipse and R

2008-08-12 Thread Prof Brian Ripley
You should set environment variables in the environment, not from a program. See rw-FAQ Q2.15 (and you may be able to set them in Eclipse before it starts R). On Tue, 12 Aug 2008, Sergey Goriatchev wrote: I tried with Sys.setenv() in Eclipse environment in the following manner: Sys.getenv(

Re: [R] dynamically extract data from a list

2008-08-12 Thread Dan Davison
Dries Knapen-2 wrote: > > Hi, > > Thanks for your reply. However, this didn't work exactly as I needed > it to since the expression is dynamically built as a character vector > > i.e. not executed as > e <- expression(Sepal.Width > 4) > > but as > e <- expression("Sepal.Width > 4") > > in

Re: [R] produce variable on the fly

2008-08-12 Thread David Hajage
> vect = c(10:20) > for (i in 1:10) { + assign(paste("VAR",i,sep=""), vect[i]) + } > VAR1 [1] 10 > VAR2 [1] 11 2008/8/12 jimineep <[EMAIL PROTECTED]> > > Hi guys, > > I want to create variable on the fly: for example > > for (i in 1:10) { >cat(paste("VAR",i,sep="")) > } > Will print VAR1,

Re: [R] produce variable on the fly

2008-08-12 Thread Erik Iverson
?assign , or consider a named vector/list. jimineep wrote: Hi guys, I want to create variable on the fly: for example for (i in 1:10) { cat(paste("VAR",i,sep="")) } Will print VAR1, VAR2 etc up to VAR10. However I want to make these into variables, and then give them a value, for example:

[R] Geodata object border

2008-08-12 Thread imicola
Sorry, this is probably quite an easy question, but I'm new to R and couldn't find the answer anywhere. I'm using geoR and geoRglm, but can't figure out how to get a border in my geodata object. Does this need to be defined when I'm importing my data, or afterwards, and how do I go about doing t

Re: [R] dynamically extract data from a list

2008-08-12 Thread Dries Knapen
On 12 Aug 2008, at 17:00, Gabor Grothendieck wrote: Executing strings is probably not a very R-ish thing to do I know - but as far as I can see there was no other way around in this case... but if that's your aim use eval and parse: s <- "iris["iris$Sepal.Width > 4,]" eval(parse(text = s

Re: [R] unable to start device JPEG in linux

2008-08-12 Thread Bachas
I have half a solution: bitmap(file="filename.jpg",type="jpeg"); works to generate a jpeg file. However, I want my plots to be stored in single jpeg files and I can't get this to work: bitmap(file="Rplot%03d.jpg",onefile=FALSE,type="jpeg"); it overwrites my Rplot001.jpg file. Any one additional

Re: [R] biplot_group_colours_and_point_symbols

2008-08-12 Thread Indermaur Lukas
thanks petr, i try it out and get back to you in case of problems. cheers, lukas Von: Petr PIKAL [mailto:[EMAIL PROTECTED] Gesendet: Di 12.08.2008 13:18 An: Indermaur Lukas Cc: [EMAIL PROTECTED] Betreff: Odp: [R] biplot_group_colours_and_point_symbols Hi [EMAI

Re: [R] Eclipse and R

2008-08-12 Thread Sergey Goriatchev
I tried with Sys.setenv() in Eclipse environment in the following manner: > Sys.getenv("LANGUAGE") LANGUAGE "" > Sys.setenv(LANGUAGE="en") > Sys.getenv("LANGUAGE") LANGUAGE "en" Once I've done this at the beginning of the session, warnings are in English. When I exit Eclipse and then re

[R] produce variable on the fly

2008-08-12 Thread jimineep
Hi guys, I want to create variable on the fly: for example for (i in 1:10) { cat(paste("VAR",i,sep="")) } Will print VAR1, VAR2 etc up to VAR10. However I want to make these into variables, and then give them a value, for example: vect = c(10:20) for (i in 1:10) { cat(paste("VAR",i,sep

[R] gls and memory allocation

2008-08-12 Thread Dave Depew
Hi all, A two part quick question regarding gls 1) I'd like to pass a formula to gnls from a gam(mgcv package). Is there a quick way to do this? I tried using >gnls(gam$call$formula, data=df, correlation=AC1) but it keeps outputting a message to the effect that I need x ~ y etc as the formula

Re: [R] unable to start device JPEG in linux

2008-08-12 Thread Bachas
I have the same problem. I am using R on our bioinformatics server. From what I have read jpeg() needs to use a widows graphics device like X11 to be able to generate a jpeg file. I am also very curious to see if anyone knows a solution, now I need to use pdf() of ps() which is more time consuming

[R] fPortfolio constraints, maxsumW

2008-08-12 Thread John P. Burkett
Running R version 2.6.1 under Gentoo Linux and using the fPortfolio package, I am having trouble specifying a sector constraint. One of the constraints to be imposed is that assets 1 and 2 together account for no more than 13.63% of the portfolio. My attempt at coding that constraint, "maxsumW

[R] sqlQuery with date attribute

2008-08-12 Thread Abderrazzak MANY
Hello R users, I would like to use an integer and a date as attributes in sqlQuery, and these arguments are defined in my function. I guess this is clearer comparing to my first post. Here is my function: GetReturn<-function(code,date) { db<-"C:/Test.mdb" channel<-odbcConnectAccess(db) ssql<

Re: [R] Larger Fonts for x/y-axis

2008-08-12 Thread Mike Prager
Andreas Tille <[EMAIL PROTECTED]> wrote: > what is the trick to get larger fonts for Graphs to make a good > slide for presentations? Generally I use something like cex = 2 in the plot function, as well as lwd = 3 -- Mike Prager, NOAA, Beaufort, NC * Opinions expressed are personal and not

Re: [R] Eclipse and R

2008-08-12 Thread Prof Brian Ripley
Most internationalized programs (including R) respond to the LANGUAGE environent variable: have you tried setting it to "en"? We would need to know your OS to help more (it looks like it might be Windows or possibly Mac OS: the terms used are not right for either). On Tue, 12 Aug 2008, Sergey

Re: [R] dynamically extract data from a list

2008-08-12 Thread Dries Knapen
Hi, Thanks for your reply. However, this didn't work exactly as I needed it to since the expression is dynamically built as a character vector i.e. not executed as e <- expression(Sepal.Width > 4) but as e <- expression("Sepal.Width > 4") in which case subset() throws an error (must evaluat

  1   2   >