Re: [R] importing multiple file form folder

2012-05-29 Thread mpavlic
Hi Jim, thanks for that, works perfectly. m -- View this message in context: http://r.789695.n4.nabble.com/importing-multiple-file-form-folder-tp4631637p4631798.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mai

Re: [R] strucchange Fstats() example

2012-05-29 Thread Achim Zeileis
On Tue, 29 May 2012, Mabille, Geraldine wrote: In the second example, the authors state the presence of "at least" two breakpoints. When plotting the F-statistics using the following code, we see indeed two peaks in the F-statistics, that coincides with the dates given by the authors: c.a 19

Re: [R] Simple example for High performance computing with R?

2012-05-29 Thread Martin Morgan
On 05/29/2012 08:02 PM, Fabrice Tourre wrote: Dear list, I want to run two independent calculation (A, B) and then combined their results to do a plot in R. Before I just run calculation A first, then calculation B. It will take some times. I just have one server with multiple core. I noticed th

[R] How to calculate correlation matrix for 128 * 12625 matrix

2012-05-29 Thread mahdi
In our dataset the samples/object are number of patients which is 128 and we are dealing with 12,625 genes which is our attributes of the dataset. So, it is obvious that if I calculate the correlation matrix of (128 * 12,625) the resulted dimension of the correlation matrix will be (12,625 * 12,625

[R] Simple example for High performance computing with R?

2012-05-29 Thread Fabrice Tourre
Dear list, I want to run two independent calculation (A, B) and then combined their results to do a plot in R. Before I just run calculation A first, then calculation B. It will take some times. I just have one server with multiple core. I noticed that there are some nice package in R for parallel

Re: [R] PROBLEMS with In `[<-.factor`(`*tmp*`, (¿ORDERED FACTOR?)

2012-05-29 Thread David Winsemius
On May 29, 2012, at 11:01 AM, RBB wrote: HI!!! I have a table containing qualitative and quantitative data; one of the columns contains "Level of education", and the possibilities are "none", "High school", "college"; I want to give the value 0 to "none", the value 1 to "High school",

Re: [R] importing multiple file form folder

2012-05-29 Thread David Winsemius
On May 29, 2012, at 10:56 AM, mpavlic wrote: Hi Sarah, I can not for the life of me understand what was wrong with my post?!? Can you please explain, so that i will not make the same mistake again? She asked you to read the Posting Guide. It _still_ appears you have not done so. Please

Re: [R] a question about "by" and "ddply"

2012-05-29 Thread R. Michael Weylandt
On Wed, May 30, 2012 at 12:58 AM, David Winsemius wrote: > > On May 29, 2012, at 6:32 PM, jacaranda tree wrote: > >> Hi all, >> I have a data set (df, n=10 for the sake of simplicity here) where I have >> two continuous variables (age and weight) and I also have a grouping >> variable (group, with

Re: [R] a question about "by" and "ddply"

2012-05-29 Thread David Winsemius
On May 29, 2012, at 6:32 PM, jacaranda tree wrote: Hi all, I have a data set (df, n=10 for the sake of simplicity here) where I have two continuous variables (age and weight) and I also have a grouping variable (group, with two levels). I want to run correlations for each group separately

Re: [R] a question about "by" and "ddply"

2012-05-29 Thread Jeff Newmiller
a) This is not reproducible (missing data). Please read the Posting Guide mentioned at the bottom of every message. b) You are abusing ddply. Read the help for ddply... the function you give it needs to return a data frame. You may want dlply instead, or you need to copy the atomic values from

Re: [R] R and igraph problems

2012-05-29 Thread Jeff Newmiller
I get no error loading this package (cannot reproduce). I suggest you uninstall and reinstall R, and do not install or run as administrator (per your other email). If this does not solve your problem, please read the Posting Guide and follow it's recommendations to improve your odds of getting

Re: [R] Windows 7 installation issues

2012-05-29 Thread Jeff Newmiller
a) Please read the Posting Guidelines mentioned at the bottom of every message. One rule is this is a plain text email list, so adjust your mail client to post text to this email list, not HTML. b) For best results, do not run R as administrator except to update base packages. R works fine usin

Re: [R] Windows 7 installation issues

2012-05-29 Thread Henrik Bengtsson
You probably meant testInstalledPackage("base") without the 's', cf. help("testInstalledPackage", package="tools"). /Henri On Tue, May 29, 2012 at 4:18 PM, jalantho...@verizon.net wrote: > I installed R version 2.15.0 under C:/ on a PC running Windows 7.  When I > load library("tools") to tes

[R] Windows 7 installation issues

2012-05-29 Thread jalantho...@verizon.net
I installed R version 2.15.0 under C:/ on a PC running Windows 7.  When I load library("tools") to test the installation and then run the command testInstalledPackages("base"), I get the following error: Error in setwd(outDir): cannot change working directory. I have set up the R shortcut to r

Re: [R] PROBLEMS with In `[<-.factor`(`*tmp*`, (¿ORDERED FACTOR?)

2012-05-29 Thread arun
HI, Do you want to replace the column ("level of education") with values or just add values as second column?  I guess you are looking for the latter. Try this, dat<-data.frame(Levelofeducation=rep(c("none","HighSchool","College"),c(3,3,3)),value=rep(c(0,1,2),c(3,3,3))) str(dat) data.frame': 

[R] a question about "by" and "ddply"

2012-05-29 Thread jacaranda tree
Hi all, I have a data set (df, n=10 for the sake of simplicity here) where I have two continuous variables (age and weight) and I also have a grouping variable (group, with two levels). I want to run correlations for each group separately (kind of similar to "split file" in SPSS). I've been expe

Re: [R] as.function parameters

2012-05-29 Thread jackl
Hi there, ~ sry for the late answer.. and thanks for the advice. i'm using a different approach than the CRR model because i'm implementing a pricing algorithm for american options with transaction costs. i'm not sure if i should close this thread for now, because right now i'm trying to do a d

[R] R and igraph problems

2012-05-29 Thread jalantho...@verizon.net
I have R 2.15.0 running under Windows 7. I installed the igraph 0.5.4 package from a zip file. When I attempt to load igraph using "library(igraph)", I get the error package igraph is not installed for arch=x64.  When I repeat this using the 32-bit version of R, I get the same basic error but wi

Re: [R] Error message GSA package

2012-05-29 Thread ahess
Dear David, I know that you posted this quite a while ago, and you probably aren't interested anymore, but I thought it might be useful to answer this question because I came across the same problem. As you may have figured out, the error occurs because of the "minsize" argument, which is 15 by d

Re: [R] Error message GSA package

2012-05-29 Thread ahess
Dear David, I know that this was posted, but I ran across the same error, so I thought it might be useful to respond. The reason this error occurs is because of the "minsize" setting used in GSA, which is 15 by default. Setting this to the number of genes in the set you are interested will fix t

Re: [R] Converting to XTS loses data.frame structure

2012-05-29 Thread R. Michael Weylandt
Hi Steven, I am the GSOC student in question and I think the best statement of work is probably this one here on the GSOC-R Wiki (as well as for the other projects): http://rwiki.sciviews.org/doku.php?id=developers:projects:gsoc2012:xts If you log into Google Melange, my project proposal should

Re: [R] Converting to XTS loses data.frame structure

2012-05-29 Thread steven mosher
is there a statement of work for the summer of code work. On May 29, 2012 12:19 PM, "Joshua Ulrich" wrote: > On Tue, May 29, 2012 at 2:11 PM, Noah Silverman > wrote: > > Hello, > > > > I noticed something odd when working with data frames and xts objects. > > > > If I read in a CSV file, R creat

Re: [R] use xyplot to plot mean and CI by groups

2012-05-29 Thread Richard M. Heiberger
I am showing two alternatives, both from the HH package. install.packages("HH") The first one does essentially what you request, smithdata <- src[c("x", "trt")] smithdata$timefactor <- factor(src$time) position(smithdata$timefactor) <- as.numeric(levels(smithdata$timefactor)) position(smithdata$t

Re: [R] Relist strings? [Was: How to remove square brackets, etc. from address strings?]

2012-05-29 Thread Rui Barradas
What is the result after each step? Could you use dput to post them? dput(head(r)) dput(head(r1)) # after the first lapply Copy the output of those instructions and paste them here. I'm asking this because I've tried with your dataset and it worked. Rui Barradas Em 29-05-2012 21:06, Sabina A

[R] use xyplot to plot mean and CI by groups

2012-05-29 Thread John Smith
Dear R users, I am trying to use xyplot to draw group mean and CI. The following is the sample code. But I want: 1. Use different colors and symbols to draw individual points, CI and the lines connect group means from different time points; 2. Add jitters to x axis to allow CIs not be ov

Re: [R] importing multiple file form folder

2012-05-29 Thread jim holtman
Here is how to get the number: > x <- c("channel 1 20120509 153744 1.ddf", "channel 1 20120509 154744 > 1.ddf", + "channel 1 20120509 155744 1.ddf", "channel 1 20120509 160744 1.ddf", + "channel 1 20120509 161744 1.ddf", "channel 1 20120509 162744 1.ddf") > # get the numbe

Re: [R] PROBLEMS with In `[<-.factor`(`*tmp*`, (¿ORDERED FACTOR?)

2012-05-29 Thread Bert Gunter
...and On Tue, May 29, 2012 at 1:04 PM, R. Michael Weylandt wrote: > Read this: > http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example > > Read the posting guide:  http://www.R-project.org/posting-guide.html > > and try again. > > It's entirely impossible to help

Re: [R] Random Forest Classification_ForestCombination

2012-05-29 Thread Liaw, Andy
As long as you can remember that the summaries such as variable importance, OOB predictions, and OOB error rates are not applicable, I think that should be fine. Andy -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Nikita Desai

Re: [R] gslider-gwidgets

2012-05-29 Thread j verzani
karthicklakshman gmail.com> writes: > > Hello R lovers, > > For my GUI, I am using gslider of Gwidgets. I need to add the "to=" value > dynamically ie., maximum value from a data frame column(something like > to=max(df[,3])). But I am getting error message like > You update the items to sel

Re: [R] Factor problem

2012-05-29 Thread R. Michael Weylandt
Please don't double post. (And see my reply to your other thread) Michael On Tue, May 29, 2012 at 1:50 PM, Raúl Bajo wrote: > HI! > > I am working with a table with quantitative and qualitative data; one of > the columns is "Level of education", which is an ordered factor. I want to > get rid of

Re: [R] Relist strings? [Was: How to remove square brackets, etc. from address strings?]

2012-05-29 Thread Sabina Arndt
Hello, thank you very much for your reply, Rui Barradas. > In my workspace everything was converted either to non-empty strings or > NULLs. > This is how to do it. > > > r1 <- lapply(r, function(x) x[nchar(x) > 0]) > r1 <- lapply(r1, function(x) if(length(x)) x else NULL) # second pass > cou

Re: [R] PROBLEMS with In `[<-.factor`(`*tmp*`, (¿ORDERED FACTOR?)

2012-05-29 Thread R. Michael Weylandt
Read this: http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example Read the posting guide: http://www.R-project.org/posting-guide.html and try again. It's entirely impossible to help you as is. Michael On Tue, May 29, 2012 at 2:01 PM, RBB wrote: > HI!!! > > I h

Re: [R] Converting to XTS loses data.frame structure

2012-05-29 Thread Noah Silverman
Thanks Joshua, Appreciate it! -- Noah Silverman UCLA Department of Statistics 8208 Math Sciences Building Los Angeles, CA 90095 On May 29, 2012, at 12:17 PM, Joshua Ulrich wrote: > On Tue, May 29, 2012 at 2:11 PM, Noah Silverman > wrote: >> Hello, >> >> I noticed something odd when working w

Re: [R] trouble automating formula edits when log or * are present; update trouble

2012-05-29 Thread Bert Gunter
or use quote()... -- Bert On Tue, May 29, 2012 at 10:48 AM, wrote: > Paul Johnson writes: > >> do.call( substitute, list( frm, list( x = as.name("z") ) ) ) ## or using quote() >>do.call( substitute, list( frm, list( x = quote(z > y ~ log(z) * (w + u) > > > HTH, > > Chuck > > >> >> I h

[R] gslider-gwidgets

2012-05-29 Thread karthicklakshman
Hello R lovers, For my GUI, I am using gslider of Gwidgets. I need to add the "to=" value dynamically ie., maximum value from a data frame column(something like to=max(df[,3])). But I am getting error message like Error in checkPtrType(object, "GtkWidget") : object of class NULL isn't a GtkW

[R] Factor problem

2012-05-29 Thread Raúl Bajo
HI! I am working with a table with quantitative and qualitative data; one of the columns is "Level of education", which is an ordered factor. I want to get rid of the ordered factor, and set my own scale. How to do that? All the time I get the following error: In `[<-.factor`(`*tmp*`, educa = "Le

[R] PROBLEMS with In `[<-.factor`(`*tmp*`, (¿ORDERED FACTOR?)

2012-05-29 Thread RBB
HI!!! I have a table containing qualitative and quantitative data; one of the columns contains "Level of education", and the possibilities are "none", "High school", "college"; I want to give the value 0 to "none", the value 1 to "High school", and 2 to "college", but I got the following error:

[R] offset glm.nb issues why so unstable?

2012-05-29 Thread D_Tomas
Hi, I am using the glm.nb" model type to fit some count data with TWO offset variables. I have successfully used this approach to build scores of models for several datasets but I am having problems with two in particular. Depending on the model I try to fit for a given dataset, I obtain th

Re: [R] Create and Change Column in a Matrix as per condition

2012-05-29 Thread arun
Hi Antony, Try this, I changed matrix to data frame to make it work and change it back again to matrix.  There might be a easy way to do this.  GetCsv<-as.matrix(data.frame("DWATT"=c(10,20,30,30,32)))  GetCsv<-data.frame(GetCsv)  GetCsv[GetCsv$DWATT<30 | GetCsv$DWATT >31, "DWAT_QF"] <-"RC"  Get

[R] Fw: Help needed in wavelet transforming

2012-05-29 Thread arun
- Forwarded Message - From: arun To: tarun trivedi Cc: Sent: Tuesday, May 29, 2012 12:24 PM Subject: Re: [R] Help needed in wavelet transforming Hi Tarun, Have you looked into LS2w? http://rgm2.lab.nig.ac.jp/RGM2/func.php?rd_id=LS2W:imwd Hope this helps. A.K. - Original M

Re: [R] Question about random Forest function in R

2012-05-29 Thread Liu, Weifeng Aaron
This is a well-known limitation. You have to group categorical attributes together to work around. -- Weifeng (aaron) liu  |  retail systems pricing  |  sr research scientist -Original Message- From: r-h

Re: [R] importing multiple file form folder

2012-05-29 Thread mpavlic
Just one more thing ... my colnames are as follows : c("channel 1 20120509 153744 1.ddf", "channel 1 20120509 154744 1.ddf", "channel 1 20120509 155744 1.ddf", "channel 1 20120509 160744 1.ddf", "channel 1 20120509 161744 1.ddf", "channel 1 20120509 162744 1.ddf",...) H

Re: [R] Converting to XTS loses data.frame structure

2012-05-29 Thread Jeff Newmiller
Only convert numeric columns to time series. This is a fundamental limitation of ts, xts, and zoo. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go.

Re: [R] Question about random Forest function in R

2012-05-29 Thread Liaw, Andy
Hi Kelly, The function has a limitation that it cannot handle any column in your "x" that is a categorical variable with more than 32 categories. One possibility is to see if you can "bin" some of the categories into one to get below 32 categories. Andy -Original Message- From: r-hel

Re: [R] Converting to XTS loses data.frame structure

2012-05-29 Thread Joshua Ulrich
On Tue, May 29, 2012 at 2:11 PM, Noah Silverman wrote: > Hello, > > I noticed something odd when working with data frames and xts objects. > > If I read in a CSV file, R creates a nice data.frame.  This works well. > > If I then convert to an XTS object, I see that all the values in the data are

[R] Converting to XTS loses data.frame structure

2012-05-29 Thread Noah Silverman
Hello, I noticed something odd when working with data frames and xts objects. If I read in a CSV file, R creates a nice data.frame. This works well. If I then convert to an XTS object, I see that all the values in the data are now quoted. My data is a mix of numeric and character. This is us

Re: [R] lattice: add a marginal histogram on top of the colorkey of a levelplot?

2012-05-29 Thread ilai
?plot.trellis. In general something like mlp<- levelplot(... mhist<- histogram(... plot(mlp,split=c(1,2,1,2),more=T) plot(mhist,split=c(1,1,1,2),more=F) You will need to do some work on the padding and layout widths to get the distances right (I assume the key is to be the "x-axis" of the histogr

Re: [R] Extract time from irregular date and time data records

2012-05-29 Thread Sam Albers
Apologies. I was searching using the wrong search terms. This is clearly a string issue. I've added the solution below. Sam On Tue, May 29, 2012 at 11:39 AM, Sam Albers wrote: > Hello, > > I am having a problem making use of some data outputted from an > instrument in a somewhat weird format. Th

Re: [R] trouble automating formula edits when log or * are present; update trouble

2012-05-29 Thread cberry
Paul Johnson writes: > Greetings > > I want to take a fitted regression and replace all uses of a variable > in a formula. For example, I'd like to take > > m1 <- lm(y ~ x1, data=dat) > > and replace x1 with something else, say x1c, so the formula would become > > m1 <- lm(y ~ x1c, data=dat) So

Re: [R] Boxplot superscript y-axis

2012-05-29 Thread Carlos Rivera
Dear Prof. Eduardo, Try this: rot<-expression(paste("DGL growth (cm.yr"^"-1",")")) boxplot(five$gr13~five$Code, xlab="Species code", ylab=rot) In this page there are some useful mathematical annotations in R: http://stat.ethz.ch/R-manual/R-patched/library/grDevices/html/plotmath.html Best wishe

[R] Wilcoxon-Mann-Whitney U value: outcomes from different stat packages

2012-05-29 Thread maxbre
Given this example #start code a<-c(0,70,50,100,70,650,1300,6900,1780,4930,1120,700,190,940, 760,100,300,36270,5610,249680,1760,4040,164890,17230,75140,1870,22380,5890,2430) b<-c(0,0,10,30,50,440,1000,140,70,90,60,60,20,90,180,30,90, 3220,490,20790,290,740,5350,940,3910,0,640,850,260)

[R] Memory Windows

2012-05-29 Thread Emiliano Zapata
This is my current version of R: R version 2.15.0 (2012-03-30) Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: x86_64-pc-mingw32/x64 (64-bit) OS: Windows I get the following: > memory.size() [1] 23.04 > memory.limit() [1] 190600 > I also have the foll

Re: [R] problems with xlim in plot.zoo() and window()

2012-05-29 Thread Agustin Lobo
Thanks! Using as.POSIXct() instead of as.Date() solves the problem: > plot(alyL32007z$NEE_st,col=cod,type="b",pch=18,xlim=as.POSIXct(c("2007-03-04 > 11:30:00 UTC" ,"2007-11-09 11:30:00 UTC"))) #works fine > delme <- window(alyL32007z, start = > as.POSIXct("2007-03-04",tz="UTC"),end=as.POSIXct("20

[R] Extract time from irregular date and time data records

2012-05-29 Thread Sam Albers
Hello, I am having a problem making use of some data outputted from an instrument in a somewhat weird format. The instrument outputs two columns - one called JulianDay.Hour and one called Minutes.Seconds. I would like to convert these columns into a single column with a time. So I was using substr

Re: [R] package tm: reading XML files

2012-05-29 Thread Milan Bouchet-Valat
Le mardi 29 mai 2012 à 10:03 +0200, Ad Feelders a écrit : > Dear fellow R users, > > I'm using the package tm for text mining, and have a problem with > reading in a corpus from XML files. > When I copy the example from "Introduction to the tm package" of the > small reuters subset "crude", ever

Re: [R] trouble automating formula edits when log or * are present; update trouble

2012-05-29 Thread Bert Gunter
Paul et. al: I think Gabor's incantation qualifies as my desired alternative to eval(parse())). It is, unfortunately, rather tricky, imo. However, the objection you raise to the gsub(deparse()) solution is easily overcome through the use of an appopriate regex: e.g.: gsub("\\","log(x)","x+xc+cx

Re: [R] importing multiple file form folder

2012-05-29 Thread mpavlic
Hi again Rui, i got the column names settled like this : >colnames(Temp) <- paste(flist, seq_len(ncol(Temp)), sep=".") Thanks again, m -- View this message in context: http://r.789695.n4.nabble.com/importing-multiple-file-form-folder-tp4631637p4631737.html Sent from the R help mailing list a

[R] lattice: add a marginal histogram on top of the colorkey of a levelplot?

2012-05-29 Thread Andy Bunn
Lattice experts: Can you think of a way to produce a levelplot as below and then add a histogram of the z variable to the top margin of the plot that would sit on top of the color key? x <- seq(pi/4, 5 * pi, length.out = 100) y <- seq(pi/4, 5 * pi, length.out = 100) r <- as.vector(sqrt(outer(

Re: [R] importing multiple file form folder

2012-05-29 Thread mpavlic
Hi Rui, Thanks a lot, it works like I wanted. I am sorry about my late response though... Is it possible to get the name of the file (Channe 1. ) as a name of the column in the resulting table (dataframe)? Many thanks, m -- View this message in context: http://r.789695.n4.nabble.com/im

Re: [R] importing multiple file form folder

2012-05-29 Thread mpavlic
Hi Sarah, I can not for the life of me understand what was wrong with my post?!? Can you please explain, so that i will not make the same mistake again? Regards, m -- View this message in context: http://r.789695.n4.nabble.com/importing-multiple-file-form-folder-tp4631637p4631734.html Sent fr

Re: [R] trouble automating formula edits when log or * are present; update trouble

2012-05-29 Thread R. Michael Weylandt
Deparse... that's it -- was disappointed with having to turn as.character.formula inside out once and again. Merci! But, as always, we all loose to Gabor ;-) Michael On Tue, May 29, 2012 at 1:16 PM, Bert Gunter wrote: > I should have added: > > If the formula is just assigned to a name, quote()

Re: [R] problems with xlim in plot.zoo() and window()

2012-05-29 Thread Gabor Grothendieck
On Tue, May 29, 2012 at 1:39 PM, Agustin Lobo wrote: > Thanks! > Using as.POSIXct() instead of as.Date() solves the problem: >> plot(alyL32007z$NEE_st,col=cod,type="b",pch=18,xlim=as.POSIXct(c("2007-03-04 >> 11:30:00 UTC" ,"2007-11-09 11:30:00 UTC"))) #works fine >> delme <- window(alyL32007z, st

Re: [R] trouble automating formula edits when log or * are present; update trouble

2012-05-29 Thread Paul Johnson
>> > > Try substitute: > >> do.call("substitute", list(newFmla, setNames(list(as.name("x1c")), "x1"))) > y ~ log(x1c) + x2 * x3 > Damn. That's pretty. I'd say "setNames" a magic bullet too. Thanks very much. The approach suggested by Michael and Bert has the little shortcoming that grepping for "

Re: [R] trouble automating formula edits when log or * are present; update trouble

2012-05-29 Thread Gabor Grothendieck
On Tue, May 29, 2012 at 11:43 AM, Paul Johnson wrote: > Greetings > > I want to take a fitted regression and replace all uses of a variable > in a formula. For example, I'd like to take > > m1 <- lm(y ~ x1, data=dat) > > and replace x1 with something else, say x1c, so the formula would become > >

Re: [R] trouble automating formula edits when log or * are present; update trouble

2012-05-29 Thread Bert Gunter
I should have added: If the formula is just assigned to a name, quote() and eval(parse(...)) are not needed: fm1 <- y ~ x1 ## a formula w <- gsub( "x1","log(x1)", deparse(fm1)) fm2 <- formula(w) This is probably the btter way to do it. -- Bert On Tue, May 29, 2012 at 10:01 AM, Bert Gunter

Re: [R] problems with xlim in plot.zoo() and window()

2012-05-29 Thread Gabor Grothendieck
On Tue, May 29, 2012 at 11:47 AM, Agustin Lobo wrote: > I'm trying to get a minimally intuitive way of plotting zoo objects > extracted for given periods of time > > I do: >> plot(alyL32007z$NEE_st,col=cod,type="b",pch=18,xlim=time(alyL32007z)[c(3000,15000)]) > > and get a  correct plot but the ex

Re: [R] Creating a new R mirror in Chile

2012-05-29 Thread Uwe Ligges
See http://cran.r-project.org/mirror-howto.html Uwe Ligges On 29.05.2012 18:08, Jose Bustos Melo wrote: Hello everyone, I would like to create a new R mirror en Chile and I would be very placed if any of you who are familiar doing it can help us. We are looking for manuals and materials need i

Re: [R] trouble automating formula edits when log or * are present; update trouble

2012-05-29 Thread Bert Gunter
Michael: m2 is a model fit, not a formula. So I don't think what you suggested will work. However, I think your idea is a good one. The trick is to protect the model specification from evaluation via quote(). e.g. > z <- deparse(quote(lm(y~x1))) > z [1] "lm(y ~ x1)" Then you can apply your sug

Re: [R] how to check given number seq. is time series or not?

2012-05-29 Thread Robert Baer
Perhaps ?str is the command you seek? -Original Message- From: sagarnikam123 Sent: Saturday, May 26, 2012 10:24 PM To: r-help@r-project.org Subject: Re: [R] how to check given number seq. is time series or not? Yes,sir index of above/below numbers is time (both dataset are same)

Re: [R] Help needed in wavelet transformation

2012-05-29 Thread Jeff Newmiller
RSiteSearch("wavelet") at the R command line prompt, or http://rseek.org --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go...

Re: [R] trouble automating formula edits when log or * are present; update trouble

2012-05-29 Thread R. Michael Weylandt
Hi Paul, I haven't quite thought through this yet, but might it not be easier to convert your formula to a character and then use gsub et al on it directly? Something like this # Using m2 as you set up below m2 <- lm(y ~ log(x1) + x2*x3, data=dat) f2 <- formula(m2) as.formula(paste(f2[2], f2[1

Re: [R] Relist strings? [Was: How to remove square brackets, etc. from address strings?]

2012-05-29 Thread Rui Barradas
Hello, again. See comments inline Em 29-05-2012 16:28, Sabina Arndt escreveu: Hello, thank you very much for your reply, Rui Barradas. OK, I did what you said: x<- readLines("sabina.txt") s<- strsplit(x, ";[[:space:]]\\[") r<- lapply(s, function(x) sapply(strsplit(x, "[[:blank:]]"), tail, 1)

Re: [R] problem with Rcmdr

2012-05-29 Thread Richard M. Heiberger
Please See John Fox's notes http://socserv.socsci.mcmaster.ca/jfox/Misc/Rcmdr/installation-notes.html and perhaps other parts of his website. On Tue, May 29, 2012 at 10:06 AM, mabel alsina harris wrote: > > Hi!! > My question is related to Rcmdr. I have Mac OS and I use R since more or > less 1

[R] problems with xlim in plot.zoo() and window()

2012-05-29 Thread Agustin Lobo
I'm trying to get a minimally intuitive way of plotting zoo objects extracted for given periods of time I do: > plot(alyL32007z$NEE_st,col=cod,type="b",pch=18,xlim=time(alyL32007z)[c(3000,15000)]) and get a correct plot but the expression for xlim is hard to read by humans. I try > time(alyL3200

[R] odfWeave fails to load

2012-05-29 Thread stephenb
R version 2.15.0 (2012-03-30) Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i386-pc-mingw32/i386 (32-bit) package ‘survey’ successfully unpacked and MD5 sums checked package ‘odfWeave.survey’ successfully unpacked and MD5 sums checked > library(odfWe

Re: [R] Use variable inside Function for updating the matrix

2012-05-29 Thread arun
Hi Antony, Try this, > Obj_Name<-da$AGE > Obj_Name [1] 20 30 40 30 25  da[Obj_Name>=30 & Obj_Name<=40, "TRUE/FALSE"]<-TRUE colnames(da)<-c("NAME","Obj_Name","PLACE","ELIGIBLE") > da   NAME Obj_Name PLACE ELIGIBLE 1  ABC   20 INDIA   NA 2  XYZ   30    FRANCE TRUE 3  PQR   

[R] poLCA package inquiry

2012-05-29 Thread KDT
Dear R-users! I am using the poLCA package to find latent classes in a dataset with binary outcomes. Several hundreds of persons can engage hundreds of items. Assume 100 items being engaged by 500 persons, the resulting dataframe is as shown below (5 persons). item1 item2 item3 item4 item5 .

[R] problem with Rcmdr

2012-05-29 Thread mabel alsina harris
Hi!! My question is related to Rcmdr. I have Mac OS and I use R since more or less 1 year, not as an expert but I really like it. Now I want to install the Rcmdr package, I already downloaded it, but when I want to "charged" R tell me that it needed the tcltk package, so I downloaded it too

[R] RODBC, Excel, and data truncation when writing

2012-05-29 Thread Steven Lacey
Hi, I am hoping to use the RODBC package to write a dataframe to an Excel .xlsx file. The dataframe contains at least one field with character elements that exceed 255 bytes, which appears to be the cell width limit in Excel. Below is example code and the warning message received: library(RODBC)

[R] Create and Change Column in a Matrix as per condition

2012-05-29 Thread Rantony
Hi, i have a matrix like this *DWATT * 10 20 30 30 32 Here i need to create a new column named "*DWATT_QF*" with filling value as per the following condition, if DWATT_QF = RC When DWATT value less than 30

[R] Boxplot superscript y-axis

2012-05-29 Thread eduardo van den Berg
Dear list, I need to include in a superscript number (-1) in a y-axis label of a boxplot graphic. I tried the following line: >boxplot(five$gr13~five$Code, xlab="Species code", ylab=substitute(paste("DGL growth (cm.yr"^{-1},")"))) It returns the following error message: Error in "DGL growth (cm

[R] GLMMPQL spatial autocorrelation

2012-05-29 Thread Alexroyan
Dear all, I am experiencing problems using the glmmPQL function in the MASS package (Venables & Ripley 2002) to model binomial data with spatial autocorrelation. My question - is the presence of birds affected by various hydrological parameters? Presence/absence data were collected from 83 sit

[R] Question about random Forest function in R

2012-05-29 Thread Kelly Cool
Hello,  I am trying to run the random Forest function on a data.frame using the following code.. myrf <- randomForest (y=sample_data_metal, x=Train, importance=TRUE, proximity=TRUE) However, an error occurs saying, "can not handle categorical predictors with more than 32 categories".  My

[R] Help needed in wavelet transformation

2012-05-29 Thread tarun trivedi
Hello I am currently working on forecasting hourly electricity prices where I am required to do wavelet transformation. First I need to calculate decomposition coefficients of the wavelet transform, then I need to select wavelet function using multiresolution technique. I would be really grateful

[R] Package for partially ordered sets

2012-05-29 Thread Christian Kampichler
Dear all, is anyone aware of an R package for handling posets, drawing Hasse diagrams etc.? I browsed through CRAN but was not successful... Thanks in advance, Christian -- Christian Kampichler Roghorst 91 6708 KD Wageningen, Niederlande Tel +31 (0)317 417527 Mob +

Re: [R] Matrix Header Name Select

2012-05-29 Thread Rantony
ITS OK. And thanks. Its working ! From: Özgür Asar [via R] [mailto:ml-node+s789695n4631684...@n4.nabble.com] Sent: Tuesday, May 29, 2012 6:04 PM To: Akkara, Antony (GE Energy, Non-GE) Subject: Re: Matrix Header Name Select Sorry, I misunderstood your question. colnames(mymatrix) woul

[R] model frame and formula mismatch with latent class analysis poLCA

2012-05-29 Thread KDT
Dear R-users, I keep getting an ERROR saying " Error in model.matrix.default(formula, mframe) : model frame and formula mismatch in model.matrix() " when i fit poLCA with more than 63 variables. Below are the details. I am trying to do a Latent Class Analysis using poLCA. My data set contains bi

[R] Error ! "Subscript out of bounds"

2012-05-29 Thread Rantony
Hi, i have a function like this, *GetCsv[GetCsv[,ColHdr]ArrMinMax[iCol,2],ColHdr_QF]<-"RC"* Here, *GetCsv* -- It contain a matrix *ColHdr* -- Is a column Header *ArrMinMax* - It is a array of 2 columns - Here, this is the function to change

[R] Matrix Header Name Select

2012-05-29 Thread Rantony
Hi, i have a matrix with headers. How can i get header name in that marix ? i tried in R, with names(MyMatrix[1]) - its getting exactly. But when i try in eclips, its not receiving ColHdr <- names(MyMatrix[1]) - it getting NULL value - could you please help me ? - Thanks Antony. -- View this

[R] Help needed in wavelet transforming

2012-05-29 Thread tarun trivedi
Hello I am currently working on forecasting hourly electricity prices where I am required to do wavelet transformation. First I need to calculate decomposition coefficients of the wavelet transform, then I need to select wavelet function using multiresolution technique. I would be really grateful

[R] strucchange Fstats() example

2012-05-29 Thread Mabille, Geraldine
Dear all, I'm trying to understand how the strucchange package is working and I have been looking at the examples given for the Fstats() function. The first example (Nile), shows one peak in the F-stats and one breakpoint is estimated, that can be plotted using the following code ## Nile data wi

[R] Creating a new R mirror in Chile

2012-05-29 Thread Jose Bustos Melo
Hello everyone, I would like to create a new R mirror en Chile and I would be very placed if any of you who are familiar doing it can help us. We are looking for manuals and materials need it. Thank you in advance, José Bustos Data Scientist at www.aespro.cl [[alternative HTML version de

[R] trouble automating formula edits when log or * are present; update trouble

2012-05-29 Thread Paul Johnson
Greetings I want to take a fitted regression and replace all uses of a variable in a formula. For example, I'd like to take m1 <- lm(y ~ x1, data=dat) and replace x1 with something else, say x1c, so the formula would become m1 <- lm(y ~ x1c, data=dat) I have working code to finish that part of

Re: [R] Relist strings? [Was: How to remove square brackets, etc. from address strings?]

2012-05-29 Thread Sabina Arndt
Hello, thank you very much for your reply, Rui Barradas. OK, I did what you said: > x <- readLines("sabina.txt") > s <- strsplit(x, ";[[:space:]]\\[") > r <- lapply(s, function(x) sapply(strsplit(x, "[[:blank:]]"), tail, 1)) > length(r) [1] 20 I don't know why your result here was 21 since the

[R] lme: Testing within-group coefficients

2012-05-29 Thread Dan Bebber
I need to determine whether a variable y2e increases with a covariate xt within individuals, where individuals a-j are measured several times. Is it possible to test whether within-group coefficients are significantly different from zero? The coefficients from an lmList fitted to my data give: >

Re: [R] Hash Table - Select and Change Data iniside Matrix

2012-05-29 Thread R. Michael Weylandt
It would behoove you to read some introductory materials -- use help.start() to get be provided with the standard "An Introduction to R." More generally, the help system can be accessed by typing help("name") or, as a shortcut, ?name. In your case, help("&") would lead to the correct answer. The

Re: [R] setting parameters equal in lm

2012-05-29 Thread Dustin Fife
Great. Thank you! On Tue, May 29, 2012 at 8:11 AM, ONKELINX, Thierry wrote: > offset() fixes the parameter to 1. So offset(I(.5*X2)) should do the trick. > > ir. Thierry Onkelinx > Instituut voor natuur- en bosonderzoek / Research Institute for Nature and > Forest > team Biometrie & Kwaliteitszo

Re: [R] correlation matrix only if enough non-NA values

2012-05-29 Thread Rui Barradas
Hello, Instead of 'sum' use 'mean' ok <- apply(tbl, 2, function(x) mean(!is.na(x)) >= 0.5) cor(tbl[, ok], use="pairwise.complete.obs") Hope this helps, Rui Barradas Em 29-05-2012 10:03, jeff6868 escreveu: Hi everybody. I'm trying to do a correlation matrix in a list of files. Each file cont

Re: [R] setting parameters equal in lm

2012-05-29 Thread ONKELINX, Thierry
offset() fixes the parameter to 1. So offset(I(.5*X2)) should do the trick. ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance Kliniekstraat 25 1070 Anderlecht Belgium + 32 2

Re: [R] setting parameters equal in lm

2012-05-29 Thread Rui Barradas
Simple, just make y2 <- y - 0.5*X2 Rui Barradas Em 29-05-2012 13:55, Dustin Fife escreveu: That did it. Thanks! One more follow-up questions. How do I set a parameter to a particular value? I tried I(.5*X2), but that didn't do what I expected. On Tue, May 29, 2012 at 6:39 AM, Rui Barradas wro

  1   2   >