[R] m-estimators

2010-08-06 Thread Iasonas Lamprianou
Dear colleagues can somebody help me by showing how we can compute m-estimators in R? thanks Dr. Iasonas Lamprianou Assistant Professor (Educational Research and Evaluation) Department of Education Sciences European University-Cyprus P.O. Box 22006 1516 Nicosia Cyprus Tel.: +357-22-713178 Fa

Re: [R] 64-bit R on 64-bit Windows box... Still not enough memory?!

2010-08-06 Thread Philipp Pagel
On Thu, Aug 05, 2010 at 04:40:48PM -0700, noclue_ wrote: > > I have a 64-bit windows box - > Intel Xeon CPU E7340 @ 2.4GHz 31.9GB of RAM > I have R 2.11.1 (64bit) running on it. > > My csv data is 3.6 GB (with about 15 million obs, 120 variables.) Here is my guess: Your vraiables are mstly n

Re: [R] Tobit Modelling

2010-08-06 Thread sayan dasgupta
Hi Patrick, Well tobit regression is applicable when there is censoring in the data. Tobit regression in R has been implemented in the R package survival An easy user interface is there in the packages AER and Zelig. On Fri, Aug 6, 2010 at 6:12 AM, Patrick Sessford wrote: > > > Dear R-users, >

[R] Is R GPL or LGPL (or can I write a commercial front end to R)?

2010-08-06 Thread Tom Quarendon
Note I'm not asking for any legal advice here obviously, simply what the intention of the R foundation is with regard to allowing commercial connection to R. I've looked at various threads on the r-devel archive and it looks like this may have been discussed before, but as far as could tell, no

Re: [R] Confidence Intervals for logistic regression

2010-08-06 Thread aline uwimana
Dear Troy, use this commend, your will get IC95% and OR. logistic.model <- glm(formula =y~ x1+x2, family = binomial) summary(logistic.model) sum.coef<-summary(logistic.model)$coef est<-exp(sum.coef[,1]) upper.ci<-exp(sum.coef[,1]+1.96*sum.coef[,2]) lower.ci<-exp(sum.coef[,1]-1.96*sum.coef[,2])

Re: [R] Confidence Intervals for logistic regression

2010-08-06 Thread Michael Bedward
Sorry about earlier reply - didn't read your email properly (obviously :) You're suggestion was right, so as well as method for Aline below, another way of doing the same thing is: pred <- predict(y.glm, newdata= something, se.fit=TRUE) ci <- matrix( c(pred$fit + 1.96 * pred$se.fit, pred$fit - 1.

[R] McLeod.Li.test

2010-08-06 Thread Aditya Damani
Hi, I wanted to know that in the “McLeod.Li.test” P-value graph, at what level is the dotted line drawn? Also can it be changed? Thanks. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/list

[R] R code for EGARCH

2010-08-06 Thread Aditya Damani
Hi, Can we run EGARCH in R. If yes, I would be grateful if someone could tell me the R codes for running EGARCH model. Thanks. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-he

Re: [R] Stopping precision using 'optim'

2010-08-06 Thread Uwe Ligges
On 06.08.2010 02:44, Jeremy Beaulieu wrote: Hi all~ I am wondering if it is possible to alter the stopping precision for parameters estimated using the 'optim'? Have you read the Details section of ?optim It tells us that there are "abstol" and "reltol" ... If it helps, I am minimizing th

[R] wavlet transform

2010-08-06 Thread buburumka
Hello I wrote this simple code lev=8; wname='d8'; dec=dwt(ld, filter=wname, n.levels=lev, boundary="periodic", fast=TRUE); i_ld=idwt(dec); before http://r.789695.n4.nabble.com/file/n2316043/1.png 1.png after http://r.789695.n4.nabble.com/file/n2316043/2.png 2.png I don't

[R] R:Backward elimination in svyglm function in R

2010-08-06 Thread aline uwimana
Dear all, someone knows how to get the best fit model by using the svyglm function with backward elimination method. thanx [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PL

Re: [R] Is R GPL or LGPL (or can I write a commercial front end to R)?

2010-08-06 Thread Duncan Murdoch
Tom Quarendon wrote: Note I'm not asking for any legal advice here obviously, simply what the intention of the R foundation is with regard to allowing commercial connection to R. I can't speak for the R Foundation, but I can say that its intentions aren't all you have to consider. R has

Re: [R] Plotting range of values in barplot()

2010-08-06 Thread Jim Lemon
On 08/06/2010 04:22 AM, yankeetilidie wrote: Hello, I am attempting to create a bar plot that contains a range of possible response values on the x-axis of 1 to 5 and contains barplots for the number of responses even in the event that there are 0 responses. For example, I have a data set that

Re: [R] Is R GPL or LGPL (or can I write a commercial front end to R)?

2010-08-06 Thread Tom Quarendon
her the intention or > the actuality of the license allow that. > > > > Thanks! > > > > > [[alternative HTML version deleted]] > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/lis

[R] Odp: m-estimators

2010-08-06 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 06.08.2010 09:10:44: > > Dear colleagues > > can somebody help me by showing how we can compute m-estimators in R? Open your favourite browser. Open CRAN page Go to search Input "m-estimators" as search term. You will got about 3500 hits, definitely s

Re: [R] hi!! please help me!

2010-08-06 Thread Sarah Goslee
Didn't we just go through this? In general, you need to translate your matlab code into R. There are some good R-octave equivalence guides online that will help you with that task. In specific, you need to read the posting guide and ask an answerable question. Sarah On Fri, Aug 6, 2010 at 1:31

Re: [R] using grib files in R

2010-08-06 Thread Paul Hiemstra
Hi Janet, This question would probably be more suited for the r-sig-geo mailing list. In my view, the best option is to use a tool like wgrib to dump the layer you want from the grib file to text and then read it into R using e.g. read.table. See also the spatial data classes provided to R th

Re: [R] R code for EGARCH

2010-08-06 Thread Paul Hiemstra
Hi, PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Paul On 08/06/2010 11:11 AM, Aditya Damani wrote: Hi, Can we run EGARCH in R. If yes, I would be grateful if someone could tell me the R codes fo

Re: [R] Is R GPL or LGPL (or can I write a commercial front end to R)?

2010-08-06 Thread Duncan Murdoch
.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ Information from ESET NOD32 Antivirus, version of virus signature database 5346 (20100806) ______

Re: [R] Is R GPL or LGPL (or can I write a commercial front end to R)?

2010-08-06 Thread Tal Galili
able to use the invocation API > and link to R.dll without my program being subjected to GPL. > > > > > > > > Note that I'm not talking here about anything to do with code written in > the language of R. This is purely concerned with treating R as a library > w

Re: [R] Is R GPL or LGPL (or can I write a commercial front end to R)?

2010-08-06 Thread Tom Quarendon
to be the intention. Question is whether at the other end, at the invocation >> API end, whether it is the intention to be able to use the invocation API >> and link to R.dll without my program being subjected to GPL. >> >> >> >> Note that I'm not talking her

Re: [R] Extracting future and past workday dates

2010-08-06 Thread Sergey Goriatchev
Henrique, that is what I need! Big thanks! Regards, Sergey On Thu, Aug 5, 2010 at 14:56, Henrique Dallazuanna wrote: > n <- 3 > w <- as.numeric(format(Sys.Date(), '%w')) > fut <- c(Sys.Date() - 0:(n + ifelse(w - n > 6, (w - n) - 6, 0)), > Sys.Date() + 1:(n + 1 + ifelse(w + n > 6, (w + n

Re: [R] using grib files in R

2010-08-06 Thread Roger Bivand
In addition to Paul's advice, you may find it useful to know that *.grb files may be read by GDAL drivers in the rgdal package, so that for http://gribs.ocens.net/NorthEurope.wind.grb.bz2, after downloading and uncompressing, GDALinfo("NorthEurope.wind.grb") shows the 122 bands in the file, and re

Re: [R] apply family functions

2010-08-06 Thread jim holtman
The data you provided does not match your example: > dat <- data.frame(Class = c("AAA", "C", "CC", "BB", "B", "A"), Close_date = + c(ini, ini, ini, ini+109, ini+39, ini+24), stringsAsFactors = FALSE) > dat Class Close_date 1 AAA 2010-01-01 2 C 2010-01-01 3CC 2010-01-01 4BB 2010-04-

Re: [R] hi!! please help me!

2010-08-06 Thread Stefan Grosse
Am 06.08.2010 07:31, schrieb leepama: > > I made some anonymous function which performs some process in matlab code.. > But I want to perform it in R program... > Is there any method??? You have already got answers to this. Please read the posting guide and please stop using an unspecific subject

[R] data.frame: return all rows where at least one...

2010-08-06 Thread Werner W.
Hi, I know ways to do this but they all seem awkward and I somehow believe that there is a convenient shortcut. If I have a data.frame with many columns, how can I request all rows for which at least one column satisfy an expression? For instance, all rows where at least one column is negativ

Re: [R] data.frame: return all rows where at least one...

2010-08-06 Thread Erik Iverson
On 08/06/2010 08:03 AM, Werner W. wrote: Hi, I know ways to do this but they all seem awkward and I somehow believe that there is a convenient shortcut. Since you don't show us what you tried, I don't know what you consider 'awkward'. If I have a data.frame with many columns, how can I re

[R] Problems using external BLAS

2010-08-06 Thread Bjørn-Helge Mevik
I have problems building R 2.11.1 with an external BLAS. I've tried several with several libraries: # ACML: export LD_LIBRARY_PATH=/site/VERSIONS/acml-3.6.0/gfortran64_int64/lib BLAS=--with-blas="-L/site/VERSIONS/acml-3.6.0/gfortran64_int64/lib -lacml" LAPACK=--with-lapack # MKL 11: BLAS=--with-

Re: [R] data.frame: return all rows where at least one...

2010-08-06 Thread Tal Galili
One solution - let's say our data.frame is "xx" Then: xx <- matrix(rnorm(9), 3,3) apply(xx < 0, 1, any) Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostat

Re: [R] Tobit Modelling

2010-08-06 Thread Cristian Montes
Hi Patrick Here is some code that might help you implement your tobit regression, if you don´t mind using maximum likelihood. #first declare a likelihood function with a censored model #assume your x2 is censored for values below -1, and using a simple #linear model in this case. Our censoring

Re: [R] A %nin% operator?

2010-08-06 Thread Kevin Wright
There's many additional operators defined in the mvbutils package, including %!in%. Kevin On Thu, Aug 5, 2010 at 10:25 AM, David Huffer wrote: > See Harrell's Hmisc package > > -- > David Huffer, Ph.D. > Deputy Director > CSOSA/ORE > Washington, DC > > -Original Message- > From: r-h

Re: [R] Is R GPL or LGPL (or can I write a commercial front end to R)?

2010-08-06 Thread Tom Quarendon
king here about anything to do with code written in the > language of R. This is purely concerned with treating R as a library with an > interface and wanting to link to that interface and whether the intention or > the actuality of the license allow that. > > > > Thanks!

Re: [R] Exporting nlme summary

2010-08-06 Thread Ronald Wendt
Thanks for all the help. A nice and easy fix. On Thu, Aug 5, 2010 at 6:36 PM, David Winsemius wrote: > > On Aug 5, 2010, at 6:22 PM, Jun Shen wrote: > > I believe this has been discussed many times in the archives. Here is >> one way to do it. >> > > Yes, you are so right. > > >> Use function "s

[R] Pausing script to allow user input from keyboard.

2010-08-06 Thread Johnny Tkach
Hi all, I have written a simple R script to help me analyze a large data set. I would like to have the script pause to allow the user to input a character string that is subsequently used as a filename when saving tables. I have tried to use the "readline" command - this seems to work fi

[R] Partial Function Application

2010-08-06 Thread Mog
Hi. I would like to partially apply a function to a list of arguments, and I don't know how to do this in R, without perhaps writing default values to the formals() of my function, or writing to the environment object of a function. For context, my definition of partially apply is: "fix some of the

Re: [R] Pausing script to allow user input from keyboard.

2010-08-06 Thread jim holtman
Don't cut/paste; 'source' in the script. readLines is trying to read from stdin which is where the commands are being read from. Using 'source' avoids that problem. You can also look at some examples I have seen using tk/tcl where you can bring up a window for user input. On Fri, Aug 6, 2010 at

[R] Odp: Pausing script to allow user input from keyboard.

2010-08-06 Thread Petr PIKAL
Hi Some time ago somebody advised me to use cat("\n","Enter filename","\n") # prompt x=scan(n=1) # read 1 line from console than use x in further code Regards Petr r-help-boun...@r-project.org napsal dne 06.08.2010 15:52:17: > Hi all, > > I have written a simple R script to help me analyze

Re: [R] try-error within for loop

2010-08-06 Thread Olga Lyashevska
Wu Gong wrote: > So, try() inside loop should work. Like > > for () { > if (class(try(...,silent=T))=="try-error") result[[i]] <- NA > ... > } Thanks a lot, it worked for me! Cheers Olga __ R-help@r-project.org mailing list https://stat.ethz

Re: [R] Is R GPL or LGPL (or can I write a commercial front end to R)?

2010-08-06 Thread peter dalgaard
ight owners they aren't going to sue if a use >>> falls within their intention, even if on a strict interpretation of the >>> license such use wouldn't be allowed. >>> >>> >>> >>> So it seems to be the intention that I can write a D

[R] [OT] R on Atlas library

2010-08-06 Thread Matthias Gondan
Dear List, I am aware this is slightly off-topic, but I am sure there are people who already had the problem and who perhaps solved it. I am running long-lasting model fits using constrOptim command. At work there is a linux computer (Quad Core, debian) on which I already have compiled R and Atl

Re: [R] Partial Function Application

2010-08-06 Thread David Winsemius
On Aug 6, 2010, at 9:56 AM, Mog wrote: Hi. I would like to partially apply a function to a list of arguments, and I don't know how to do this in R, without perhaps writing default values to the formals() of my function, or writing to the environment object of a function. For context, my definit

Re: [R] Partial Function Application

2010-08-06 Thread baptiste Auguié
Hi, I think you mean Currying, there's a function in roxygen that looks like, Curry function (f, ..., .left = TRUE) { .orig = list(...) function(...) { if (.left) { args <- c(.orig, list(...)) } else { args <- c(list(...), .orig) }

[R] image plot but data not on grid.

2010-08-06 Thread W Eryk Wolski
Hi, Would like to make an image however the values in z are not on an uniform grid. Have a dataset with length(x) == length(y) == length(z) x[1],y[1] gives the position of z[1] and would like to encode value of z by a color. looking for something like plot(x,y, col = z) where col for z is cleve

Re: [R] Partial Function Application

2010-08-06 Thread Mog
Thank you! That's exactly what I wanted. --Mog __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained,

[R] Error on random forest variable importance estimates

2010-08-06 Thread Pierre Dubath
Hello, I am using the R randomForest package to classify variable stars. I have a training set of 1755 stars described by (too) many variables. Some of these variables are highly correlated. I believe that I understand how randomForest works and how the variable importance are evaluated (thr

Re: [R] image plot but data not on grid.

2010-08-06 Thread Martyn Byng
Hi, Not really sure what you are after, but the following plots a series of points of varying colour plot(x,y,type='n') apply(cbind(x,y,z),1,function(a) {points(a[1],a[2],col=a[3],pch=".")}) but its going to be really slow for a large number of points Martyn -Original Message- From: r-

Re: [R] data.frame: return all rows where at least one...

2010-08-06 Thread werner w
Thanks for the answers! The any function was basically exactly what I was looking for. (previously I used something with rowSums() which is probably not the most efficient way.) Thanks so much, Werner -- View this message in context: http://r.789695.n4.nabble.com/data-frame-return-all-rows-w

Re: [R] image plot but data not on grid.

2010-08-06 Thread David Winsemius
On Aug 6, 2010, at 10:24 AM, W Eryk Wolski wrote: Hi, Would like to make an image however the values in z are not on an uniform grid. Have a dataset with length(x) == length(y) == length(z) x[1],y[1] gives the position of z[1] and would like to encode value of z by a color. looking for some

Re: [R] Is R GPL or LGPL (or can I write a commercial front end to R)?

2010-08-06 Thread Marc Schwartz
Tom, FWIW, since you appear to be representing World Programming in your queries (at least that is my inference given your e-mail domain), it would be prudent to get formal legal advice here and not place your company at legal and financial risk by basing decisions on comments (well intentioned

[R] Colours on conditional levelplots in package "lattice"

2010-08-06 Thread gordon . morrison
I am having difficulty in getting the colours on a conditional levelplot in the package lattice to work as I want them to - I wonder if someone could help me. The colours do not completely agree with the colour key. Here is a specimen example. require(lattice) col1 <- c (1.37,2.35,0.20,1.85,0.

[R] About R base

2010-08-06 Thread Stephen Liu
Hi folks, I have R x64 2.11.1 installed on Win 7 64 bit which is running as VM (guest) on Oracle VirtualBox. Is there any difference between it and R on Linux? I can install another R on Debian 5.04, also running as VM. TIA B.R. Stephen L __ R-

Re: [R] Is R GPL or LGPL (or can I write a commercial front end to R)?

2010-08-06 Thread David Smith
Tom, I would strongly echo the advice of Duncan and Marc and others already on this thread to seek expert legal advice on this issue. At Revolution we rely on the expertise of Mark Radcliffe, the General Legal Counsel of the Open Source Initiative. (Additional information here: http://www.revoluti

Re: [R] Is R GPL or LGPL (or can I write a commercial front end to R)?

2010-08-06 Thread Tom Quarendon
rs they aren't going to sue if a use >> falls within their intention, even if on a strict interpretation of the >> license such use wouldn't be allowed. >> >> >> >> So it seems to be the intention that I can write a DLL to provide R >> functions in an add on package, whic

Re: [R] Is R GPL or LGPL (or can I write a commercial front end to R)?

2010-08-06 Thread Tom Quarendon
ution Analytics http://blog.revolutionanalytics.com Tel: +1 (650) 330-0553 x205 (Palo Alto, CA, USA) __ Information from ESET NOD32 Antivirus, version of virus signature database 5347 (20100806) __ The message was checked by ESET NOD32 Antivirus. http://www.ese

[R] Tukey post hoc test for testing interaction between two or more predictors

2010-08-06 Thread Nicola Spotorno
Hi everyone, I woudl like to apply a Tukey post hoc after a repeated measure ANOVA. I followed the suggestions that I found in this help -list especially this one: /[R] Tukey HSD (or other post hoc tests) following repeated measures ANOVA You want to use lme() in package nlme, then glht()

Re: [R] Is R GPL or LGPL (or can I write a commercial front end to R)?

2010-08-06 Thread Tom Quarendon
o the limitations or freedoms that they are intending to >> allow. After all, as the copyright owners they aren't going to sue if a use >> falls within their intention, even if on a strict interpretation of the >> license such use wouldn't be allowed. >> &g

[R] How to read a file inside a function?

2010-08-06 Thread Raghuraman Ramachandran
Hi I wish to read a file from my local directory from inside a function. I am passing the filename as the argument but this does not work. Say for example function(dat) { dat1=read.csv("D:\\dat.csv",header=TRUE) } If I call funtion(dat) I get the following error. 'Intuitively' i understand this is

Re: [R] Stopping precision using 'optim'

2010-08-06 Thread Ravi Varadhan
Read the help file for optim(). ?optim It clearly says the following with regards to L-BFGS-B: factr controls the convergence of the "L-BFGS-B" method. Convergence occurs when the reduction in the objective is within this factor of the machine tolerance. Default is 1e7, that is a tolerance of ab

Re: [R] How to read a file inside a function?

2010-08-06 Thread Wu Gong
ff <- function(filename) { dat1 <- read.csv(file=filename,header=TRUE) } filename <- "D:\dat.csv" ff(filename) - A R learner. -- View this message in context: http://r.789695.n4.nabble.com/How-to-read-a-file-inside-a-function-tp2316516p2316528.html Sent from the R help mailing list archi

[R] plotting lines and colors

2010-08-06 Thread Erin Hodgess
Dear R People: Suppose I plot the following plot(1:50) Is there a way to plot, say, [1:25] in red and [26:50] in blue, please? (or should I just plot 2 separate lines, please?) I'm about 99% sure that there is no way without 2 lines. thanks for any help, Sincerely, Erin -- Erin Hodgess Ass

Re: [R] plotting lines and colors

2010-08-06 Thread Joshua Wiley
On Fri, Aug 6, 2010 at 9:42 AM, Erin Hodgess wrote: > Dear R People: > > Suppose I plot the following > > plot(1:50) > > Is there a way to plot, say, [1:25] in red and [26:50] in blue, please? One simple way is with the col argument, there are certainly fancier solutions too. plot(1:50, col = re

Re: [R] gsub

2010-08-06 Thread Wu Gong
i <- "piante_venere.csv" gsub("^.*_(.*)\\.csv$", "\\1", i) - A R learner. -- View this message in context: http://r.789695.n4.nabble.com/gsub-tp2316443p2316550.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org

Re: [R] Multiply each depth level of an array with another vector element

2010-08-06 Thread Greg Snow
?sweep -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > project.org] On Behalf Of Maurits Aben > Sent: Thursday, August 05, 2010 2:00 PM

Re: [R] How to read a file inside a function?

2010-08-06 Thread Joshua Wiley
On Fri, Aug 6, 2010 at 9:29 AM, Raghuraman Ramachandran wrote: > Hi > > I wish to read a file from my local directory from inside a function. I am > passing the filename as the argument but this does not work. > Say for example > function(dat) > { > dat1=read.csv("D:\\dat.csv",header=TRUE) this d

[R] memory use without running gc()

2010-08-06 Thread Johann Hibschman
Is there any way to get the current memory used by R without running gc()? I'd like to include the memory usage in logging output, but calling gc() to get that information takes long enough to be noticeable (~ 6 s with ~ 20 GB of ram in use), which goes against the point of logging. Thanks, Johan

Re: [R] eval-parse and lme in a loop

2010-08-06 Thread Greg Snow
> fortune(106) If the answer is parse() you should usually rethink the question. -- Thomas Lumley R-help (February 2005) Here is one approach that seems to be working: for (meanCol in paste("Mean_", 1:3, sep="")) { cat('\n##',meanCol,'\n\n') f <- formula( paste( me

[R] stats::reshape question

2010-08-06 Thread Krishna Tateneni
Hello, A quick question for my edification. When I run the following (R 2.8.1 on Microsoft Windows): > d = data.frame(x1=c(1,2),x2=c(3,4),y1=c(5,6),y2=c(7,8)) > reshape(d,varying=c("y1","x1","y2","x2"),v.names=c("y","x"),dir="long") I found myself surprised by the results--the column labeled "y

Re: [R] Multiply each depth level of an array with another vector element

2010-08-06 Thread Wu Gong
It's interesting that sweep is the slowest one comparing to replicate and rep :) - A R learner. -- View this message in context: http://r.789695.n4.nabble.com/Multiply-each-depth-level-of-an-array-with-another-vector-element-tp2315537p2316586.html Sent from the R help mailing list archive a

[R] qqline error: Error in sort.list(x, partial = unique(c(lo, hi))) : 'x' must be atomic for 'sort.list' Have you called 'sort' on a list?

2010-08-06 Thread Benjamin Caldwell
Hi all, I'm modeling using lme in the nlme package. qqnorm makes plots just find, but when I try to add a line with qqline, I get the following error: "Error in sort.list(x, partial = unique(c(lo, hi))) : 'x' must be atomic for 'sort.list' Have you called 'sort' on a list?" For example > modeli

Re: [R] stats::reshape question

2010-08-06 Thread Wu Gong
It seems that we can't change the order of varying argument or v.names. "Notice that the order of variables in varying is like x.1,y.1,x.2,y.2. " Code can only be: reshape(d,varying=c("x1","y1","x2","y2"),v.names=c("x","y"),dir="long") - A R learner. -- View this message in context: http:

Re: [R] Plotting range of values in barplot()

2010-08-06 Thread Dennis Murphy
Hi: As far as I recall, no one has provided a horizontal barchart as a solution, so here's one using lattice: library(lattice) smw.dat<-factor(rep(c("Somewhat Disagree", "Neutral", "Somewhat Agree", "Strongly Agree"),c(1,2,7,12)), levels=c("Strongly Disagree", "Somewhat Disagree", "Ne

Re: [R] memory use without running gc()

2010-08-06 Thread jim holtman
?memory.size On Fri, Aug 6, 2010 at 1:00 PM, Johann Hibschman wrote: > Is there any way to get the current memory used by R without running > gc()? > > I'd like to include the memory usage in logging output, but calling gc() > to get that information takes long enough to be noticeable (~ 6 s with

[R] Computation Duration Time

2010-08-06 Thread TGS
Is there a way to find out what the computation duration time was to complete executing a code chunk? __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guid

Re: [R] m-estimators

2010-08-06 Thread Dennis Murphy
Hi: Try (install package sos first if necessary): library(sos) findFn('M-estimator') This produced 34 hits on my machine (not quite as productive as Petr's search :), but it identifies a few packages that contain functions for robust estimation. It's also a good way to get familiar with a very u

Re: [R] Computation Duration Time

2010-08-06 Thread Erik Iverson
?Rprof or ?system.time TGS wrote: Is there a way to find out what the computation duration time was to complete executing a code chunk? __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guid

Re: [R] memory use without running gc()

2010-08-06 Thread Johann Hibschman
jim holtman writes: > ?memory.size Only works on Windows. I guess I should have specified; this is on Linux. Thanks, Johann __ 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] qqline error: Error in sort.list(x, partial = unique(c(lo, hi))) : 'x' must be atomic for 'sort.list' Have you called 'sort' on a list?

2010-08-06 Thread David Winsemius
On Aug 6, 2010, at 1:47 PM, Benjamin Caldwell wrote: Hi all, I'm modeling using lme in the nlme package. qqnorm makes plots just find, but when I try to add a line with qqline, I get the following error: "Error in sort.list(x, partial = unique(c(lo, hi))) : 'x' must be atomic for 'sort.lis

[R] gsub

2010-08-06 Thread Alfredo Alessandrini
Hi, I'm using gsub, but I've a problem. > print(i) [1] "piante_venere.csv" > gsub("\\.csv$", "", i) [1] "piante_venere" > gsub("^piante_", "", i) [1] "venere.csv" Can I combine the two expressions? Like this: > gsub(.) [1] "venere" Thanks, Alfredo -- View this message in context: ht

[R] Creating timeSeries

2010-08-06 Thread Serdar Akin
Hi I want to create a TimeSeries object with already defined dates (in the first vector) so that all the data are coerced as a time series object with the dates as they are. Is there anyone that have an idea what to do? 2010-07-07 3.900833 3.176667 2.754167 2.045833 1.820833 2010-04-21 4.256667

Re: [R] 64-bit R on 64-bit Windows box... Still not enough memory?!

2010-08-06 Thread noclue_
> .Machine$sizeof.pointer [1] 4 -- View this message in context: http://r.789695.n4.nabble.com/64-bit-R-on-64-bit-Windows-box-Still-not-enough-memory-tp2315742p2316493.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.

[R] pdf indifferent to lwd after some small number<1 (e.g. 0.18)

2010-08-06 Thread Chuen Tan
Hi, To plot a figure, I used lwd=0.18 in the function lines() to plot very fine lines. However, using png() or pdf() to save the figure, it appears that lwd has no effect on pdf() beyond some small number (e.g. 0.18) and the lines looks much thicker than png(). Setting lwd<0.18 does not make th

Re: [R] Confidence Intervals for logistic regression

2010-08-06 Thread Troy S
Michael, Thanks for the reply. I believe Aline was sgiving me CI's on coefficients as well. So c(pred$fit + 1.96 * pred$se.fit, pred$fit - 1.96 * pred$se.fit) gives me the CI on the logits if I understand correctly? Maybe the help on predict.glm can be updated. Thanks! On 6 August 2010 01:46,

Re: [R] stats::reshape question

2010-08-06 Thread Dennis Murphy
Hi: Is this what you were aiming for? reshape(d,varying=list(c("x1","x2"), c("y1","y2")),v.names=c("x","y"),dir="long") time x y id 1.11 1 5 1 2.11 2 6 2 1.22 3 7 1 2.22 4 8 2 HTH, Dennis On Fri, Aug 6, 2010 at 10:28 AM, Krishna Tateneni wrote: > Hello, > > A quick ques

Re: [R] 64-bit R on 64-bit Windows box... Still not enough memory?!

2010-08-06 Thread David Winsemius
You are running 32 bit R. Read the RW FAQ. On Aug 6, 2010, at 12:03 PM, noclue_ wrote: .Machine$sizeof.pointer [1] 4 -- David Winsemius, MD West Hartford, CT __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEA

[R] Grouping clusters from dendrograms

2010-08-06 Thread Julia M
Hi, I have produced a dendrogram of categorical data in R using the hclust function, although the input was a dissimilarity matrix produced in SAS, as I have defined my own distances. The dendrogram is fine and I can view and use this. However, I was wondering if there is a method by which I ca

[R] R script doesn't load libraries when called from cron

2010-08-06 Thread zerdna
I have R script that i need to run in cron. Either R libraries or some .so libraries that they depend on don't get loaded correctly. Here is an example. I have a file, call it tmp.R tmp.R = R --slave --args $0 $* < tryCatchList -> tryCatchOne -> Execution halted

Re: [R] Error on random forest variable importance estimates

2010-08-06 Thread Liaw, Andy
From: Pierre Dubath > > Hello, > > I am using the R randomForest package to classify variable > stars. I have > a training set of 1755 stars described by (too) many > variables. Some of > these variables are highly correlated. > > I believe that I understand how randomForest works and how >

Re: [R] gsub

2010-08-06 Thread Marc Schwartz
On Aug 6, 2010, at 10:14 AM, Alfredo Alessandrini wrote: > > Hi, > > I'm using gsub, but I've a problem. > >> print(i) > [1] "piante_venere.csv" >> gsub("\\.csv$", "", i) > [1] "piante_venere" >> gsub("^piante_", "", i) > [1] "venere.csv" > > > Can I combine the two expressions? > > Like th

Re: [R] stats::reshape question

2010-08-06 Thread Krishna Tateneni
Thanks for the reply, I realize that having x and y in that order in "varying" and "v.names" will work. The question is why reversing the order (i.e., y followed by x) does not work; it seems unintuitive, so I'm wondering if I've just misread the documentation. On Fri, Aug 6, 2010 at 1:45 PM, Den

[R] How to apply apply?!

2010-08-06 Thread Raghuraman Ramachandran
guRus I have say a dataframe, d and I wish to do the following: 1) For each row, I want to take one particular value of the row and multiply it by 2. How do I do it. Say the data frame is as below: OPEN HIGH LOW CLOSE 1931.2 1931.2 1931.2 1931.2 0 0 0 999.05 0 0 0 1052.5 0 0 0 987.8 0 0 0 925.

Re: [R] Creating timeSeries

2010-08-06 Thread Raghuraman Ramachandran
?xts xts will do what you want. as.xts or xts() are straightforward ways. On Fri, Aug 6, 2010 at 5:11 PM, Serdar Akin wrote: > Hi > > I want to create a TimeSeries object with already defined dates (in the > first vector) so that all the data are coerced as a time series object with > the dates

Re: [R] pdf indifferent to lwd after some small number< 1 (e.g. 0.18)

2010-08-06 Thread Ben Bolker
Chuen Tan yahoo.com> writes: > > Hi, > > To plot a figure, I used lwd=0.18 in the function lines() to plot > very fine lines. However, using png() or > pdf() to save the figure, it appears that lwd has no effect on > pdf() beyond some small number (e.g. 0.18) and > the lines looks much thicker

Re: [R] 64-bit R on 64-bit Windows box... Still not enough memory?!

2010-08-06 Thread Philipp Pagel
On Fri, Aug 06, 2010 at 09:03:09AM -0700, noclue_ wrote: > > > .Machine$sizeof.pointer > [1] 4 So it appears you are not on 64bit. Experpt form the help page: [...] sizeof.pointer: the number of bytes in a C ‘SEXP’ type. Will be ‘4’ on 32-bit builds and ‘8’ on 64-bit builds of R. [..

Re: [R] How to apply apply?!

2010-08-06 Thread Abhijit Dasgupta, PhD
For 1, an easy way is dat <- transform(dat, CLOSE2=2*CLOSE) For 2: apply(dat,1,fun) On 08/06/2010 03:06 PM, Raghuraman Ramachandran wrote: guRus I have say a dataframe, d and I wish to do the following: 1) For each row, I want to take one particular value of the row and multiply it by 2. Ho

Re: [R] How to apply apply?!

2010-08-06 Thread Erik Iverson
Raghuraman Ramachandran wrote: guRus I have say a dataframe, d and I wish to do the following: 1) For each row, I want to take one particular value of the row and multiply it by 2. How do I do it. Say the data frame is as below: OPEN HIGH LOW CLOSE 1931.2 1931.2 1931.2 1931.2 0 0 0 999.05

Re: [R] How to apply apply?!

2010-08-06 Thread Philipp Pagel
> How do I multiply only the close of every row using the 'apply' function? > And once multiplied how do I obtain a new table that also contains the new > 2*CLOSE column (without cbind?). You don't use apply in this case - a simple multiplication and variable assignment will do: > require(tserie

[R] Running Sweave directly from Windows command line

2010-08-06 Thread julia . jacobson
Hello everybody out there using R, When I try to run the command "R CMD Sweave file.Rnw" (R Version 2.11.1) on the command line of Windows 7, an error message tells me that the command "sh" is not known. I suppose that R is trying to use a shell script, which can't be interpreted using Windows.

Re: [R] qqline error: Error in sort.list(x, partial = unique(c(lo, hi))) : 'x' must be atomic for 'sort.list' Have you called 'sort' on a list?

2010-08-06 Thread Benjamin Caldwell
Okay, yeah, so he're the deal - nlme is loaded, did the library(nlme) thing no problem. When I run >??qqnorm.lme the file comes up fine. But, if I try to use the function, I get an error like the package isn't loaded e.g. >qqnorm.gls(modelincrF) Error: could not find function "qqnorm.gls" On Fr

[R] r sig for tcl/tk?

2010-08-06 Thread Erin Hodgess
Dear R People: Is there an R sig for Tcl/Tk, please? I looked at the User Groups list on the main page and didn't see one. However, I thought I'd double check. Thanks, Erin -- Erin Hodgess Associate Professor Department of Computer and Mathematical Sciences University of Houston - Downtown m

[R] Signals and Noise

2010-08-06 Thread TGS
Is there a reference page indicating which packages or functions are available in R for the filed of electrical engineering? I'm not an EE but I've been doing some simulations regarding signals and noise and I found the 'tuneR' to be useful. Are there any others?

  1   2   >