Re: [R] ggplot2: mixing colour and linetype in geom_line

2009-09-10 Thread Benoit Boulinguiez
many thanks Felipe I didn't know the melt function. I'll have a close look at it. Regards/Cordialement Benoit Boulinguiez -Message d'origine- De : Felipe Carrillo [mailto:mazatlanmex...@yahoo.com] Envoyé : mercredi 9 septembre 2009 20:40 À : r-help@r-project.org; Benoit Boulinguie

[R] [R-pkgs] new package MLCM: Maximum Likelihood Conjoint Measurement

2009-09-10 Thread Ken Knoblauch
This is to announce a new package MLCM on CRAN. The package provides functions for estimating perceptual scales by maximum likelihood from data collected in a conjoint measurement experiment. Data for conjoint measurement are typically collected using a psychophysical procedure. The stimuli vary

Re: [R] Help on percentage of random numbers for different classes

2009-09-10 Thread Robert Baer
I am sorry for asking this stupid question, but i have been running in circles. I want to randomly generate a scaling point of between 1 and 10, for say hundred entries, where the first 10% percent is has rates between 2 and 7, the next 15% 3 and 7, 20% between 3 and 9, 20% between 3 and 10, 3

Re: [R] How to do rotation for polygon?

2009-09-10 Thread Hemavathi Ramulu
Hi everyone, I still couldn't get the diagram as I mentioned before. I try Grey and Milton suggestion but it confusing. I hope anyone helped me. Thanks in advance. Regards, Hema. On Thu, Sep 3, 2009 at 11:39 PM, Greg Snow wrote: > The my.symbols and ms.polygon functions in the TeachingDemos pa

[R] Order of multiple plots

2009-09-10 Thread legen
Hello all, I have a problem and need your help. I am going to draw two plots in one row and two columns by using “par(mfrow=c(1,2))”, but I want to first draw the right plot and then draw the left plot. Does anybody can show me how to do it please? Thanks in advance. Legen -- View this message

[R] Facing error in loading dababase table

2009-09-10 Thread Abbas R. Ali
Hi   Facing error in loading dababase table. Folowing is my code:   library('RODBC')  channel = odbcConnect("dsn", "", "") data1 = sqlQuery(channel, "SELECT * FROM TABLE", as.is = TRUE) odbcClose(channel)   load(data1) # it is giving me error here that "In data(data1) : data set 'dat

[R] How should a SelfStart function handle illegal parameter values?

2009-09-10 Thread Keith Jewell
Hi Everyone, I'm trying to write selfStart non-linear models for use with nls. In these models some combinations of parameter values are illegal; the function value is undefined. That's OK when calling the function directly [e.g. SSmodel(x, pars...)]; I return an appropriate non-value such as

Re: [R] Facing error in loading dababase table

2009-09-10 Thread Uwe Ligges
Abbas R. Ali wrote: Hi Facing error in loading dababase table. Folowing is my code: library('RODBC') channel = odbcConnect("dsn", "", "") data1 = sqlQuery(channel, "SELECT * FROM TABLE", as.is = TRUE) odbcClose(channel) The object data1 is there, you do not need to load it fr

Re: [R] SPSS Statistics-R Integration Plug-In

2009-09-10 Thread Michael Bibo
> . The links are: R Sources -> Windows -> base -> > Previous Releases. The direct link is: http://cran.at.r- > project.org/bin/windows/base/old/ That should of course read "R Binaries -> Windows -> base -> Previous Releases". __ R-help@r-proje

[R] Plot area reduction

2009-09-10 Thread rajesh j
Hi, I need my plot to occupy a thin strip-like area but the plot area in R is a square so when I save it and reduce its height to a strip in my document the font in the graph looks flattened. Is there someway i can do this in R itself?..so that my plot is a strip but the font looks normal -- Raj

Re: [R] Joining Characters in R {issue with paste}

2009-09-10 Thread Michael Dewey
At 22:13 09/09/2009, Abhishek Pratap wrote: I did try ?paste and paste(a,b,separator=""). same result Your second example pastes three strings together. "a" "b" and " ", the third of which you have named separator which is not the same as sep. Thanks, -Abhi On Wed, Sep 9, 2009 at 5:11 PM,

Re: [R] Color index in image function

2009-09-10 Thread Bernardo Rangel Tura
On Wed, 2009-09-09 at 02:33 -0700, FMH wrote: > Thank you for the hints, but how could i add the grid lines which have > numbers, representing the height of the volcano on the image. > > Thank you > So I think this script is what you need Brazilan.Pallete <- colorRampPalette(c("green","yello

Re: [R] Help on percentage of random numbers for different classes

2009-09-10 Thread KABELI MEFANE
Dear Robert   Thank you very much for all the help, now i am enjoying working with all of you as you make R look simple and interesting. --- On Thu, 10/9/09, Robert Baer wrote: From: Robert Baer Subject: Re: [R] Help on percentage of random numbers for different classes To: "KABELI MEFANE" ,

Re: [R] Order of multiple plots

2009-09-10 Thread Henrique Dallazuanna
I think you can try this: par(mfrow=c(1,2)) plot(1, type = 'n', axes = FALSE, xlab = '', ylab = '') plot(1, type = 'n', axes = FALSE, xlab = '', ylab = '') par(mfg = c(1, 2)) plot(rnorm(10)) On Thu, Sep 10, 2009 at 1:49 AM, legen wrote: > > Hello all, > > I have a problem and need your help. >

Re: [R] Plot area reduction

2009-09-10 Thread Jim Lemon
On 09/10/2009 08:10 PM, rajesh j wrote: Hi, I need my plot to occupy a thin strip-like area but the plot area in R is a square so when I save it and reduce its height to a strip in my document the font in the graph looks flattened. Is there someway i can do this in R itself?..so that my plot is

[R] Build a connectivity between .NET and R without using any interface

2009-09-10 Thread Amitava1 M
Dear All I like to develop an application using .NET and R. The front end would be .NET and statistical analysis would be done in R in the back end. So I want to integrate .NET(VB) with R without using any interface (e.g., R (D)com) to control. Secondly, I like to use Rscript (by calling .R fil

Re: [R] lag a data.frame column?

2009-09-10 Thread Angel Spassov
Mark Knecht wrote (09.Sep.2009 at 10:43 -0700): > Sometimes it's the simple things... > > Why doesn't this lag X$x by 3 and place it in X$x1? (i.e. - Na's in > the first 3 rows and then values showing up...) > > The help page does talk about time series. If lag doesn't work on > data.frame column

[R] Order a vector and move to new vector

2009-09-10 Thread Conrad Addo
I currently have a data frame with a Fund ID and NAV value. Is it possible to order the data frame and move to separate columns in a new data frame or matrix in R without using a for loop? I suppose I'd like to use a built in function to make it faster because I will have around 60,000 entries to

[R] Insall package

2009-09-10 Thread wesley mathew
Dear Sir Subject: - *Install " rscproxy_1.3-1.tar.gz "* I am working in Windows system. I was try to install *rscproxy* package in two way. *1.* install.packages ("rscproxy_1.3-1.tar.gz"), It shows the Warning: unable to access index for repository http://cran.pt.r-project.org/bin/windows/c

[R] Issue displaying DATES on a plot with two ordinates

2009-09-10 Thread clair.crossup...@googlemail.com
Dear all, I am having an issue with displaying the dates on a plot with two ordinates (i.e. two differently scaled y-axes). Instead of dates appearing on the x-axis I am instead seeing a string of numbers (14460, 14465, 14470 and 14475). example R code: library(plotrix) x.Left <- as.Date(c('2009

Re: [R] Build a connectivity between .NET and R without using any interface

2009-09-10 Thread Duncan Murdoch
On 9/10/2009 8:40 AM, Amitava1 M wrote: Dear All I like to develop an application using .NET and R. The front end would be .NET and statistical analysis would be done in R in the back end. So I want to integrate .NET(VB) with R without using any interface (e.g., R (D)com) to control. Secondly

Re: [R] Insall package

2009-09-10 Thread Duncan Murdoch
On 9/10/2009 6:44 AM, wesley mathew wrote: Dear Sir Subject: - *Install " rscproxy_1.3-1.tar.gz "* I am working in Windows system. I was try to install *rscproxy* package in two way. *1.* install.packages ("rscproxy_1.3-1.tar.gz"), It shows the Warning: unable to access index for reposito

Re: [R] Xyplot, multi line title via main, all lines left justified

2009-09-10 Thread Deepayan Sarkar
On Wed, Sep 9, 2009 at 2:53 PM, Afshartous, David wrote: > > All, > > Below is an xyplot plot with multiple panels and a title produced via main: > > library("lattic") > data.ex = data.frame(y = rnorm(10), t = rep(1:5, 2), group = rep(c(0,1), > each = 5)) > > xyplot(y ~ t | as.factor(group), data

Re: [R] Build a connectivity between .NET and R without using any interface

2009-09-10 Thread Gabor Grothendieck
System.Diagnostics.Process in .Net can launch any program such as Rscript. If that is not enough of a pointer to get you going you need to post to a .Net group since this really is about .Net programming, not about R programming. On Thu, Sep 10, 2009 at 8:40 AM, Amitava1 M wrote: > Dear All > >

[R] executing rscript from VB

2009-09-10 Thread H Rao
Hi, I am looking to execute an R script from VB as below. The script runs fine but the redirection doesnt seem to happen. The redirection operator and the out file seem to be treated as arguments to the R script. Is there a way to get the > operator working thanks, R System.Diagnostics.Process p

[R] tranform a table?

2009-09-10 Thread bbimber
hello everyone, i'm new to R, so i hope you dont mind a fairly basic R question. we're using R to manipulate the results of SQL queries and create an HTML output. I'm starting with a table that looks essentially like this: NameField1 Field2 John value1 value2 Jane value3

[R] Listing all data instead of only k-elements when using combn-function

2009-09-10 Thread Sarah Moens
Hi dear reader, I've been searching the help-archive and found many topics with regard to the use of combinations, but I can't seem to make sense out of the advice given. So I posted my question here, my apologies that this has come up for many times before. Example data-set: Group

[R] Intercept=0 in gam from gam package

2009-09-10 Thread Corrado
Dear R list, is it possible to force the intercept to assume the value of 0 (that is no intercept) in gam from gam package? Regards -- Corrado Topi Global Climate Change & Biodiversity Indicators Area 18,Department of Biology University of York, York, YO10 5YW, UK Phone: + 44 (0) 1904 328645,

[R] Negative AIC

2009-09-10 Thread Corrado
Dear R list, I just obtained a negative AIC for two models (-221.7E+4 and -230.2E+4). Is that normal? Regards -- Corrado Topi Global Climate Change & Biodiversity Indicators Area 18,Department of Biology University of York, York, YO10 5YW, UK Phone: + 44 (0) 1904 328645, E-mail: ct...@york.ac.

Re: [R] Order of multiple plots

2009-09-10 Thread S Ellison
Rather than use par(mfro...) you should probably take a look at the alternative "layout" approach. That allows you to give R a matrix (corresponding to panels in the plot) containing the number of the plot to be placed in each panel. It also allows unequal panel sizes. See ?layout for details.

[R] [R-pkgs] new version of R-package mice

2009-09-10 Thread mgko
Dear R-users, Version V2.0 of the package mice is now available on CRAN for Windows, Linux and Apple users. Multivariate Imputation by Chained Equations (MICE) is the name of software for imputing incomplete multivariate data by Fully Conditional Specifcation (FCS). MICE V1.0 appeared in the y

Re: [R] Intercept=0 in gam from gam package

2009-09-10 Thread Gavin Simpson
On Thu, 2009-09-10 at 14:58 +0100, Corrado wrote: > Dear R list, > > is it possible to force the intercept to assume the value of 0 (that is no > intercept) in gam from gam package? Just like you would in lm or glm for example, by adding -1 to your formula. ?gam suggests you look at ?lm to see a

[R] Running R in Windows server

2009-09-10 Thread srpd TCLTK
Hi, I'm trying to set up a server which allows different users to use R simultaneously. Is it possible in Windows? I know that a LINUX Server is probably a better option, but I had already created a GUI with Tcl/tk in Windows. So some of the events don't work in LINUX. Thanks in advance,

Re: [R] executing rscript from VB

2009-09-10 Thread Duncan Murdoch
On 9/10/2009 9:25 AM, H Rao wrote: Hi, I am looking to execute an R script from VB as below. The script runs fine but the redirection doesnt seem to happen. The redirection operator and the out file seem to be treated as arguments to the R script. Is there a way to get the > operator working T

[R] fit arima long period alternatives

2009-09-10 Thread Matteo Bertini
I'd like to fit a SARIMA model on a timeseries but the period I'd like to use is too big (7 day in 15min samples = 672) for the algorithm used in R. Some suggested alternatives? Thanks, Matteo Bertini [[alternative HTML version deleted]] __ R-

Re: [R] lean text label below barplot table

2009-09-10 Thread Sunil Suchindran
#Example data df <- data.frame(trt = factor(c("A long label", "Another long \n label")), outcome = c(1,4)) #Install ggplot2 if needed library(ggplot2) p <- ggplot(df, aes(y=outcome, x=trt)) p <- p + geom_bar(position="dodge", stat="identity") p <- p + opts(axis.text.x = theme_text(angle = 45, hj

Re: [R] Running R in Windows server

2009-09-10 Thread Uwe Ligges
srpd TCLTK wrote: Hi, I'm trying to set up a server which allows different users to use R simultaneously. Is it possible in Windows? Yes, I guess you want to use some Terminal Server. As for any other software, each user can start own instances of R. Uwe Ligges I know that a LI

Re: [R] Running R in Windows server

2009-09-10 Thread Barry Rowlingson
On Thu, Sep 10, 2009 at 3:07 PM, srpd TCLTK wrote: > > Hi, > > > > I'm trying to set up a server which allows different users to use R > simultaneously. Is it possible in Windows? > I know that a LINUX Server is probably a better option, but I had already > created a GUI with Tcl/tk in Windows. S

Re: [R] Negative AIC

2009-09-10 Thread Ben Bolker
Corrado-5 wrote: > > Dear R list, > > I just obtained a negative AIC for two models (-221.7E+4 > and -230.2E+4). Is that normal? > > It's not necessarily wrong. See -- View this message in context: http://www.nabble.com/Negative-AIC-tp25383791p25384865

Re: [R] tranform a table?

2009-09-10 Thread Don MacQueen
One could probably use one of the apply family of functions (apply, lapply, sapply), but having looked into it a bit, I think it's simpler to use an explicit loop. I doubt you'll encounter a need for greater efficiency, in the cpu time sense, unless your tables are huge. But the looping can b

Re: [R] Negative AIC

2009-09-10 Thread Corrado
My worry is: can I compare negative AIC with positive AIC? does the comparison still hold? On Thursday 10 September 2009 15:57:01 Ben Bolker wrote: > Corrado-5 wrote: > > Dear R list, > > > > I just obtained a negative AIC for two models (-221.7E+4 > > and -230.2E+4). Is that normal? > > It's no

[R] Merge data frames but prefer values in one

2009-09-10 Thread JiHO
Hello everyone, My problem is better explained with an example: > x=data.frame(a=1:4,b=1:4,c=rnorm(4)) > x a b c 1 1 1 -0.8821089 2 2 2 -0.7082583 3 3 3 -0.5948835 4 4 4 -1.8571443 > y=data.frame(a=c(1,3),b=3,c=rnorm(2)) > y a bc 1 1 3 -0.273155973 2 3 3 0.009517862 Now

Re: [R] Insall package

2009-09-10 Thread Cedrick Johnson
Try downloading the rscproxy-.ZIP file on windows. Extension tar.gz is used (mostly) on linux or install.packages('rscproxy') -c wesley mathew wrote: Dear Sir Subject: - *Install " rscproxy_1.3-1.tar.gz "* I am working in Windows system. I was try to install *rscproxy* package in

Re: [R] Negative AIC

2009-09-10 Thread Ben Bolker
If all the models are fitted to the same data set, using the same modeling tools (you have to be careful e.g. comparing lmer models to glm models, because they use different additive constants), and everything seems to make sense (!!!), then yes. I would be a little surprised, and think that som

Re: [R] Negative AIC

2009-09-10 Thread Murilo Doi
Hi, yes the AIC can be negative. To choose the model we use the criteria of lower AIC (-230.2E+4). Murilo Doi Corrado-5 wrote: > > Dear R list, > > I just obtained a negative AIC for two models (-221.7E+4 > and -230.2E+4). Is that normal? > > Regards > -- > Corrado Topi > > Global Climat

Re: [R] How to do rotation for polygon?

2009-09-10 Thread William Dunlap
Try representing the pentagon as a set of complex numbers. Translate them by adding a complex number and multiply by exp(1i*angle) to rotate them around the origin. E.g. to rotate them around their center of gravity, mean(p), do > p<-complex(real=c(4,5,7,8,6), imag=c(5,3,3,5,7)) > plot(p, xlim=c

Re: [R] Negative AIC

2009-09-10 Thread John C Frain
Enders (2004), Applied Econometric time series, Wiley, Exercise 10, page 102, sets out some of the variations of the AIC and SBC and contains a good definition. As these are all monotonic transformations of one another they lead to the same maximum (minimum). I say maximum/minimum because I have

Re: [R] tranform a table?

2009-09-10 Thread David Hajage
I think you could use reshape and ascii package here. Create a file ("code.Rnw") with this code : John and Jane = <<>>= df <- data.frame(names = c("John", "Jane"), field1 = c("value1", "value2"), field2 = c("value3", "value4")) library(reshape) cdf <- cast(melt(df, id = "names"), var

Re: [R] Merge data frames but prefer values in one

2009-09-10 Thread Henrique Dallazuanna
Try this: xy <- merge(x, y, by = c("a","b"),all = TRUE) xy$c <- ifelse(rowSums(!is.na(.x <- xy[, c('c.x', 'c.y')])) > 1, .x[,1], rowSums(.x, na.rm = TRUE)) xy On Thu, Sep 10, 2009 at 12:21 PM, JiHO wrote: > Hello everyone, > > My problem is better explained with an example: > > > x=data.frame(a

Re: [R] Negative AIC

2009-09-10 Thread Corrado
I think the problem is trying to compare different models trained don the same dataset. 1) If I compare for example gam (from gam package) with and without intercept, is that a valid comparison? For example: model with intercept has explained dev 24%, with AIC -2217146, model without intercept

[R] AIC and goodness of prediction - was: Re: goodness of "prediction" using a model (lm, glm, gam, brt,

2009-09-10 Thread Corrado
Dear Kingsford, I apologise for breaking the thread, but I thought there were some more people who would be interested. What you propose is what I am using at the moment: the sum of the squares of the residuals, plus variance / stdev. I am not really satisfied. I have also tried using R2, and

Re: [R] Order of multiple plots

2009-09-10 Thread Nandi
'Layout' is the way to go. You can define a layout as: LO <- layout(matrix(c(1, 2, 3, 4), ncol=2)) In your case, you would probably want to use: layout(matrix(c(2, 1), ncol=2)) Then, the first plot will be drawn in space number 2, and then the second plot will be drawn in space number 1. Hope th

[R] index of min elements in matrix

2009-09-10 Thread annie Zhang
Hi, All, How can I get the indices of the minimum elements in a matrix without using a loop? For example, if the matrix is 4 5 2 2 8 9 5 2 3 Then I want to output (1,3), (2,1), (3,2). Thanks, Annie [[alternative HTML version deleted]] __ R

Re: [R] index of min elements in matrix

2009-09-10 Thread Henrique Dallazuanna
Try this: m <- rbind(c(4,5,2), c(2,8,9), c(5,2,3)) cbind(1:NROW(m), apply(m, 1, which.min)) On Thu, Sep 10, 2009 at 3:34 PM, annie Zhang wrote: > Hi, All, > > How can I get the indices of the minimum elements in a matrix without using > a loop? > > For example, if the matrix is > > 4 5 2 > 2 8

Re: [R] index of min elements in matrix

2009-09-10 Thread Marc Schwartz
On Sep 10, 2009, at 1:34 PM, annie Zhang wrote: Hi, All, How can I get the indices of the minimum elements in a matrix without using a loop? For example, if the matrix is 4 5 2 2 8 9 5 2 3 Then I want to output (1,3), (2,1), (3,2). Thanks, Annie mat <- matrix(c(4, 2, 5, 5, 8, 2, 2, 9

Re: [R] index of min elements in matrix

2009-09-10 Thread annie Zhang
Thanks for all your help. Yes, it's very helpful. Annie On Thu, Sep 10, 2009 at 11:42 AM, Marc Schwartz wrote: > On Sep 10, 2009, at 1:34 PM, annie Zhang wrote: > > Hi, All, >> >> How can I get the indices of the minimum elements in a matrix without >> using >> a loop? >> >> For example, if the

Re: [R] Order a vector and move to new vector

2009-09-10 Thread Nandi
Try the following: Data <- read.table('Sample.txt', header=T) > Data IDUNAV 1 1694 999.89 2 1696 999.90 3 1694 999.87 4 1696 999.88 5 1694 999.84 6 1696 999.86 7 1694 999.82 8 1696 999.84 9 1694 999.79 10 1696 999.82 11 1694 999.71 12 1696 999.75 13 1694 999.69 14 16

[R] function to solve equations

2009-09-10 Thread Yash Gandhi
Hi, I am trying to solve this equation prob = exp(-3.33 + 0.0102*x)/(1+exp(-3.33 + 0.0102*x)). I want to write a function where I call the function and enter the 'prob' value and the output should be the 'x'. Im not sure how to write this. I have a basic structure but im not sure if its correc

Re: [R] ggplot2: mixing colour and linetype in geom_lin e

2009-09-10 Thread Matthieu Dubois
Hi Benoit, I'm not a specialist of ggplot2, but I will try to help. You may obtain more --interesting-- answers on the ggplot2 mailing list. This said, let's go. To solve your problem, I would suggest to 1. change the form of the data frame (using the reshape library) in order to have one v

Re: [R] function to solve equations

2009-09-10 Thread Ravi Varadhan
You don't need an equation solver. This is basic algebra. The solution is: X = (log(prob) - log(1 - prob) + 3.33) / 0.0102 Ravi. --- Ravi Varadhan, Ph.D. Assistant Professor, The Center on Aging and Health Divi

[R] R 2.9.2 memory max - object vector size

2009-09-10 Thread S. Few
Me: Win XP 4 gig ram R 2.9.2 library(foreign) # to read/write SPSS files library(doBy) # for summaryBy library(RODBC) setwd("C:\\Documents and Settings\\00909BR") gc() memory.limit(size=4000) ## PROBLEM: I have memory limit problems. R and otherwise. My dataframes for merging or su

[R] Linux R version: best?

2009-09-10 Thread S. Few
For my Redhat 5.2 Linux box, which version of R would be most stable? I am doing forecasting, statistics, etc. Thanks! Steve __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www

Re: [R] Linux R version: best?

2009-09-10 Thread Steve Lianoglou
Hi, On Sep 10, 2009, at 4:47 PM, S. Few wrote: For my Redhat 5.2 Linux box, which version of R would be most stable? I am doing forecasting, statistics, etc. I believe the conventional wisdom is to always download the latest version ... and also, typically, update your current version to t

Re: [R] Linux R version: best?

2009-09-10 Thread Marc Schwartz
On Sep 10, 2009, at 4:33 PM, Steve Lianoglou wrote: Hi, On Sep 10, 2009, at 4:47 PM, S. Few wrote: For my Redhat 5.2 Linux box, which version of R would be most stable? I am doing forecasting, statistics, etc. I believe the conventional wisdom is to always download the latest version ...

[R] numerical integration

2009-09-10 Thread Roslina Zakaria
Hi r-users,   Can I do a numerical integration in R to solve for F(z)- integral_0^z {f(t) dt} = 0 where F(z) is the CDF and f(t) is the pdf?  What package can I use?   Thank you so much for any help given. [[alternative HTML version deleted]] ___

Re: [R] numerical integration

2009-09-10 Thread Bert Gunter
My goodness! Did you try ?integrate ? Bert Gunter Genentech Nonclinical Biostatistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Roslina Zakaria Sent: Thursday, September 10, 2009 3:36 PM To: r-help@r-project.org Subject: [R]

[R] Complex binning?

2009-09-10 Thread Mark Knecht
Hi, I need to do some binning which to date I've done just writing subset commands. I'm now wondering if there are any good packages that have some good pre-designed functions for multi-variable binning using say 4 or 5 variables, sometimes binning on 3 or more levels of each variable, and then

Re: [R] "Read.csv" in R with dynamic file (1st) argument

2009-09-10 Thread Carl Witthoft
That will not work (or at least doesn't work for me. This does work: fnam<-'thefilename.csv' #or build the name however you like fpath <- 'macintoshhd/users/me/myfolder/ # or whatever you need read.csv(eval(paste(fpath,fnam,sep="")) #worked for me Carl --- Try this: read.csv(s

[R] sppolot: fill below minimum legend value

2009-09-10 Thread emorway
In the plot below, there are some grid cells that have values below 10, which is the lowest "cut" value I have specified. Is there a way, without adjusting the number of cuts, to tell R to fill in those cells with the lowest possible color (in this case greeen)? There is a white "hole" in the im

Re: [R] Complex binning?

2009-09-10 Thread Bert Gunter
packages: plyr reshape (the package, not the base R function) There may well be others... Bert Gunter Genentech Nonclinical Biostatistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Mark Knecht Sent: Thursday, September 10, 2

Re: [R] R 2.9.2 memory max - object vector size

2009-09-10 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of S. Few > Sent: Thursday, September 10, 2009 1:46 PM > To: r-help@r-project.org > Subject: [R] R 2.9.2 memory max - object vector size > > Me: > > Win XP > 4 gig ram > R 2.9.2 >

Re: [R] "Read.csv" in R with dynamic file (1st) argument

2009-09-10 Thread Steven Kang
Oh strange, as it worked for me.. Thanks for providing alternative method in solving the problem! On Fri, Sep 11, 2009 at 9:01 AM, Carl Witthoft wrote: > That will not work (or at least doesn't work for me. > > This does work: > > fnam<-'thefilename.csv' #or build the name however you like > f

Re: [R] Complex binning?

2009-09-10 Thread Mark Knecht
Thanks Bert, I've used reshape a bit but hadn't considered it for this need. plyr is new to me so I'll check it out. I think the hard part in my case is designing the bins. I have some continuous signals for which I don't know how many bins I want to break each into. I'd like to be able to s

[R] memory limit problem

2009-09-10 Thread oleg portnoy
Hi, I have Win XP 32, 4 gig DDR2 and R 2.9.2. I have memory limit problems. > memory.limit(4090) [1] 4090 > memory.limit() [1] 4090 > a<-trans.matrix.f(7) # made big matrix of integer 16384*16384 Error: cannot allocate vector of size 512.0 Mb I not have other objects in R memory. what I do? trans

Re: [R] memory limit problem

2009-09-10 Thread Steve Lianoglou
Hi, On Thu, Sep 10, 2009 at 8:24 PM, oleg portnoy wrote: > Hi, > I have Win XP 32, 4 gig DDR2 and R 2.9.2. > I have memory limit problems. >> memory.limit(4090) > [1] 4090 > >> memory.limit() > [1] 4090 >> a<-trans.matrix.f(7) # made big matrix of integer 16384*16384 > Error: cannot allocate vect

[R] Exporting the formula for a LOESS fit

2009-09-10 Thread jrflanders
I'm at my wit's end, and have searched all of my sources. I need to generate a relatively large number of individual LOESS fits each month of data (I have about 16 months of data). Fitting the polynomial is not my problem, figuring out what the formula that describes that polynomial is. apologies

[R] Bootstrap simulation

2009-09-10 Thread MarcioRibeiro
Hi listers, I would like a suggestion. I am working on a bootstrap simulation which I am calculation the confidence intervals to obtain the coverage probability. I am applying 3 kind of confidence intervals and 3 coverage probabilities (2 sided, left 5% and left 95%). I programmed a function for t

Re: [R] Exporting the formula for a LOESS fit

2009-09-10 Thread Peter Alspach
Tena koe Loess uses local fitting: "Fitting is done locally. That is, for the fit at point x, the fit is made using points in a neighbourhood of x, weighted by their distance from x" (from the help). That is, there is no single formula to describe the fit. HTH Peter Alspach > -Origin

Re: [R] "Read.csv" in R with dynamic file (1st) argument

2009-09-10 Thread Don MacQueen
Alternatives to sprintf() include formatC() or prettyNum(), which would have to be used in combination with paste(). In Carl's solution, the file.path() function should be considered, since it automatically uses the correct path separators for the OS. Furthermore, eval() is not necessary.

[R] fitting stated preference econometric data using multinomial logit in R

2009-09-10 Thread Richard Anderson
Hello, Does anyone know anything about using R to fit stated preference econometric data using multinomial logit? I am not sure that standard VGLM/VGAM can handle this, or if it does, how. This data is different than more typical revealed preference data in that it is recorded as in the fol

Re: [R] eps file with embedded font

2009-09-10 Thread Paul Murrell
Hi My suggested code had dropped the ... format="epswrite" ... and if you put that back, then the /setpagesize command is removed. Does that improve things in your test cases? Paul Ted Harding wrote: Thanks, Paul. In fact I had been hoping to lure you to the surface, from the 12740-km oce

Re: [R] Best R text editors?

2009-09-10 Thread Johannes Huesing
Martin Maechler [Wed, Sep 02, 2009 at 09:17:42AM CEST]: > > "PaCo" == p connolly > > on Wed, 02 Sep 2009 12:19:31 +1200 writes: > > PaCo> On Mon, 31-Aug-2009 at 08:25PM +1000, Jim Lemon wrote: > PaCo> [...] [...] > PaCo> |> Emacs still > PaCo> |> has that annoying tr

[R] Accumulating results from "for" loop in a list/array

2009-09-10 Thread Steven Kang
Dear R users, I would like to accumulate objects generated from 'for' loop to a list or array. To illustrate the problem, arbitrary data set and script is shown below, x <- data.frame(a = c(rep("n",3),rep("y",2),rep("n",3),rep("y",2)), b = c(rep("y",2),rep("n",4),rep("y",3),"n"), c = c(rep("n"

[R] problem formula (newbe)

2009-09-10 Thread Robert U
Dear R-users,   I am trying to run a function of the package “adabag” (e.g. boosting.cv) in order to determine a proper number of cluster that I would specify later on my KMeans clustering. (I had this idea from: http://www.statsoft.com/TEXTBOOK/stcluan.html)   However, I do have a

Re: [R] Merge data frames but prefer values in one

2009-09-10 Thread jo
Thanks for the post-processing ideas. But is there any way to do that in one step? On Thu, Sep 10, 2009 at 7:20 PM, Henrique Dallazuanna wrote: > > Try this: > > xy <- merge(x, y, by = c("a","b"),all = TRUE) > xy$c <- ifelse(rowSums(!is.na(.x <- xy[, c('c.x', 'c.y')])) > 1, .x[,1], > rowSums(.x,

Re: [R] Accumulating results from "for" loop in a list/array

2009-09-10 Thread Schalk Heunis
Steven I think list() can help you ## indlist = list() for (i in 1:(dim(x)[2])) { indlist[[paste("ind", i, sep = "")]] <- which(x[ , i] == "y") } accum = unlist(indlist) print(indlist$ind1) ### Schalk He