Re: [R] Using table to get frequencies of several factors at once

2013-01-14 Thread Pancho Mulongeni
Yes thank you, that worked. -Original Message- From: John Kane [mailto:jrkrid...@inbox.com] Sent: Friday, January 11, 2013 4:23 PM To: Pancho Mulongeni; R help Subject: RE: [R] Using table to get frequencies of several factors at once Does something like this do what you want? It

Re: [R] hwo to subtract a child array from the big array?

2013-01-14 Thread Jie Tang
Actually, I find a method. The function reshape OR array data_5m-array(data,c(5,length(data)/5)) and data_5m[1,] is what I wanted ,but I donot think it is a good method. 2013/1/14 Jeff Newmiller jdnew...@dcn.davis.ca.us ab - AA[(1:10)*10] -- TANG Jie Email: totang...@gmail.com Tel:

[R] Fwd: Help with nonlinear regression

2013-01-14 Thread Ahmed Attia
-- Forwarded message -- From: r-help-ow...@r-project.org Date: Mon, Jan 14, 2013 at 12:31 AM Subject: Help with nonlinear regression To: ahmedati...@gmail.com The message's content type was not explicitly allowed -- Forwarded message -- From: Ahmed Attia

Re: [R] One sided confidence limits for the regression line

2013-01-14 Thread Rolf Turner
On 01/14/2013 05:19 PM, li li wrote: Hi all, I am trying to plot the one-sided confidence limits for the regression line. It seems it is ok to use predict function to compute the two sided confidence limits. Does any one know a easy way to compute the one sided confidence limits?

[R] Grabbing Specific Words from Content (basic text mining)

2013-01-14 Thread Sachinthaka Abeywardana
Hi all, Suppose I have a data frame with mixed content (name age and address). a-Name: John Smith Age: 35 Address: 32, street, sub, something b-data.frame(a) 1. The question is I want to extract the name age and address separately from this data frame (containing potentially more people). 2.

[R] The three-dot question

2013-01-14 Thread Feng Li
Dear all, Why does not the three-dot accept arguments from the parent environment? I am just confused with this error, can someone give me a hint? rm(list=ls()) testFun - function(a, ...) + { + if(a){ + print(a) + }else + { + print(b) + } + }

Re: [R] Grabbing Specific Words from Content (basic text mining)

2013-01-14 Thread Oliver Keyes
Total newb here, but you might want to check out ?grep and ?regmatches as a start. (ways to match and then extract substrings respectively) On Mon, Jan 14, 2013 at 9:30 AM, Sachinthaka Abeywardana sachin.abeyward...@gmail.com wrote: Hi all, Suppose I have a data frame with mixed content

Re: [R] random effects model

2013-01-14 Thread rex2013
Sorry I have corrected the mistakes: BP.stack3 - reshape(Copy.of.BP_2,idvar=CODEA,timevar=time,sep=_,varying=list(c(Obese14,Obese21),c(Overweight14,Overweight21)),v.names=c(Obese,Overweight),times=factor(c(1,2)),direction=long) BP.stack3 head(BP.stack3) tail(BP.stack3)

Re: [R] The three-dot question

2013-01-14 Thread R. Michael Weylandt
Hi Feng, I'm afraid I don't entirely understansd your question -- the `...` construct only allows you to pass variable numbers of arguments, not to have arbitrary access to the parent frames. You need to manually extract b from the dots inside of testFun. Also, it's quite frowned upon to put

Re: [R] GLM Modelling help needed

2013-01-14 Thread Oliver Keyes
So, with R you use object[int,int] to select the rows and columns you want to highlight. ([rows,columns]); what you've done here is asked it to apply to rows 1 to 2 (1:2), across all columns. You'll want [,3:4] to specify two particular columns. I'm not familiar enough with glm itself to provide

Re: [R] Grabbing Specific Words from Content (basic text mining)

2013-01-14 Thread Gabor Grothendieck
On Mon, Jan 14, 2013 at 4:30 AM, Sachinthaka Abeywardana sachin.abeyward...@gmail.com wrote: Hi all, Suppose I have a data frame with mixed content (name age and address). a-Name: John Smith Age: 35 Address: 32, street, sub, something b-data.frame(a) 1. The question is I want to extract

Re: [R] random effects model

2013-01-14 Thread Usha Gurunathan
Hi AK I have been trying to create some plots. All being categorical variables, I am not getting any luck with plots. The few ones that have worked are below: barchart(~table(HiBP)|Obese,data=BP.sub3) ## BP.sub3 is the stacked data without missing values

Re: [R] The three-dot question

2013-01-14 Thread Feng Li
Hi Michael, Thanks for the reply. On Mon, 2013-01-14 at 10:33 +, R. Michael Weylandt wrote: Hi Feng, I'm afraid I don't entirely understansd your question -- the `...` construct only allows you to pass variable numbers of arguments, not to have arbitrary access to the parent frames.

[R] How to fit a linear model to data by minimizing the mean absolute percent error?

2013-01-14 Thread Andre Cesta
Hi All, I wonder if you can help me with an aparently simple task.  I have been searching examples for this without any luck: #Assume x-1:10  #x ranges from 1 to 10. y-x*runif(10)+ 1.5*x  #y is a linear function of x with some error. Add uniform error that is scaled to be larger as x values

[R] Does psm::Surv handle interval2 data?

2013-01-14 Thread Andrews, Chris
Does Surv in psm handle interval2 data? The argument list seems to indicate it does but I get an error. Thanks, Chris # code library('survival') left - c(1, 3, 5, NA) right -c(2, 3, NA, 4) Surv(left, right, type='interval2') survreg(Surv(left, right, type='interval2') ~ 1) library('rms')

Re: [R] Does psm::Surv handle interval2 data?

2013-01-14 Thread Frank Harrell
Chris, Thanks for sending the specifics. It appears that I've let Surv in rms fall behind recent versions of Surv in survival. It will take me a few days to get this fixed. I'll send a follow-up note then. Frank Andrews, Chris wrote Does Surv in psm handle interval2 data? The argument list

[R] How to fit a linear model to data by minimizing the mean absolute percent error?

2013-01-14 Thread Andre Cesta
Hi All, I wonder if you can help me with an aparently simple task.  I have been searching examples for this without any luck: #Assume x-1:10  #x ranges from 1 to 10. y-x*runif(10)+ 1.5*x  #y is a linear function of x with some error. Add uniform error that is scaled to be larger as x values

Re: [R] The three-dot question

2013-01-14 Thread Mark Leeds
Hi: If you want testFun to know about b, then you would have to do b-list(...)$b inside TestFun itself. But the dot dot dot argument is not really for that purpose. The use of dotdotdot is for the case where a function INSIDE testFun has a formal argument named say b. Then you can pass the ...

[R] Fwd: Help with nonlinear regression

2013-01-14 Thread Ahmed Attia
-- Forwarded message -- From: Ahmed Attia ahmedati...@gmail.com Date: Mon, Jan 14, 2013 at 2:31 AM Subject: Help with nonlinear regression To: r-help@r-project.org Dears- I have a question about nonlinear regression. Asymptotic Regression Model below is the equation of

Re: [R] The three-dot question

2013-01-14 Thread Duncan Murdoch
On 13-01-14 6:34 AM, Feng Li wrote: Hi Michael, Thanks for the reply. On Mon, 2013-01-14 at 10:33 +, R. Michael Weylandt wrote: Hi Feng, I'm afraid I don't entirely understansd your question -- the `...` construct only allows you to pass variable numbers of arguments, not to have

[R] ginv / LAPACK-SVD causes R to segfault on a large matrix.

2013-01-14 Thread Cyrus Shaoul
Dear R-help list members, I am hoping to get you help in reproducing a problem I am having That is only reproducible on a large-memory machine. Whenever I run the following lines, get a segfault listed below: *** caught segfault *** address 0x7f092cc46e40, cause 'invalid permissions'

Re: [R] Grabbing Specific Words from Content (basic text mining)

2013-01-14 Thread Manjusha Joshi
Hello, Suppose I have a data frame with mixed content (name age and address). a-Name: John Smith Age: 35 Address: 32, street, sub, something b-data.frame(a) Since it is dataframe, assumption is you stored data in the columns as Name, Age, Address, sub etc. 1. The question is I want to

Re: [R] sqldf package: using variables in where condition

2013-01-14 Thread Ravi Sreedhar
Sent from my iPhone On Jan 13, 2013, at 9:47 PM, ravsre ravishre...@hotmail.com wrote: I am trying to use the sqldf package to create independent data frames from a master dataframe. I want to use sqldf package and perform a simple select statement. However, what I want to do is to

[R] putting data.frame values in new dataframes

2013-01-14 Thread condor
I have a very dataset which I want to put in new dataframes according to date. Example: Suppose I have number day month hours 1 1 1410 2 2 2 141012 3 3 141018 4 4 1510 3 5 5 151014 6 6 161018 7 7

Re: [R] ginv / LAPACK-SVD causes R to segfault on a large matrix.

2013-01-14 Thread Suzen, Mehmet
On 14 January 2013 15:08, Cyrus Shaoul cyrus.sha...@uni-tuebingen.de wrote: La.svd Dear Cyrus, Have you tried running La.svd ; LAPACK only version (without R) via C/C++ or Fortran code? After all it can be a LAPACK issue and R-team has no control on that. Best, -m

[R] readJPEG function cannot open jpeg files

2013-01-14 Thread Yi Yuan
I installed jpeg package and tried to use kim-readJPEG(kim.jpeg) to read in a jpeg file, but R gave me an error: Error in readJPEG(kim.jpeg) : unable to open kim.jpeg I already put kim.jpeg in Rstudio's default working directory: E:\home work\Rstudio. So I don't think it's a problem caused by

Re: [R] Grabbing Specific Words from Content (basic text mining)

2013-01-14 Thread arun
HI, YOu could do either: Lines-readLines(textConnection(Name: John Smith Age: 35 Address: 32, street, sub, something Name Adam Grey Age: 25 Address: 26, street, sub, something))     Lines[-grep(Name\\:,Lines)]-gsub(Name,Name:,Lines[-grep(Name\\:,Lines)])  Name-gsub(Name\\: (.*) Age\\: (.*)

Re: [R] putting data.frame values in new dataframes

2013-01-14 Thread condor
thank you very much, I have a smaller question: If I give the first dataframe a name, say data1. How can I read it without pasting the dataframe -- View this message in context: http://r.789695.n4.nabble.com/putting-data-frame-values-in-new-dataframes-tp4655474p4655482.html Sent from the R

Re: [R] The three-dot question

2013-01-14 Thread Feng Li
That makes sense. Thanks! Feng On Mon, 2013-01-14 at 09:09 -0500, Mark Leeds wrote: Hi: If you want testFun to know about b, then you would have to do b-list(...)$b inside TestFun itself. But the dot dot dot argument is not really for that purpose. The use of dotdotdot is for the case

Re: [R] sqldf package: using variables in where condition

2013-01-14 Thread Gabor Grothendieck
On Mon, Jan 14, 2013 at 8:36 AM, Ravi Sreedhar ravishre...@hotmail.com wrote: Sent from my iPhone On Jan 13, 2013, at 9:47 PM, ravsre ravishre...@hotmail.com wrote: I am trying to use the sqldf package to create independent data frames from a master dataframe. I want to use sqldf package

Re: [R] putting data.frame values in new dataframes

2013-01-14 Thread MacQueen, Don
Perhaps split(mydf, paste(mydf$month,mydf$day)) -- Don MacQueen Lawrence Livermore National Laboratory 7000 East Ave., L-627 Livermore, CA 94550 925-423-1062 On 1/14/13 5:57 AM, condor radonniko...@hotmail.nl wrote: I have a very dataset which I want to put in new dataframes according

Re: [R] How to fit a linear model to data by minimizing the mean absolute percent error?

2013-01-14 Thread Bert Gunter
Take the logs of both side and minimize the absolute error on the log scale, then transform your results back. The quantreg package does L1 regression. If you want to know **why**, this works, consult a local statistician or post to a statistical list like stats.stackexchange.com. This is not an

[R] Course: Introduction to zero inflated models and GLMM

2013-01-14 Thread Highland Statistics Ltd
We would like to announce the following statistics course: Introduction to zero inflated models and GLMM 13 - 16 May 2013. Elche, Spain. For details, see: http://www.highstat.com/statscourse.htm Course flyer: http://www.highstat.com/Courses/Flyer2013_05Elche_ZIP.pdf Kind regards, Alain

Re: [R] How to fit a linear model to data by minimizing the mean absolute percent error?

2013-01-14 Thread Jeff Newmiller
It doesn't look like you have read the Posting Guide (see bottom of email). This not a homework help forum. Please use the assistance provided by your educational institution. --- Jeff NewmillerThe

Re: [R] readJPEG function cannot open jpeg files

2013-01-14 Thread Suzen, Mehmet
Similar issue with URLs: yesWeCan - http://upload.wikimedia.org/wikipedia/commons/9/9d/Barack_Obama.jpg; url(yesWeCan) description http://upload.wikimedia.org/wikipedia/commons/9/9d/Barack_Obama.jpg;

Re: [R] readJPEG function cannot open jpeg files

2013-01-14 Thread Jeff Newmiller
Being unable to open a file is a related to your operating system and how R interacts with that OS. If your interactive development environment (IDE, of which RStudio is an example) is trying to make things simpler for you but you don't understand how to use it, then you need to ask help from

[R] How to open grib file in R?

2013-01-14 Thread Jonsson
I have this https://echange-fichiers.inra.fr/get?k=6TdTdezNeZwAqJtpwVm grib file which is a regular lat-lon 0.25x0.25 degrees and contains 4 fields . I tried to open it using : grib - readGDAL(C:\\Users\\aalyaari\\Desktop\\Vol_025_H14_2010060700.grib) but I got this error:

Re: [R] readJPEG function cannot open jpeg files

2013-01-14 Thread William Dunlap
You can use file.info(myFile) to make sure the file exists and has appropriate permissions (mode in file.info's lingo, as in Unix). E.g., file.info(c:/temp/BO.jpeg) # this one does not exist size isdir mode mtime ctime atime exe c:/temp/BO.jpeg NANA NA NA NA NA NA

Re: [R] How to open grib file in R?

2013-01-14 Thread Barry Rowlingson
On Mon, Jan 14, 2013 at 4:36 PM, Jonsson amen.alya...@bordeaux.inra.fr wrote: but I got this error: C:\Users\aalyaari\Desktop\Vol_025_H14_2010060700.grib has GDAL driver GRIB and has 721 rows and 1440 columns Error in validityMethod(as(object, superClass)) : Geographical CRS given to

Re: [R] How to open grib file in R?

2013-01-14 Thread Jeff Newmiller
Your question should have been posted to the R-sig-geo mailing list. FWIW I have no direct experience with the files or functions you are using, but I have to say the error message seems pretty clear to me: latitude values are normally limited to [-90,90], but your file appears to have data

[R] Tukey HSD plot with lines indicating (non-)significance

2013-01-14 Thread Karl Ove Hufthammer
Dear list members, I'm running some tests looking at differences between means for various levels of a factor, using Tukey's HSD method. I would like to plot the data as boxplots or dotplots, with horizontal significance lines indicating which groups are statistically significantly

Re: [R] readJPEG function cannot open jpeg files

2013-01-14 Thread Prof Brian Ripley
On 14/01/2013 16:26, Suzen, Mehmet wrote: Similar issue with URLs: Not a similar issue at all: a URL is not a file. That most functions in R itself open connections including URLs does not mean that contributed packages do. The package help is quite specific about its requirements.

Re: [R] putting data.frame values in new dataframes

2013-01-14 Thread arun
Hi, Do you want to read it from a saved file? res-split(dat1,dat1$day)  res[[1]] names(res)-paste(data,1:5,sep=)  write.table(res[[1]],file=data1.txt)  read.table(data1.txt,sep=,header=TRUE) #  number day month hours #1  1  14    10 2 #2  2  14    10    12 #3  3  14    10    18

Re: [R] ginv / LAPACK-SVD causes R to segfault on a large matrix.

2013-01-14 Thread Cyrus Shaoul
No, Mehmet, I haven't tried that yet. I was hoping to find out if there was some other option. I have no experience using LAPACK directly. I have looked into RcppEigen and RcppArmadillo, but have not tested them yet. If there are no other options, I guess I will go down that path. Thanks a lot,

Re: [R] How to fit a linear model to data by minimizing the mean absolute percent error?

2013-01-14 Thread Andre Cesta
Hi Bert, Thanks for your reply. Your recommendation seems to minimize the error transformed with log, but not the percent error, that is, the model error divided by the observed value (for each observation). I need to minimize the percent error. With log, there could be a very large

Re: [R] readJPEG function cannot open jpeg files

2013-01-14 Thread Felipe Carrillo
I have used the biOps package to read pictures and it works fine. For example you can plot a pic just by: library(biOps) x - readJpeg(mypic.jpg)  ##mypic should be in you working directory plot(x) Notice that is only one uppercase letter on readJpeg and mypic is jpg not jpeg Felipe D. Carrillo

[R] readJPEG function cannot open jpeg files

2013-01-14 Thread Yi Yuan
Hi, r-help mailing list subscribers, I installed jpeg package and tried to use kim-readJPEG(kim.jpeg) to read in a jpeg file, but R gave me an error: Error in readJPEG(kim.jpeg) : unable to open kim.jpeg I already put kim.jpeg in Rstudio's default working directory: E:\home work\Rstudio. So I

Re: [R] readJPEG function cannot open jpeg files

2013-01-14 Thread Yi Yuan
Thanks William ! file.info(E:/ home work/Rstudio/kim.jpeg) size isdir mode mtime ctime atime exe E:/home work/Rstudio/kim.jpeg NANA NA NA NA NA NA So R thinks this file doesn't exist? But the file is already in E:/ home work/Rstudio folder, I

Re: [R] readJPEG function cannot open jpeg files

2013-01-14 Thread Yi Yuan
Hi, guys, my problem is solved. I used file.info(list.files(getwd(),full.names=TRUE)) and found out that the said file is listed as kim.jpg instead of kim.jpeg. So kim-readJPEG(kim.jpg) worked. Thanks for your help and sorry for my newbie question. On Mon, Jan 14, 2013 at 11:59 AM, Yi Yuan

Re: [R] readJPEG function cannot open jpeg files

2013-01-14 Thread Duncan Murdoch
On 13-01-14 11:59 AM, Yi Yuan wrote: Thanks William ! file.info(E:/ home work/Rstudio/kim.jpeg) size isdir mode mtime ctime atime exe E:/home work/Rstudio/kim.jpeg NANA NA NA NA NA NA So R thinks this file doesn't exist? But the file is

Re: [R] How to open grib file in R?

2013-01-14 Thread Jonsson
I have just contacted the sources and I am told that he checked min/max lat/lon for the file and it was right. He is using Linux while I am using Windows, would that be problematic? -- View this message in context:

Re: [R] Tukey HSD plot with lines indicating (non-)significance

2013-01-14 Thread Richard M. Heiberger
Please look at the MMC (Mean-mean Multiple Comparisons) plot in the HH package. It displays both the means and the differences. install.packages(HH) ## if you don't already have it. library(HH) ?MMC Rich On Mon, Jan 14, 2013 at 12:36 PM, Karl Ove Hufthammer k...@huftis.orgwrote: Dear list

Re: [R] readJPEG function cannot open jpeg files

2013-01-14 Thread Duncan Murdoch
On 13-01-14 12:18 PM, Yi Yuan wrote: Hi, guys, my problem is solved. I used file.info(list.files(getwd(),full.names=TRUE)) and found out that the said file is listed as kim.jpg instead of kim.jpeg. So kim-readJPEG(kim.jpg) worked. Thanks for your help and sorry for my newbie question. Another

Re: [R] ginv / LAPACK-SVD causes R to segfault on a large matrix.

2013-01-14 Thread David Winsemius
On Jan 14, 2013, at 9:07 AM, Cyrus Shaoul wrote: No, Mehmet, I haven't tried that yet. I was hoping to find out if there was some other option. I have no experience using LAPACK directly. I have looked into RcppEigen and RcppArmadillo, but have not tested them yet. If there are no other

Re: [R] readJPEG function cannot open jpeg files

2013-01-14 Thread Suzen, Mehmet
On 14 January 2013 18:56, Prof Brian Ripley rip...@stats.ox.ac.uk wrote: On 14/01/2013 16:26, Suzen, Mehmet wrote: Similar issue with URLs: Not a similar issue at all: a URL is not a file. That most functions in R itself open connections including URLs does not mean that contributed

Re: [R] random effects model

2013-01-14 Thread arun
Hi, I get the error message. BP.gee8- gee(hibp14~time*Categ,data=BPsub7,id=CODEA,family=binomial,corstr=exchangeable,na.action=na.omit) #Beginning Cgee S-function, @(#) geeformula.q 4.13 98/01/27 #Error in gee(hibp14 ~ time * Categ, data = BPsub7, id = CODEA, family = binomial,  :  #

[R] Confidence intervel for regression line

2013-01-14 Thread li li
Hi all, For the simple linear regression, I want to find the input x value so that the lower confidnece limit is a specific number, say 0.2. In other words, I want to find the value of x so that the lower confidence bound crosses the horizontal line 0.2. Is there a simple way (an R

Re: [R] Determining sample size from power function

2013-01-14 Thread Greg Snow
If you have a working function that gives the power for a given sample size then you can use the uniroot function to find which sample size will give the desired power (many of the standard power functions use this internally when computing anything other than power). You just create a function

Re: [R] Tukey HSD plot with lines indicating (non-)significance

2013-01-14 Thread Karl Ove Hufthammer
må. den 14. 01. 2013 klokka 13.58 (-0500) skreiv Richard M. Heiberger: Please look at the MMC (Mean-mean Multiple Comparisons) plot in the HH package. It displays both the means and the differences. install.packages(HH) ## if you don't already have it. library(HH) ?MMC Thanks for the

[R] function coverage

2013-01-14 Thread Ross Boylan
Is there an easy way to identify all the functions called as a result of invoking a function? Getting the calling hierarchy too would be nice, but is definitely not essential. I'm trying to understand someone else's package, which is in a namespace and has some S3 functions. I could probably

Re: [R] function coverage

2013-01-14 Thread R. Michael Weylandt
Possibly you could trace() all the functions you're interested in. E.g., lapply(ls(package:stats), trace) # Untested. MW On Mon, Jan 14, 2013 at 9:08 PM, Ross Boylan r...@biostat.ucsf.edu wrote: Is there an easy way to identify all the functions called as a result of invoking a function?

Re: [R] function coverage

2013-01-14 Thread Duncan Murdoch
On 13-01-14 4:08 PM, Ross Boylan wrote: Is there an easy way to identify all the functions called as a result of invoking a function? Getting the calling hierarchy too would be nice, but is definitely not essential. I think codetools could do this reasonably well with the walkCode function,

[R] error using the subset function in a for loop index

2013-01-14 Thread Irucka Embry
Hi all, I have attached the function file (revisedfunction) and the list of station IDs (StationIDs) in .pdf format documents. I have written a function to perform various operations on the station IDs in two groups. The first 6 station IDs require one less step than the remaining 68 station IDs.

[R] Rbbg for 2.15.2

2013-01-14 Thread Tolga Uzuner
Dear R Users, Anyone know of a version of Rbbg compiled for R 2.15.2 . The current version does not appear to work with 2.15.2 install.packages(Rbbg, repos = http://r.findata.org;) Installing package(s) into ‘C:/Users/t_uzu_000/Documents/R/win-library/2.15’ (as ‘lib’ is unspecified) Warning:

Re: [R] function coverage

2013-01-14 Thread Hadley Wickham
I think codetools could do this reasonably well with the walkCode function, but I've never done it so I don't have sample code, and walkCode is mostly an internal function. There are a couple of approaches here: http://stackoverflow.com/questions/14276728/ Hadley -- Chief Scientist, RStudio

[R] tabstop in graphics

2013-01-14 Thread Berry Boessenkool
Hi, I'm curious about Tab stops in graphics: plot(1) text(1.2, 1.2, Char\nMoreChar) works fine, but text(1.2, 0.8, Char\tMoreChar) doesn't. Exporting with pdf tells me that the sign width is unknown. I'm not into informatics, so I don't know how a tabstop actually works. Is this at all

[R] Changing MaxNWts with the mi() function (error message)

2013-01-14 Thread Heather Kettrey
Hello, I am trying to impute data with the mi() function (mi package) and keep receiving an error message. When imputing the variable, sex, the mi() function accesses the mi.categorical() function, which then accesses the nnet() function. I then receive the following error message (preceded by my

[R] I'm trying to parse 1 column of a dataframe into 3 seperate columns

2013-01-14 Thread Joel Pulliam
I have a factor called 'utm_medium' in the dataframe 'data' str(data$utm_medium) Factor w/ 396925 levels ,affiliateID=sessionID=821850667323ec6ae6cffd28f380etag=,..: 366183 355880 357141 20908 357513 365348 368088 360827 31704 364767 ... The data in this factor is delimited with ''. I

Re: [R] random effects model

2013-01-14 Thread arun
HI, BP_2b-read.csv(BP_2b.csv,sep=\t) BP_2bNM-na.omit(BP_2b) BP.stack3 - reshape(BP_2bNM,idvar=CODEA,timevar=time,sep=,varying=list(c(Obese14,Obese21),c(Overweight14,Overweight21),c(hibp14,hibp21)),v.names=c(Obese,Overweight,HiBP),times=factor(c(1,2)),direction=long) library(car)

Re: [R] I'm trying to parse 1 column of a dataframe into 3 seperate columns

2013-01-14 Thread David L Carlson
How about a - sapply(test, function(x) x[1]) s - sapply(test, function(x) x[2]) e - sapply(test, function(x) x[3]) -- David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message-

Re: [R] Tukey HSD plot with lines indicating (non-)significance

2013-01-14 Thread Richard M. Heiberger
When the group means are close together, the labels will overlap. This overlap is actually informative, indicating that the groups are close. For this common case, we provide the tiebreaker function matchMMC which is also documented and illustrated on the ?MMC page. I have never tried to put

[R] Plotting two graphs on the same figure

2013-01-14 Thread Lily Arias Chauca
I want to add a line that represents the relationship between x and y to a strip chart, I've tried the following functions: par(new=TRUE) points(x,y) lines(x,y) but nothing works, I get the strip chart but line doesn't show up. Here is my function: stripchart(hydfin$exp ~ hydfin$alt, vert =

Re: [R] Plotting two graphs on the same figure

2013-01-14 Thread David Winsemius
On Jan 14, 2013, at 3:32 PM, Lily Arias Chauca wrote: I want to add a line that represents the relationship between x and y to a strip chart, I've tried the following functions: par(new=TRUE) points(x,y) lines(x,y) but nothing works, I get the strip chart but line doesn't show up.

[R] error in for loop in function (object not found)

2013-01-14 Thread Irucka Embry
Hi all, I have attached the function file (revisedfunction) and the list of station IDs (StationIDs) in .pdf format. I have written a function to perform various operations on the station IDs in two groups. The first 6 station IDs require one less step than the remaining 68 station IDs. The file

[R] Random Forest Error for Factor to Character column

2013-01-14 Thread Lopez, Dan
Hi, Can someone please offer me some guidance? I imported some data. One of the columns called JOBTITLE when imported was imported as a factor column with 416 levels. I subset the data in such a way that only 4 levels have data in JOBTITLE and tried running randomForest but it complained

Re: [R] error in for loop in function (object not found)

2013-01-14 Thread David Winsemius
Nothing attached. Please read the Webpage link and the Posting Guide more thoroughly. -- David. On Jan 14, 2013, at 5:31 PM, Irucka Embry wrote: Hi all, I have attached the function file (revisedfunction) and the list of station IDs (StationIDs) in .pdf format. I have written a function

Re: [R] Random Forest Error for Factor to Character column

2013-01-14 Thread Andrew Robinson
After you subset the data, did you redeclare the factor? If not then R still thinks it has the potential for all those levels. TRAINSET$JOBTITLE - factor(TRAINSET$JOBTITLE) I hope this helps Andrew On Tuesday, January 15, 2013, Lopez, Dan wrote: Hi, Can someone please offer me some

Re: [R] tabstop in graphics

2013-01-14 Thread David Winsemius
On Jan 14, 2013, at 1:51 PM, Berry Boessenkool wrote: Hi, I'm curious about Tab stops in graphics: plot(1) text(1.2, 1.2, Char\nMoreChar) works fine, but text(1.2, 0.8, Char\tMoreChar) doesn't. Exporting with pdf tells me that the sign width is unknown. On my machine I get

Re: [R] error in for loop in function (object not found)

2013-01-14 Thread Irucka Embry
Hi David, thanks for letting me know about the missing attachments. This is the code for the function: xygetN - function(file, hasHeader = TRUE, separator = ,) { totalPath - paste(file, sep = ) tmp - read.csv(totalPath, header = hasHeader, sep = separator, fill = TRUE, comment.char = #, as.is

[R] Optical Mark Recognition

2013-01-14 Thread K Simmons
Hey all, Has anyone ever altered an R package for image analysis to do optical mark recognition? I'm trying to find a way to semi-automate data entry of several thousand paper health surveys that are predominantly composed of check boxes. All the boxes are uniform size and shape, so it seems as

[R] Month name in English, not R running language

2013-01-14 Thread Marc Girondot
When ploting a timeseries, the months are shown with abbreviation in the current language of the system. For example, x - seq(from=as.Date(2000-04-01), length.out=100, by=1) y - rnorm(length(x), 5,2) plot(x, y) Show for me avi mai jui jul as I use R with French language localization. I see in

Re: [R] Month name in English, not R running language

2013-01-14 Thread Pascal Oettli
Hello, ?Sys.setlocale HTH, Pascal Le 15/01/2013 15:28, Marc Girondot a écrit : When ploting a timeseries, the months are shown with abbreviation in the current language of the system. For example, x - seq(from=as.Date(2000-04-01), length.out=100, by=1) y - rnorm(length(x), 5,2) plot(x, y)

Re: [R] Month name in English, not R running language

2013-01-14 Thread Marc Girondot
It works perfectly: Sys.setlocale(category = LC_TIME, locale=en_GB.UTF-8) [1] en_GB.UTF-8 x - seq(from=as.Date(2000-04-01), length.out=100, by=1) y - rnorm(length(x), 5,2) plot(x, y) Sys.setlocale(category = LC_TIME, locale=) [1] fr_FR.UTF-8 Thanks a lot Marc (I post the solution on the

Re: [R] Confidence intervel for regression line

2013-01-14 Thread Rolf Turner
On 01/15/2013 09:17 AM, li li wrote: Hi all, For the simple linear regression, I want to find the input x value so that the lower confidnece limit is a specific number, say 0.2. In other words, I want to find the value of x so that the lower confidence bound crosses the horizontal line