From macqueen1 at llnl.gov Tue Feb 1 01:46:44 2011 From: macqueen1 at llnl.gov (MacQueen, Don) Date: Mon, 31 Jan 2011 16:46:44 -0800 Subject: [R] list.files() error message: 'translateCharUTF8' must be called on a CHARSXP Message-ID: I'm using list.files() on my home directory, like this: crnt.files <- list.files(dir.to.check, full.names=TRUE, all.files=TRUE, recursive=TRUE) With dir.to.check set to the full path to my home directory. After a while I get: Error in list.files(dir.to.check, full.names = TRUE, all.files = TRUE, : 'translateCharUTF8' must be called on a CHARSXP This happens on one of my two machines, not the other. Presumably there is a "file" somewhere in my home directory that, well, isn't a file? Or maybe has some strange character in its file name? That maybe isn't valid in my LOCALE? I would appreciate some advice on how to find this "file" so I can get rid of it, or rename it, or something. Also, does this message possibly represent a problem that the R developers should pay attention to? I'm not sure. Thanks -Don > sessionInfo() R version 2.12.1 (2010-12-16) Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit) locale: [1] C attached base packages: [1] stats graphics grDevices utils datasets methods base -- Don MacQueen Environmental Protection Department Lawrence Livermore National Laboratory 925 423-1062 From liping.liulp at gmail.com Tue Feb 1 01:06:23 2011 From: liping.liulp at gmail.com (=?UTF-8?B?5YiY5Yqb5bmz?=) Date: Mon, 31 Jan 2011 16:06:23 -0800 Subject: [R] Unable to require installed package In-Reply-To: References: Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From dimitri.liakhovitski at gmail.com Tue Feb 1 02:39:00 2011 From: dimitri.liakhovitski at gmail.com (Dimitri Liakhovitski) Date: Mon, 31 Jan 2011 20:39:00 -0500 Subject: [R] Regularization of a matrix that has some tiny negative eigenvalues In-Reply-To: References: Message-ID: Thanks a lot, Kjetil! On Mon, Jan 31, 2011 at 1:15 PM, Kjetil Halvorsen wrote: > The Matrix package (which should already be insatlled on your > computer, since it is "Recommended") have the function > nearPD, which should do the job. > > Kjetil > > On Sat, Jan 29, 2011 at 1:32 AM, Dimitri Liakhovitski > wrote: >> Dear all: >> >> In what I am doing I sometimes get a (Hessian) matrix that has a >> couple of tiny negative eigenvalues (e.g. -6 * 10^-17). So, I can't >> run a Cholesky decomp on it - but I need to. >> Is there an established way to regularize my (Hessian) matrix (e.g., >> via some transformation) that would allow me to get a semi-positive >> definite matrix to be used in Cholesky decomp? >> >> Or should I try some other decomp method on the back end that is less >> sensitive than Cholesky? >> Dimitri >> >> ______________________________________________ >> R-help at 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, reproducible code. >> > -- Dimitri Liakhovitski Ninah Consulting www.ninah.com From gundalav at gmail.com Tue Feb 1 02:45:39 2011 From: gundalav at gmail.com (Gundala Viswanath) Date: Tue, 1 Feb 2011 10:45:39 +0900 Subject: [R] List of List in Data Frame Message-ID: Dear sirs, I have a data that is generated like this: > dat1 <- data.frame(V1 = rep(1, 5), V2 = sample(c(40:45), 5)) > dat2 <- data.frame(V1 = sample(c(0,1), 5, replace = TRUE), V2 = sample(c(40:45), 5, replace = TRUE)) What I want to do is to obtain a data frame that contain list of list. > hiv $hiv.dat1 $hiv.dat1$V1[[1]] [1] 1 1 1 1 1 $hiv.dat1$V2[[1]] [1] 41 42 43 40 44 $hiv.dat2 $hiv.dat2$V1[[1]] [1] 0 1 1 0 0 $hiv.dat2$V2[[1]] [1] 42 43 40 44 43 But why this line of command failed to create that? > hiv <- list(hiv.dat1 = as.list(dat1), hiv.dat2 = as.list(dat2)) Especially it gives "$hiv.dat1$V1" instead of "$hiv.dat1$V1[[1]]". How can we correct that? I need this particular data structure required for a specific package (ROCR). - G.V. From sebastian.daza at gmail.com Tue Feb 1 04:08:37 2011 From: sebastian.daza at gmail.com (=?ISO-8859-1?Q?Sebasti=E1n_Daza?=) Date: Mon, 31 Jan 2011 21:08:37 -0600 Subject: [R] Latent Class Logit Models in discrete choice experiments In-Reply-To: References: Message-ID: <4D477935.8090800@gmail.com> See: https://www.msu.edu/~chunghw/downloads.html Maybe you can find something useful there! Regards On 1/31/2011 12:35 PM, Daniel Vecchiato wrote: > Dear R users, > > I would like to perform Latent Class Logit Models for the analysis of choice experiments in environmental valuation. > > This kind of analysis is usually performed with NLogit Software (http://www.limdep.com). > > I attach the results I usually obtain using NLogit and NLogit model specifications. > > For Random parameter models and Logit Models I usually perform my analysis with the package mlogit ( http://cran.r-project.org/web/packages/mlogit/index.html ). > > The models I would like to run are presented in this ppt: > > http://pages.stern.nyu.edu/~wgreene/.../Lectures/Part13-LatentClassModels.ppt > > and an overview is given in this paper by Hoyos: > > http://dx.doi.org/10.1016/j.ecolecon.2010.04.011 > > Anybody has any package to suggest for this kind of analysis? (poLCA does not provide me the same estimates) > > > Thanks in advance > > Daniel > > > ______________________________________________ > R-help at 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, reproducible code. > -- Sebasti?n Daza sebastian.daza at gmail.com From mszenteczki at gmail.com Tue Feb 1 03:39:06 2011 From: mszenteczki at gmail.com (MarquisDM) Date: Mon, 31 Jan 2011 18:39:06 -0800 (PST) Subject: [R] Simple Boxplot Question- unexpected string constant error Message-ID: <1296527946808-3250421.post@n4.nabble.com> Hi everyone, Sorry for the newbie question but whenever I enter the following code into r it gives me an unexpected string constant in "boxplot(Abs~Conc,ylab='Absorbency',xlab'Ethanol(%)'" error. I have tried everything to eliminate it and have searched these forums to no avail, can anyone tell me what to do to allow r to generate my boxplot for me? Here is my code: A=c(0.37,0.38,1.1,1.1,0.65,0.61,0.56,0.74,0.71,0.60) B=c(0.66,0.63,0.85,0.9,0.8,0.9,0.8,0.8,0.41,0.49) C=c(1.2,1.2,1.4,1.35,1.2,1.2,1.35,1.75,0.86,0.8) D=c(1.1,1.2,1.2,0.8,1.1,0.85,0.94,1.4,0.88,0.63) Abs=c(A,B,C,D) Conc=c('0','0','0','0','0','0','0','0','0','0','20','20','20','20','20','20','20','20','20','20','30','30','30','30','30','30','30','30','30','30','40','40','40','40','40','40','40','40','40','40') boxplot(Abs~Conc,ylab='Absorbency',xlab'Ethanol(%)') -- View this message in context: http://r.789695.n4.nabble.com/Simple-Boxplot-Question-unexpected-string-constant-error-tp3250421p3250421.html Sent from the R help mailing list archive at Nabble.com. From matzke at berkeley.edu Tue Feb 1 05:04:52 2011 From: matzke at berkeley.edu (Nick Matzke) Date: Mon, 31 Jan 2011 20:04:52 -0800 Subject: [R] how to check if a library is loaded, from a function Message-ID: <4D478664.4000803@berkeley.edu> Hi, I've written a function which I load with a source command. The function requires a certain library, phangorn, to work. I would like the function to check if phangorn is loaded as a library before running. For some reason, just putting require(phangorn) into the sourced function doesn't do anything. This must be simple, but I can't figure it out! Any help appreciated... Cheers! Nick -- ==================================================== Nicholas J. Matzke Ph.D. Candidate, Graduate Student Researcher Huelsenbeck Lab Center for Theoretical Evolutionary Genomics 4151 VLSB (Valley Life Sciences Building) Department of Integrative Biology University of California, Berkeley Graduate Student Instructor, IB200B Principles of Phylogenetics: Ecology and Evolution http://ib.berkeley.edu/courses/ib200b/ http://phylo.wikidot.com/ Lab websites: http://ib.berkeley.edu/people/lab_detail.php?lab=54 http://fisher.berkeley.edu/cteg/hlab.html Dept. personal page: http://ib.berkeley.edu/people/students/person_detail.php?person=370 Lab personal page: http://fisher.berkeley.edu/cteg/members/matzke.html Lab phone: 510-643-6299 Dept. fax: 510-643-6264 Cell phone: 510-301-0179 Email: matzke at berkeley.edu Mailing address: Department of Integrative Biology 3060 VLSB #3140 Berkeley, CA 94720-3140 ----------------------------------------------------- "[W]hen people thought the earth was flat, they were wrong. When people thought the earth was spherical, they were wrong. But if you think that thinking the earth is spherical is just as wrong as thinking the earth is flat, then your view is wronger than both of them put together." Isaac Asimov (1989). "The Relativity of Wrong." The Skeptical Inquirer, 14(1), 35-44. Fall 1989. http://chem.tufts.edu/AnswersInScience/RelativityofWrong.htm From dwinsemius at comcast.net Tue Feb 1 05:12:37 2011 From: dwinsemius at comcast.net (David Winsemius) Date: Mon, 31 Jan 2011 23:12:37 -0500 Subject: [R] Simple Boxplot Question- unexpected string constant error In-Reply-To: <1296527946808-3250421.post@n4.nabble.com> References: <1296527946808-3250421.post@n4.nabble.com> Message-ID: <5EF4602A-42D2-4B34-9789-5B2A5DFB4A3A@comcast.net> On Jan 31, 2011, at 9:39 PM, MarquisDM wrote: > boxplot(Abs~Conc,ylab='Absorbency',xlab'Ethanol(%)') missing "="..............................^..... David Winsemius, MD West Hartford, CT From djmuser at gmail.com Tue Feb 1 05:18:58 2011 From: djmuser at gmail.com (Dennis Murphy) Date: Mon, 31 Jan 2011 20:18:58 -0800 Subject: [R] Simple Boxplot Question- unexpected string constant error In-Reply-To: <1296527946808-3250421.post@n4.nabble.com> References: <1296527946808-3250421.post@n4.nabble.com> Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From dwinsemius at comcast.net Tue Feb 1 05:19:06 2011 From: dwinsemius at comcast.net (David Winsemius) Date: Mon, 31 Jan 2011 23:19:06 -0500 Subject: [R] List of List in Data Frame In-Reply-To: References: Message-ID: <685FE4FC-47E0-4B3B-8BD0-18D42B3A75DA@comcast.net> On Jan 31, 2011, at 8:45 PM, Gundala Viswanath wrote: > Dear sirs, > > I have a data that is generated like this: > >> dat1 <- data.frame(V1 = rep(1, 5), V2 = sample(c(40:45), 5)) >> dat2 <- data.frame(V1 = sample(c(0,1), 5, replace = TRUE), V2 = >> sample(c(40:45), 5, replace = TRUE)) > > What I want to do is to obtain a data frame that contain list of list. > >> hiv > $hiv.dat1 > $hiv.dat1$V1[[1]] > [1] 1 1 1 1 1 > > $hiv.dat1$V2[[1]] > [1] 41 42 43 40 44 > > > $hiv.dat2 > $hiv.dat2$V1[[1]] > [1] 0 1 1 0 0 > > $hiv.dat2$V2[[1]] > [1] 42 43 40 44 43 > > But why this line of command failed to create that? > >> hiv <- list(hiv.dat1 = as.list(dat1), hiv.dat2 = as.list(dat2)) > > Especially it gives "$hiv.dat1$V1" instead of "$hiv.dat1$V1[[1]]". But that _is_ a list of lists. Two lists, each with two sub-lists hiv$hiv.dat1$V1[[1]] is just the element "1". It is not a list. > > How can we correct that? > I need this particular data structure required for a specific > package (ROCR). To do what operation or procedure? > -- David Winsemius, MD West Hartford, CT From diasandre at gmail.com Tue Feb 1 05:22:08 2011 From: diasandre at gmail.com (ADias) Date: Mon, 31 Jan 2011 20:22:08 -0800 (PST) Subject: [R] sum the values in a vector as a complete number Message-ID: <1296534128515-3250470.post@n4.nabble.com> Hi I am trying to create a function that is able to calculate this sum: a<-c(2,3,5) b<-(8,7) with "a" meaning 235 and "b" 87. So the result of this sum would be 235 + 87 = 322. I've searched a function like strsplit but that worked for integers and in reverse - not spliting but combining. Can you give me a hand on this please? thanks AD -- View this message in context: http://r.789695.n4.nabble.com/sum-the-values-in-a-vector-as-a-complete-number-tp3250470p3250470.html Sent from the R help mailing list archive at Nabble.com. From dwinsemius at comcast.net Tue Feb 1 05:49:49 2011 From: dwinsemius at comcast.net (David Winsemius) Date: Mon, 31 Jan 2011 23:49:49 -0500 Subject: [R] how to check if a library is loaded, from a function In-Reply-To: <4D478664.4000803@berkeley.edu> References: <4D478664.4000803@berkeley.edu> Message-ID: <3E7F0D64-0E2B-4D56-BDDC-76FC92C855DA@comcast.net> On Jan 31, 2011, at 11:04 PM, Nick Matzke wrote: > Hi, > > I've written a function which I load with a source command. The > function requires a certain library, phangorn, to work. > > I would like the function to check if phangorn is loaded as a > library before running. For some reason, just putting > require(phangorn) into the sourced function doesn't do anything. If a package is already loaded then require() will not load it again. I think it is also going to be quiet if it's called in a sourced routine, so I would ask whether you have properly tested your claim that it "doesn't do anything"? If you start with a clean session and source your routine, does the routine fail because the package does not load? > > This must be simple, but I can't figure it out! Any help > appreciated... > > -- > ==================================================== > Nicholas J. Matzke > Ph.D. Candidate, Graduate Student Researcher 30 line sig elided. -- David Winsemius, MD West Hartford, CT From mtmorgan at fhcrc.org Tue Feb 1 05:59:32 2011 From: mtmorgan at fhcrc.org (Martin Morgan) Date: Mon, 31 Jan 2011 20:59:32 -0800 Subject: [R] Generic Functions and Dates In-Reply-To: <20110131201526.GB23385@cake.fdo.local> References: <20110131201526.GB23385@cake.fdo.local> Message-ID: <4D479334.7030404@fhcrc.org> On 01/31/2011 12:15 PM, Elliot Joel Bernstein wrote: > I'm trying to write a generic function that calls different methods > depending on the structure of the argument, but not the exact type of > its contents. For example, the function 'nan2last' below works for a > numeric vector but not for a vector of Date objects. Is there any way > to make it work on any vector? Hi Elliot -- In principle one could write a method that advertises that it operates on signature "ANY" setMethod(nan2last, "ANY", function(x) <...>) but in practice it's unlikely that one could do something useful on _any_ object. If I > getClass("Date") Virtual Class "Date" [package "methods"] Slots: Name: .S3Class Class: character Extends: "oldClass" I see that Date does not extend "vector", so I'd write a method that delegates as appropriate, along the lines of .nan2last <- function(x) { } setMethod(foo, "vector", .na2last) setMethod(foo, "Date", .na2last) > setGeneric("nan2last", function(x) { standardGeneric("nan2last") }) > > setMethod(nan2last, "vector", > function(x) { > > naLocs <- (1:length(x))[is.na(x)] probably naLocs <- which(is.na(x)) > > if (length(naLocs) == 0) > return (x) > > naLocs <- naLocs[naLocs>1] > > for (i in 1:length(naLocs)) { seq_along(naLocs), otherwise you'll surprise yourself with 1:length(integer(0)) > x[naLocs[i]] <- x[naLocs[i]-1] > } just x[naLocs] <- x[naLocs - 1], outside the loop (so no seq_along) Martin > > return(x) > }) > > ## Works > x <- 1:10; > x[sample(10,3)] <- NA > print(cbind(x, nan2last(x))) > > ## Doesn't work > x <- seq(as.Date("2011-01-01"), as.Date("2011-01-31"), "days") > x[sample(length(x), 5)] <- NA > nan2last(x) > > Thanks. > > - Elliot > > ______________________________________________ > R-help at 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, reproducible code. -- Computational Biology Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: M1-B861 Telephone: 206 667-2793 From bbolker at gmail.com Tue Feb 1 06:16:07 2011 From: bbolker at gmail.com (Ben Bolker) Date: Tue, 1 Feb 2011 05:16:07 +0000 (UTC) Subject: [R] rgl: draw multiple ellipsoids References: Message-ID: baptiste auguie googlemail.com> writes: > > Dear list, > > I'm trying to visualise some ellipsoidal shapes in 3D. Their position, > axes, and angular orientation can be arbitrary. I saw an ellipse3d > function in rgl; however it is heavily oriented towards the > statistical concept of ellipse of confidence, whilst I am just > concerned with the geometrical object. > Don't know if it will be better or not, but try library(rgl) demo("shapes3d") From gundalav at gmail.com Tue Feb 1 06:20:51 2011 From: gundalav at gmail.com (Gundala Viswanath) Date: Tue, 1 Feb 2011 14:20:51 +0900 Subject: [R] How to Plot Two Curves Into One Page Message-ID: I have a R script that contain these lines for plotting: plot(foo,lwd=2,lty=3,col="red", main=""); plot(bar,lwd=2,lty=3,col="blue"); legend(0.6,0.6,c('Default','Probabilistic'), col=c('red','blue'),lwd=3); But it generate 1 file (Rplot.pdf) with two pages. Each page for 1 plot. Is there a way I can put them together in to one page? - G.V. From eriki at ccbr.umn.edu Tue Feb 1 06:55:12 2011 From: eriki at ccbr.umn.edu (Erik Iverson) Date: Mon, 31 Jan 2011 23:55:12 -0600 Subject: [R] sum the values in a vector as a complete number In-Reply-To: <1296534128515-3250470.post@n4.nabble.com> References: <1296534128515-3250470.post@n4.nabble.com> Message-ID: <4D47A040.9000707@ccbr.umn.edu> > I am trying to create a function that is able to calculate this sum: > > a<-c(2,3,5) > b<-(8,7) > > with "a" meaning 235 and "b" 87. So the result of this sum would be 235 + 87 > = 322. a <- c(2,3,5) b <- c(8,7) vectorToScalar <- function(x) { as.numeric(paste(x, collapse = "")) } vectorToScalar(a) + vectorToScalar(b) From jorgeivanvelez at gmail.com Tue Feb 1 07:02:50 2011 From: jorgeivanvelez at gmail.com (Jorge Ivan Velez) Date: Tue, 1 Feb 2011 01:02:50 -0500 Subject: [R] sum the values in a vector as a complete number In-Reply-To: <1296534128515-3250470.post@n4.nabble.com> References: <1296534128515-3250470.post@n4.nabble.com> Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From gundalav at gmail.com Tue Feb 1 07:41:46 2011 From: gundalav at gmail.com (Gundala Viswanath) Date: Tue, 1 Feb 2011 15:41:46 +0900 Subject: [R] How to Plot Two Curves Into One Page In-Reply-To: References: Message-ID: Dear Jorge, Thanks for the reply. But what I mean is to create plot on "top" of another in to one page. So in the end there will be only one plot with two curves. Actually what I am to plot is two ROC curves. - G.V. On Tue, Feb 1, 2011 at 3:37 PM, Jorge Ivan Velez wrote: > Hi Gundala, > Yes. > One way of doing it would be writing > par( mfrow = c(1, 2)) > before plotting your variables. Thus, the following should do it: > par( mfrow = c(1, 2)) ? ? # see ?par and the argument mfrow for more > information > plot(foo,lwd=2,lty=3,col="red", main=""); > plot(bar,lwd=2,lty=3,col="blue"); > legend(0.6,0.6,c('Default','Probabilistic'), col=c('red','blue'),lwd=3); > > A second option would be setting up a suitable layout. For this, please take > a look at ?layout. > Best, > Jorge > > > On Tue, Feb 1, 2011 at 12:20 AM, Gundala Viswanath <> wrote: >> >> I have a R script that contain these lines for plotting: >> >> plot(foo,lwd=2,lty=3,col="red", main=""); >> plot(bar,lwd=2,lty=3,col="blue"); >> legend(0.6,0.6,c('Default','Probabilistic'), col=c('red','blue'),lwd=3); >> >> >> But it generate 1 file (Rplot.pdf) with two pages. Each page for 1 plot. >> Is there a way I can put them together in to one page? >> >> - G.V. >> >> ______________________________________________ >> R-help at 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, reproducible code. > > From ripley at stats.ox.ac.uk Tue Feb 1 07:57:50 2011 From: ripley at stats.ox.ac.uk (Prof Brian Ripley) Date: Tue, 1 Feb 2011 06:57:50 +0000 (GMT) Subject: [R] list.files() error message: 'translateCharUTF8' must be called on a CHARSXP In-Reply-To: References: Message-ID: On Mon, 31 Jan 2011, MacQueen, Don wrote: > I'm using list.files() on my home directory, like this: > > crnt.files <- list.files(dir.to.check, full.names=TRUE, all.files=TRUE, > recursive=TRUE) > > With dir.to.check set to the full path to my home directory. > > After a while I get: > > Error in list.files(dir.to.check, full.names = TRUE, all.files = TRUE, : > 'translateCharUTF8' must be called on a CHARSXP > > This happens on one of my two machines, not the other. > Presumably there is a "file" somewhere in my home directory that, well, > isn't a file? > Or maybe has some strange character in its file name? That maybe isn't > valid in my LOCALE? Your guesses are wrong: this indicates internal corruption in R. > I would appreciate some advice on how to find this "file" so I can get rid > of it, or rename it, or something. > > Also, does this message possibly represent a problem that the R developers > should pay attention to? I'm not sure. They would need a reproducible example. There is something odd, though: Mac OS X is not usually providing a C locale, nor in a C locale would translateCharUTF8 be called. Does this happen if you set a standard Mac (UTF-8) locale? > > Thanks > -Don > > >> sessionInfo() > R version 2.12.1 (2010-12-16) > Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit) > > locale: > [1] C > > attached base packages: > [1] stats graphics grDevices utils datasets methods base > > > -- > Don MacQueen > Environmental Protection Department > Lawrence Livermore National Laboratory > 925 423-1062 > > ______________________________________________ > R-help at 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, reproducible code. > -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 From ripley at stats.ox.ac.uk Tue Feb 1 08:07:15 2011 From: ripley at stats.ox.ac.uk (Prof Brian Ripley) Date: Tue, 1 Feb 2011 07:07:15 +0000 (GMT) Subject: [R] how to check if a library is loaded, from a function In-Reply-To: <4D478664.4000803@berkeley.edu> References: <4D478664.4000803@berkeley.edu> Message-ID: On Mon, 31 Jan 2011, Nick Matzke wrote: > Hi, > > I've written a function which I load with a source command. The function > requires a certain library, phangorn, to work. Do you mean an R package or an OS library (aka DLL)? I'll assume the former, but please do use accurate terminology. > I would like the function to check if phangorn is loaded as a library before > running. For some reason, just putting require(phangorn) into the sourced > function doesn't do anything. Did you check the return value? It does do something: compute a return value. You can also check "package:phangorn" %in% search() > This must be simple, but I can't figure it out! Any help appreciated... > > Cheers! > Nick > > -- > ==================================================== > Nicholas J. Matzke > Ph.D. Candidate, Graduate Student Researcher > > Huelsenbeck Lab > Center for Theoretical Evolutionary Genomics > 4151 VLSB (Valley Life Sciences Building) > Department of Integrative Biology > University of California, Berkeley > > Graduate Student Instructor, IB200B > Principles of Phylogenetics: Ecology and Evolution > http://ib.berkeley.edu/courses/ib200b/ > http://phylo.wikidot.com/ > > > Lab websites: > http://ib.berkeley.edu/people/lab_detail.php?lab=54 > http://fisher.berkeley.edu/cteg/hlab.html > Dept. personal page: > http://ib.berkeley.edu/people/students/person_detail.php?person=370 > Lab personal page: http://fisher.berkeley.edu/cteg/members/matzke.html > Lab phone: 510-643-6299 > Dept. fax: 510-643-6264 > > Cell phone: 510-301-0179 > Email: matzke at berkeley.edu > > Mailing address: > Department of Integrative Biology > 3060 VLSB #3140 > Berkeley, CA 94720-3140 > > ----------------------------------------------------- > "[W]hen people thought the earth was flat, they were wrong. When people > thought the earth was spherical, they were wrong. But if you think that > thinking the earth is spherical is just as wrong as thinking the earth is > flat, then your view is wronger than both of them put together." > > Isaac Asimov (1989). "The Relativity of Wrong." The Skeptical Inquirer, > 14(1), 35-44. Fall 1989. > http://chem.tufts.edu/AnswersInScience/RelativityofWrong.htm > > ______________________________________________ > R-help at 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, reproducible code. > -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 From dieter.menne at menne-biomed.de Tue Feb 1 08:19:34 2011 From: dieter.menne at menne-biomed.de (Dieter Menne) Date: Mon, 31 Jan 2011 23:19:34 -0800 (PST) Subject: [R] How can I index multiple linear models? (Without getting a warning.) In-Reply-To: <1296541518289-3250535.post@n4.nabble.com> References: <1296541518289-3250535.post@n4.nabble.com> Message-ID: <1296544774170-3250594.post@n4.nabble.com> BSanders wrote: > > > ..... > lin[i] = lm(reservesub[,3]~ reservesub[,i+3]) > > For which I'm given 15 warning messages which say : > > "1: In lin[i] = lm(reservesub[, 3] ~ reservesub[, i + 3]) : > number of items to replace is not a multiple of replacement length" > lin = list() for(i in 1:15){ b = rnorm(10) q = rnorm(10) #lin[i] = lm(b~q) #warnings lin[[i]] = lm(b~q) #warnings } Dieter -- View this message in context: http://r.789695.n4.nabble.com/How-can-I-index-multiple-linear-models-Without-getting-a-warning-tp3250535p3250594.html Sent from the R help mailing list archive at Nabble.com. From adam at mycostech.com Tue Feb 1 07:25:18 2011 From: adam at mycostech.com (BSanders) Date: Mon, 31 Jan 2011 22:25:18 -0800 (PST) Subject: [R] How can I index multiple linear models? (Without getting a warning.) Message-ID: <1296541518289-3250535.post@n4.nabble.com> My code looks like this: lin = NA for(i in 1:15){ lin[i] = lm(reservesub[,3]~ reservesub[,i+3]) } For which I'm given 15 warning messages which say : "1: In lin[i] = lm(reservesub[, 3] ~ reservesub[, i + 3]) : number of items to replace is not a multiple of replacement length" I'm am able to generate the 15 different models and get the coefficients. I am able to access each coefficient, for example , the slope of the third model can be called using lin[[3]][2], which is helpful, but none of the other objects that go along with the linear model, like residuals, are accessible (for me.) I feel like I'm missing something kind of fundamental here, but I can't put my finger on it. Thanks in advance. Barry Sanders. -- View this message in context: http://r.789695.n4.nabble.com/How-can-I-index-multiple-linear-models-Without-getting-a-warning-tp3250535p3250535.html Sent from the R help mailing list archive at Nabble.com. From adam at mycostech.com Tue Feb 1 07:51:38 2011 From: adam at mycostech.com (BSanders) Date: Mon, 31 Jan 2011 22:51:38 -0800 (PST) Subject: [R] How to Plot Two Curves Into One Page In-Reply-To: References: Message-ID: <1296543098539-3250567.post@n4.nabble.com> par(mfrow=c(3,2)) ## will get you 3 rows and 2 columns -- View this message in context: http://r.789695.n4.nabble.com/How-to-Plot-Two-Curves-Into-One-Page-tp3250546p3250567.html Sent from the R help mailing list archive at Nabble.com. From adam at mycostech.com Tue Feb 1 07:53:06 2011 From: adam at mycostech.com (BSanders) Date: Mon, 31 Jan 2011 22:53:06 -0800 (PST) Subject: [R] How to Plot Two Curves Into One Page In-Reply-To: References: Message-ID: <1296543186650-3250568.post@n4.nabble.com> abline() or lines() -- View this message in context: http://r.789695.n4.nabble.com/How-to-Plot-Two-Curves-Into-One-Page-tp3250546p3250568.html Sent from the R help mailing list archive at Nabble.com. From m_karuna2002 at yahoo.com Tue Feb 1 08:15:16 2011 From: m_karuna2002 at yahoo.com (karuna m) Date: Tue, 1 Feb 2011 12:45:16 +0530 (IST) Subject: [R] (no subject) Message-ID: <899389.8321.qm@web94501.mail.in2.yahoo.com> An embedded and charset-unspecified text was scrubbed... Name: not available URL: From niederlein-rstat at yahoo.de Tue Feb 1 09:09:52 2011 From: niederlein-rstat at yahoo.de (Antje Niederlein) Date: Tue, 1 Feb 2011 09:09:52 +0100 Subject: [R] mle question Message-ID: Hello, I tried to use mle to fit a distribution(zero-inflated negbin for count data). My call is very simple: mle(ll) ll() takes the three parameters, I'd like to be estimated (size, mu and prob). But within the ll() function I have to judge if the current parameter-set gives a nice fit or not. So I have to apply them to observation data. But how does the method know about my observed data? The mle()-examples define this data outside of this method and it works. For a simple example, it was fine but when it comes to a loop (tapply) providing different sets of observation data, it doesn't work anymore. I'm confused - is there any way to do better? Here is a little example which show my problem: # R-code --------------------------------- lambda.data <- runif(10,0.5,10) ll <- function(lambda = 1) { cat("x in ll()",x,"\n") y.fit <- dpois(x, lambda) sum( (y - y.fit)^2 ) } lapply(1:10, FUN = function(x){ raw.data <- rpois(100,lambda.data[x]) freqTab <- count(raw.data) x <- freqTab$x y <- freqTab$freq / sum(freqTab$freq) cat("x in lapply", x,"\n") fit <- mle(ll) coef(fit) }) Can anybody help? Antje From ligges at statistik.tu-dortmund.de Tue Feb 1 10:08:34 2011 From: ligges at statistik.tu-dortmund.de (Uwe Ligges) Date: Tue, 01 Feb 2011 10:08:34 +0100 Subject: [R] Unable to require installed package In-Reply-To: References: Message-ID: <4D47CD92.5020008@statistik.tu-dortmund.de> 1. You need R version >= R-2.12.0 on Windows in order to use a package that is compiled under R >= 2.12.0. 2. winbuilder gave some reports. That may have said if and why your package could not be compiled under 64-bit R for some reason. 3. If you have a 32-bit-only package, you can only load it in it in an 32-bit R instance, not in a 64-bit R. 4. 32-bit R runs fine under 64-bit Windows. Best, Uwe Ligges On 01.02.2011 01:06, ??? wrote: > Hi, > > I uploaded my package to http://win-builder.r-project.org/ and had it built. > > It can work on one machine, but on the other, it reports: > > Loading required package: grt > Error: package 'grt' was built for i386-pc-mingw32 > In addition: Warning message: > package 'grt' was built under R version 2.12.1 > Execution halted > > Is it because the package is built for win32? But in the manual it says R > for win32 works good on win64. > > Note that the package has some C++ code. > > best, > Liping Liu > > > > > On Thu, Jan 27, 2011 at 1:21 AM, Prof Brian Ripleywrote: > >> On Thu, 27 Jan 2011, Barry Rowlingson wrote: >> >> On Thu, Jan 27, 2011 at 7:57 AM, ????????? wrote: >>> >>>> Hi, >>>> >>>> I write a package in Linux and ready to distribute, and I can install it >>>> in >>>> linux and run it. >>>> However, when I have install it in my Windows' R. >>>> >>>> I can not 'require' it. >>>> >>>> is.element("grt", installed.packages()[,1]) >>>>> >>>> [1] TRUE >>>> >>>>> require(grt) >>>>> >>>> Loading required package: grt >>>> Failed with error: ???'grt' is not a valid installed package??? >>>> >>>> Is there any pitfall between platforms? >>>> And anywhere I could check more detailed error message. >>>> >>> >>> How did you install it in Windows? If you just copied it from the >>> Linux install directory, or if its in a shared directory, it probably >>> wont work. >>> >>> You need to do a proper R CMD INSTALL on Windows, and for that you'll >>> need the assorted dev tools for building R packages on Windows. >>> >> >> For the record: these days you do not need any extra tools unless the >> package contains code that needs compilation, and in the latter case we >> provide the win-builder service. >> >> However, the message indicates no file grt/Meta/package.rds, which would be >> there if the package was copied from Linux. So we need to know exactly what >> was done. >> >> >>> Barry >>> >>> ______________________________________________ >>> R-help at 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, reproducible code. >>> >>> >> -- >> Brian D. Ripley, ripley at stats.ox.ac.uk >> Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ >> University of Oxford, Tel: +44 1865 272861 (self) >> 1 South Parks Road, +44 1865 272866 (PA) >> Oxford OX1 3TG, UK Fax: +44 1865 272595 > > [[alternative HTML version deleted]] > > > > > ______________________________________________ > R-help at 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, reproducible code. From savicky at praha1.ff.cuni.cz Tue Feb 1 09:05:06 2011 From: savicky at praha1.ff.cuni.cz (Petr Savicky) Date: Tue, 1 Feb 2011 09:05:06 +0100 Subject: [R] p value for joint probability In-Reply-To: <47C1151A-BE59-4EA3-B5C7-B0A700638C16@gmail.com> References: <47C1151A-BE59-4EA3-B5C7-B0A700638C16@gmail.com> Message-ID: <20110201080506.GA21236@praha1.ff.cuni.cz> On Mon, Jan 31, 2011 at 09:42:27PM +0100, moleps wrote: > Dear all, > > Given > > rr<-data.frame(r1<-rnorm(1000,10,5),r2<-rnorm(1000,220,5)) > Hello. There is already an answer to your question. However, i think that the above command works in a different way than you expect. The embedded assignments create vectors r1, r2 and the names of columns are derived from the whole expressions "r1<-rnorm(1000,10,5)" and "r2<-rnorm(1000,220,5)". If there are no other variables, then you get rr<-data.frame(r1<-rnorm(1000,10,5),r2<-rnorm(1000,220,5)) ls() [1] "rr" "r1" "r2" rr[1:3, ] r1....rnorm.1000..10..5. r2....rnorm.1000..220..5. 1 8.639778 227.3891 2 17.477301 227.4780 3 5.640543 227.7373 If r1, r2 should be the names of the columns, then use named arguments in the call of the function data.frame() rr<-data.frame(r1=rnorm(1000,10,5),r2=rnorm(1000,220,5)) rr[1:3, ] r1 r2 1 12.3274362 224.7632 2 13.1347464 214.3805 3 0.7495177 219.6179 Petr Savicky. From savicky at praha1.ff.cuni.cz Tue Feb 1 10:12:42 2011 From: savicky at praha1.ff.cuni.cz (Petr Savicky) Date: Tue, 1 Feb 2011 10:12:42 +0100 Subject: [R] Problem with intersection between two different tables In-Reply-To: <21758.23351.qm@web120513.mail.ne1.yahoo.com> References: <21758.23351.qm@web120513.mail.ne1.yahoo.com> Message-ID: <20110201091242.GA7935@praha1.ff.cuni.cz> On Mon, Jan 31, 2011 at 01:35:14PM -0800, Shishir Vor wrote: > Hi, > > > I'm a beginner with R. > > > I have two different? tables with > the variable name dmr1 and tp2 a given following. v1 is the common? column? field of > the both tables. In the first table column v3 is always v2+1 while in > the second table v2 and v3 hold the range. I want to know which rows > of tb1 intersect with the range between v2 and v3 of tb3. I need some one's kind help to solve this problem. Hi. The same question was asked a few hours before. If you are not subscribed to R-help, then use the web interface https://stat.ethz.ch/pipermail/r-help/2011-January/thread.html to search the messages with subject [R] how to search to value to another table There is a reply, which tests the intervals [a, b] from tb1 for being a subset of [c, d] in tb2. If you need to test a nonempty intersection, it is slightly more complicated, but not much. Are you from the same research team? Petr Savicky. From r.m.krug at gmail.com Tue Feb 1 10:31:04 2011 From: r.m.krug at gmail.com (Rainer M Krug) Date: Tue, 01 Feb 2011 10:31:04 +0100 Subject: [R] How to change size of xlab inplot? Message-ID: <4D47D2D8.6080408@gmail.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi I want to increase the size of the text for xlab in the plot command: plot(1,1, xlab="Label") I tried cex, cex.caption and others, but none worked. Is there a way of using cex=2 for the xlab? Thanks, Rainer - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel: +33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: Rainer at krugs.de Skype: RMkrug -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk1H0tgACgkQoYgNqgF2egrXfwCfc0RRosky2rVqqcph62lBYB49 loQAnjOntMEM2TMJLacVdzTznGh7SmdE =8q8a -----END PGP SIGNATURE----- From nick.sabbe at ugent.be Tue Feb 1 10:46:01 2011 From: nick.sabbe at ugent.be (Nick Sabbe) Date: Tue, 1 Feb 2011 10:46:01 +0100 Subject: [R] Preparing dataset for glmnet: factors to dummies Message-ID: <04a701cbc1f4$d63fd680$82bf8380$@sabbe@ugent.be> Hello list. For some reason, the makers of glmnet do not accept a dataframe as input. They expect the input to be a matrix, where the dummies are already precoded. Now I have created a sample dataset with . 11 factor columns with two levels . 4 factor columns with three levels . 135 continuous columns (from a standard normal) . 100 observations (rows) Say this dataframe is in dfrPredictors. What I do now, is use the following code: form<-paste("~",paste(colnames(dfrPredictors), collapse="+"), sep="") dfrTmp<-model.frame(dfrPredictors, na.action=na.pass) result<- as.matrix(model.matrix(as.formula(form), data=dfrTmp))[,-1] This works (although admittedly, I don't understand everything of it). However, I notice that for this rather limited dataset, this conversion takes around 0.1 seconds user/elapsed time (on a relatively speedy laptop). For my current work, I need to do this a lot of times on very similar dataframes (in fact, they are multiply imputed from the same 'original' dataframe), so I need all the speed I can get. Does anybody know of a way that is quicker than the above? Note: because of other uses of the dataframe, I don't have the option to do this conversion before the imputation, so I really need the conversion itself to work quickly. Thanks, Nick Sabbe -- ping: nick.sabbe at ugent.be link: http://biomath.ugent.be wink: A1.056, Coupure Links 653, 9000 Gent ring: 09/264.59.36 -- Do Not Disapprove From gkakaron at yahoo.gr Tue Feb 1 10:20:48 2011 From: gkakaron at yahoo.gr (George Kakarontzas) Date: Tue, 1 Feb 2011 11:20:48 +0200 Subject: [R] Read a similarity matrix from excel Message-ID: <001d01cbc1f1$50d7cc30$f2876490$@yahoo.gr> Good morning, I have an excel spreadsheet with similarities among objects. The format of the file is the following: 1st row: ,,,..., 2nd row: ,0,s<1,2>,s<1,3>,...,s<1,N> 3rd row: ,s<2,1>,0,s<2,3>,...,s<2,N> The table is symmetrical and contains the similarities among the objects (s stands for similarity among x and k). The first row contains the name of the objects (strings of characters) in the same order that these same names are contained in the first column. The cell <1,1> is empty. How can I read this in R so that after reading it I can perform a hierarchical clustering. The table is 78x78 so it is relatively easy to manually change something if it makes it easier to read. I found many articles about reading a data table with variables and then constructing the distance matrix from within R, but I have the similarity matrix instead. Thank you for your help George From surreyjackson at gmail.com Tue Feb 1 10:51:12 2011 From: surreyjackson at gmail.com (Surrey Jackson) Date: Tue, 1 Feb 2011 22:51:12 +1300 Subject: [R] Scatterplot Question Message-ID: Hello, I have some data where a number of events (the total amount varies) occur at cumulating times, I would like to create a scatterplot (easily achieved using plot etc) of these events (the events can either be times using poxist or I can convert them into just seconds which is probably easier to work with), however I would like the events/times to re-begin plotting every 10th occurrence and start being plotted again from 0 on the Y axis. The result would be a scatte rplot that looks like it has lots of ups and downs in it, as opposed to one that just keeps on going on up and up and up. This would allow me to compare the time of the events across multiple sessions of data. Now I can create a scatterplot of the first 10 occurrences and then minus the 10th time from the next 10 occurrences so the times will be plotted correctly on the Y axis. However I can't make them plot in the 11:20 slot. I have read all the help files for plot, dotchart etc and can't figure it out. I am after an elegant solution as I have many hundreds of data files that I will need to do this for and I have been creating all my other graphs and doing other anaylsis using a loop and all the files have varying numbers of events to be plotted. Any help would be greatly appreciated. Regards Surrey Jackson From bogaso.christofer at gmail.com Tue Feb 1 11:29:21 2011 From: bogaso.christofer at gmail.com (Bogaso Christofer) Date: Tue, 1 Feb 2011 15:59:21 +0530 Subject: [R] Working with additional input for user defined function Message-ID: <010301cbc1fa$e68965a0$b39c30e0$@gmail.com> An embedded and charset-unspecified text was scrubbed... Name: not available URL: From statmailinglists at googlemail.com Tue Feb 1 12:01:58 2011 From: statmailinglists at googlemail.com (Paolo Rossi) Date: Tue, 1 Feb 2011 11:01:58 +0000 Subject: [R] Estimation and Forecast of Seasonal Component Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From wwwhsd at gmail.com Tue Feb 1 12:12:43 2011 From: wwwhsd at gmail.com (Henrique Dallazuanna) Date: Tue, 1 Feb 2011 09:12:43 -0200 Subject: [R] How to change size of xlab inplot? In-Reply-To: <4D47D2D8.6080408@gmail.com> References: <4D47D2D8.6080408@gmail.com> Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From wwwhsd at gmail.com Tue Feb 1 12:27:18 2011 From: wwwhsd at gmail.com (Henrique Dallazuanna) Date: Tue, 1 Feb 2011 09:27:18 -0200 Subject: [R] sum the values in a vector as a complete number In-Reply-To: <1296534128515-3250470.post@n4.nabble.com> References: <1296534128515-3250470.post@n4.nabble.com> Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From csardi at rmki.kfki.hu Tue Feb 1 12:30:39 2011 From: csardi at rmki.kfki.hu (=?ISO-8859-1?B?R+Fib3IgQ3PhcmRp?=) Date: Tue, 1 Feb 2011 12:30:39 +0100 Subject: [R] httpd-access.log parsing and graph construction. In-Reply-To: References: Message-ID: Hi Jeff, I am not sure what you want to do, but the 'graph' and 'igraph' packages are for network, graph theory, i.e. http://en.wikipedia.org/wiki/Graph_theory If you think that this is the kind of tool you need, look over the manual of the packages, and the documentation at the igraph homepage at http://igraph.sf.net to see what these packages can do for you. Best, Gabor On Mon, Jan 31, 2011 at 4:23 PM, Jeff Hamann wrote: > R gurus: > > I'm thinking about using R for website traffic analysis but didn't find anything in my web searches specific to R. > > If I have the webpages (simple example would contain something like three (3) static pages with a couple of links each) and parse the apache access log file (httpd-access.log), then I can populate the graph representing the website and perform whatever analysis I need. Yes? > > I've used the igraph package, not graph, but was assuming there's some existing functionality to perform these tasks. > > Any thoughts? Please reply privately. > > Respectfully, > Jeff. > > > Jeff Hamann, PhD > PO Box 1421 > Corvallis, Oregon 97339-1421 > 541-754-2457 > jeff.hamann[at]forestinformatics[dot]com > jeff.d.hamann[at]gmail[dot]com > http://www.forestinformatics.com > http://forufus.blogspot.com/ > http://seekingalpha.com/author/jeff-d-hamann >> > > > > ? ? ? ?[[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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, reproducible code. > -- Gabor Csardi ? ?? UNIL DGM From maechler at stat.math.ethz.ch Tue Feb 1 12:33:53 2011 From: maechler at stat.math.ethz.ch (Martin Maechler) Date: Tue, 1 Feb 2011 12:33:53 +0100 Subject: [R] Preparing dataset for glmnet: factors to dummies In-Reply-To: <04a701cbc1f4$d63fd680$82bf8380$@sabbe@ugent.be> References: <04a701cbc1f4$d63fd680$82bf8380$@sabbe@ugent.be> Message-ID: <19783.61345.624028.936178@stat.math.ethz.ch> >>>>> "NS" == Nick Sabbe >>>>> on Tue, 1 Feb 2011 10:46:01 +0100 writes: NS> Hello list. NS> For some reason, the makers of glmnet do not accept a dataframe as input. NS> They expect the input to be a matrix, where the dummies are already NS> precoded. NS> Now I have created a sample dataset with NS> . 11 factor columns with two levels NS> . 4 factor columns with three levels NS> . 135 continuous columns (from a standard normal) NS> . 100 observations (rows) NS> Say this dataframe is in dfrPredictors. please do provide your R code next time, so we'll have a fully reproducible example .... NS> What I do now, is use the following code: NS> form<-paste("~",paste(colnames(dfrPredictors), collapse="+"), sep="") NS> dfrTmp<-model.frame(dfrPredictors, na.action=na.pass) NS> result<- as.matrix(model.matrix(as.formula(form), data=dfrTmp))[,-1] NS> This works (although admittedly, I don't understand everything of it). NS> However, I notice that for this rather limited dataset, this conversion NS> takes around 0.1 seconds user/elapsed time (on a relatively speedy laptop). NS> For my current work, I need to do this a lot of times on very similar NS> dataframes (in fact, they are multiply imputed from the same 'original' NS> dataframe), so I need all the speed I can get. NS> Does anybody know of a way that is quicker than the above? Note: because of NS> other uses of the dataframe, I don't have the option to do this conversion NS> before the imputation, so I really need the conversion itself to work NS> quickly. The glmnet package fortunately also works with sparse matrices (as from the 'Matrix' package). In Matrix, there's the function sparse.model.matrix() which should work like model.matrix() but produce a sparse matrix. This is typically considerably faster when the resulting matrix is large and sparse, notably because the memory footprint is so much smaller. We (Matrix authors) have gone a step further, and written a model.Matrix() function with argument 'sparse = FALSE / TRUE' which should even more closely mirror the functionality of R's model.matrix() (as that produces only standard, i.e., dense matrices). The functionality of model.Matrix() has been moved out of the Matrix package into the package 'MatrixModels', and that package also provides -- somewhat experimental -- functionality for fitting GLMs with sparse model matrices. We'd be glad to get feedback on your uses and observations with these sparse model matrices. Martin Maechler, ETH Zurich From murdoch.duncan at gmail.com Tue Feb 1 12:47:13 2011 From: murdoch.duncan at gmail.com (Duncan Murdoch) Date: Tue, 01 Feb 2011 06:47:13 -0500 Subject: [R] Sweave: change tab size In-Reply-To: References: Message-ID: <4D47F2C1.6030409@gmail.com> On 11-01-31 6:51 AM, Sascha Vieweg wrote: > When Sweave outputs function code that spreads across many lines, > the default indent of inner lines is 4 spaces (plus the prompt). > How can I change that default to 2 spaces? I tried to adjust my > Sweave.sty with the option tabsize but that doesn't show an > effect. Also the Sweave documentation did not provide a cue. > Thanks for hints, *S* > If you use the keep.source=TRUE option it won't change the formatting, so you can use any indentation you like. If you don't, it will use deparse() to format your functions, and deparse() has the indentation hard coded. You'd have to build your own copy of R to change it. The function that matters is printtab2buff() in src/main/deparse.c. Duncan Murdoch From joda2457 at student.uu.se Tue Feb 1 13:04:19 2011 From: joda2457 at student.uu.se (Joel) Date: Tue, 1 Feb 2011 04:04:19 -0800 (PST) Subject: [R] Rserve Message-ID: <1296561859129-3251032.post@n4.nabble.com> Hi Im just wondering if anyone knows if Rserve is parallel programed? and if so how, do it send every new connection to a new node or? Thx for the help Joel -- View this message in context: http://r.789695.n4.nabble.com/Rserve-tp3251032p3251032.html Sent from the R help mailing list archive at Nabble.com. From ligges at statistik.tu-dortmund.de Tue Feb 1 13:28:24 2011 From: ligges at statistik.tu-dortmund.de (Uwe Ligges) Date: Tue, 01 Feb 2011 13:28:24 +0100 Subject: [R] How many nested function calls? In-Reply-To: References: Message-ID: <4D47FC68.6050701@statistik.tu-dortmund.de> On 31.01.2011 23:23, muchado22 at gmail.com wrote: > Is there a limit to how many nested function calls R will tolerate? I mean, > if I have a function that calls another function that calls another > function, etc., is there a limit to how deep I can go? > > I am getting an error that says a variable is not available. When I do a > traceback(), it shows that the supposedly missing variable is 7 functions > back. I'll call that "fcn1". > > As far as I can tell, the variable that the error says is not available is > in fact globally available, except when I try to access it via nested > function calls. Also, when I call fcn1 at the command prompt, there is no > problem. But if I put browser() inside fcn1 and call fcn7, the variable is > not available at the Browse[1]> prompt. And I get the same problem if I call > fcn2. > > Does it sound like the problem is the number of nested function calls or > something else? No, the number is controlled. See ?options and its argument "expressions" that tells you that 5000 nested expressions are a default limit that can be changed easily (and if it is hit you will get an informative error message). What you see is how are searches objects in environments (so called scoping rules). The general first rule is to pass all required objects as arguments to the functions that need them. You can make (but should not make too many) exceptions if you have understood the scoping rules that you can read about in the documentation. Best, Uwe Ligges > Thanks, > Anna > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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, reproducible code. From joda2457 at student.uu.se Tue Feb 1 13:38:11 2011 From: joda2457 at student.uu.se (Joel) Date: Tue, 1 Feb 2011 04:38:11 -0800 (PST) Subject: [R] Rserve In-Reply-To: <1296561859129-3251032.post@n4.nabble.com> References: <1296561859129-3251032.post@n4.nabble.com> Message-ID: <1296563891897-3251138.post@n4.nabble.com> Can add that if it dossent split up the processes by default is there anyway I can do it by myself? //Joel -- View this message in context: http://r.789695.n4.nabble.com/Rserve-tp3251032p3251138.html Sent from the R help mailing list archive at Nabble.com. From r.user.spain at gmail.com Tue Feb 1 14:09:59 2011 From: r.user.spain at gmail.com (Usuario R) Date: Tue, 1 Feb 2011 14:09:59 +0100 Subject: [R] Subset of Data Frame using the date Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From wwwhsd at gmail.com Tue Feb 1 14:13:31 2011 From: wwwhsd at gmail.com (Henrique Dallazuanna) Date: Tue, 1 Feb 2011 11:13:31 -0200 Subject: [R] Subset of Data Frame using the date In-Reply-To: References: Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From r.m.krug at gmail.com Tue Feb 1 14:26:24 2011 From: r.m.krug at gmail.com (Rainer M Krug) Date: Tue, 01 Feb 2011 14:26:24 +0100 Subject: [R] SOLVED: How to change size of xlab inplot? In-Reply-To: References: <4D47D2D8.6080408@gmail.com> Message-ID: <4D480A00.10502@gmail.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 02/01/2011 12:12 PM, Henrique Dallazuanna wrote: > Try cex.lab: > > plot(1,1, xlab="Label", cex.lab = 2) Thanks - that is what I was looking for. Cheers, Rainer > > On Tue, Feb 1, 2011 at 7:31 AM, Rainer M Krug > wrote: > > Hi > > I want to increase the size of the text for xlab in the plot command: > > plot(1,1, xlab="Label") > > I tried cex, cex.caption and others, but none worked. Is there a way of > using cex=2 for the xlab? > > Thanks, > > Rainer > > ______________________________________________ R-help at 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, reproducible code. > -- > Henrique Dallazuanna > Curitiba-Paran?-Brasil > 25? 25' 40" S 49? 16' 22" O - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel: +33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: Rainer at krugs.de Skype: RMkrug -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk1ICgAACgkQoYgNqgF2egoqtQCfevifpfHcIbJ4bWYH3cR48LRV T0wAn11xzK13E3UAgWtk9bmfTIYWxMkt =olNC -----END PGP SIGNATURE----- From alcesgabbo at hotmail.com Tue Feb 1 10:52:19 2011 From: alcesgabbo at hotmail.com (alcesgabbo) Date: Tue, 1 Feb 2011 01:52:19 -0800 (PST) Subject: [R] multi-Operations on a matrix Message-ID: <1296553939722-3250807.post@n4.nabble.com> Hello everybody. I have this object procedure property sensor_data sensor_date 1 S_10 nord 626821.0 2002-09-30T00:00:00+0200 2 S_10 nord 626821.0 2002-12-05T00:00:00+0100 3 S_10 nord 626821.1 2008-07-31T00:00:00+0200 4 S_1000 nord 626496.8 2002-09-30T00:00:00+0200 5 S_1000 nord 626496.8 2002-12-05T00:00:00+0100 6 S_1000 nord 626496.9 2009-04-23T00:00:00+0200 7 S_1000 nord 626497.0 2009-11-10T00:00:00+0100 8 S_1 nord 626485.3 2002-09-30T00:00:00+0200 9 S_1 nord 626485.3 2002-12-05T00:00:00+0100 10 S_1 nord 626485.3 2003-02-07T00:00:00+0100 the third colomn (sensor_data) is a distance in meters. each distance has a date (sensor_date) for each row I would like to find the difference from the first distance (with the min date) and the distance. I know it's difficult to understand.. I give you an example: for the first procedure S_10 I should find the first distance based on the date: distance: 626821.0 with the date: 2002-09-30T00:00:00+0200 then I should do the difference between the current distance and the first distance: 626821.0 - 626821.0 = 0.0 626821.0 - 626821.0 = 0.0 626821.1 - 626821.0 = 0.1 Then I should do this also for the other procedures. I would like a resut like this: procedure property sensor_data sensor_date difference 1 S_10 nord 626821.0 2002-09-30T00:00:00+0200 0.0 2 S_10 nord 626821.0 2002-12-05T00:00:00+0100 0.0 3 S_10 nord 626821.1 2008-07-31T00:00:00+0200 0.1 4 S_1000 nord 626496.8 2002-09-30T00:00:00+0200 0.0 5 S_1000 nord 626496.8 2002-12-05T00:00:00+0100 0.0 6 S_1000 nord 626496.9 2009-04-23T00:00:00+0200 0.1 7 S_1000 nord 626497.0 2009-11-10T00:00:00+0100 0.2 8 S_1 nord 626485.3 2002-09-30T00:00:00+0200 0.0 9 S_1 nord 626485.3 2002-12-05T00:00:00+0100 0.0 10 S_1 nord 626485.3 2003-02-07T00:00:00+0100 0.0 How can I do this procedure????? Thanks -- View this message in context: http://r.789695.n4.nabble.com/multi-Operations-on-a-matrix-tp3250807p3250807.html Sent from the R help mailing list archive at Nabble.com. From daniel.vecchiato at unipd.it Tue Feb 1 12:22:06 2011 From: daniel.vecchiato at unipd.it (Daniel Vecchiato) Date: Tue, 1 Feb 2011 12:22:06 +0100 Subject: [R] Latent Class Logit Models in discrete choice experiments In-Reply-To: References: Message-ID: <33CFA8CC-4730-4CCD-9194-7101F1F70ADC@unipd.it> Thanks to all for your answers! The ppt file should be here: http://bit.ly/gi15gh I also uploaded some model specifications and the results I want to replicate + the random dataset (long format) I'm using. The zip file is here: https://docs.google.com/leaf?id=0B09M2qtL2eXjNmE3ZGM4NGQtZjE4Ny00NmQzLWI3ZTEtZjYxZjI1NTM1ZGQw&hl=en Basically, I have 400 respondents. Each respondent faces 4 choice scenarios, and in each scenario he chooses among 3 option. Each option is characterized by 4 attributes (3 categorical [attr_1, attr_2 and attr_3], and 1 continuos [cost]) The respondent choice depends by the option characteristics (conditional to the characteristics of the other options in the same set) + the respondent socioeconomics. Daniel From peltokyla at gmail.com Tue Feb 1 10:56:55 2011 From: peltokyla at gmail.com (Titta) Date: Tue, 1 Feb 2011 11:56:55 +0200 Subject: [R] Problems with sample means and standard deviations Message-ID: An embedded and charset-unspecified text was scrubbed... Name: ei saatavilla URL: From savicky at praha1.ff.cuni.cz Tue Feb 1 12:04:21 2011 From: savicky at praha1.ff.cuni.cz (Petr Savicky) Date: Tue, 1 Feb 2011 12:04:21 +0100 Subject: [R] Scatterplot Question In-Reply-To: References: Message-ID: <20110201110421.GA15703@praha1.ff.cuni.cz> On Tue, Feb 01, 2011 at 10:51:12PM +1300, Surrey Jackson wrote: > Hello, > > I have some data where a number of events (the total amount varies) > occur at cumulating times, I would like to create a scatterplot > (easily achieved using plot etc) of these events (the events can > either be times using poxist or I can convert them into just seconds > which is probably easier to work with), however I would like the > events/times to re-begin plotting every 10th occurrence and start > being plotted again from 0 on the Y axis. The result would be a > scatte rplot that looks like it has lots of ups and downs in it, as > opposed to one that just keeps on going on up and up and up. This > would allow me to compare the time of the events across multiple > sessions of data. > > Now I can create a scatterplot of the first 10 occurrences and then > minus the 10th time from the next 10 occurrences so the times will be > plotted correctly on the Y axis. However I can't make them plot in > the 11:20 slot. > > I have read all the help files for plot, dotchart etc and can't figure it out. > > I am after an elegant solution as I have many hundreds of data files > that I will need to do this for and I have been creating all my other > graphs and doing other anaylsis using a loop and all the files have > varying numbers of events to be plotted. Hello. I think that a transformation of the data before the plot can be used. Below, i suggest a solution, where the y-values at indices 1, 10, 20, ... are subtracted. So, also the first interval is plotted relatively to its starting value. I am not sure, whether this is suitable for your application. # create an irregularly increasing sequence n <- 33 y <- cumsum(runif(n)) plot(y) # restarting indices ind <- 1:n - (1:n) %% 10 ind[ind == 0] <- 1 plot(y - y[ind]) Is this close to what you want? If not, then i suggest to send the loop solution as a part of the description. Petr Savicky. From jthetzel at gmail.com Tue Feb 1 12:31:38 2011 From: jthetzel at gmail.com (jthetzel) Date: Tue, 1 Feb 2011 03:31:38 -0800 (PST) Subject: [R] How to change size of xlab inplot? In-Reply-To: <4D47D2D8.6080408@gmail.com> References: <4D47D2D8.6080408@gmail.com> Message-ID: <1296559898701-3250960.post@n4.nabble.com> Rainer, Take a look at this thread: http://www.mail-archive.com/r-help at r-project.org/msg64936.html Jeremy Jeremy Hetzel Boston University -- View this message in context: http://r.789695.n4.nabble.com/How-to-change-size-of-xlab-inplot-tp3250762p3250960.html Sent from the R help mailing list archive at Nabble.com. From E.Vettorazzi at uke.uni-hamburg.de Tue Feb 1 14:37:48 2011 From: E.Vettorazzi at uke.uni-hamburg.de (Eik Vettorazzi) Date: Tue, 01 Feb 2011 14:37:48 +0100 Subject: [R] Working with additional input for user defined function In-Reply-To: <010301cbc1fa$e68965a0$b39c30e0$@gmail.com> References: <010301cbc1fa$e68965a0$b39c30e0$@gmail.com> Message-ID: <4D480CAC.3050601@uke.uni-hamburg.de> Hi Christofer, just have a look at how other functions deal with this, e.g. > plot function (x, y, ...) { #*snip* hasylab <- function(...) !all(is.na(pmatch(names(list(...)), "ylab"))) #*snip* got it? cheers Am 01.02.2011 11:29, schrieb Bogaso Christofer: > Hi all, suppose I have following user defined function: > > > > fn1 = function(x, y, ...) { > > z <- x+y; u=y^2 > > # if something with name "add" exists in the > function argument then do some calculation and return that calculated value, > NOT z > > # if NOT then return z > > return(z) > > } > > > > As you see in the function definition, I put open space " '.' syntax " , so > that user can put additional argument. However here what I want to do is, if > user have additional input then above function would do some ***special > calculation*** and return that value. > > > > How can I accomplice that? > > > > Thanks and regards, > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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, reproducible code. -- Eik Vettorazzi Institut f?r Medizinische Biometrie und Epidemiologie Universit?tsklinikum Hamburg-Eppendorf Martinistr. 52 20246 Hamburg T ++49/40/7410-58243 F ++49/40/7410-57790 From wwwhsd at gmail.com Tue Feb 1 14:44:58 2011 From: wwwhsd at gmail.com (Henrique Dallazuanna) Date: Tue, 1 Feb 2011 11:44:58 -0200 Subject: [R] Problems with sample means and standard deviations In-Reply-To: References: Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From joda2457 at student.uu.se Tue Feb 1 15:27:32 2011 From: joda2457 at student.uu.se (Joel) Date: Tue, 1 Feb 2011 06:27:32 -0800 (PST) Subject: [R] Hidden variables Message-ID: <1296570452928-3251588.post@n4.nabble.com> Hi Im trying to make a package in R just to learn how it works. One thing I dont manage to do is to make a hidden environment or variable so to say. I want a "hash list" that I create my useing: TestEnv<-new.env() assign("Key1","Ans1",envir=TestEnv) assign("Key2","Ans2",envir=TestEnv) Then I just have this function to try it: TestFunc<- function(Key, ...) UseMethod("TestFunc") TestFunc.default <- function(Key,...){ Ans<-get(Key, envir=TestEnv) print(Ans) } But when I load this package I can access the TestEnv by just typing TestEnv, but I want this one hidden so that you only can get the "Ans" from the "Key" via the TestFunc. Thx for the help Joel -- View this message in context: http://r.789695.n4.nabble.com/Hidden-variables-tp3251588p3251588.html Sent from the R help mailing list archive at Nabble.com. From mark.heckmann at gmx.de Tue Feb 1 15:39:11 2011 From: mark.heckmann at gmx.de (Mark Heckmann) Date: Tue, 01 Feb 2011 15:39:11 +0100 Subject: [R] Finding non-ASCII characters in R code using R Message-ID: <20110201143911.143630@gmx.net> During R CMD check I get the following note: * checking data for non-ASCII characters ... NOTE Note: found 9 marked UTF-8 string(s) How can I search my code files for non ASCII chars using R? Thanks, Mark -- Mark Heckmann (Dipl. Wirt.-Ing.) phone +49 (0) 421/1614618 Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de From ptit_bleu at yahoo.fr Tue Feb 1 14:47:17 2011 From: ptit_bleu at yahoo.fr (PtitBleu) Date: Tue, 1 Feb 2011 05:47:17 -0800 (PST) Subject: [R] sqlsave and mysql database with autoincremental column Message-ID: <1296568037168-3251425.post@n4.nabble.com> Hello, I'm trying to modify my r-script to use RODBC instead of DBI/RMySQL (no more ready-to-use package for windows). I would like to copy a data.frame of 44 columns to a table of 45 columns (the 45th is an autoincremental column). With the following commands, colnames(df)<- a vector with the names of the 44 columns ch<-odbcDriverConnect(connection="SERVER=localhost;DRIVER=MySQL ODBC 5.1 Driver;DATABASE=my_db;UID=usercount;PWD=my_pwd;case=tolower") sqlSave(ch,my_df, "my_table", append = TRUE, rownames = FALSE, fast=FALSE) odbcClose(ch) I got the following message (in french, sorry): Erreur dans dimnames(x) <- dn : la longueur de 'dimnames' [2] n'est pas ?gale ? l'?tendue du tableau It means something like: the length of 'dimnames' [2] is not equal to the array extent If I do the same with a table with only 44 columns, without the autoincremental column, it works ... but I need this last column. Could you please help me to modify my commands so that I can copy 44-columns data.frame to the 45-columns MySQL table ? Thanks in advance, Ptit Bleu. -- View this message in context: http://r.789695.n4.nabble.com/sqlsave-and-mysql-database-with-autoincremental-column-tp3251425p3251425.html Sent from the R help mailing list archive at Nabble.com. From michaellancee at gmail.com Tue Feb 1 14:49:10 2011 From: michaellancee at gmail.com (mlancee) Date: Tue, 1 Feb 2011 05:49:10 -0800 (PST) Subject: [R] Comparing decimal numbers Message-ID: <1296568150758-3251437.post@n4.nabble.com> Hi, I have a seemingly easy question that has been keeping be busy for quite a while. The problem is the following: 0.1 + 0.1 + 0.1 == 0.3 [1] FALSE Why is this false? Another example is 0.2 + 0.1 == 0.3 [1] FALSE or 0.25 + 0.05 == 0.20 + 0.10 [1] FALSE However, I do get TRUE if I use integers, or for example the following 0.1 + 0.1 == 0.2 [1] TRUE It is probably something very basic, but I did not manage to find the answer. Thanks, Michael -- View this message in context: http://r.789695.n4.nabble.com/Comparing-decimal-numbers-tp3251437p3251437.html Sent from the R help mailing list archive at Nabble.com. From jonathan_knibb at hotmail.com Tue Feb 1 15:04:50 2011 From: jonathan_knibb at hotmail.com (Jonathan Knibb) Date: Tue, 1 Feb 2011 14:04:50 +0000 Subject: [R] better way to iterate matrix multiplication? Message-ID: I'm simulating a Markov process using a vector of proportions. Each value in the vector represents the proportion of the population who are in a particular state (so the vector sums to 1). I have a square matrix of transition probabilities, and for each tick of the Markov clock the vector is multiplied by the transition matrix. To illustrate the sort of thing I mean: pm <- c(0.5,0.5,0) # half of cases start in state 1, half in state 2 tm <- matrix(runif(9),nrow=3) # random transition matrix for illustration tm <- t(apply(tm,1,function (x) x/sum(x))) # make its rows sum to 1 total.months = 10 for(month in 1:total.months) {pm <- pm %*% tm} # slow! pm # now contains the proportion of cases in each state after 10 months My question is: is there a quicker, more R-idiomatic way of doing it, avoiding 'for'? I've been trying to use apply() to fill a matrix with the vectors, but I can't get this to act iteratively. Suggestions gratefully received! From ivanpatt at RADFORD.EDU Tue Feb 1 15:52:02 2011 From: ivanpatt at RADFORD.EDU (Van Patten, Isaac T) Date: Tue, 1 Feb 2011 09:52:02 -0500 Subject: [R] dotchart {graphics} 2.11.1 vs. 2.12.1 Message-ID: <71247479631715408F1886722FA393A88C917AF1AF@MLEXCM01.RADFORD.EDU> I have a factor vector of subject races (Asian, Black, Hispanic, White; n=30) that I want to plot with a Cleveland dotplot or dotchart. I tried the following in R2.12.1 : > dotchart(table(school$Race)) Error in plot.xy(xy.coords(x, y), type = type, ...) : invalid plot type Using the same data set in R2.11.1 the operation succeeded (I tried several variations to be sure): > dotchart(table(school$Race)) > race2<-table(school$Race) > dotchart(race2) > dotchart(race2, pch=17,col="red") Each of these worked in 2.11.1 but not in 2.12.1; What changed in the {graphics} package to alter this and is there a work-around? Isaac T. Van Patten, Ph.D. Professor of Criminal Justice 307 Adams Street, Office 1A Box 6934, Radford University Radford, VA 24142 (540)831-6737 ivanpatt at radford.edu http://ivanpatt.asp.radford.edu It doesn't matter how beautiful your theory is; It doesn't matter how smart you are; If it doesn't agree with the [data], its wrong. -Richard Feynman From jwiley.psych at gmail.com Tue Feb 1 16:09:52 2011 From: jwiley.psych at gmail.com (Joshua Wiley) Date: Tue, 1 Feb 2011 07:09:52 -0800 Subject: [R] dotchart {graphics} 2.11.1 vs. 2.12.1 In-Reply-To: <71247479631715408F1886722FA393A88C917AF1AF@MLEXCM01.RADFORD.EDU> References: <71247479631715408F1886722FA393A88C917AF1AF@MLEXCM01.RADFORD.EDU> Message-ID: Hi, Its a bit messy, but here is a quick work around: dotchart(as.matrix(table(infert$education))[,1]) I wonder if this has something to do with the addition of table methods for points() and lines(). I'll post back if I find anything more out. Cheers, Josh On Tue, Feb 1, 2011 at 6:52 AM, Van Patten, Isaac T wrote: > I have a factor vector of subject races (Asian, Black, Hispanic, White; n=30) that I want to plot with a Cleveland dotplot or dotchart. > > I tried the following in R2.12.1 : > >> dotchart(table(school$Race)) > Error in plot.xy(xy.coords(x, y), type = type, ...) : invalid plot type > > Using the same data set in R2.11.1 the operation succeeded (I tried several variations to be sure): > >> dotchart(table(school$Race)) >> race2<-table(school$Race) >> dotchart(race2) >> dotchart(race2, pch=17,col="red") > > Each of these worked in 2.11.1 but not in 2.12.1; ?What changed in the {graphics} package to alter this and is there a work-around? > > Isaac T. Van Patten, Ph.D. > Professor of Criminal Justice > 307 Adams Street, Office 1A > Box 6934, Radford University > Radford, VA 24142 > (540)831-6737 > ivanpatt at radford.edu > http://ivanpatt.asp.radford.edu > It doesn't matter how beautiful your theory is; > It doesn't matter how smart you are; > If it doesn't agree with the [data], its wrong. > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?-Richard Feynman > > ______________________________________________ > R-help at 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, reproducible code. > -- Joshua Wiley Ph.D. Student, Health Psychology University of California, Los Angeles http://www.joshuawiley.com/ From marchywka at hotmail.com Tue Feb 1 16:10:15 2011 From: marchywka at hotmail.com (Mike Marchywka) Date: Tue, 1 Feb 2011 10:10:15 -0500 Subject: [R] general question on approaches to getting data from data providers Message-ID: My question, buried in this rant, is " is there a mail list or other means for identifying sites with information likely to be important to many R users but the data is difficult to obtain due to the site's choice of technology?" Quite often, people here ask questions about scraping html to get various types of "public" information ( public being a bit debatable when information is buried in formatting junk). At least in one case,? I think it was something financial, I noted that R has packages with large components dedicated to scraping data from both gov and com sources but there is no indication that they are working with cooperative groups on the other side of the information fence. This morning, I tried to contact the census.gov webmaster after noting that all their data is in xls when in fact csv would probably be more appropriate for the data they have- I can open csv easily in notepad LOL. Then of course they point you to a certain company that makes a product to read this stuff. Is there a different list or general community that has a charter for discussing ways to get computer readable data from "data" providers? There are many websites that create other things, like fancy PDF graphics, that obliterate data or try to lock you into one commercial or proprietary or limited tool chain for data analysis. Thanks. From E.Vettorazzi at uke.uni-hamburg.de Tue Feb 1 16:11:41 2011 From: E.Vettorazzi at uke.uni-hamburg.de (Eik Vettorazzi) Date: Tue, 01 Feb 2011 16:11:41 +0100 Subject: [R] Comparing decimal numbers In-Reply-To: <1296568150758-3251437.post@n4.nabble.com> References: <1296568150758-3251437.post@n4.nabble.com> Message-ID: <4D4822AD.2030302@uke.uni-hamburg.de> Hi Michael, this is R-FAQ 7.31 http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-doesn_0027t-R-think-these-numbers-are-equal_003f cheers. Am 01.02.2011 14:49, schrieb mlancee: > > Hi, > > I have a seemingly easy question that has been keeping be busy for quite a > while. The problem is the following: > > 0.1 + 0.1 + 0.1 == 0.3 > [1] FALSE > > Why is this false? Another example is > > 0.2 + 0.1 == 0.3 > [1] FALSE > > or > > 0.25 + 0.05 == 0.20 + 0.10 > [1] FALSE > > However, I do get TRUE if I use integers, or for example the following > > 0.1 + 0.1 == 0.2 > [1] TRUE > > It is probably something very basic, but I did not manage to find the > answer. > > Thanks, > Michael -- Eik Vettorazzi Institut f?r Medizinische Biometrie und Epidemiologie Universit?tsklinikum Hamburg-Eppendorf Martinistr. 52 20246 Hamburg T ++49/40/7410-58243 F ++49/40/7410-57790 From Steve_Friedman at nps.gov Tue Feb 1 16:10:10 2011 From: Steve_Friedman at nps.gov (Steve_Friedman at nps.gov) Date: Tue, 1 Feb 2011 10:10:10 -0500 Subject: [R] Setting maximum value of the legend on an image.plot and animation Message-ID: Hello, I'm doing the following: library(ncdf) library(fields) library(animation) saline <- open.ncdf("salinity_1990.nc") salt = get.var.ncdf(nc=saline, varid="Salinity") # create an animation of the complete temporal domain in the ncdf file. saveHTML({ for (i in 1:364) { image.plot(salt[, , i]) } }, img.name = "salinity.img", imgdir = "salinity_dir", htmlfile = "salinity.html", zmax = c(0, 80), autobrowse = FALSE, title = "TIME SALINITY PREDICTIONS", description = c("This should plot 1 years daily salinity predictions in Florida Bay") ) Almost all of the data sets I work with are multi-temporal spatial forms. Being able to view the time sequence is very important to us, The animation procedure is very good. I appreciate its development. Here are my questions. 1) I would like to find a procedure to set the maximum value of the legend of an image.plot. Each time step has a different maximum value, but for the animation to be valuable, I need to standardize these to a maximum such that the scale is equal in each time step. 2) Secondly, when setting imgdir it only goes to a temp directory. If I define a directory, the new directory path is added to the default temp directory path. Is there a way to fix this so that the output directory is truly defined in the saveHTML statements? I'm working on a windows XP machine using R 2.12.1. Thanks Steve Steve Friedman Ph. D. Ecologist / Spatial Statistical Analyst Everglades and Dry Tortugas National Park 950 N Krome Ave (3rd Floor) Homestead, Florida 33034 Steve_Friedman at nps.gov Office (305) 224 - 4282 Fax (305) 224 - 4147 From Martyn.Byng at nag.co.uk Tue Feb 1 16:22:25 2011 From: Martyn.Byng at nag.co.uk (Martyn Byng) Date: Tue, 1 Feb 2011 15:22:25 -0000 Subject: [R] better way to iterate matrix multiplication? References: Message-ID: <49E76DF37649DC48A4CE882BC8CE51C90183B334@nagmail2.nag.co.uk> Hi, If you only want the final matrix, i.e. in this case the pm at 10 months, then you might be better off looking at something like the square-and-multiply algorithm (http://en.wikipedia.org/wiki/Exponentiation_by_squaring) rather than a brute force multiplication. Martyn -----Original Message----- From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Jonathan Knibb Sent: 01 February 2011 14:05 To: r-help at r-project.org Subject: [R] better way to iterate matrix multiplication? I'm simulating a Markov process using a vector of proportions. Each value in the vector represents the proportion of the population who are in a particular state (so the vector sums to 1). I have a square matrix of transition probabilities, and for each tick of the Markov clock the vector is multiplied by the transition matrix. To illustrate the sort of thing I mean: pm <- c(0.5,0.5,0) # half of cases start in state 1, half in state 2 tm <- matrix(runif(9),nrow=3) # random transition matrix for illustration tm <- t(apply(tm,1,function (x) x/sum(x))) # make its rows sum to 1 total.months = 10 for(month in 1:total.months) {pm <- pm %*% tm} # slow! pm # now contains the proportion of cases in each state after 10 months My question is: is there a quicker, more R-idiomatic way of doing it, avoiding 'for'? I've been trying to use apply() to fill a matrix with the vectors, but I can't get this to act iteratively. Suggestions gratefully received! ______________________________________________ R-help at 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, reproducible code. ________________________________________________________________________ This e-mail has been scanned for all viruses by Star.\ _...{{dropped:12}} From djmuser at gmail.com Tue Feb 1 16:34:13 2011 From: djmuser at gmail.com (Dennis Murphy) Date: Tue, 1 Feb 2011 07:34:13 -0800 Subject: [R] multi-Operations on a matrix In-Reply-To: <1296553939722-3250807.post@n4.nabble.com> References: <1296553939722-3250807.post@n4.nabble.com> Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From ripley at stats.ox.ac.uk Tue Feb 1 16:57:06 2011 From: ripley at stats.ox.ac.uk (Prof Brian Ripley) Date: Tue, 1 Feb 2011 15:57:06 +0000 (GMT) Subject: [R] Finding non-ASCII characters in R code using R In-Reply-To: <20110201143911.143630@gmx.net> References: <20110201143911.143630@gmx.net> Message-ID: See 'Writing R Extensions' ... 'Function showNonASCII in package tools can help in finding non-ASCII bytes in files.' On Tue, 1 Feb 2011, Mark Heckmann wrote: > > During R CMD check I get the following note: > > * checking data for non-ASCII characters ... NOTE > Note: found 9 marked UTF-8 string(s) > > How can I search my code files for non ASCII chars using R? > > Thanks, > Mark > > -- > Mark Heckmann (Dipl. Wirt.-Ing.) > phone +49 (0) 421/1614618 > > Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir > belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de > > ______________________________________________ > R-help at 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, reproducible code. > -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 From w_chris_carleton at hotmail.com Tue Feb 1 17:01:13 2011 From: w_chris_carleton at hotmail.com (Chris Carleton) Date: Tue, 1 Feb 2011 11:01:13 -0500 Subject: [R] Rmpi; sample code not running, the slaves won't execute commands Message-ID: Hi All, I'm trying to parallelize some code using Rmpi and I've started with a sample 'hello world' program that's available at http://math.acadiau.ca/ACMMaC/Rmpi/sample.html. The code is as follows; # Load the R MPI package if it is not already loaded. if (!is.loaded("mpi_initialize")) { library("Rmpi") } # Spawn as many slaves as possible mpi.spawn.Rslaves(nslaves=3) # In case R exits unexpectedly, have it automatically clean up # resources taken up by Rmpi (slaves, memory, etc...) .Last <- function(){ if (is.loaded("mpi_initialize")){ if (mpi.comm.size(1) > 0){ print("Please use mpi.close.Rslaves() to close slaves.") mpi.close.Rslaves() } print("Please use mpi.quit() to quit R") .Call("mpi_finalize") } } # Tell all slaves to return a message identifying themselves mpi.remote.exec(paste("I am",mpi.comm.rank(),"of",mpi.comm.size())) # Tell all slaves to close down, and exit the program mpi.close.Rslaves() mpi.quit() My output is as follows; > source("./test_Rmpi.R") 3 slaves are spawned successfully. 0 failed. master (rank 0, comm 1) of size 4 is running on: minanha slave1 (rank 1, comm 1) of size 4 is running on: minanha slave2 (rank 2, comm 1) of size 4 is running on: minanha slave3 (rank 3, comm 1) of size 4 is running on: minanha While trying to parallelize one of my other functions, I found that the master seems to be sending the messages and executing its portion of the program, but the slaves are not responding. However, the slaves do seem to send the initial message to the master that they are ready to receive a job, which prompts the master to send the job. So, noticing that problem, I tried to execute the 'hello world' program above and, as you can see, the slaves are spawned, but they won't print the text in the mpi.remote.exec() function. Any ideas? Chris From E.Vettorazzi at uke.uni-hamburg.de Tue Feb 1 17:04:17 2011 From: E.Vettorazzi at uke.uni-hamburg.de (Eik Vettorazzi) Date: Tue, 01 Feb 2011 17:04:17 +0100 Subject: [R] better way to iterate matrix multiplication? In-Reply-To: References: Message-ID: <4D482F01.7010005@uke.uni-hamburg.de> if you have a homogeneous mc (= a constant transition matrix), your state at time 10 is given by (chapman-kolmogorov) p10=p0 %*% tm^(10) so you need a matrix power function. You can use the eigendecomposition and some linear algebra A^n=(VDV^{-1})^n)=VD^nV^{-1} dd<-eigen(tm,symmetric=F) as.real(p0%*% dd$vectors%*% diag(dd$values^n)%*%solve(dd$vectors)) but for your toy example, there is no difference in time consumed. hth Am 01.02.2011 15:04, schrieb Jonathan Knibb: > I'm simulating a Markov process using a vector of proportions. Each > value in the vector represents the proportion of the population who are > in a particular state (so the vector sums to 1). I have a square matrix > of transition probabilities, and for each tick of the Markov clock the > vector is multiplied by the transition matrix. > > To illustrate the sort of thing I mean: > > pm <- c(0.5,0.5,0) # half of cases start in state 1, half in state 2 > tm <- matrix(runif(9),nrow=3) # random transition matrix for illustration > tm <- t(apply(tm,1,function (x) x/sum(x))) # make its rows sum to 1 > total.months = 10 > for(month in 1:total.months) {pm <- pm %*% tm} # slow! > pm # now contains the proportion of cases in each state after 10 months > > My question is: is there a quicker, more R-idiomatic way of doing it, > avoiding 'for'? I've been trying to use apply() to fill a matrix with > the vectors, but I can't get this to act iteratively. > > Suggestions gratefully received! > > ______________________________________________ > R-help at 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, reproducible code. -- Eik Vettorazzi Institut f?r Medizinische Biometrie und Epidemiologie Universit?tsklinikum Hamburg-Eppendorf Martinistr. 52 20246 Hamburg T ++49/40/7410-58243 F ++49/40/7410-57790 From bogaso.christofer at gmail.com Tue Feb 1 17:28:57 2011 From: bogaso.christofer at gmail.com (Bogaso Christofer) Date: Tue, 1 Feb 2011 21:58:57 +0530 Subject: [R] Working with additional input for user defined function In-Reply-To: <4D480CAC.3050601@uke.uni-hamburg.de> References: <010301cbc1fa$e68965a0$b39c30e0$@gmail.com> <4D480CAC.3050601@uke.uni-hamburg.de> Message-ID: <016201cbc22d$228eeca0$67acc5e0$@gmail.com> Thanks Eik for your help. So far I am able to do following things: > fn1 = function(x, y, ...) { + x1 <- x+y + if(is.null(names(list(...)))) + res <- x1 + else + res <- get(names(list(...))) + return(res) + + } ; > fn1(-2,2) [1] 0 > fn1(-2,2, zz=3:5) Error in get(names(list(...))) : object 'zz' not found As you see, still I am far from the solution. How to pass the value of "..." for further calculation? Thanks, -----Original Message----- From: Eik Vettorazzi [mailto:E.Vettorazzi at uke.uni-hamburg.de] Sent: 01 February 2011 19:08 To: Bogaso Christofer Cc: r-help at r-project.org Subject: Re: [R] Working with additional input for user defined function Hi Christofer, just have a look at how other functions deal with this, e.g. > plot function (x, y, ...) { #*snip* hasylab <- function(...) !all(is.na(pmatch(names(list(...)), "ylab"))) #*snip* got it? cheers Am 01.02.2011 11:29, schrieb Bogaso Christofer: > Hi all, suppose I have following user defined function: > > > > fn1 = function(x, y, ...) { > > z <- x+y; u=y^2 > > # if something with name "add" exists > in the function argument then do some calculation and return that > calculated value, NOT z > > # if NOT then return z > > return(z) > > } > > > > As you see in the function definition, I put open space " '.' syntax " > , so that user can put additional argument. However here what I want > to do is, if user have additional input then above function would do > some ***special > calculation*** and return that value. > > > > How can I accomplice that? > > > > Thanks and regards, > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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, reproducible code. -- Eik Vettorazzi Institut f?r Medizinische Biometrie und Epidemiologie Universit?tsklinikum Hamburg-Eppendorf Martinistr. 52 20246 Hamburg T ++49/40/7410-58243 F ++49/40/7410-57790 From djmuser at gmail.com Tue Feb 1 17:11:48 2011 From: djmuser at gmail.com (Dennis Murphy) Date: Tue, 1 Feb 2011 08:11:48 -0800 Subject: [R] Scatterplot Question In-Reply-To: References: Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From bbolker at gmail.com Tue Feb 1 17:16:10 2011 From: bbolker at gmail.com (Ben Bolker) Date: Tue, 1 Feb 2011 16:16:10 +0000 Subject: [R] better way to iterate matrix multiplication? References: <4D482F01.7010005@uke.uni-hamburg.de> Message-ID: Eik Vettorazzi uke.uni-hamburg.de> writes: > > if you have a homogeneous mc (= a constant transition matrix), your > state at time 10 is given by (chapman-kolmogorov) > p10=p0 %*% tm^(10) > so you need a matrix power function. There are matrix exponential functions in the Matrix and expm packages ... don't know about their speed From E.Vettorazzi at uke.uni-hamburg.de Tue Feb 1 17:49:14 2011 From: E.Vettorazzi at uke.uni-hamburg.de (Eik Vettorazzi) Date: Tue, 01 Feb 2011 17:49:14 +0100 Subject: [R] Working with additional input for user defined function In-Reply-To: <016201cbc22d$228eeca0$67acc5e0$@gmail.com> References: <010301cbc1fa$e68965a0$b39c30e0$@gmail.com> <4D480CAC.3050601@uke.uni-hamburg.de> <016201cbc22d$228eeca0$67acc5e0$@gmail.com> Message-ID: <4D48398A.8020803@uke.uni-hamburg.de> almost there fn1 <- function(x, y, ...) { x1 <- x+y if(is.null(names(list(...)))) res <- x1 else { res <- list(...) #further operations on res$aa res$zz, e.g. #res<-res$zz+res$aa #or #for (a in res) { #do something #} } res } fn1(-2,2) fn1(-2,2, zz=3:5,aa=6:8) see the R-lang documentation, chapter 2.1.9. I don't know, if you are looking for specific named arguments (as 'zz' or 'aa') and neither what you want to do with the additional arguments. Am 01.02.2011 17:28, schrieb Bogaso Christofer: > Thanks Eik for your help. So far I am able to do following things: > >> fn1 = function(x, y, ...) { > + x1 <- x+y > + if(is.null(names(list(...)))) > + res <- x1 > + else > + res <- get(names(list(...))) > + return(res) > + > + } ; >> fn1(-2,2) > [1] 0 >> fn1(-2,2, zz=3:5) > Error in get(names(list(...))) : object 'zz' not found > > As you see, still I am far from the solution. How to pass the value of "..." > for further calculation? > > Thanks, > > -----Original Message----- > From: Eik Vettorazzi [mailto:E.Vettorazzi at uke.uni-hamburg.de] > Sent: 01 February 2011 19:08 > To: Bogaso Christofer > Cc: r-help at r-project.org > Subject: Re: [R] Working with additional input for user defined function > > Hi Christofer, > just have a look at how other functions deal with this, e.g. >> plot > > function (x, y, ...) > { > #*snip* > hasylab <- function(...) !all(is.na(pmatch(names(list(...)), > "ylab"))) > #*snip* > > got it? > cheers > > Am 01.02.2011 11:29, schrieb Bogaso Christofer: >> Hi all, suppose I have following user defined function: >> >> >> >> fn1 = function(x, y, ...) { >> >> z <- x+y; u=y^2 >> >> # if something with name "add" exists >> in the function argument then do some calculation and return that >> calculated value, NOT z >> >> # if NOT then return z >> >> return(z) >> >> } >> >> >> >> As you see in the function definition, I put open space " '.' syntax " >> , so that user can put additional argument. However here what I want >> to do is, if user have additional input then above function would do >> some ***special >> calculation*** and return that value. >> >> >> >> How can I accomplice that? >> >> >> >> Thanks and regards, >> >> >> [[alternative HTML version deleted]] >> >> ______________________________________________ >> R-help at 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, reproducible code. > > > -- > Eik Vettorazzi > Institut f?r Medizinische Biometrie und Epidemiologie Universit?tsklinikum > Hamburg-Eppendorf > > Martinistr. 52 > 20246 Hamburg > > T ++49/40/7410-58243 > F ++49/40/7410-57790 > -- Eik Vettorazzi Institut f?r Medizinische Biometrie und Epidemiologie Universit?tsklinikum Hamburg-Eppendorf Martinistr. 52 20246 Hamburg T ++49/40/7410-58243 F ++49/40/7410-57790 From lucsmarotta at gmail.com Tue Feb 1 17:51:03 2011 From: lucsmarotta at gmail.com (Luana Marotta) Date: Tue, 1 Feb 2011 12:51:03 -0400 Subject: [R] Lmer binomial distribution x HLM Bernoulli distribution Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From alex.smit4 at gmail.com Tue Feb 1 16:41:01 2011 From: alex.smit4 at gmail.com (Alex Smith) Date: Tue, 1 Feb 2011 15:41:01 +0000 Subject: [R] Positive Definite Matrix In-Reply-To: <4D4685D4.5090207@structuremonitoring.com> References: <2ED53BAC-07E2-47CC-8F11-DB24EBDAB382@comcast.net> <890CAE0B-7416-4048-B6BE-670DB6223755@comcast.net> <002101cbbfc5$27518eb0$75f4ac10$@mcmaster.ca> <691539EF-6F2E-4BFD-8624-3791CB85DB08@comcast.net> <0EE1D311-9A09-4630-B31D-BDF70F5C37DB@comcast.net> <4A1F26B8-6867-4B4A-90BE-0A350EE17288@comcast.net> <4D4573A2.809@structuremonitoring.com> <19782.28275.469647.790241@stat.math.ethz.ch> <4D4685D4.5090207@structuremonitoring.com> Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From megh700004 at gmail.com Tue Feb 1 16:31:44 2011 From: megh700004 at gmail.com (Megh Dal) Date: Tue, 1 Feb 2011 21:01:44 +0530 Subject: [R] Help need to define method of an s4 class Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From michaellancee at gmail.com Tue Feb 1 16:24:22 2011 From: michaellancee at gmail.com (mlancee) Date: Tue, 1 Feb 2011 07:24:22 -0800 (PST) Subject: [R] Comparing decimal numbers In-Reply-To: <4D4822AD.2030302@uke.uni-hamburg.de> References: <1296568150758-3251437.post@n4.nabble.com> <4D4822AD.2030302@uke.uni-hamburg.de> Message-ID: <1296573862746-3251804.post@n4.nabble.com> Thanks a lot! -- View this message in context: http://r.789695.n4.nabble.com/Comparing-decimal-numbers-tp3251437p3251804.html Sent from the R help mailing list archive at Nabble.com. From savicky at praha1.ff.cuni.cz Tue Feb 1 16:39:55 2011 From: savicky at praha1.ff.cuni.cz (Petr Savicky) Date: Tue, 1 Feb 2011 16:39:55 +0100 Subject: [R] Comparing decimal numbers In-Reply-To: <1296568150758-3251437.post@n4.nabble.com> References: <1296568150758-3251437.post@n4.nabble.com> Message-ID: <20110201153954.GA32396@praha1.ff.cuni.cz> On Tue, Feb 01, 2011 at 05:49:10AM -0800, mlancee wrote: > > Hi, > > I have a seemingly easy question that has been keeping be busy for quite a > while. The problem is the following: > > 0.1 + 0.1 + 0.1 == 0.3 > [1] FALSE > > Why is this false? Another example is > > 0.2 + 0.1 == 0.3 > [1] FALSE > > or > > 0.25 + 0.05 == 0.20 + 0.10 > [1] FALSE > > However, I do get TRUE if I use integers, or for example the following > > 0.1 + 0.1 == 0.2 > [1] TRUE > > It is probably something very basic, but I did not manage to find the > answer. Hi. The reason is that a number, which has a finite expansion as a decimal number, need not have a finite expansion as a binary number. Besides FAQ 7.31, see also http://rwiki.sciviews.org/doku.php?id=misc:r_accuracy for further examples and some hints. Petr Savicky. From juapin at gmail.com Tue Feb 1 16:41:09 2011 From: juapin at gmail.com (misil) Date: Tue, 1 Feb 2011 07:41:09 -0800 (PST) Subject: [R] Regression type 2, x measured with error Message-ID: <1296574869381-3251875.post@n4.nabble.com> I wanna to do a Regression type 2 or Regression with X measured with error....anybody knows how can i make it in R?? thanks! -- View this message in context: http://r.789695.n4.nabble.com/Regression-type-2-x-measured-with-error-tp3251875p3251875.html Sent from the R help mailing list archive at Nabble.com. From Stephan.Kolassa at gmx.de Tue Feb 1 18:02:06 2011 From: Stephan.Kolassa at gmx.de (Stephan Kolassa) Date: Tue, 01 Feb 2011 18:02:06 +0100 Subject: [R] Comparing decimal numbers In-Reply-To: <1296568150758-3251437.post@n4.nabble.com> References: <1296568150758-3251437.post@n4.nabble.com> Message-ID: <4D483C8E.1070702@gmx.de> Hi, this is R FAQ 7.31. http://cran.r-project.org/doc/FAQ/R-FAQ.html HTH, Stephan Am 01.02.2011 14:49, schrieb mlancee: > > Hi, > > I have a seemingly easy question that has been keeping be busy for quite a > while. The problem is the following: > > 0.1 + 0.1 + 0.1 == 0.3 > [1] FALSE > > Why is this false? Another example is > > 0.2 + 0.1 == 0.3 > [1] FALSE > > or > > 0.25 + 0.05 == 0.20 + 0.10 > [1] FALSE > > However, I do get TRUE if I use integers, or for example the following > > 0.1 + 0.1 == 0.2 > [1] TRUE > > It is probably something very basic, but I did not manage to find the > answer. > > Thanks, > Michael From E.Vettorazzi at uke.uni-hamburg.de Tue Feb 1 18:02:42 2011 From: E.Vettorazzi at uke.uni-hamburg.de (Eik Vettorazzi) Date: Tue, 1 Feb 2011 18:02:42 +0100 Subject: [R] better way to iterate matrix multiplication? In-Reply-To: References: <4D482F01.7010005@uke.uni-hamburg.de> Message-ID: <4D483CB2.4090505@uke.uni-hamburg.de> yes there are. But Christofer doesn't need exp(A), but A^n. But there is a matpow-function %^% in this package, which is a little bit slower, I think: library(expm) states<-1000 tm <- matrix(runif(states^2),nrow=states) # random transition matrix for illustration tm <- t(apply(tm,1,function (x) x/sum(x))) # make its rows sum to 1 p0<-pm <- c(0.5,0.5,rep(0,states-2)) # half of cases start in state 1, half in state 2 n<-10000 system.time({dd<-eigen(tm,symmetric=F) as.real(p0%*% dd$vectors%*% diag(dd$values^n)%*%solve(dd$vectors))}) User System elapsed 15.20 0.09 15.57 system.time(p0%*%(tm%^%n)) User System elapsed 38.61 0.00 39.62 Am 01.02.2011 17:16, schrieb Ben Bolker: > Eik Vettorazzi uke.uni-hamburg.de> writes: > >> >> if you have a homogeneous mc (= a constant transition matrix), your >> state at time 10 is given by (chapman-kolmogorov) >> p10=p0 %*% tm^(10) >> so you need a matrix power function. > > There are matrix exponential functions in the Matrix and expm > packages ... don't know about their speed > > ______________________________________________ > R-help at 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, reproducible code. -- Eik Vettorazzi Institut f?r Medizinische Biometrie und Epidemiologie Universit?tsklinikum Hamburg-Eppendorf Martinistr. 52 20246 Hamburg T ++49/40/7410-58243 F ++49/40/7410-57790 From recsa at channing.harvard.edu Tue Feb 1 17:08:13 2011 From: recsa at channing.harvard.edu (Christopher Anderson) Date: Tue, 1 Feb 2011 11:08:13 -0500 Subject: [R] Fitting ELISA measurements "unknowns" to 4 parameter logistic model Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From ehlers at ucalgary.ca Tue Feb 1 18:23:24 2011 From: ehlers at ucalgary.ca (Peter Ehlers) Date: Tue, 01 Feb 2011 09:23:24 -0800 Subject: [R] dotchart {graphics} 2.11.1 vs. 2.12.1 In-Reply-To: References: <71247479631715408F1886722FA393A88C917AF1AF@MLEXCM01.RADFORD.EDU> Message-ID: <4D48418C.2000902@ucalgary.ca> On 2011-02-01 07:09, Joshua Wiley wrote: > Hi, > > Its a bit messy, but here is a quick work around: > > dotchart(as.matrix(table(infert$education))[,1]) > > I wonder if this has something to do with the addition of table > methods for points() and lines(). I'll post back if I find anything > more out. Will this suffice: dotchart(c(table(infert$education))) Peter Ehlers > > > Cheers, > > Josh > > On Tue, Feb 1, 2011 at 6:52 AM, Van Patten, Isaac T > wrote: >> I have a factor vector of subject races (Asian, Black, Hispanic, White; n=30) that I want to plot with a Cleveland dotplot or dotchart. >> >> I tried the following in R2.12.1 : >> >>> dotchart(table(school$Race)) >> Error in plot.xy(xy.coords(x, y), type = type, ...) : invalid plot type >> >> Using the same data set in R2.11.1 the operation succeeded (I tried several variations to be sure): >> >>> dotchart(table(school$Race)) >>> race2<-table(school$Race) >>> dotchart(race2) >>> dotchart(race2, pch=17,col="red") >> >> Each of these worked in 2.11.1 but not in 2.12.1; What changed in the {graphics} package to alter this and is there a work-around? >> >> Isaac T. Van Patten, Ph.D. >> Professor of Criminal Justice >> 307 Adams Street, Office 1A >> Box 6934, Radford University >> Radford, VA 24142 >> (540)831-6737 >> ivanpatt at radford.edu >> http://ivanpatt.asp.radford.edu >> It doesn't matter how beautiful your theory is; >> It doesn't matter how smart you are; >> If it doesn't agree with the [data], its wrong. >> -Richard Feynman >> >> ______________________________________________ >> R-help at 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, reproducible code. >> > > > From maechler at stat.math.ethz.ch Tue Feb 1 18:25:17 2011 From: maechler at stat.math.ethz.ch (Martin Maechler) Date: Tue, 1 Feb 2011 18:25:17 +0100 Subject: [R] better way to iterate matrix multiplication? In-Reply-To: <4D483CB2.4090505@uke.uni-hamburg.de> References: <4D482F01.7010005@uke.uni-hamburg.de> <4D483CB2.4090505@uke.uni-hamburg.de> Message-ID: <19784.16893.29834.488834@stat.math.ethz.ch> >>>>> "EV" == Eik Vettorazzi >>>>> on Tue, 1 Feb 2011 18:02:42 +0100 writes: EV> yes there are. But Christofer doesn't need exp(A), but EV> A^n. EV> But there is a matpow-function %^% in this package, which is a little EV> bit slower, I think: EV> library(expm) EV> states<-1000 EV> tm <- matrix(runif(states^2),nrow=states) # random transition matrix EV> for illustration EV> tm <- t(apply(tm,1,function (x) x/sum(x))) # make its rows sum to 1 EV> p0<-pm <- c(0.5,0.5,rep(0,states-2)) # half of cases start in state 1, EV> half in state 2 EV> n<-10000 EV> system.time({dd<-eigen(tm,symmetric=F) EV> as.real(p0%*% dd$vectors%*% diag(dd$values^n)%*%solve(dd$vectors))}) EV> User System elapsed EV> 15.20 0.09 15.57 EV> system.time(p0%*%(tm%^%n)) EV> User System elapsed EV> 38.61 0.00 39.62 Indeed, thank you for doing the experiment. Note however that the eigen() method is only available in *some* cases for the matrix power, e.g. only when the matrix is non-singular, whereas the `%^%` in package expm should work reliably in all cases. Also for (much) smaller powers than n=10'000 the cpu time needed is more comparable. Martin Maechler, ETH Zurich EV> Am 01.02.2011 17:16, schrieb Ben Bolker: >> Eik Vettorazzi uke.uni-hamburg.de> writes: >> >>> >>> if you have a homogeneous mc (= a constant transition matrix), your >>> state at time 10 is given by (chapman-kolmogorov) >>> p10=p0 %*% tm^(10) >>> so you need a matrix power function. >> >> There are matrix exponential functions in the Matrix and expm >> packages ... don't know about their speed EV> -- EV> Eik Vettorazzi EV> Institut f?r Medizinische Biometrie und Epidemiologie EV> Universit?tsklinikum Hamburg-Eppendorf EV> Martinistr. 52 EV> 20246 Hamburg EV> T ++49/40/7410-58243 EV> F ++49/40/7410-57790 From dwinsemius at comcast.net Tue Feb 1 18:31:34 2011 From: dwinsemius at comcast.net (David Winsemius) Date: Tue, 1 Feb 2011 12:31:34 -0500 Subject: [R] Regression type 2, x measured with error In-Reply-To: <1296574869381-3251875.post@n4.nabble.com> References: <1296574869381-3251875.post@n4.nabble.com> Message-ID: On Feb 1, 2011, at 10:41 AM, misil wrote: > > I wanna to do a Regression type 2 or Regression with X measured with > error....anybody knows how can i make it in R?? > thanks! There are several prior posts in the archives ... although perhaps not the Nabble archives since they start throwing away stuff after about a year. Search on "orthogonal regression", "total least sqaures regression" or "Deming regression". David Winsemius, MD West Hartford, CT From djmuser at gmail.com Tue Feb 1 18:34:39 2011 From: djmuser at gmail.com (Dennis Murphy) Date: Tue, 1 Feb 2011 09:34:39 -0800 Subject: [R] Problems with sample means and standard deviations In-Reply-To: References: Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From dwinsemius at comcast.net Tue Feb 1 18:42:41 2011 From: dwinsemius at comcast.net (David Winsemius) Date: Tue, 1 Feb 2011 12:42:41 -0500 Subject: [R] Fitting ELISA measurements "unknowns" to 4 parameter logistic model In-Reply-To: References: Message-ID: On Feb 1, 2011, at 11:08 AM, Christopher Anderson wrote: > Hello, > > I am trying to fit my Elisa results (absorbance readings) to a > standard > curve. To create the standard curve model, I performed a 4-parameter > logistic fit using the 'drc' package (ExpectedConc~Absorbance). This > gave me > the following: >> FourP > > A 'drc' model. > > Call: > drm(formula = Response ~ Expected, data = SC, fct = LL.4()) > > Coefficients: > b:(Intercept) c:(Intercept) d:(Intercept) e:(Intercept) > 1.336 6.236 85.521 59.598 > >> summary(FourP) > > Model fitted: Log-logistic (ED50 as parameter) (4 parms) > > Parameter estimates: > > Estimate Std. Error t-value p-value > b:(Intercept) 1.33596 0.15861 8.42309 0.0011 > c:(Intercept) 6.23557 3.18629 1.95700 0.1220 > d:(Intercept) 85.52140 2.15565 39.67313 0.0000 > e:(Intercept) 59.59835 5.18781 11.48815 0.0003 > > Residual standard error: > > 1.866876 (4 degrees of freedom) > > Now that I have the 4 parameters, how do I fit the absorbance > readings for > the analytical unknowns to the standard curve model (as to estimate > the > concentrations of my unknown analytical samples)? > I can use the argument 'predict', but this predicts absorbance given > concentrations (y given x), I need to predict concentrations give > absorbance > (x given y). > Use approxfun() to construct a curve using the predict() values as x at reasonable intervals and the y values you used for predict. It effectively swaps the inputs to predict x from y. There is a worked example from two weeks ago in the Archives with the Subject line: "Inverse Prediction with splines" > Thanks! > Chris > David Winsemius, MD West Hartford, CT From y.jiao at ucl.ac.uk Tue Feb 1 18:42:59 2011 From: y.jiao at ucl.ac.uk (Yan Jiao) Date: Tue, 1 Feb 2011 17:42:59 -0000 Subject: [R] R string help Message-ID: <595C4E81822E244DB8853767F6A47A970383DF19@pc6-13.pogb.cancer.ucl.ac.uk> An embedded and charset-unspecified text was scrubbed... Name: not available URL: From mtmorgan at fhcrc.org Tue Feb 1 18:43:25 2011 From: mtmorgan at fhcrc.org (Martin Morgan) Date: Tue, 01 Feb 2011 09:43:25 -0800 Subject: [R] Help need to define method of an s4 class In-Reply-To: References: Message-ID: <4D48463D.5090906@fhcrc.org> On 02/01/2011 07:31 AM, Megh Dal wrote: > I need some help in defining a "print" method for my new S4 class > definition. So fer I have worked like this: > > setClass("MyClass", sealed=F, representation(slot1 = "list", #create a > new class > slot2 = "vector", > slot3 = "vector", > slot4 = "vector")) > setMethod("print", "MyClass", function(x) { #set up print method for that > cat("My Method definition.\n") > }) > newObject <- new("MyClass", slot1=list(diag(3), diag(3)), slot2="some > character", slot3="some character", slot4="some character") > print(newObject) > newObject > > Here what is happening is that, if user types "newObject" then the entire > structure of this object is displayed nakedly. I want to display the same > thing which is displayed if user type "print(newObject)". > > If someone guides me how to do that, it would be great. write a 'show' method for S4 classes, rather than 'print'. Martin > > Thanks in advance > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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, reproducible code. -- Computational Biology Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: M1-B861 Telephone: 206 667-2793 From wwwhsd at gmail.com Tue Feb 1 18:45:07 2011 From: wwwhsd at gmail.com (Henrique Dallazuanna) Date: Tue, 1 Feb 2011 15:45:07 -0200 Subject: [R] R string help In-Reply-To: <595C4E81822E244DB8853767F6A47A970383DF19@pc6-13.pogb.cancer.ucl.ac.uk> References: <595C4E81822E244DB8853767F6A47A970383DF19@pc6-13.pogb.cancer.ucl.ac.uk> Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From spector at stat.berkeley.edu Tue Feb 1 18:50:00 2011 From: spector at stat.berkeley.edu (Phil Spector) Date: Tue, 1 Feb 2011 09:50:00 -0800 (PST) Subject: [R] R string help In-Reply-To: <595C4E81822E244DB8853767F6A47A970383DF19@pc6-13.pogb.cancer.ucl.ac.uk> References: <595C4E81822E244DB8853767F6A47A970383DF19@pc6-13.pogb.cancer.ucl.ac.uk> Message-ID: Yan - Here's one way. It assumes there's exactly one set of brackets in the string, and they can be anywhere: > aaa<- "up.6.11(16)" > sub('^.*?\\((.*)\\).*$','\\1',aaa) [1] "16" - Phil Spector Statistical Computing Facility Department of Statistics UC Berkeley spector at stat.berkeley.edu On Tue, 1 Feb 2011, Yan Jiao wrote: > Dear R guru: > > > > If I got a variable > > aaa<- "up.6.11(16)" > > > > how can I extract 16 out of the bracket? > > I could use substr, e.g. > > substr(aaa, start=1, stop=2) > > [1] "up" > > > > But it needs start and stop, what if my start or stop is not fixed, I > just want the number inside the bracket, how can I achieve this? > > > > Many thanks > > > > yan > > > ********************************************************************** > This email and any files transmitted with it are confide...{{dropped:10}} > > ______________________________________________ > R-help at 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, reproducible code. > From marchywka at hotmail.com Tue Feb 1 18:25:10 2011 From: marchywka at hotmail.com (Mike Marchywka) Date: Tue, 1 Feb 2011 12:25:10 -0500 Subject: [R] Positive Definite Matrix In-Reply-To: References: , <2ED53BAC-07E2-47CC-8F11-DB24EBDAB382@comcast.net>, <890CAE0B-7416-4048-B6BE-670DB6223755@comcast.net>, <002101cbbfc5$27518eb0$75f4ac10$@mcmaster.ca>, <691539EF-6F2E-4BFD-8624-3791CB85DB08@comcast.net>, <0EE1D311-9A09-4630-B31D-BDF70F5C37DB@comcast.net>, , <4A1F26B8-6867-4B4A-90BE-0A350EE17288@comcast.net>, , , <4D4573A2.809@structuremonitoring.com>, <19782.28275.469647.790241@stat.math.ethz.ch>, <4D4685D4.5090207@structuremonitoring.com>, Message-ID: >Date: Tue, 1 Feb 2011 15:41:01 +0000 >From: alex.smit4 at gmail.com >To: spencer.graves at structuremonitoring.com >CC: r-help at r-project.org; maechler at stat.math.ethz.ch >Subject: Re: [R] Positive Definite Matrix >Hello thank you for so much input. I am afraid that I am fairly new to this and some of the material is above my understanding for the time being and I am not looking at anything very complex as you will see from the program I will include. I have been talking to a fellow colleague I am working with and have come down to this. Your input has been invaluable to me learning more about R thank you! 1.As an example, I do not wish to find a near pd matrix but I want to test wether it is pd or not so I know if I want it or not,as you will see on the program I want two outputs depending on if it is a pd and symmetric. So I have written this for one symmetric matrix and it works and one for a non symmetric one slightly changed but it doesnt work,if you could point out why this is going wrong that would be helpful. It cant compare the complex eigenvalues. [...] >2. My colleague said why dont we use the Sylvester's Criterion and test the leading minors. Would something like that work? This thread seems to have dragged on for a while, what are you trying to do? Presumably this is something other than an exercize in R. What interpretation do you have for your eignenvalue spectrum or matrix element ? Problems here could point to various features or pathologies or opportunities at various points in the analysis. From ggrothendieck at gmail.com Tue Feb 1 19:14:27 2011 From: ggrothendieck at gmail.com (Gabor Grothendieck) Date: Tue, 1 Feb 2011 13:14:27 -0500 Subject: [R] R string help In-Reply-To: <595C4E81822E244DB8853767F6A47A970383DF19@pc6-13.pogb.cancer.ucl.ac.uk> References: <595C4E81822E244DB8853767F6A47A970383DF19@pc6-13.pogb.cancer.ucl.ac.uk> Message-ID: On Tue, Feb 1, 2011 at 12:42 PM, Yan Jiao wrote: > Dear R guru: > > > > If I got a variable > > aaa<- "up.6.11(16)" > > > > how can I extract 16 out of the bracket? > > I could use substr, e.g. > > substr(aaa, start=1, stop=2) > > [1] "up" > > > > But it needs start and stop, what if my start or stop is not fixed, I > just want the number inside the bracket, how can I achieve this? > strapply in gsubfn is intended for that type of problem. 1. The regular expression matches an open parenthesis "\\(" any string ".*" and then a close parenthesis "\\)" sending the portion within unescaped parentheses (...) to the as.numeric function. > library(gsubfn) > aaa<- "up.6.11(16)" > strapply(aaa, "\\((.*)\\)", as.numeric, simplify = TRUE) [1] 16 2. If you knew it was at the end then the simpler regular expression "(\\d+).$" would also work > strapply(aaa, "(\\d+).$", as.numeric, simplify = TRUE) [1] 16 3. or we could extract all the numbers and take the last one: > strapply(aaa, "\\d+", as.numeric, simplify = ~ tail(x, 1)) [1] 16 See: http://gsubfn.googlecode.com -- Statistics & Software Consulting GKX Group, GKX Associates Inc. tel: 1-877-GKX-GROUP email: ggrothendieck at gmail.com From alex.smit4 at gmail.com Tue Feb 1 19:20:41 2011 From: alex.smit4 at gmail.com (Alex Smith) Date: Tue, 1 Feb 2011 18:20:41 +0000 Subject: [R] Positive Definite Matrix In-Reply-To: References: <2ED53BAC-07E2-47CC-8F11-DB24EBDAB382@comcast.net> <890CAE0B-7416-4048-B6BE-670DB6223755@comcast.net> <002101cbbfc5$27518eb0$75f4ac10$@mcmaster.ca> <691539EF-6F2E-4BFD-8624-3791CB85DB08@comcast.net> <0EE1D311-9A09-4630-B31D-BDF70F5C37DB@comcast.net> <4A1F26B8-6867-4B4A-90BE-0A350EE17288@comcast.net> <4D4573A2.809@structuremonitoring.com> <19782.28275.469647.790241@stat.math.ethz.ch> <4D4685D4.5090207@structuremonitoring.com> Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From kjetilbrinchmannhalvorsen at gmail.com Tue Feb 1 19:34:00 2011 From: kjetilbrinchmannhalvorsen at gmail.com (Kjetil Halvorsen) Date: Tue, 1 Feb 2011 15:34:00 -0300 Subject: [R] Positive Definite Matrix In-Reply-To: References: <2ED53BAC-07E2-47CC-8F11-DB24EBDAB382@comcast.net> <890CAE0B-7416-4048-B6BE-670DB6223755@comcast.net> <002101cbbfc5$27518eb0$75f4ac10$@mcmaster.ca> <691539EF-6F2E-4BFD-8624-3791CB85DB08@comcast.net> <0EE1D311-9A09-4630-B31D-BDF70F5C37DB@comcast.net> <4A1F26B8-6867-4B4A-90BE-0A350EE17288@comcast.net> <4D4573A2.809@structuremonitoring.com> <19782.28275.469647.790241@stat.math.ethz.ch> <4D4685D4.5090207@structuremonitoring.com> Message-ID: see inline below. On Tue, Feb 1, 2011 at 2:25 PM, Mike Marchywka wrote: > > > > >>Date: Tue, 1 Feb 2011 15:41:01 +0000 >>From: alex.smit4 at gmail.com >>To: spencer.graves at structuremonitoring.com >>CC: r-help at r-project.org; maechler at stat.math.ethz.ch >>Subject: Re: [R] Positive Definite Matrix > > >>Hello thank you for so much input. I am afraid that I am fairly new to this > and some of the material is above my understanding for the time being and I > am not looking at anything very complex as you will see from the program I > will include. > I have been talking to a fellow colleague I am working with and have come > down to this. > Your input has been invaluable to me learning more about R thank you! > 1.As an example, I do not wish to find a near pd matrix but I want to test > wether it is pd or not so I know if I want it or not,as you will see on the > program I want two outputs depending on if it is a pd and symmetric. So I > have written this for one symmetric matrix and it works and one for a non > symmetric one slightly changed but it doesnt work,if you could point out why > this is going wrong that would be helpful. It cant compare the complex > eigenvalues. > [...] > >>2. My colleague said why dont we use the Sylvester's Criterion and test the > leading minors. Would something like that work? It would work, but it would be more work than just testing the eigenvalues! kjetil > > > This thread seems to have dragged on for a while, what are you trying to do? > Presumably this is something other than an exercize in R. > What interpretation do you have for your eignenvalue spectrum or matrix element > ? Problems here could point to various features or pathologies or > opportunities at various points in the analysis. > > > > > > ______________________________________________ > R-help at 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, reproducible code. > From bates at stat.wisc.edu Tue Feb 1 19:50:59 2011 From: bates at stat.wisc.edu (Douglas Bates) Date: Tue, 1 Feb 2011 12:50:59 -0600 Subject: [R] Lmer binomial distribution x HLM Bernoulli distribution In-Reply-To: References: Message-ID: On Tue, Feb 1, 2011 at 10:51 AM, Luana Marotta wrote: > Dear R-users, > I'm running a lmer model using the lme4 package. My dependent variable is > dichotomous and I'm using the "binomial" family. The results > are slightly different from the HLM results based on a Bernoulli > distribution. I read that a Bernoulli distribution is an extension of a > binomial distribution. Is that right? If so, how can I adapt my R model to a > Bernoulli distribution so that my R results are the same as my HLM results? Actually it's the other way around. A binomial(n, p) random variable is the sum of n independent Bernoulli(p) random variables. Alternatively, you could describe the Bernoulli(p) distribution as a special case of the binomial, the binomial(1, p) distribution. It is generally more productive to ask questions regarding lme4 and lmer on the R-SIG-Mixed-Models at R-project.org mailing list. It would help if you could make the data and the output of your model fits available so we can check on different systems. From paulteetor at yahoo.com Tue Feb 1 19:53:54 2011 From: paulteetor at yahoo.com (Paul Teetor) Date: Tue, 1 Feb 2011 12:53:54 -0600 Subject: [R] Now available: "25 Recipes for Getting Started with R" Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From billhyman1 at yahoo.com Tue Feb 1 20:01:59 2011 From: billhyman1 at yahoo.com (Bill Hyman) Date: Tue, 1 Feb 2011 11:01:59 -0800 (PST) Subject: [R] Matching patients Message-ID: <92497.51887.qm@web52803.mail.re2.yahoo.com> May I ask a clinical question? For a trial, we have a treatment group of small size, say 30 patients. We want to selectmatching control patients from a bigger group (100 patients) in terms of several clinical variables, such as age, tumor stage etc. This practice is to select the closest matching set of control cases. I wonder if R has any routine or package that can help with this problem. Thank you. Looking forward... From m at feng.li Tue Feb 1 20:27:04 2011 From: m at feng.li (Feng Li) Date: Tue, 1 Feb 2011 20:27:04 +0100 Subject: [R] kmeans: number of cluster centres must lie between 1 and nrow(x) Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From jwiley.psych at gmail.com Tue Feb 1 20:31:52 2011 From: jwiley.psych at gmail.com (Joshua Wiley) Date: Tue, 1 Feb 2011 11:31:52 -0800 Subject: [R] dotchart {graphics} 2.11.1 vs. 2.12.1 In-Reply-To: <4D48418C.2000902@ucalgary.ca> References: <71247479631715408F1886722FA393A88C917AF1AF@MLEXCM01.RADFORD.EDU> <4D48418C.2000902@ucalgary.ca> Message-ID: On Tue, Feb 1, 2011 at 9:23 AM, Peter Ehlers wrote: > Will this suffice: > > ?dotchart(c(table(infert$education))) That is probably the cleanest answer for now (I tried something like that with as.vector(), but lost the names). Another reasonable option would be: dotchart(unclass(table(infert$education))) 2D tables work fine presently: dotchart(table(state.division, state.region)) I started a thread on R-devel suggesting a few possible solutions, so perhaps in the next release, dotchart() will be able to handle table class objects without any coercion. Josh > > Peter Ehlers > >> >> >> Cheers, >> >> Josh >> >> On Tue, Feb 1, 2011 at 6:52 AM, Van Patten, Isaac T >> ?wrote: >>> >>> I have a factor vector of subject races (Asian, Black, Hispanic, White; >>> n=30) that I want to plot with a Cleveland dotplot or dotchart. >>> >>> I tried the following in R2.12.1 : >>> >>>> dotchart(table(school$Race)) >>> >>> Error in plot.xy(xy.coords(x, y), type = type, ...) : invalid plot type >>> >>> Using the same data set in R2.11.1 the operation succeeded (I tried >>> several variations to be sure): >>> >>>> dotchart(table(school$Race)) >>>> race2<-table(school$Race) >>>> dotchart(race2) >>>> dotchart(race2, pch=17,col="red") >>> >>> Each of these worked in 2.11.1 but not in 2.12.1; ?What changed in the >>> {graphics} package to alter this and is there a work-around? >>> >>> Isaac T. Van Patten, Ph.D. >>> Professor of Criminal Justice >>> 307 Adams Street, Office 1A >>> Box 6934, Radford University >>> Radford, VA 24142 >>> (540)831-6737 >>> ivanpatt at radford.edu >>> http://ivanpatt.asp.radford.edu >>> It doesn't matter how beautiful your theory is; >>> It doesn't matter how smart you are; >>> If it doesn't agree with the [data], its wrong. >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?-Richard Feynman >>> >>> ______________________________________________ >>> R-help at r-project.org mailing list >>> https://stat.ethz.ch/mailman/listinfo/r-help >>> PLEASE do read the posting guide From moleps2 at gmail.com Tue Feb 1 20:31:57 2011 From: moleps2 at gmail.com (moleps) Date: Tue, 1 Feb 2011 20:31:57 +0100 Subject: [R] p value for joint probability In-Reply-To: <4D473402.6040606@ucalgary.ca> References: <47C1151A-BE59-4EA3-B5C7-B0A700638C16@gmail.com> <4D473402.6040606@ucalgary.ca> Message-ID: <2D841946-AFC0-41C0-9214-4B1295EC1249@gmail.com> My terminology is probably way off. I?ll try again in plain english. I?d like to generate a scatter plot of r1 & r2 and color code each pair according to the probability of observing the pair given that the two samples (r1 & r2) are drawn from two independent normal distributions. rr<-data.frame(r1=-rnorm(1000,10,5),r2=-rnorm(1000,220,5)) with(rr,plot(r1,r2)) Best, //M On 31. jan. 2011, at 23.13, Peter Ehlers wrote: > On 2011-01-31 12:42, moleps wrote: >> Dear all, >> >> Given >> >> rr<-data.frame(r1<-rnorm(1000,10,5),r2<-rnorm(1000,220,5)) >> >> >> How can I add a column (rr$p) for the joint probability of each r1& r2 pair? > > If you take the values in each pair to be observations > from two independent Normal distributions, it's easy: > The "joint probability" of those values is zero. > > But I suspect you mean something else by "joint probability". > Can you elaborate? > > Peter Ehlers > >> I know how to add the column.. I just dont know how to compute the p value for joint probabilities given the two samples. >> >> >> //M >> >> ______________________________________________ >> R-help at 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, reproducible code. > From NordlDJ at dshs.wa.gov Tue Feb 1 21:10:31 2011 From: NordlDJ at dshs.wa.gov (Nordlund, Dan (DSHS/RDA)) Date: Tue, 1 Feb 2011 12:10:31 -0800 Subject: [R] p value for joint probability In-Reply-To: <2D841946-AFC0-41C0-9214-4B1295EC1249@gmail.com> References: <47C1151A-BE59-4EA3-B5C7-B0A700638C16@gmail.com> <4D473402.6040606@ucalgary.ca> <2D841946-AFC0-41C0-9214-4B1295EC1249@gmail.com> Message-ID: <941871A13165C2418EC144ACB212BDB001C260FC@dshsmxoly1504g.dshs.wa.lcl> > -----Original Message----- > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r- > project.org] On Behalf Of moleps > Sent: Tuesday, February 01, 2011 11:32 AM > To: Peter Ehlers > Cc: r-help at r-project.org > Subject: Re: [R] p value for joint probability > > > My terminology is probably way off. I?ll try again in plain english. > > I?d like to generate a scatter plot of r1 & r2 and color code each > pair according to the probability of observing the pair given that the > two samples (r1 & r2) are drawn from two independent normal > distributions. > > rr<-data.frame(r1=-rnorm(1000,10,5),r2=-rnorm(1000,220,5)) > > with(rr,plot(r1,r2)) > > Best, > //M > And the answer is the same as Peter gave below. The theoretical probability of a specific pair of numbers occurring in your example is zero. So, I will ask Peter's question differently (although his question was a good one). What is your interest in doing these plots? What are you trying to understand? Are you just trying to learn how do this "joint probability" plot for use on data where there is a non-zero probability of pairs of numbers occurring? Equiring minds would like to know. :-) Dan Daniel J. Nordlund Washington State Department of Social and Health Services Planning, Performance, and Accountability Research and Data Analysis Division Olympia, WA 98504-5204 > > > > On 31. jan. 2011, at 23.13, Peter Ehlers wrote: > > > On 2011-01-31 12:42, moleps wrote: > >> Dear all, > >> > >> Given > >> > >> rr<-data.frame(r1<-rnorm(1000,10,5),r2<-rnorm(1000,220,5)) > >> > >> > >> How can I add a column (rr$p) for the joint probability of each r1& > r2 pair? > > > > If you take the values in each pair to be observations > > from two independent Normal distributions, it's easy: > > The "joint probability" of those values is zero. > > > > But I suspect you mean something else by "joint probability". > > Can you elaborate? > > > > Peter Ehlers > > > >> I know how to add the column.. I just dont know how to compute the > p value for joint probabilities given the two samples. > >> > >> > >> //M > >> > >> ______________________________________________ > >> R-help at 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, reproducible code. > > > > ______________________________________________ > R-help at 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, reproducible code. From marchywka at hotmail.com Tue Feb 1 21:21:44 2011 From: marchywka at hotmail.com (Mike Marchywka) Date: Tue, 1 Feb 2011 15:21:44 -0500 Subject: [R] p value for joint probability In-Reply-To: <941871A13165C2418EC144ACB212BDB001C260FC@dshsmxoly1504g.dshs.wa.lcl> References: <47C1151A-BE59-4EA3-B5C7-B0A700638C16@gmail.com>, <4D473402.6040606@ucalgary.ca>, <2D841946-AFC0-41C0-9214-4B1295EC1249@gmail.com>, <941871A13165C2418EC144ACB212BDB001C260FC@dshsmxoly1504g.dshs.wa.lcl> Message-ID: > Date: Tue, 1 Feb 2011 12:10:31 -0800 > From: NordlDJ at dshs.wa.gov > To: r-help at r-project.org > Subject: Re: [R] p value for joint probability > > > -----Original Message----- > > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r- > > project.org] On Behalf Of moleps > > Sent: Tuesday, February 01, 2011 11:32 AM > > To: Peter Ehlers > > Cc: r-help at r-project.org > > Subject: Re: [R] p value for joint probability > > > > > > My terminology is probably way off. I?ll try again in plain english. > > > > I?d like to generate a scatter plot of r1 & r2 and color code each > > pair according to the probability of observing the pair given that the > > two samples (r1 & r2) are drawn from two independent normal > > distributions. > > > > rr<-data.frame(r1=-rnorm(1000,10,5),r2=-rnorm(1000,220,5)) > > > > with(rr,plot(r1,r2)) > > > > Best, > > //M >> > > And the answer is the same as Peter gave below. The theoretical probability of a specific pair of numbers occurring in your example is zero. So, I will ask Peter's question differently (although his question was a good one). What is your interest in doing these plots? What are you trying to understand? Are you just trying to learn how do this "joint probability" plot for use on data where there is a non-zero probability of pairs of numbers occurring? Equiring minds would like to know. :-) Empirically of course, the probability is not zero since it did happen :) As with the folks surprised about floating point equality compares, there is some integration over the quantization interval. So in fact the probabiliyt of measuring what was measured is an integral over the floating point difference between the two closest numbers. Presumably however you want an answer unrelated to the fp properties. > > Dan > > Daniel J. Nordlund > Washington State Department of Social and Health Services > Planning, Performance, and Accountability > Research and Data Analysis Division > Olympia, WA 98504-5204 > From rvaradhan at jhmi.edu Tue Feb 1 21:25:48 2011 From: rvaradhan at jhmi.edu (Ravi Varadhan) Date: Tue, 01 Feb 2011 15:25:48 -0500 Subject: [R] Matching patients In-Reply-To: <92497.51887.qm@web52803.mail.re2.yahoo.com> References: <92497.51887.qm@web52803.mail.re2.yahoo.com> Message-ID: <71b0b697d921.4d4825fc@johnshopkins.edu> Look at the "optmatch" package. ____________________________________________________________________ Ravi Varadhan, Ph.D. Assistant Professor, Division of Geriatric Medicine and Gerontology School of Medicine Johns Hopkins University Ph. (410) 502-2619 email: rvaradhan at jhmi.edu ----- Original Message ----- From: Bill Hyman Date: Tuesday, February 1, 2011 2:04 pm Subject: [R] Matching patients To: r-help at r-project.org > May I ask a clinical question? For a trial, we have a treatment group > of small > size, say 30 patients. We want to selectmatching control patients > from a bigger > group (100 patients) in terms of several clinical variables, such as > age, tumor > stage etc. This practice is to select the closest matching set of > control cases. > I wonder if R has any routine or package that can help with this > problem. Thank > you. Looking forward... > > ______________________________________________ > R-help at r-project.org mailing list > > PLEASE do read the posting guide > and provide commented, minimal, self-contained, reproducible code. From dwinsemius at comcast.net Tue Feb 1 21:26:33 2011 From: dwinsemius at comcast.net (David Winsemius) Date: Tue, 1 Feb 2011 15:26:33 -0500 Subject: [R] p value for joint probability In-Reply-To: <2D841946-AFC0-41C0-9214-4B1295EC1249@gmail.com> References: <47C1151A-BE59-4EA3-B5C7-B0A700638C16@gmail.com> <4D473402.6040606@ucalgary.ca> <2D841946-AFC0-41C0-9214-4B1295EC1249@gmail.com> Message-ID: On Feb 1, 2011, at 2:31 PM, moleps wrote: > > My terminology is probably way off. I?ll try again in plain english. > > I?d like to generate a scatter plot of r1 & r2 and color code each > pair according to the probability of observing the pair given that > the two samples (r1 & r2) are drawn from two independent normal > distributions. The answer is still zero. If you want to ask a different question that might have a non-zero answer, it might be: How can I color points on the basis of their joint density with an assumption of no correlation , you might get a better answer. Densities are not probabilities. You would need to specify whether the arguments to the rnorm functions (i.e. the theoretic values) were to be used or did you intend to use sample values for mean and sd? > > rr<-data.frame(r1=-rnorm(1000,10,5),r2=-rnorm(1000,220,5)) > > with(rr,plot(r1,r2)) > > Best, > //M > > > > > On 31. jan. 2011, at 23.13, Peter Ehlers wrote: > >> On 2011-01-31 12:42, moleps wrote: >>> Dear all, >>> >>> Given >>> >>> rr<-data.frame(r1<-rnorm(1000,10,5),r2<-rnorm(1000,220,5)) >>> >>> >>> How can I add a column (rr$p) for the joint probability of each >>> r1& r2 pair? >> >> If you take the values in each pair to be observations >> from two independent Normal distributions, it's easy: >> The "joint probability" of those values is zero. >> >> But I suspect you mean something else by "joint probability". >> Can you elaborate? >> >> Peter Ehlers >> >>> I know how to add the column.. I just dont know how to compute the >>> p value for joint probabilities given the two samples. >>> >>> >>> //M >>> >>> ______________________________________________ >>> R-help at 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, reproducible code. >> > > ______________________________________________ > R-help at 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, reproducible code. David Winsemius, MD West Hartford, CT From savicky at praha1.ff.cuni.cz Tue Feb 1 21:29:29 2011 From: savicky at praha1.ff.cuni.cz (Petr Savicky) Date: Tue, 1 Feb 2011 21:29:29 +0100 Subject: [R] p value for joint probability In-Reply-To: <2D841946-AFC0-41C0-9214-4B1295EC1249@gmail.com> References: <47C1151A-BE59-4EA3-B5C7-B0A700638C16@gmail.com> <4D473402.6040606@ucalgary.ca> <2D841946-AFC0-41C0-9214-4B1295EC1249@gmail.com> Message-ID: <20110201202929.GA10370@praha1.ff.cuni.cz> On Tue, Feb 01, 2011 at 08:31:57PM +0100, moleps wrote: > > My terminology is probably way off. I?ll try again in plain english. > > I?d like to generate a scatter plot of r1 & r2 and color code each pair according to the probability of observing the pair given that the two samples (r1 & r2) are drawn from two independent normal distributions. When you say probability, do you actually mean the density function? http://en.wikipedia.org/wiki/Probability_density_function The probability that a random point belongs to a region is the integral of the density function over that region. If the region is a single point, then this integral is zero. Functions related to a multivariate normal distribution may be computed using package http://cran.at.r-project.org/web/packages/mvtnorm/index.html Petr Savicky. From michael.bedward at gmail.com Tue Feb 1 22:39:04 2011 From: michael.bedward at gmail.com (Michael Bedward) Date: Wed, 2 Feb 2011 08:39:04 +1100 Subject: [R] Regression type 2, x measured with error In-Reply-To: References: <1296574869381-3251875.post@n4.nabble.com> Message-ID: Another search term is "geometric mean regression". For simple models you can try the lmodel2 package. Michael On 2 February 2011 04:31, David Winsemius wrote: > > On Feb 1, 2011, at 10:41 AM, misil wrote: > >> >> I wanna to do a Regression type 2 or Regression with X measured with >> error....anybody knows how can i make it in R?? >> thanks! > > There are several prior posts in the archives ... although perhaps not the > Nabble archives since they start throwing away stuff after about a year. > Search on "orthogonal regression", "total least sqaures regression" or > "Deming regression". > > David Winsemius, MD > West Hartford, CT > > ______________________________________________ > R-help at 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, reproducible code. > From moleps2 at gmail.com Tue Feb 1 22:49:54 2011 From: moleps2 at gmail.com (moleps) Date: Tue, 1 Feb 2011 22:49:54 +0100 Subject: [R] p value for joint probability In-Reply-To: References: <47C1151A-BE59-4EA3-B5C7-B0A700638C16@gmail.com> <4D473402.6040606@ucalgary.ca> <2D841946-AFC0-41C0-9214-4B1295EC1249@gmail.com> Message-ID: <7BA5AD3E-E028-450B-A087-9F271D712873@gmail.com> Allright.. Appreciate the input on non-zero terminology (:-). What I wanted was: rr<-data.frame(r1=rnorm(1000,10,5),r2=rnorm(1000,220,5)) with(rr,plot(r1,r2)) r3<-kde2d(r1,r2,lims=c(2,18,200,240)) filled.contour(r3) //M On 1. feb. 2011, at 21.26, David Winsemius wrote: > > On Feb 1, 2011, at 2:31 PM, moleps wrote: > >> >> My terminology is probably way off. I?ll try again in plain english. >> >> I?d like to generate a scatter plot of r1 & r2 and color code each pair according to the probability of observing the pair given that the two samples (r1 & r2) are drawn from two independent normal distributions. > > The answer is still zero. If you want to ask a different question that might have a non-zero answer, it might be: How can I color points on the basis of their joint density with an assumption of no correlation , you might get a better answer. Densities are not probabilities. You would need to specify whether the arguments to the rnorm functions (i.e. the theoretic values) were to be used or did you intend to use sample values for mean and sd? > > >> >> rr<-data.frame(r1=-rnorm(1000,10,5),r2=-rnorm(1000,220,5)) >> >> with(rr,plot(r1,r2)) >> >> Best, >> //M >> >> >> >> >> On 31. jan. 2011, at 23.13, Peter Ehlers wrote: >> >>> On 2011-01-31 12:42, moleps wrote: >>>> Dear all, >>>> >>>> Given >>>> >>>> rr<-data.frame(r1<-rnorm(1000,10,5),r2<-rnorm(1000,220,5)) >>>> >>>> >>>> How can I add a column (rr$p) for the joint probability of each r1& r2 pair? >>> >>> If you take the values in each pair to be observations >>> from two independent Normal distributions, it's easy: >>> The "joint probability" of those values is zero. >>> >>> But I suspect you mean something else by "joint probability". >>> Can you elaborate? >>> >>> Peter Ehlers >>> >>>> I know how to add the column.. I just dont know how to compute the p value for joint probabilities given the two samples. >>>> >>>> >>>> //M >>>> >>>> ______________________________________________ >>>> R-help at 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, reproducible code. >>> >> >> ______________________________________________ >> R-help at 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, reproducible code. > > David Winsemius, MD > West Hartford, CT > From ar562 at cam.ac.uk Tue Feb 1 20:05:46 2011 From: ar562 at cam.ac.uk (A. Ramzan) Date: 01 Feb 2011 19:05:46 +0000 Subject: [R] (no subject) Message-ID: Hello I am trying to find a way to find the max value, for only a subset of a dataframe, depending on how the data is grouped for example, How would I find the maxmium responce, for all the GPR119a condition below: responce,mouce,condition 0.105902,KO,con 0.232018561,KO,con 0.335008375,KO,con 0.387025433,KO,GPR119a 0.576769897,KO,GPR119a 0.645120419,KO,GPR119a 0.2538608,KO,GPR119b 0.183061952,KO,GPR119b 0.824035587,KO,GPR119b 0.399201597,KO,GPR119c 0.417006618,KO,GPR119c 0.572958834,KO,GPR119c 0.229467444,KO,GPR119d 0.294089745,KO,GPR119d 0.309964445,KO,GPR119d 0.30474325,KO,GPR119e 0.159374839,KO,GPR119e 0.467726848,KO,GPR119e 1.01841912,KO,GPR119f 0.423028621,KO,GPR119f 0.223588597,KO,GPR119f Thank From aliu at miraibio.com Tue Feb 1 19:58:07 2011 From: aliu at miraibio.com (Allen Liu) Date: Tue, 1 Feb 2011 18:58:07 +0000 Subject: [R] Fitting ELISA measurements References: Message-ID: Christopher Anderson channing.harvard.edu> writes: > > Hello, > > I am trying to fit my Elisa results (absorbance readings) to a standard > curve. To create the standard curve model, I performed a 4-parameter > logistic fit using the 'drc' package (ExpectedConc~Absorbance). This gave me > the following: > > FourP > > A 'drc' model. > > Call: > drm(formula = Response ~ Expected, data = SC, fct = LL.4()) > > Coefficients: > b:(Intercept) c:(Intercept) d:(Intercept) e:(Intercept) > 1.336 6.236 85.521 59.598 > > > summary(FourP) > > Model fitted: Log-logistic (ED50 as parameter) (4 parms) > > Parameter estimates: > > Estimate Std. Error t-value p-value > b:(Intercept) 1.33596 0.15861 8.42309 0.0011 > c:(Intercept) 6.23557 3.18629 1.95700 0.1220 > d:(Intercept) 85.52140 2.15565 39.67313 0.0000 > e:(Intercept) 59.59835 5.18781 11.48815 0.0003 > > Residual standard error: > > 1.866876 (4 degrees of freedom) > > Now that I have the 4 parameters, how do I fit the absorbance readings for > the analytical unknowns to the standard curve model (as to estimate the > concentrations of my unknown analytical samples)? > I can use the argument 'predict', but this predicts absorbance given > concentrations (y given x), I need to predict concentrations give absorbance > (x given y). > > Thanks! > Chris > > [[alternative HTML version deleted]] > > Hi Chris, Disclaimer: I am a technical support supervisor for Hitachi Solutions. I have a solution that does not involve using R but rather a software package that is dedicated to ELISA analysis with focus on the 4PL and 5PL model equations. If you are not interested, then please disregard the rest of this message. MasterPlex ReaderFit is a software package dedicated to the quantitative analysis of ELISA data. Once you fit your standards, all concentrations of your unknown samples will automatically be interpolated or extrapolated. Here is a link to a free 14-day trial of the software that is fully-functional: http://www.miraibio.com/masterplex-readerfit/curve-fitting-for-plate- readers.html If you would like, I can assist you with the analysis of your data. You can email me at aliu at miraibio dot com and I would more than happy to do some data analysis with you. In addition, here is a blog post that I have written a while back for some tips on ELISA data analysis: http://www.miraibio.com/blog/2009/06/tips-for-data-analysis/ I hope this helps. Best Regards, Allen Liu From fabio_ufes at hotmail.com Tue Feb 1 21:20:45 2011 From: fabio_ufes at hotmail.com (fgg) Date: Tue, 1 Feb 2011 12:20:45 -0800 (PST) Subject: [R] superscript Message-ID: <1296591645633-3252881.post@n4.nabble.com> Hi there, How can I superscript the "2" of "r2 =..." in the legend below? legend(210, 110, paste("r2 = ", format(summary(regression)$adj.r.squared,digits=3), sep="")) I usually use "expression(paste(...", but it won't work this time because "format(summary(..." needs to be evaluated. Thanks in advance! -- View this message in context: http://r.789695.n4.nabble.com/superscript-tp3252881p3252881.html Sent from the R help mailing list archive at Nabble.com. From fabio_ufes at hotmail.com Tue Feb 1 23:28:09 2011 From: fabio_ufes at hotmail.com (fgg) Date: Tue, 1 Feb 2011 14:28:09 -0800 (PST) Subject: [R] superscript In-Reply-To: <1296593413785-3252924.post@n4.nabble.com> References: <1296591645633-3252881.post@n4.nabble.com> <1296593106282-3252921.post@n4.nabble.com> <1296593413785-3252924.post@n4.nabble.com> Message-ID: <1296599289007-3253088.post@n4.nabble.com> Thanks, jthetzel. That works. Can you plot a legend with 2 lines using bquote? e.g. r^2 = x rmse = y "," and "\n" don't seem to work. -- View this message in context: http://r.789695.n4.nabble.com/superscript-tp3252881p3253088.html Sent from the R help mailing list archive at Nabble.com. From francesco.petrogalli at gmail.com Tue Feb 1 20:57:43 2011 From: francesco.petrogalli at gmail.com (Francesco Petrogalli) Date: Tue, 1 Feb 2011 14:57:43 -0500 Subject: [R] Sweave Message-ID: Hello everybody, is there a way to tell Sweave to skip the R code and process only the LaTeX part? I know it sounds a little bit weird, but the R code of my document is complete and _slow_ and I need to add the LaTeX part. Thanks, franZ From Hugo.Mildenberger at web.de Tue Feb 1 21:18:35 2011 From: Hugo.Mildenberger at web.de (Hugo Mildenberger) Date: Tue, 1 Feb 2011 21:18:35 +0100 Subject: [R] Fitting ELISA measurements "unknowns" to 4 parameter logistic model In-Reply-To: References: Message-ID: <201102012118.36396.Hugo.Mildenberger@web.de> Hello Chris, You may also use the R-package "calib". Hugo On Tuesday 01 February 2011 17:08:13 Christopher Anderson wrote: > Hello, > > I am trying to fit my Elisa results (absorbance readings) to a standard > curve. To create the standard curve model, I performed a 4-parameter > logistic fit using the 'drc' package (ExpectedConc~Absorbance). This gave me > the following: > > FourP > > A 'drc' model. > > Call: > drm(formula = Response ~ Expected, data = SC, fct = LL.4()) > > Coefficients: > b:(Intercept) c:(Intercept) d:(Intercept) e:(Intercept) > 1.336 6.236 85.521 59.598 > > > summary(FourP) > > Model fitted: Log-logistic (ED50 as parameter) (4 parms) > > Parameter estimates: > > Estimate Std. Error t-value p-value > b:(Intercept) 1.33596 0.15861 8.42309 0.0011 > c:(Intercept) 6.23557 3.18629 1.95700 0.1220 > d:(Intercept) 85.52140 2.15565 39.67313 0.0000 > e:(Intercept) 59.59835 5.18781 11.48815 0.0003 > > Residual standard error: > > 1.866876 (4 degrees of freedom) > > Now that I have the 4 parameters, how do I fit the absorbance readings for > the analytical unknowns to the standard curve model (as to estimate the > concentrations of my unknown analytical samples)? > I can use the argument 'predict', but this predicts absorbance given > concentrations (y given x), I need to predict concentrations give absorbance > (x given y). > > Thanks! > Chris > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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, reproducible code. > From eriki at ccbr.umn.edu Tue Feb 1 23:50:46 2011 From: eriki at ccbr.umn.edu (Erik Iverson) Date: Tue, 01 Feb 2011 16:50:46 -0600 Subject: [R] (no subject) In-Reply-To: References: Message-ID: <4D488E46.8070605@ccbr.umn.edu> ?tapply would be one way to get the max for all conditions at once. Your example is not reproducible, so I cannot give you a reproducible answer, but adapt the following: tapply(df$responce, df$condition, max) A. Ramzan wrote: > Hello > > I am trying to find a way to find the max value, for only a subset of a > dataframe, depending on how the data is grouped for example, > > How would I find the maxmium responce, for all the GPR119a condition below: > > responce,mouce,condition > 0.105902,KO,con > 0.232018561,KO,con > 0.335008375,KO,con > 0.387025433,KO,GPR119a > 0.576769897,KO,GPR119a > 0.645120419,KO,GPR119a > 0.2538608,KO,GPR119b > 0.183061952,KO,GPR119b > 0.824035587,KO,GPR119b > 0.399201597,KO,GPR119c > 0.417006618,KO,GPR119c > 0.572958834,KO,GPR119c > 0.229467444,KO,GPR119d > 0.294089745,KO,GPR119d > 0.309964445,KO,GPR119d > 0.30474325,KO,GPR119e > 0.159374839,KO,GPR119e > 0.467726848,KO,GPR119e > 1.01841912,KO,GPR119f > 0.423028621,KO,GPR119f > 0.223588597,KO,GPR119f > > Thank > > ______________________________________________ > R-help at 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, reproducible code. From lkiogou at yahoo.com Tue Feb 1 21:51:18 2011 From: lkiogou at yahoo.com (Kiogou Lydie) Date: Tue, 1 Feb 2011 12:51:18 -0800 (PST) Subject: [R] help Message-ID: <734603.74038.qm@web57504.mail.re1.yahoo.com> An embedded and charset-unspecified text was scrubbed... Name: not available URL: From jthetzel at gmail.com Tue Feb 1 21:45:06 2011 From: jthetzel at gmail.com (jthetzel) Date: Tue, 1 Feb 2011 12:45:06 -0800 (PST) Subject: [R] superscript In-Reply-To: <1296591645633-3252881.post@n4.nabble.com> References: <1296591645633-3252881.post@n4.nabble.com> Message-ID: <1296593106282-3252921.post@n4.nabble.com> Would the following work? legend(210, 110, bquote(r2 == .(format(summary(regression)$adj.r.squared,digits=3)))) See ?plotmath and ?bquote Jeremy Jeremy Hetzel Boston University -- View this message in context: http://r.789695.n4.nabble.com/superscript-tp3252881p3252921.html Sent from the R help mailing list archive at Nabble.com. From jthetzel at gmail.com Tue Feb 1 21:50:13 2011 From: jthetzel at gmail.com (jthetzel) Date: Tue, 1 Feb 2011 12:50:13 -0800 (PST) Subject: [R] superscript In-Reply-To: <1296593106282-3252921.post@n4.nabble.com> References: <1296591645633-3252881.post@n4.nabble.com> <1296593106282-3252921.post@n4.nabble.com> Message-ID: <1296593413785-3252924.post@n4.nabble.com> Correction, I forgot the caret: legend(210, 110, bquote(r^2 == .(format(summary(regression)$adj.r.squared,digits=3)))) -- View this message in context: http://r.789695.n4.nabble.com/superscript-tp3252881p3252924.html Sent from the R help mailing list archive at Nabble.com. From ron_michael70 at yahoo.com Tue Feb 1 23:03:46 2011 From: ron_michael70 at yahoo.com (Ron Michael) Date: Tue, 1 Feb 2011 14:03:46 -0800 (PST) Subject: [R] lower.tri/upper.tri functions unable to make a matrix symmetric! Message-ID: <824059.49630.qm@web63803.mail.re1.yahoo.com> Dear all, I have having a strange problem with upper.tri()/lower.tri() functions which I used to use to make a matrix symmetric. However for a specific large matrix, they seem not working. Initial I had following matrix: > MyMatrix [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 0.0002137831 1.791564e-06 1.308941e-06 1.320362e-06 1.576466e-06 -2.090668e-06 -4.480179e-08 1.617517e-06 1.188307e-06 -6.592009e-06 [2,] NA 2.313636e-04 -2.028031e-06 -2.749156e-06 -4.670093e-07 2.630111e-06 1.364227e-06 -5.065928e-06 9.069602e-07 7.034820e-07 [3,] NA NA 2.800611e-04 2.530742e-06 1.237191e-06 6.105895e-07 -2.095904e-06 -5.090979e-06 1.180013e-06 8.172282e-06 [4,] NA NA NA 3.219580e-04 -8.626130e-08 2.877486e-06 -4.387613e-06 1.551715e-06 5.999397e-07 -4.047684e-06 [5,] NA NA NA NA 2.343739e-04 5.086490e-06 2.839762e-06 -5.081967e-07 1.121733e-07 -3.601529e-06 [6,] NA NA NA NA NA 2.488756e-04 2.118398e-07 -1.879584e-06 7.186348e-07 -3.602057e-06 [7,] NA NA NA NA NA NA 2.946481e-04 2.454685e-06 -2.310217e-07 2.787164e-06 [8,] NA NA NA NA NA NA NA 1.899915e-04 1.224963e-06 -1.533257e-07 [9,] NA NA NA NA NA NA NA NA 2.009841e-04 -6.389595e-07 [10,] NA NA NA NA NA NA NA NA NA 4.427314e-04 [11,] NA NA NA NA NA NA NA NA NA NA [12,] NA NA NA NA NA NA NA NA NA NA [13,] NA NA NA NA NA NA NA NA NA NA [14,] NA NA NA NA NA NA NA NA NA NA [15,] NA NA NA NA NA NA NA NA NA NA [16,] NA NA NA NA NA NA NA NA NA NA [,11] [,12] [,13] [,14] [,15] [,16] [1,] 1.611978e-06 1.156455e-06 2.429236e-06 -6.371224e-07 3.092417e-07 3.011528e-06 [2,] -5.510187e-06 -8.998582e-07 9.614807e-07 -8.311204e-07 -8.974948e-07 -3.812490e-08 [3,] -1.373343e-06 -5.213719e-07 -1.775968e-06 1.206253e-06 6.585452e-07 1.272045e-06 [4,] -2.111128e-07 2.386934e-06 2.966653e-06 2.694338e-06 2.838703e-06 3.419373e-06 [5,] 4.707156e-06 2.080091e-06 -1.449516e-06 2.091399e-07 1.564799e-06 1.203982e-06 [6,] -7.174750e-06 -1.016559e-06 3.679732e-07 -1.604075e-06 3.363196e-06 -2.106617e-06 [7,] -1.358783e-06 -2.298378e-06 -1.822507e-06 1.792765e-06 1.201043e-06 -2.553821e-06 [8,] 5.935161e-06 -3.651090e-07 2.112346e-06 -1.432126e-06 -3.692184e-07 -2.214944e-06 [9,] 3.847311e-07 -1.156356e-07 4.155777e-06 -1.627045e-06 1.789992e-07 3.229348e-06 [10,] 3.123505e-06 3.504098e-06 -1.462336e-06 3.846515e-06 -2.693877e-08 3.698078e-06 [11,] 3.421896e-04 -1.334050e-06 -4.764588e-06 -4.065790e-07 1.312966e-06 1.531616e-06 [12,] NA 1.600832e-04 7.403796e-07 2.684925e-06 2.003153e-06 1.217396e-06 [13,] NA NA 3.573365e-04 -1.540675e-06 4.166715e-07 1.457177e-06 [14,] NA NA NA 2.277771e-04 1.856102e-06 -1.513366e-06 [15,] NA NA NA NA 2.065449e-04 1.294455e-06 [16,] NA NA NA NA NA 2.056605e-04 > MyMatrix[lower.tri(MyMatrix)] <- MyMatrix[upper.tri(MyMatrix)] > isSymmetric(MyMatrix) [1] FALSE Can somebody please tell me what is the problem with lower.tri/upper.tri functions? why they are not making my matrix symmetric? Thanks From kparamas at asu.edu Tue Feb 1 23:07:04 2011 From: kparamas at asu.edu (kparamas) Date: Tue, 1 Feb 2011 14:07:04 -0800 (PST) Subject: [R] using SNOW and clusterApplyLB to run jobs parallel Message-ID: <1296598024724-3253060.post@n4.nabble.com> I have this function and want to run it parallel with different sets of data. Using SNOW and clusterApplyLB. system.time(out <- mclapply(cData, plotGraph)) #each cData contains 100X6000 doubles system.time(out <- mclapply(cData2, plotGraph)) system.time(out <- mclapply(cData3, plotGraph)) system.time(out <- mclapply(cData4, plotGraph)) system.time(out <- mclapply(cData5, plotGraph)) system.time(out <- mclapply(cData6, plotGraph)) plotGraph() <- function(cData) { cl = unname(cor(cData)) result = cbind(as.vector(row(cl)),as.vector(col(cl)),as.vector(cl)) result = result[result[,1] != result[,2],] corm = result corm =corm[abs(corm[,3]) >= CORRELATION, ] # remove low cor pairs library(network); library(sna) net <- network(corm, directed = F) # the network cd <- component.dist(net) # component analysis delete.vertices(net, which(cd$csize[cd$membership] == 1)) # delete genes not connected with others plot(net) } -- View this message in context: http://r.789695.n4.nabble.com/using-SNOW-and-clusterApplyLB-to-run-jobs-parallel-tp3253060p3253060.html Sent from the R help mailing list archive at Nabble.com. From tylerdeanrudolph at gmail.com Tue Feb 1 23:01:46 2011 From: tylerdeanrudolph at gmail.com (T.D. Rudolph) Date: Tue, 1 Feb 2011 14:01:46 -0800 (PST) Subject: [R] "each" argument in rep (Bug?) Message-ID: <1296597706008-3253050.post@n4.nabble.com> I have a vector of unique elements that I want to replicate a variable number of times depending on the element (lengths all > 800). However I noticed that the resulting length was not the sum of the each argument. The following example demonstrates this. I am confused as to why this works: rep(1:4, c(2,1,2,1)) [1] 1 1 2 3 3 4 but this doesn't: rep(1:3, each=c(2,1,2)) [1] 1 1 2 2 3 3 This does not appear to be consistent with the description provided in ?rep.... Is this supposed to be happening? -- View this message in context: http://r.789695.n4.nabble.com/each-argument-in-rep-Bug-tp3253050p3253050.html Sent from the R help mailing list archive at Nabble.com. From izahn at psych.rochester.edu Wed Feb 2 00:00:43 2011 From: izahn at psych.rochester.edu (Ista Zahn) Date: Tue, 1 Feb 2011 18:00:43 -0500 Subject: [R] (no subject) In-Reply-To: References: Message-ID: max(dat[dat$condition=="GPR119a", "responce"]) aggregate(dat$responce, by=list(dat$condition), max) see ?"[" and ?aggregate -Ista On Tue, Feb 1, 2011 at 2:05 PM, A. Ramzan wrote: > Hello > > I am trying to find a way to find the max value, for only a subset of a > dataframe, depending on how the data is grouped for example, > > How would I find the maxmium responce, for all the GPR119a condition below: > > responce,mouce,condition > 0.105902,KO,con > 0.232018561,KO,con > 0.335008375,KO,con > 0.387025433,KO,GPR119a > 0.576769897,KO,GPR119a > 0.645120419,KO,GPR119a > 0.2538608,KO,GPR119b > 0.183061952,KO,GPR119b > 0.824035587,KO,GPR119b > 0.399201597,KO,GPR119c > 0.417006618,KO,GPR119c > 0.572958834,KO,GPR119c > 0.229467444,KO,GPR119d > 0.294089745,KO,GPR119d > 0.309964445,KO,GPR119d > 0.30474325,KO,GPR119e > 0.159374839,KO,GPR119e > 0.467726848,KO,GPR119e > 1.01841912,KO,GPR119f > 0.423028621,KO,GPR119f > 0.223588597,KO,GPR119f > > Thank > > ______________________________________________ > R-help at 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, reproducible code. > -- Ista Zahn Graduate student University of Rochester Department of Clinical and Social Psychology http://yourpsyche.org From d.kazakiewicz at gmail.com Tue Feb 1 23:59:41 2011 From: d.kazakiewicz at gmail.com (Den) Date: Wed, 02 Feb 2011 00:59:41 +0200 Subject: [R] (no subject) In-Reply-To: References: Message-ID: <1296601181.2361.2.camel@den2042-desktop> max(subset(dataName, condition=="GPR119a")$responce) ? ???, 01/02/2011 ? 19:05 +0000, A. Ramzan ????: > Hello > > I am trying to find a way to find the max value, for only a subset of a > dataframe, depending on how the data is grouped for example, > > How would I find the maxmium responce, for all the GPR119a condition below: > > responce,mouce,condition > 0.105902,KO,con > 0.232018561,KO,con > 0.335008375,KO,con > 0.387025433,KO,GPR119a > 0.576769897,KO,GPR119a > 0.645120419,KO,GPR119a > 0.2538608,KO,GPR119b > 0.183061952,KO,GPR119b > 0.824035587,KO,GPR119b > 0.399201597,KO,GPR119c > 0.417006618,KO,GPR119c > 0.572958834,KO,GPR119c > 0.229467444,KO,GPR119d > 0.294089745,KO,GPR119d > 0.309964445,KO,GPR119d > 0.30474325,KO,GPR119e > 0.159374839,KO,GPR119e > 0.467726848,KO,GPR119e > 1.01841912,KO,GPR119f > 0.423028621,KO,GPR119f > 0.223588597,KO,GPR119f > > Thank > > ______________________________________________ > R-help at 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, reproducible code. From D.Strbenac at garvan.org.au Wed Feb 2 00:00:10 2011 From: D.Strbenac at garvan.org.au (Dario Strbenac) Date: Wed, 2 Feb 2011 10:00:10 +1100 (EST) Subject: [R] (no subject) In-Reply-To: References: Message-ID: <20110202100010.BKR91426@gimr.garvan.unsw.edu.au> If your data frame is called myDF, max(myDF[myDF[, condition] == "GPR119a", "responce"]) ---- Original message ---- >Date: 01 Feb 2011 19:05:46 +0000 >From: r-help-bounces at r-project.org (on behalf of "A. Ramzan" ) >Subject: [R] (no subject) >To: r-help at r-project.org > >Hello > >I am trying to find a way to find the max value, for only a subset of a >dataframe, depending on how the data is grouped for example, > >How would I find the maxmium responce, for all the GPR119a condition below: > >responce,mouce,condition >0.105902,KO,con >0.232018561,KO,con >0.335008375,KO,con >0.387025433,KO,GPR119a >0.576769897,KO,GPR119a >0.645120419,KO,GPR119a >0.2538608,KO,GPR119b >0.183061952,KO,GPR119b >0.824035587,KO,GPR119b >0.399201597,KO,GPR119c >0.417006618,KO,GPR119c >0.572958834,KO,GPR119c >0.229467444,KO,GPR119d >0.294089745,KO,GPR119d >0.309964445,KO,GPR119d >0.30474325,KO,GPR119e >0.159374839,KO,GPR119e >0.467726848,KO,GPR119e >1.01841912,KO,GPR119f >0.423028621,KO,GPR119f >0.223588597,KO,GPR119f > >Thank > >______________________________________________ >R-help at 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, reproducible code. -------------------------------------- Dario Strbenac Research Assistant Cancer Epigenetics Garvan Institute of Medical Research Darlinghurst NSW 2010 Australia From carrieandstat at gmail.com Wed Feb 2 00:08:40 2011 From: carrieandstat at gmail.com (Carrie Li) Date: Tue, 1 Feb 2011 18:08:40 -0500 Subject: [R] Matching patients In-Reply-To: <92497.51887.qm@web52803.mail.re2.yahoo.com> References: <92497.51887.qm@web52803.mail.re2.yahoo.com> Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From dwinsemius at comcast.net Wed Feb 2 00:12:44 2011 From: dwinsemius at comcast.net (David Winsemius) Date: Tue, 1 Feb 2011 18:12:44 -0500 Subject: [R] help In-Reply-To: <734603.74038.qm@web57504.mail.re1.yahoo.com> References: <734603.74038.qm@web57504.mail.re1.yahoo.com> Message-ID: On Feb 1, 2011, at 3:51 PM, Kiogou Lydie wrote: > > I actually want to do the following: > > a[j] = (1/(j!))*? (i-1-d), j = 500, ? means product i = 1 to j What is the purpose of this effort? > > Yet, j! will stop at 170 and ? (i-1-d) at 172; so, a[j] will > not exceed 170. > > I would like to have at least 200 a[j]. > factorial(200) [1] Inf Warning message: In factorial(200) : value out of range in 'gammafn' > > WHAT SHOULD I DO? You should review the mathematics involved in calculating factorials and think more deeply about the limitations of your machine and software. ?factorial > > PLEASE SEE MY CODE FOR DETAIL!! > > > #################################################### > R CODE: > ################################################### > > d = .25 > > # generate j! > v=j=1 > for (i in 1:200){ > v[i] = i > for (i in 2:200){ > j[1]=1 > j[i] = j[i-1]*v[i] > } > } > j > > # generate aj > l=A=a=0 > for (k in 1:200){ > l[k] = (k-1-d) > for (i in 2:200){ > A[1] = l[1] > A[i] = A[i-1]*l[i] > for ( i in 1:200){ > a[i]= (1/j[i])*A[i] > } > > } > } > a > > ######################################## END CODE ################## > ##################################################################### > > > With GOD, everything is POSSIBLE. > Except perhaps calculating unlogged factorials above 170 with 64 bit computers. > Avec DIEU, tout est POSSIBLE. > > > > [[alternative HTML version deleted]] -- David Winsemius, MD West Hartford, CT From spector at stat.berkeley.edu Wed Feb 2 00:16:40 2011 From: spector at stat.berkeley.edu (Phil Spector) Date: Tue, 1 Feb 2011 15:16:40 -0800 (PST) Subject: [R] "each" argument in rep (Bug?) In-Reply-To: <1296597706008-3253050.post@n4.nabble.com> References: <1296597706008-3253050.post@n4.nabble.com> Message-ID: In what way is the behavior non-consistent? Quoting from the help page for rep: ?times? A vector giving the number of times to repeat each element if of length ?length(x)?, or to repeat the whole vector if of length 1. ?each? non-negative integer. Each element of ?x? is repeated ?each? times. Treated as ?1? if ?NA? or invalid. So while times may be a vector, each is clearly limited to being an integer. I'll admit that it would be nice if it told you that it was only using the first element of a vector each argument, but the behaviour is perfectly consistent with the documentation. - Phil Spector Statistical Computing Facility Department of Statistics UC Berkeley spector at stat.berkeley.edu On Tue, 1 Feb 2011, T.D. Rudolph wrote: > > I have a vector of unique elements that I want to replicate a variable number > of times depending on the element (lengths all > 800). However I noticed > that the resulting length was not the sum of the each argument. The > following example demonstrates this. > > I am confused as to why this works: > > rep(1:4, c(2,1,2,1)) > [1] 1 1 2 3 3 4 > > but this doesn't: > > rep(1:3, each=c(2,1,2)) > [1] 1 1 2 2 3 3 > > This does not appear to be consistent with the description provided in > ?rep.... > Is this supposed to be happening? > -- > View this message in context: http://r.789695.n4.nabble.com/each-argument-in-rep-Bug-tp3253050p3253050.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at 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, reproducible code. > From wdunlap at tibco.com Wed Feb 2 00:20:26 2011 From: wdunlap at tibco.com (William Dunlap) Date: Tue, 1 Feb 2011 15:20:26 -0800 Subject: [R] lower.tri/upper.tri functions unable to make a matrix symmetric! In-Reply-To: <824059.49630.qm@web63803.mail.re1.yahoo.com> References: <824059.49630.qm@web63803.mail.re1.yahoo.com> Message-ID: <77EB52C6DD32BA4D87471DCD70C8D70003DE1772@NA-PA-VBE03.na.tibco.com> Try replacing MyMatrix[lower.tri(MyMatrix)] <- MyMatrix[upper.tri(MyMatrix)] with MyMatrix[lower.tri(MyMatrix)] <- t(MyMatrix[upper.tri(MyMatrix)]) so it puts the transponse of the upper triangle into the lower. Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com > -----Original Message----- > From: r-help-bounces at r-project.org > [mailto:r-help-bounces at r-project.org] On Behalf Of Ron Michael > Sent: Tuesday, February 01, 2011 2:04 PM > To: r-help at r-project.org > Subject: [R] lower.tri/upper.tri functions unable to make a > matrix symmetric! > > Dear all, I have having a strange problem with > upper.tri()/lower.tri() functions which I used to use to make > a matrix symmetric. However for a specific large matrix, they > seem not working. Initial I had following matrix: > > > MyMatrix > [,1] [,2] [,3] [,4] > [,5] [,6] [,7] [,8] > [,9] [,10] > [1,] 0.0002137831 1.791564e-06 1.308941e-06 1.320362e-06 > 1.576466e-06 -2.090668e-06 -4.480179e-08 1.617517e-06 > 1.188307e-06 -6.592009e-06 > [2,] NA 2.313636e-04 -2.028031e-06 -2.749156e-06 > -4.670093e-07 2.630111e-06 1.364227e-06 -5.065928e-06 > 9.069602e-07 7.034820e-07 > [3,] NA NA 2.800611e-04 2.530742e-06 > 1.237191e-06 6.105895e-07 -2.095904e-06 -5.090979e-06 > 1.180013e-06 8.172282e-06 > [4,] NA NA NA 3.219580e-04 > -8.626130e-08 2.877486e-06 -4.387613e-06 1.551715e-06 > 5.999397e-07 -4.047684e-06 > [5,] NA NA NA NA > 2.343739e-04 5.086490e-06 2.839762e-06 -5.081967e-07 > 1.121733e-07 -3.601529e-06 > [6,] NA NA NA NA > NA 2.488756e-04 2.118398e-07 -1.879584e-06 > 7.186348e-07 -3.602057e-06 > [7,] NA NA NA NA > NA NA 2.946481e-04 2.454685e-06 > -2.310217e-07 2.787164e-06 > [8,] NA NA NA NA > NA NA NA 1.899915e-04 > 1.224963e-06 -1.533257e-07 > [9,] NA NA NA NA > NA NA NA NA > 2.009841e-04 -6.389595e-07 > [10,] NA NA NA NA > NA NA NA NA > NA 4.427314e-04 > [11,] NA NA NA NA > NA NA NA NA > NA NA > [12,] NA NA NA NA > NA NA NA NA > NA NA > [13,] NA NA NA NA > NA NA NA NA > NA NA > [14,] NA NA NA NA > NA NA NA NA > NA NA > [15,] NA NA NA NA > NA NA NA NA > NA NA > [16,] NA NA NA NA > NA NA NA NA > NA NA > [,11] [,12] [,13] [,14] > [,15] [,16] > [1,] 1.611978e-06 1.156455e-06 2.429236e-06 -6.371224e-07 > 3.092417e-07 3.011528e-06 > [2,] -5.510187e-06 -8.998582e-07 9.614807e-07 -8.311204e-07 > -8.974948e-07 -3.812490e-08 > [3,] -1.373343e-06 -5.213719e-07 -1.775968e-06 1.206253e-06 > 6.585452e-07 1.272045e-06 > [4,] -2.111128e-07 2.386934e-06 2.966653e-06 2.694338e-06 > 2.838703e-06 3.419373e-06 > [5,] 4.707156e-06 2.080091e-06 -1.449516e-06 2.091399e-07 > 1.564799e-06 1.203982e-06 > [6,] -7.174750e-06 -1.016559e-06 3.679732e-07 -1.604075e-06 > 3.363196e-06 -2.106617e-06 > [7,] -1.358783e-06 -2.298378e-06 -1.822507e-06 1.792765e-06 > 1.201043e-06 -2.553821e-06 > [8,] 5.935161e-06 -3.651090e-07 2.112346e-06 -1.432126e-06 > -3.692184e-07 -2.214944e-06 > [9,] 3.847311e-07 -1.156356e-07 4.155777e-06 -1.627045e-06 > 1.789992e-07 3.229348e-06 > [10,] 3.123505e-06 3.504098e-06 -1.462336e-06 3.846515e-06 > -2.693877e-08 3.698078e-06 > [11,] 3.421896e-04 -1.334050e-06 -4.764588e-06 -4.065790e-07 > 1.312966e-06 1.531616e-06 > [12,] NA 1.600832e-04 7.403796e-07 2.684925e-06 > 2.003153e-06 1.217396e-06 > [13,] NA NA 3.573365e-04 -1.540675e-06 > 4.166715e-07 1.457177e-06 > [14,] NA NA NA 2.277771e-04 > 1.856102e-06 -1.513366e-06 > [15,] NA NA NA NA > 2.065449e-04 1.294455e-06 > [16,] NA NA NA NA > NA 2.056605e-04 > > MyMatrix[lower.tri(MyMatrix)] <- MyMatrix[upper.tri(MyMatrix)] > > isSymmetric(MyMatrix) > [1] FALSE > > Can somebody please tell me what is the problem with > lower.tri/upper.tri functions? why they are not making my > matrix symmetric? > > Thanks > > > > ______________________________________________ > R-help at 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, reproducible code. > From Peter.Alspach at plantandfood.co.nz Wed Feb 2 00:24:21 2011 From: Peter.Alspach at plantandfood.co.nz (Peter Alspach) Date: Wed, 2 Feb 2011 12:24:21 +1300 Subject: [R] "each" argument in rep (Bug?) In-Reply-To: <1296597706008-3253050.post@n4.nabble.com> References: <1296597706008-3253050.post@n4.nabble.com> Message-ID: <3CD374BF2C285940A54C0A71225AF7DB3B836B99@AKLEXM01.PFR.CO.NZ> Tena koe ?rep states that each is a non-negative integer. Note, integer not a vector. Thus, rep(1:3, each=c(2,1,2)) only uses the first element in each and is equivalent to rep(1:3, each=2). One could argue there should be a warning (as there is for some functions is similar situations), but I don't see that it is a bug or undocumented (although the documentation is subtle). HTH .... Peter Alspach. > -----Original Message----- > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r- > project.org] On Behalf Of T.D. Rudolph > Sent: Wednesday, 2 February 2011 11:02 a.m. > To: r-help at r-project.org > Subject: [R] "each" argument in rep (Bug?) > > > I have a vector of unique elements that I want to replicate a variable > number > of times depending on the element (lengths all > 800). However I > noticed > that the resulting length was not the sum of the each argument. The > following example demonstrates this. > > I am confused as to why this works: > > rep(1:4, c(2,1,2,1)) > [1] 1 1 2 3 3 4 > > but this doesn't: > > rep(1:3, each=c(2,1,2)) > [1] 1 1 2 2 3 3 > > This does not appear to be consistent with the description provided in > ?rep.... > Is this supposed to be happening? > -- > View this message in context: http://r.789695.n4.nabble.com/each- > argument-in-rep-Bug-tp3253050p3253050.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at 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, reproducible code. The contents of this e-mail are confidential and may be subject to legal privilege. If you are not the intended recipient you must not use, disseminate, distribute or reproduce all or any part of this e-mail or attachments. If you have received this e-mail in error, please notify the sender and delete all material pertaining to this e-mail. Any opinion or views expressed in this e-mail are those of the individual sender and may not represent those of The New Zealand Institute for Plant and Food Research Limited. From izahn at psych.rochester.edu Wed Feb 2 00:42:17 2011 From: izahn at psych.rochester.edu (Ista Zahn) Date: Tue, 1 Feb 2011 18:42:17 -0500 Subject: [R] Sweave In-Reply-To: References: Message-ID: Hi Francesco, If you're running Sweave from within R, you can pass the eval argument to RWeaveLatex, e.g. Sweave(file="test.Rnw", eval=FALSE) Best, Ista On Tue, Feb 1, 2011 at 2:57 PM, Francesco Petrogalli wrote: > Hello everybody, > is there a way to tell Sweave to skip the R code and process only the > LaTeX part? > > I know it sounds a little bit weird, but the R code of my document is > complete and _slow_ and I need to add the LaTeX part. > > > Thanks, > > franZ > > ______________________________________________ > R-help at 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, reproducible code. > -- Ista Zahn Graduate student University of Rochester Department of Clinical and Social Psychology http://yourpsyche.org From f.harrell at vanderbilt.edu Wed Feb 2 01:02:21 2011 From: f.harrell at vanderbilt.edu (Frank Harrell) Date: Tue, 1 Feb 2011 16:02:21 -0800 (PST) Subject: [R] Preparing dataset for glmnet: factors to dummies In-Reply-To: <19783.61345.624028.936178@stat.math.ethz.ch> References: <04a701cbc1f4$d63fd680$82bf8380$@sabbe@ugent.be> <19783.61345.624028.936178@stat.math.ethz.ch> Message-ID: <1296604941555-3253210.post@n4.nabble.com> I believe that glmnet scales variables by their standard deviations. This would not be appropriate for categorical predictors. Frank ----- Frank Harrell Department of Biostatistics, Vanderbilt University -- View this message in context: http://r.789695.n4.nabble.com/Preparing-dataset-for-glmnet-factors-to-dummies-tp3250791p3253210.html Sent from the R help mailing list archive at Nabble.com. From djmuser at gmail.com Wed Feb 2 01:37:52 2011 From: djmuser at gmail.com (Dennis Murphy) Date: Tue, 1 Feb 2011 16:37:52 -0800 Subject: [R] (no subject) In-Reply-To: References: Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From hanson at depauw.edu Wed Feb 2 02:16:47 2011 From: hanson at depauw.edu (Bryan Hanson) Date: Tue, 1 Feb 2011 20:16:47 -0500 Subject: [R] Function to Message-ID: <17523D11-8566-41FA-AD25-3C8F508B0115@depauw.edu> Hi Guru's... I have a set of points that may lie along any of the x, y and z axes in a Cartesian coordinate system. I am hoping that a function exists which will determine if any two selected points are on different axes, i.e, if the one of the points is on x and the other on y or z, not elsewhere on the x axis. Put another way, I need to determine if the triangle formed by the two points and the origin lies in the xy, xz or yz planes. This might be as simple as testing if any particular value is zero, i.e. if the x coordinate is zero, then the points must be on the z and y axes and the triangle in the yz plane. But, I'm looking for a fairly general solution, one that also returns the appropriate plane as the answer. Very closely related to this, I could use a function that determines which of the 8 octants a point lies in. Seems like the cross product might be part of this, but I'm a little rusty on how to apply it. I hope this is clear enough, and someone has a suggestion to point me in the right direction. Before writing my own klunky version, I thought I'd ask. Thanks, Bryan **************** Prof. Bryan Hanson Dept of Chemistry & Biochemistry DePauw University 602 S. College Ave Greencastle IN 46135 USA From hanson at depauw.edu Wed Feb 2 02:30:22 2011 From: hanson at depauw.edu (Bryan Hanson) Date: Tue, 1 Feb 2011 20:30:22 -0500 Subject: [R] Function to locate points in 3d octants or points on two axes Message-ID: [Sorry, resending with a proper subject line!] Hi Guru's... I have a set of points that may lie along any of the x, y and z axes in a Cartesian coordinate system. I am hoping that a function exists which will determine if any two selected points are on different axes, i.e, if the one of the points is on x and the other on y or z, not elsewhere on the x axis. Put another way, I need to determine if the triangle formed by the two points and the origin lies in the xy, xz or yz planes. This might be as simple as testing if any particular value is zero, i.e. if the x coordinate is zero, then the points must be on the z and y axes and the triangle in the yz plane. But, I'm looking for a fairly general solution, one that also returns the appropriate plane as the answer. Very closely related to this, I could use a function that determines which of the 8 octants a point lies in. Seems like the cross product might be part of this, but I'm a little rusty on how to apply it. I hope this is clear enough, and someone has a suggestion to point me in the right direction. Before writing my own klunky version, I thought I'd ask. Thanks, Bryan **************** Prof. Bryan Hanson Dept of Chemistry & Biochemistry DePauw University 602 S. College Ave Greencastle IN 46135 USA From fabio_ufes at hotmail.com Wed Feb 2 00:06:51 2011 From: fabio_ufes at hotmail.com (fgg) Date: Tue, 1 Feb 2011 15:06:51 -0800 (PST) Subject: [R] superscript In-Reply-To: <1296599289007-3253088.post@n4.nabble.com> References: <1296591645633-3252881.post@n4.nabble.com> <1296593106282-3252921.post@n4.nabble.com> <1296593413785-3252924.post@n4.nabble.com> <1296599289007-3253088.post@n4.nabble.com> Message-ID: <1296601611512-3253145.post@n4.nabble.com> This works: as.expression(c(bquote(...),bquote(...))) -- View this message in context: http://r.789695.n4.nabble.com/superscript-tp3252881p3253145.html Sent from the R help mailing list archive at Nabble.com. From l.cattarino at uq.edu.au Wed Feb 2 03:40:21 2011 From: l.cattarino at uq.edu.au (Lorenzo Cattarino) Date: Wed, 2 Feb 2011 12:40:21 +1000 Subject: [R] automatic coercion to character Message-ID: <96731D3F78CD4F468A44C9BBEE907A6E01C84104@UQEXMB5.soe.uq.edu.au> An embedded and charset-unspecified text was scrubbed... Name: not available URL: From dwinsemius at comcast.net Wed Feb 2 04:31:58 2011 From: dwinsemius at comcast.net (David Winsemius) Date: Tue, 1 Feb 2011 22:31:58 -0500 Subject: [R] automatic coercion to character In-Reply-To: <96731D3F78CD4F468A44C9BBEE907A6E01C84104@UQEXMB5.soe.uq.edu.au> References: <96731D3F78CD4F468A44C9BBEE907A6E01C84104@UQEXMB5.soe.uq.edu.au> Message-ID: On Feb 1, 2011, at 9:40 PM, Lorenzo Cattarino wrote: > Hi R users > > I am wondering how I can avoid automatic coercion of my numeric vector > elements to character Stop giving character arguments . > > init <- c(age='N', R=as.numeric(0.5), S=as.numeric(0.8)) If you want a multi-mode object, use a list. > init <- list(age='N', R=as.numeric(0.5), S=as.numeric(0.8)) > init $age [1] "N" $R [1] 0.5 $S [1] 0.8 Vectors can only contain elements of a single mode. -- David. > > > > I have used as.numeric() but it does not seem to work > > > > Thank you > > Lorenzo > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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, reproducible code. David Winsemius, MD West Hartford, CT From Peter.Alspach at plantandfood.co.nz Wed Feb 2 04:35:13 2011 From: Peter.Alspach at plantandfood.co.nz (Peter Alspach) Date: Wed, 2 Feb 2011 16:35:13 +1300 Subject: [R] automatic coercion to character In-Reply-To: <96731D3F78CD4F468A44C9BBEE907A6E01C84104@UQEXMB5.soe.uq.edu.au> References: <96731D3F78CD4F468A44C9BBEE907A6E01C84104@UQEXMB5.soe.uq.edu.au> Message-ID: <3CD374BF2C285940A54C0A71225AF7DB3B836BCC@AKLEXM01.PFR.CO.NZ> Tena koe Lorenz c() combines the elements to form a vector and all elements of a vector must be of the same type. If you elements of different types you need to use a list. Note, a data.frame is a special type of list. HTH .... Peter Alspach > -----Original Message----- > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r- > project.org] On Behalf Of Lorenzo Cattarino > Sent: Wednesday, 2 February 2011 3:40 p.m. > To: r-help at r-project.org > Subject: [R] automatic coercion to character > > Hi R users > > > > I am wondering how I can avoid automatic coercion of my numeric vector > elements to character > > > > init <- c(age='N', R=as.numeric(0.5), S=as.numeric(0.8)) > > > > I have used as.numeric() but it does not seem to work > > > > Thank you > > Lorenzo > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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, reproducible code. The contents of this e-mail are confidential and may be subject to legal privilege. If you are not the intended recipient you must not use, disseminate, distribute or reproduce all or any part of this e-mail or attachments. If you have received this e-mail in error, please notify the sender and delete all material pertaining to this e-mail. Any opinion or views expressed in this e-mail are those of the individual sender and may not represent those of The New Zealand Institute for Plant and Food Research Limited. From waku at idi.ntnu.no Wed Feb 2 05:22:16 2011 From: waku at idi.ntnu.no (Waclaw Kusnierczyk) Date: Tue, 01 Feb 2011 22:22:16 -0600 Subject: [R] help In-Reply-To: References: <734603.74038.qm@web57504.mail.re1.yahoo.com> Message-ID: <4D48DBF8.5000106@idi.ntnu.no> On 02/01/2011 05:12 PM, David Winsemius wrote: > > On Feb 1, 2011, at 3:51 PM, Kiogou Lydie wrote: > >> Yet, j! will stop at 170 and ? (i-1-d) at 172; so, a[j] will >> not exceed 170. >> >> I would like to have at least 200 a[j]. > > > factorial(200) > [1] Inf > Warning message: > In factorial(200) : value out of range in 'gammafn' This is quite a nice number with 375 digits. You can compute it 'within' R with a call to, e.g., the arbitrary precision calculator bc, using the r-bc package [1] by Gabor Grothendieck: library(bc) factorial = function(n) bc(sprintf(' define factorial(n) { if (n < 2) return (1) f = 2 i = 2 while (i < n) f *= ++i return (f) } factorial(%d)', n)) f200 = factorial(200) f2000 = factorial(2000) f20000 = factorial(20000) ... The outcome is an object of the class 'bc', and you can (carefully) perform computations with it (with bc doing the job behind the scenes, as R cannot store integers of this magnitude). vQ [1] http://code.google.com/p/r-bc/ From Peter.Brecknock at bp.com Wed Feb 2 05:37:56 2011 From: Peter.Brecknock at bp.com (Pete Brecknock) Date: Tue, 1 Feb 2011 20:37:56 -0800 (PST) Subject: [R] time bin sum In-Reply-To: <1296580666431-3252376.post@n4.nabble.com> References: <1296580666431-3252376.post@n4.nabble.com> Message-ID: <1296621476210-3253400.post@n4.nabble.com> Jessica Any good? lines <-"DateTime, Q 2004-12-09 15:30:01, 2 2004-12-09 15:30:01, 1 2004-12-09 15:30:06, 1 2004-12-09 15:30:14, 5 2004-12-09 15:30:21, 1 2004-12-09 15:30:22, 11 2004-12-09 15:30:24, 4 2004-12-09 15:30:32, 1 2004-12-09 15:30:32, 1 2004-12-09 15:30:32, 3 2004-12-09 15:30:41, 4" d = read.table(textConnection(lines), sep="," ,header = TRUE) d$DateTime = as.POSIXct(d$DateTime) time <- seq(as.POSIXct('2004-12-09 15:30:00'),by='5 sec', length=10) bins = cut(d$DateTime,breaks=time) counts = as.data.frame(tapply(d$Q,bins,sum)) # Clean up counts[is.na(counts)]=0 colnames(counts) = "Counts" print(counts) HTH Pete -- View this message in context: http://r.789695.n4.nabble.com/time-bin-sum-tp3252376p3253400.html Sent from the R help mailing list archive at Nabble.com. From waku at idi.ntnu.no Wed Feb 2 05:42:54 2011 From: waku at idi.ntnu.no (Waclaw Kusnierczyk) Date: Tue, 01 Feb 2011 22:42:54 -0600 Subject: [R] "each" argument in rep (Bug?) In-Reply-To: References: <1296597706008-3253050.post@n4.nabble.com> Message-ID: <4D48E0CE.5060002@idi.ntnu.no> An embedded and charset-unspecified text was scrubbed... Name: not available URL: From joda2457 at student.uu.se Wed Feb 2 08:23:08 2011 From: joda2457 at student.uu.se (Joel) Date: Tue, 1 Feb 2011 23:23:08 -0800 (PST) Subject: [R] Hidden environment Message-ID: <1296631388543-3253502.post@n4.nabble.com> Hi I wondering if its possible to make a hidden environment for a package, so the user cant see whats in it but the diffrent functions inside the package can use the variables in the environment. Hope you can understand what Im after. Joel -- View this message in context: http://r.789695.n4.nabble.com/Hidden-environment-tp3253502p3253502.html Sent from the R help mailing list archive at Nabble.com. From savicky at praha1.ff.cuni.cz Wed Feb 2 09:21:05 2011 From: savicky at praha1.ff.cuni.cz (Petr Savicky) Date: Wed, 2 Feb 2011 09:21:05 +0100 Subject: [R] Function to locate points in 3d octants or points on two axes In-Reply-To: References: Message-ID: <20110202082105.GA7682@praha1.ff.cuni.cz> On Tue, Feb 01, 2011 at 08:30:22PM -0500, Bryan Hanson wrote: > [Sorry, resending with a proper subject line!] > > Hi Guru's... > > I have a set of points that may lie along any of the x, y and z axes > in a Cartesian coordinate system. I am hoping that a function exists > which will determine if any two selected points are on different axes, > i.e, if the one of the points is on x and the other on y or z, not > elsewhere on the x axis. Put another way, I need to determine if the > triangle formed by the two points and the origin lies in the xy, xz or > yz planes. This might be as simple as testing if any particular value > is zero, i.e. if the x coordinate is zero, then the points must be on > the z and y axes and the triangle in the yz plane. But, I'm looking > for a fairly general solution, one that also returns the appropriate > plane as the answer. Very closely related to this, I could use a > function that determines which of the 8 octants a point lies in. Seems > like the cross product might be part of this, but I'm a little rusty > on how to apply it. > > I hope this is clear enough, and someone has a suggestion to point me > in the right direction. Before writing my own klunky version, I > thought I'd ask. Hi. I think that for suggesting an appropriate solution it may be needed to know, which data structure is used for the input pairs of points. For example, it may a single matrix n times 3 with points as rows and a pair is represented by two indices of the points. Alternatively, the input may be a single matrix n times 6, where rows are pairs of points. In any case, the input may be simplified using sign() function. For example a <- as.matrix(expand.grid(x=c(-1.1, 0, 1.1), y=c(0, 1.2), z=c(0, 1.3))) a x y z [1,] -1.1 0.0 0.0 [2,] 0.0 0.0 0.0 [3,] 1.1 0.0 0.0 [4,] -1.1 1.2 0.0 [5,] 0.0 1.2 0.0 [6,] 1.1 1.2 0.0 [7,] -1.1 0.0 1.3 [8,] 0.0 0.0 1.3 [9,] 1.1 0.0 1.3 [10,] -1.1 1.2 1.3 [11,] 0.0 1.2 1.3 [12,] 1.1 1.2 1.3 sign(a) x y z [1,] -1 0 0 [2,] 0 0 0 [3,] 1 0 0 [4,] -1 1 0 [5,] 0 1 0 [6,] 1 1 0 [7,] -1 0 1 [8,] 0 0 1 [9,] 1 0 1 [10,] -1 1 1 [11,] 0 1 1 [12,] 1 1 1 This output represents a classification of the points into a finite number of regions and keeps the information needed for any of the tasks, which you mention. Hope this helps. Petr Savicky. From ripley at stats.ox.ac.uk Wed Feb 2 09:36:27 2011 From: ripley at stats.ox.ac.uk (Prof Brian Ripley) Date: Wed, 2 Feb 2011 08:36:27 +0000 (GMT) Subject: [R] Hidden environment In-Reply-To: <1296631388543-3253502.post@n4.nabble.com> References: <1296631388543-3253502.post@n4.nabble.com> Message-ID: On Tue, 1 Feb 2011, Joel wrote: > > Hi > > I wondering if its possible to make a hidden environment for a package, so > the user cant see whats in it but the diffrent functions inside the package > can use the variables in the environment. Up to a point: 1) See the manual about the concept of a name space. 2) A package can also have one or more private environments, using new.env() or local(): grDevices is an example. However, R is Open Source so a determined user can find such environments: hence 'the user cant see whats in it' (is your ' key broken?) is not really achievable. > Hope you can understand what Im after. > > Joel -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 From asanramzan at yahoo.com Wed Feb 2 09:48:38 2011 From: asanramzan at yahoo.com (Asan Ramzan) Date: Wed, 2 Feb 2011 00:48:38 -0800 (PST) Subject: [R] Finding the maximum in a particular group in a dataframe Message-ID: <621748.74621.qm@web44705.mail.sp1.yahoo.com> An embedded and charset-unspecified text was scrubbed... Name: not available URL: From cstrieder at gmail.com Wed Feb 2 05:49:32 2011 From: cstrieder at gmail.com (Cristiano Strieder) Date: Wed, 2 Feb 2011 02:49:32 -0200 Subject: [R] Why my package is not being generate? Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From grigoriy.lyukshin at gmail.com Wed Feb 2 08:07:15 2011 From: grigoriy.lyukshin at gmail.com (gked) Date: Tue, 1 Feb 2011 23:07:15 -0800 (PST) Subject: [R] error in scan(... Message-ID: <1296630435806-3253487.post@n4.nabble.com> I know it's a common error and there is a lot of help available but still can't resolve the issue: all i am trying to do is to read a csv file from my folder and this is what i get: Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, : scan() expected 'a real', got '1,m,a,F,165,240,26.5,31,0.738,0.704,1.095,0.606,0.847' Can you help? -- View this message in context: http://r.789695.n4.nabble.com/error-in-scan-tp3253487p3253487.html Sent from the R help mailing list archive at Nabble.com. From l.cattarino at uq.edu.au Wed Feb 2 08:55:43 2011 From: l.cattarino at uq.edu.au (Lorenzo Cattarino) Date: Wed, 2 Feb 2011 17:55:43 +1000 Subject: [R] combining vectors into list Message-ID: <96731D3F78CD4F468A44C9BBEE907A6E01C8422F@UQEXMB5.soe.uq.edu.au> An embedded and charset-unspecified text was scrubbed... Name: not available URL: From leendertp at gmail.com Wed Feb 2 08:35:28 2011 From: leendertp at gmail.com (Leendert Punt) Date: Wed, 2 Feb 2011 09:35:28 +0200 Subject: [R] Counter in a For Loop - Efficiency Issue Message-ID: I have a 32000 x 14 matrix (M) where entry (x, y) corresponds to person x at a discrete time y. I then have a matrix (M2) of 60000 x 2 where each entry is a an event by a person that is in the above 32000 and at a time that is in the range of the discrete time points above. I want to populate the another matrix (M3) such that (x, y) is the number of events of person x between times y-1 and y. This is simple to code, (I just put the discrete time points and the 32000 people in their own vectors, V1 and V2): for (i in 1:32000){ for (j in 1:60000){ for (k in 2:14){ if (M2[1, j] == V2[i] & M2[2, j] > V1[k-1] & M2[2, j] <= V1[k]) M3[i, k] = M3[i, k]+1 }}} This would work im sure, the problem is that it takes a very long time. Any advice on helping it run faster would be greatly appreciated. From lucia.rueda at ba.ieo.es Wed Feb 2 10:13:11 2011 From: lucia.rueda at ba.ieo.es (Lucia Rueda) Date: Wed, 2 Feb 2011 01:13:11 -0800 (PST) Subject: [R] reshape data, adding rows to dataframe Message-ID: <1296637991399-3253640.post@n4.nabble.com> Hello everyone, I have a data set like this: > head( fish_transect) ID_TRANSECT ID_PROJECT DE_ZONE DE_LOCALITY DE_SECTOR MES 1 42 MB Tarragona Creixell Control I 9 2 42 MB Tarragona Creixell Control I 9 3 42 MB Tarragona Creixell Control I 9 4 42 MB Tarragona Creixell Control I 9 5 42 MB Tarragona Creixell Control I 9 6 42 MB Tarragona Creixell Control I 9 ID_SPECIES WEIGHT SIZE N FAMILIA 1 Spondyliosoma cantharus 15.64 10 1 Sparidae 2 Symphodus melanocercus 11.21 10 1 Labridae 3 Diplodus vulgaris 30.20 10 2 Sparidae 4 Diplodus vulgaris 52.24 12 2 Sparidae 5 Diplodus sargus 221.41 14 5 Sparidae 6 Diplodus annularis 3.47 6 1 Sparidae I have been trying to duplicate the rows where N> 1, that is I want a row for each animal. Right now as you can see I have for example 5 D. sargus which are 14 cm length and so on. How can I get 1 row for each animal? I've been trying the reshape function without success. I also tried in access but couldn't do it either. Thanks a lot, Lucia -- View this message in context: http://r.789695.n4.nabble.com/reshape-data-adding-rows-to-dataframe-tp3253640p3253640.html Sent from the R help mailing list archive at Nabble.com. From mark_difford at yahoo.co.uk Wed Feb 2 08:50:37 2011 From: mark_difford at yahoo.co.uk (Mark Difford) Date: Tue, 1 Feb 2011 23:50:37 -0800 (PST) Subject: [R] Preparing dataset for glmnet: factors to dummies In-Reply-To: <1296604941555-3253210.post@n4.nabble.com> References: <04a701cbc1f4$d63fd680$82bf8380$@sabbe@ugent.be> <19783.61345.624028.936178@stat.math.ethz.ch> <1296604941555-3253210.post@n4.nabble.com> Message-ID: <1296633037682-3253538.post@n4.nabble.com> Hi Frank, >> I believe that glmnet scales variables by their standard deviations. >> This would not be appropriate for categorical predictors. That's an excellent point, which many are likely to forget (including me) since one is using a model matrix. The default argument is to standardize inputs, but there is an option to turn it off. (One could then standardize continuous inputs on different scales oneself.) Regards, Mark. -- View this message in context: http://r.789695.n4.nabble.com/Preparing-dataset-for-glmnet-factors-to-dummies-tp3250791p3253538.html Sent from the R help mailing list archive at Nabble.com. From ramya.victory at gmail.com Wed Feb 2 08:09:02 2011 From: ramya.victory at gmail.com (Ramya) Date: Tue, 1 Feb 2011 23:09:02 -0800 (PST) Subject: [R] error in density plot Message-ID: <1296630542355-3253489.post@n4.nabble.com> Hi, I have the code for the density plot j <- 8 plot(density(diff_in_sample[,1]), main = list.files()[j]) for(i in 1:25){ lines(density(diff_in_sample[,i])) } This gives me an error Error in density.default(diff_in_sample[, i]) : 'x' contains missing values I am not quite sure what to do. I have the same code doing plots for otherfiles but just one is not working. what xactly it means missing values even if there is there how can i tell it to overlook those any help would be appreciated Thanks Ramya -- View this message in context: http://r.789695.n4.nabble.com/error-in-density-plot-tp3253489p3253489.html Sent from the R help mailing list archive at Nabble.com. From edwin.groot at biologie.uni-freiburg.de Wed Feb 2 10:39:43 2011 From: edwin.groot at biologie.uni-freiburg.de (Edwin Groot) Date: Wed, 2 Feb 2011 10:39:43 +0100 Subject: [R] How to Plot Two Curves Into One Page In-Reply-To: References: Message-ID: On Tue, 1 Feb 2011 14:20:51 +0900 Gundala Viswanath wrote: > I have a R script that contain these lines for plotting: > > plot(foo,lwd=2,lty=3,col="red", main=""); > plot(bar,lwd=2,lty=3,col="blue"); > legend(0.6,0.6,c('Default','Probabilistic'), > col=c('red','blue'),lwd=3); > > > But it generate 1 file (Rplot.pdf) with two pages. Each page for 1 > plot. > Is there a way I can put them together in to one page? > > - G.V. > Hello Gundala, If these are fairly simple plots (i.e. curve, points, bar, step) you can arrange your data as columns in a matrix and use matplot(). matplot(vectorOfxValues, FooBarAsMatrix, lwd=2, lty=3, col=c("red", "blue")) legend(0.6,0.6,c('Default','Probabilistic'), col=c('red','blue'),lwd=3) Regards, Edwin -- Dr. Edwin Groot, postdoctoral associate AG Laux Institut fuer Biologie III Schaenzlestr. 1 79104 Freiburg, Deutschland +49 761-2032945 From joda2457 at student.uu.se Wed Feb 2 10:47:44 2011 From: joda2457 at student.uu.se (Joel) Date: Wed, 2 Feb 2011 01:47:44 -0800 (PST) Subject: [R] RMySQL, cant find MySQL Message-ID: <1296640064423-3253689.post@n4.nabble.com> Hi I'm having some trouble with getting RMySQL installed on my Ubuntu system. As the apt-get install version of R is 2.10.x I've reinstalled 2.12 the old fashion way by ./conf and make. But now when I shall install RMySQL I get Configuration error: could not find the MySQL installation include and/or library directories. Manually specify the location of the MySQL libraries and the header files and re-run R CMD INSTALL. And in truth I cant find the headers or libraries anywhere on my comp, but I have MySQL up and running. I did install MySQL via apt-get so if anyone know where it put the different files I would love to know :). Thx for the help Joel -- View this message in context: http://r.789695.n4.nabble.com/RMySQL-cant-find-MySQL-tp3253689p3253689.html Sent from the R help mailing list archive at Nabble.com. From lukasz.reclawowicz at gmail.com Wed Feb 2 10:59:13 2011 From: lukasz.reclawowicz at gmail.com (=?ISO-8859-2?B?o3VrYXN6IFLqY7Nhd293aWN6?=) Date: Wed, 2 Feb 2011 10:59:13 +0100 Subject: [R] help In-Reply-To: <4D48DBF8.5000106@idi.ntnu.no> References: <734603.74038.qm@web57504.mail.re1.yahoo.com> <4D48DBF8.5000106@idi.ntnu.no> Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From ivan.calandra at uni-hamburg.de Wed Feb 2 11:07:26 2011 From: ivan.calandra at uni-hamburg.de (Ivan Calandra) Date: Wed, 02 Feb 2011 11:07:26 +0100 Subject: [R] combining vectors into list In-Reply-To: <96731D3F78CD4F468A44C9BBEE907A6E01C8422F@UQEXMB5.soe.uq.edu.au> References: <96731D3F78CD4F468A44C9BBEE907A6E01C8422F@UQEXMB5.soe.uq.edu.au> Message-ID: <4D492CDE.7040004@uni-hamburg.de> Hi, Try this: mapply(FUN=c, Row, Col, SIMPLIFY=FALSE) HTH, Ivan Le 2/2/2011 08:55, Lorenzo Cattarino a ?crit : > Hi R users > > > > I have these two vectors: > > > > Row<- sample(1:25, 10) > > Col<- sample(1:25, 10) > > > > Is there a way to combine them into a list, whose first component is a > vector containing the first element of Row and the first element of Col, > the second component is a vector containing the second element of Row > and the second element of Col, and so on... > > > > Thanks you > > Lorenzo > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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, reproducible code. > -- Ivan CALANDRA PhD Student University of Hamburg Biozentrum Grindel und Zoologisches Museum Abt. S?ugetiere Martin-Luther-King-Platz 3 D-20146 Hamburg, GERMANY +49(0)40 42838 6231 ivan.calandra at uni-hamburg.de ********** http://www.for771.uni-bonn.de http://webapp5.rrz.uni-hamburg.de/mammals/eng/1525_8_1.php From ivan.calandra at uni-hamburg.de Wed Feb 2 11:09:26 2011 From: ivan.calandra at uni-hamburg.de (Ivan Calandra) Date: Wed, 02 Feb 2011 11:09:26 +0100 Subject: [R] reshape data, adding rows to dataframe In-Reply-To: <1296637991399-3253640.post@n4.nabble.com> References: <1296637991399-3253640.post@n4.nabble.com> Message-ID: <4D492D56.6090601@uni-hamburg.de> Hi, Not sure what you want to do, but take a look at ?duplicated, ?unique, and maybe ?aggregate; it might be what you're looking for. HTH, Ivan Le 2/2/2011 10:13, Lucia Rueda a ?crit : > Hello everyone, > > I have a data set like this: > >> head( fish_transect) > ID_TRANSECT ID_PROJECT DE_ZONE DE_LOCALITY DE_SECTOR MES > 1 42 MB Tarragona Creixell Control I 9 > 2 42 MB Tarragona Creixell Control I 9 > 3 42 MB Tarragona Creixell Control I 9 > 4 42 MB Tarragona Creixell Control I 9 > 5 42 MB Tarragona Creixell Control I 9 > 6 42 MB Tarragona Creixell Control I 9 > ID_SPECIES WEIGHT SIZE N FAMILIA > 1 Spondyliosoma cantharus 15.64 10 1 Sparidae > 2 Symphodus melanocercus 11.21 10 1 Labridae > 3 Diplodus vulgaris 30.20 10 2 Sparidae > 4 Diplodus vulgaris 52.24 12 2 Sparidae > 5 Diplodus sargus 221.41 14 5 Sparidae > 6 Diplodus annularis 3.47 6 1 Sparidae > > I have been trying to duplicate the rows where N> 1, that is I want a row > for each animal. Right now as you can see I have for example 5 D. sargus > which are 14 cm length and so on. How can I get 1 row for each animal? I've > been trying the reshape function without success. I also tried in access but > couldn't do it either. > > Thanks a lot, > > Lucia > > > -- Ivan CALANDRA PhD Student University of Hamburg Biozentrum Grindel und Zoologisches Museum Abt. S?ugetiere Martin-Luther-King-Platz 3 D-20146 Hamburg, GERMANY +49(0)40 42838 6231 ivan.calandra at uni-hamburg.de ********** http://www.for771.uni-bonn.de http://webapp5.rrz.uni-hamburg.de/mammals/eng/1525_8_1.php From ripley at stats.ox.ac.uk Wed Feb 2 11:10:19 2011 From: ripley at stats.ox.ac.uk (Prof Brian Ripley) Date: Wed, 2 Feb 2011 10:10:19 +0000 (GMT) Subject: [R] RMySQL, cant find MySQL In-Reply-To: <1296640064423-3253689.post@n4.nabble.com> References: <1296640064423-3253689.post@n4.nabble.com> Message-ID: On Wed, 2 Feb 2011, Joel wrote: > > Hi > > I'm having some trouble with getting RMySQL installed on my Ubuntu system. > > As the apt-get install version of R is 2.10.x I've reinstalled 2.12 the old > fashion way by ./conf and make. > > But now when I shall install RMySQL I get > > Configuration error: > could not find the MySQL installation include and/or library > directories. Manually specify the location of the MySQL > libraries and the header files and re-run R CMD INSTALL. > > And in truth I cant find the headers or libraries anywhere on my comp, but I > have MySQL up and running. > > I did install MySQL via apt-get so if anyone know where it put the different > files I would love to know :). Well, you should ask such questions on R-sig-debian or R-sig-db, but I presume you forgot that you would need MySQL-dev (or whatever it is called on Ubuntu), the development part of the MySQL installation. > > Thx for the help > Joel > -- > View this message in context: http://r.789695.n4.nabble.com/RMySQL-cant-find-MySQL-tp3253689p3253689.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at 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 PLEASE do as we ask. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 From petr.pikal at precheza.cz Wed Feb 2 11:14:18 2011 From: petr.pikal at precheza.cz (Petr PIKAL) Date: Wed, 2 Feb 2011 11:14:18 +0100 Subject: [R] Help in getting info from a DataFrame In-Reply-To: <1296485476558-3248883.post@n4.nabble.com> References: <1296426479557-3247740.post@n4.nabble.com> <1296463440594-3248276.post@n4.nabble.com> <1296485476558-3248883.post@n4.nabble.com> Message-ID: Hi r-help-bounces at r-project.org napsal dne 31.01.2011 15:51:16: > > > > > > > > Hi > > thanks. I am not sure if I have understood 100% but at least I know now that > there's a diference. > > About this: > > lapsales > Store Prod qtd > 5 Aveiro Lapiseira 3 > 8 Coimbra Lapiseira 1 > 9 Setubal Lapiseira 1 > > lapsales[max(lapsales$qtd),"Store"] > [1] Setubal > Levels: Aveiro Coimbra Evora lx Setubal > > why Setubal and not Aveiro? > > > Can you explain me the result? Probably qtd is not what you think it is. I get > dados<- data.frame(Store = c ("Setubal","lx","Aveiro","Coimbra","Aveiro","Evora","Aveiro","Coimbra","Setubal"),Prod=c("BlocoDesenho","BlocoDesenho","Tinteiro","R?gua","Lapiseira","Regua","Tinteiro","Lapiseira","Lapiseira"),qtd=c(2,1,2,1,3,1,1,1,1)) > lapsales <- dados[dados$Prod=="Lapiseira", ] > lapsales[which.max(lapsales[ , "qtd" ]), "Store"] [1] Aveiro Levels: Aveiro Coimbra Evora lx Setubal > and > str(lapsales) 'data.frame': 3 obs. of 3 variables: $ Store: Factor w/ 5 levels "Aveiro","Coimbra",..: 1 2 5 $ Prod : Factor w/ 5 levels "BlocoDesenho",..: 2 2 2 $ qtd : num 3 1 1 Maybe you get something different. Regards Petr > > thanks > AD > -- > View this message in context: http://r.789695.n4.nabble.com/Help-in-getting- > info-from-a-DataFrame-tp3247740p3248883.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at 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, reproducible code. From savicky at praha1.ff.cuni.cz Wed Feb 2 11:29:50 2011 From: savicky at praha1.ff.cuni.cz (Petr Savicky) Date: Wed, 2 Feb 2011 11:29:50 +0100 Subject: [R] Counter in a For Loop - Efficiency Issue In-Reply-To: References: Message-ID: <20110202102949.GA10456@praha1.ff.cuni.cz> On Wed, Feb 02, 2011 at 09:35:28AM +0200, Leendert Punt wrote: > I have a 32000 x 14 matrix (M) where entry (x, y) corresponds to > person x at a discrete time y. I then have a matrix (M2) of 60000 x 2 > where each entry is a an event by a person that is in the above 32000 > and at a time that is in the range of the discrete time points above. > I want to populate the another matrix (M3) such that (x, y) is the > number of events of person x between times y-1 and y. This is simple > to code, (I just put the discrete time points and the 32000 people in > their own vectors, V1 and V2): > > > for (i in 1:32000){ > for (j in 1:60000){ > > for (k in 2:14){ > > if (M2[1, j] == V2[i] & M2[2, j] > V1[k-1] & M2[2, j] <= V1[k]) > M3[i, k] = M3[i, k]+1 > > }}} Consider the following approach, which uses M2, V1 and V2 as used in the code above. V1 <- c(0, 10, 20, 30, 40) V2 <- 1:3 # list of persons in the required order M2 <- rbind( c(1, 2, 1, 1, 3, 1, 3, 1), c(11, 21, 21, 21, 11, 21, 11, 31)) person <- factor(M2[1, ], levels=V2) interval <- cut(M2[2, ], breaks=V1) M3 <- table(person, interval) M2 [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 1 2 1 1 3 1 3 1 [2,] 11 21 21 21 11 21 11 31 M3 interval person (0,10] (10,20] (20,30] (30,40] 1 0 1 3 1 2 0 0 1 0 3 0 2 0 0 Does this approach work for your data? Petr Savicky. From petr.pikal at precheza.cz Wed Feb 2 11:45:54 2011 From: petr.pikal at precheza.cz (Petr PIKAL) Date: Wed, 2 Feb 2011 11:45:54 +0100 Subject: [R] sum the values in a vector as a complete number In-Reply-To: References: <1296534128515-3250470.post@n4.nabble.com> Message-ID: Hi r-help-bounces at r-project.org napsal dne 01.02.2011 07:02:50: > Hi AD, > > You might try the following: > > # data > a <- c(2,3,5) > b <- c(8,7) # you got this wrong ;) > > # option 1 > foo <- function(x) as.numeric(paste(x, sep = "", collapse = "")) > > # examples > foo(a) > # [1] 235 > foo(b) > # [1] 87 > foo(a) + foo(b) > # [1] 322 > > # option 2 > foo2 <- function(x, y) foo(x) + foo(y) > > # example > foo2(a, b) > # [1] 322 > > See ?paste and ?as.numeric for more information. > > HTH, > Jorge Above solutions are maybe quicker but here is one plain numeric. fff<-function(x) rev(10^(0:(length(x)-1))) sum(a*fff(a))+sum(b*fff(b)) [1] 322 or you can put the whole operation inside a function fff<-function(x) sum(x*rev(10^(0:(length(x)-1)))) fff(a)+fff(b) Regards Petr > > On Mon, Jan 31, 2011 at 11:22 PM, ADias <> wrote: > > > > > Hi > > > > I am trying to create a function that is able to calculate this sum: > > > > a<-c(2,3,5) > > b<-(8,7) > > > > with "a" meaning 235 and "b" 87. So the result of this sum would be 235 + > > 87 > > = 322. > > > > I've searched a function like strsplit but that worked for integers and in > > reverse - not spliting but combining. > > > > Can you give me a hand on this please? > > > > thanks > > AD > > -- > > View this message in context: > > http://r.789695.n4.nabble.com/sum-the-values-in-a-vector-as-a-complete- > number-tp3250470p3250470.html > > Sent from the R help mailing list archive at Nabble.com. > > > > ______________________________________________ > > R-help at 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, reproducible code. > > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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, reproducible code. From savicky at praha1.ff.cuni.cz Wed Feb 2 12:00:56 2011 From: savicky at praha1.ff.cuni.cz (Petr Savicky) Date: Wed, 2 Feb 2011 12:00:56 +0100 Subject: [R] reshape data, adding rows to dataframe In-Reply-To: <1296637991399-3253640.post@n4.nabble.com> References: <1296637991399-3253640.post@n4.nabble.com> Message-ID: <20110202110055.GA27170@praha1.ff.cuni.cz> On Wed, Feb 02, 2011 at 01:13:11AM -0800, Lucia Rueda wrote: > > Hello everyone, > > I have a data set like this: > > > head( fish_transect) > ID_TRANSECT ID_PROJECT DE_ZONE DE_LOCALITY DE_SECTOR MES > 1 42 MB Tarragona Creixell Control I 9 > 2 42 MB Tarragona Creixell Control I 9 > 3 42 MB Tarragona Creixell Control I 9 > 4 42 MB Tarragona Creixell Control I 9 > 5 42 MB Tarragona Creixell Control I 9 > 6 42 MB Tarragona Creixell Control I 9 > ID_SPECIES WEIGHT SIZE N FAMILIA > 1 Spondyliosoma cantharus 15.64 10 1 Sparidae > 2 Symphodus melanocercus 11.21 10 1 Labridae > 3 Diplodus vulgaris 30.20 10 2 Sparidae > 4 Diplodus vulgaris 52.24 12 2 Sparidae > 5 Diplodus sargus 221.41 14 5 Sparidae > 6 Diplodus annularis 3.47 6 1 Sparidae > > I have been trying to duplicate the rows where N> 1, that is I want a row > for each animal. Right now as you can see I have for example 5 D. sargus > which are 14 cm length and so on. How can I get 1 row for each animal? I've > been trying the reshape function without success. I also tried in access but > couldn't do it either. Hello. Let me use a simpler example for testing. dat <- data.frame(animal=c("a", "b", "c"), N=c(2, 1, 3)) dat animal N 1 a 2 2 b 1 3 c 3 Is the following operation what you want in terms of this small example? expand <- dat[rep(1:nrow(dat), times=dat$N), ] rownames(expand) <- NULL expand animal N 1 a 2 2 a 2 3 b 1 4 c 3 5 c 3 6 c 3 Hope this helps. Petr Savicky. From bogaso.christofer at gmail.com Wed Feb 2 12:22:34 2011 From: bogaso.christofer at gmail.com (Bogaso Christofer) Date: Wed, 2 Feb 2011 16:52:34 +0530 Subject: [R] How column names/row names are preserved in matrix calculation? Message-ID: <01f301cbc2cb$801cecc0$8056c640$@gmail.com> An embedded and charset-unspecified text was scrubbed... Name: not available URL: From petr.pikal at precheza.cz Wed Feb 2 12:09:39 2011 From: petr.pikal at precheza.cz (Petr PIKAL) Date: Wed, 2 Feb 2011 12:09:39 +0100 Subject: [R] Help in getting info from a DataFrame In-Reply-To: References: <1296426479557-3247740.post@n4.nabble.com> <1296463440594-3248276.post@n4.nabble.com> <1296485476558-3248883.post@n4.nabble.com> Message-ID: Hi r-help-bounces at r-project.org napsal dne 02.02.2011 11:14:18: > Hi > > r-help-bounces at r-project.org napsal dne 31.01.2011 15:51:16: > > > > > > > > > > > > > > > > > > > Hi > > > > thanks. I am not sure if I have understood 100% but at least I know now > that > > there's a diference. > > > > About this: > > > > lapsales > > Store Prod qtd > > 5 Aveiro Lapiseira 3 > > 8 Coimbra Lapiseira 1 > > 9 Setubal Lapiseira 1 > > > lapsales[max(lapsales$qtd),"Store"] > > [1] Setubal > > Levels: Aveiro Coimbra Evora lx Setubal > > > > why Setubal and not Aveiro? > > > > > > Can you explain me the result? Sorry I did not look to your code and used the code I sent you as a solution What do you expect max(lapsales$qtg) give you as a result? If you changed the number qtd to 4 instead of 3 you will get > lapsales[max(lapsales$qtd),"Store"] [1] Levels: Aveiro Coimbra Evora lx Setubal So R give you what you ask for. You asked for third line and you got it. If you asked for which position is the maximum number lapsales[which.max(lapsales$qtd),"Store"] [1] Aveiro Levels: Aveiro Coimbra Evora lx Setubal You will get desired result. Regards Petr > > Probably qtd is not what you think it is. I get > > > dados<- data.frame(Store = c > ("Setubal","lx","Aveiro","Coimbra","Aveiro","Evora","Aveiro","Coimbra","Setubal"),Prod=c > ("BlocoDesenho","BlocoDesenho","Tinteiro","R?gua","Lapiseira","Regua","Tinteiro","Lapiseira","Lapiseira"),qtd=c > (2,1,2,1,3,1,1,1,1)) > > lapsales <- dados[dados$Prod=="Lapiseira", ] > > lapsales[which.max(lapsales[ , "qtd" ]), "Store"] > [1] Aveiro > Levels: Aveiro Coimbra Evora lx Setubal > > > > and > > > str(lapsales) > 'data.frame': 3 obs. of 3 variables: > $ Store: Factor w/ 5 levels "Aveiro","Coimbra",..: 1 2 5 > $ Prod : Factor w/ 5 levels "BlocoDesenho",..: 2 2 2 > $ qtd : num 3 1 1 > > Maybe you get something different. > > Regards > Petr > > > > > > > > > thanks > > AD > > -- > > View this message in context: > http://r.789695.n4.nabble.com/Help-in-getting- > > info-from-a-DataFrame-tp3247740p3248883.html > > Sent from the R help mailing list archive at Nabble.com. > > > > ______________________________________________ > > R-help at 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, reproducible code. > > ______________________________________________ > R-help at 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, reproducible code. From m at feng.li Wed Feb 2 12:15:49 2011 From: m at feng.li (Feng Li) Date: Wed, 2 Feb 2011 12:15:49 +0100 Subject: [R] kmeans: number of cluster centres must lie between 1 and nrow(x) In-Reply-To: References: Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From petr.pikal at precheza.cz Wed Feb 2 12:17:51 2011 From: petr.pikal at precheza.cz (Petr PIKAL) Date: Wed, 2 Feb 2011 12:17:51 +0100 Subject: [R] Odp: Read a similarity matrix from excel In-Reply-To: <001d01cbc1f1$50d7cc30$f2876490$@yahoo.gr> References: <001d01cbc1f1$50d7cc30$f2876490$@yahoo.gr> Message-ID: Hi r-help-bounces at r-project.org napsal dne 01.02.2011 10:20:48: > Good morning, > > I have an excel spreadsheet with similarities among objects. The format of > the file is the following: > > 1st row: ,,,..., > 2nd row: ,0,s<1,2>,s<1,3>,...,s<1,N> > 3rd row: ,s<2,1>,0,s<2,3>,...,s<2,N> > > The table is symmetrical and contains the similarities among the objects > (s stands for similarity among x and k). The first row contains the > name of the objects (strings of characters) in the same order that these > same names are contained in the first column. The cell <1,1> is empty. > > How can I read this in R so that after reading it I can perform a > hierarchical clustering. The table is 78x78 so it is relatively easy to > manually change something if it makes it easier to read. Select your table in Excel Press Ctrl-C In R do test<-read.delim("clipboard") you shall get something like that > test X a b c 1 a 1 23 3 2 b 4 5 6 3 c 7 8 9 > you has to get rid of first column > mat<-as.matrix(test[,-1]) and if you want you can put row.names tou your matrix > row.names(mat)<-colnames(mat) > mat a b c a 1 23 3 b 4 5 6 c 7 8 9 > row.names(mat)<-test$X > mat a b c a 1 23 3 b 4 5 6 c 7 8 9 > Regards Petr > > I found many articles about reading a data table with variables and then > constructing the distance matrix from within R, but I have the similarity > matrix instead. > > Thank you for your help > > George > > ______________________________________________ > R-help at 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, reproducible code. From marianne.promberger at kcl.ac.uk Wed Feb 2 12:51:50 2011 From: marianne.promberger at kcl.ac.uk (Marianne Promberger) Date: Wed, 2 Feb 2011 11:51:50 +0000 Subject: [R] pass nrow(x) to dots in function(x){plot(x,...)} Message-ID: <20110202115150.GD8598@lauren> Dear Rers, I have a function to barplot() a matrix, eg myfun <- function(x, ...) { barplot(x , ... )} (The real function is more complicated, it does things to the matrix first.) So I can do: m1 <- matrix(1:20,4) myfun(m1) myfun(m1, main="My title") I'd like to be able to add the number of rows of the matrix passed to the function to the "..." argument, eg myfun(m1, main=paste("n=",ns)) where 'ns' would be nrow(m1) I've tried this but it doesn't work: myfun <- function(x, ...) { ns <- nrow(x) barplot(x , ... ) } myfun(m1, main=paste("n = ",ns) ) ns is not found So, basically, how do I assign an object inside a function that I can then access in the dots when executing the function? Many thanks Marianne -- Marianne Promberger PhD, King's College London http://promberger.info R version 2.12.0 (2010-10-15) Ubuntu 9.04 From bartjoosen at hotmail.com Wed Feb 2 10:57:09 2011 From: bartjoosen at hotmail.com (Bart Joosen) Date: Wed, 2 Feb 2011 01:57:09 -0800 (PST) Subject: [R] Counter in a For Loop - Efficiency Issue In-Reply-To: References: Message-ID: <1296640629353-3253698.post@n4.nabble.com> without a reproducible sample, it is hard to tell, but I will give it a shot. Maybe it's possible to merge your M with M2: merge(M, M2) If you only want to count times, you can use seq_along(x) in a by function eg: dat <- data.frame(person=rep(c(1,2,3), each=5), time=rnorm(15)) by(dat$person, dat$person, function(x) seq_along(x)) Ofcourse you can use any of the other vectorisation functions (lapply, apply, aggregate, ....) HTH Bart -- View this message in context: http://r.789695.n4.nabble.com/Counter-in-a-For-Loop-Efficiency-Issue-tp3253674p3253698.html Sent from the R help mailing list archive at Nabble.com. From ajaxgreater at gmail.com Wed Feb 2 11:18:24 2011 From: ajaxgreater at gmail.com (Greg Hanley) Date: Wed, 2 Feb 2011 04:18:24 -0600 Subject: [R] Manipulating XTS data Message-ID: Hi, I'm pulling in data for the past 30 days or so. I'm going to slice each day into 5 minute time intervals, and I want to find the average value across all days for the given slice of time. That is, I want to know what the average value at 8:00 was for the 30 day period, the average value at 8:05, and so on. Is there a quick and easy way to do this with XTS. I figured i could skip loops somehow if I knew how to better use this package. Thanks! -Greg From lucia.rueda at ba.ieo.es Wed Feb 2 11:58:05 2011 From: lucia.rueda at ba.ieo.es (Lucia Rueda) Date: Wed, 2 Feb 2011 02:58:05 -0800 (PST) Subject: [R] reshape data, adding rows to dataframe In-Reply-To: <4D492D56.6090601@uni-hamburg.de> References: <1296637991399-3253640.post@n4.nabble.com> <4D492D56.6090601@uni-hamburg.de> Message-ID: <1296644285371-3253780.post@n4.nabble.com> Hi Ivan, Thanks for your reply. This is what I want to do: Imagine my dataset looks like this: Species N Size Coris julis 1 8 Coris julis 3 10 D.vulgaris 2 12 I have 1 C.julis of 8 cm, 3 C. julis of 10 cm and 2 D.vulgaris of 12 cm. I want 1 row for each animal, something like this: Species N Size Coris julis 1 8 Coris julis 1 10 Coris julis 1 10 Coris julis 1 10 D.vulgaris 1 12 D.vulgaris 1 12 I hope that helps. I tried reshape but couldn't do it and from what I've seen I don't think that aggregate, unique or duplicated would do it... but I'm not good with R so I can be wrong. Cheers! Lucia -- View this message in context: http://r.789695.n4.nabble.com/reshape-data-adding-rows-to-dataframe-tp3253640p3253780.html Sent from the R help mailing list archive at Nabble.com. From m_karuna2002 at yahoo.com Wed Feb 2 11:28:23 2011 From: m_karuna2002 at yahoo.com (karuna m) Date: Wed, 2 Feb 2011 15:58:23 +0530 (IST) Subject: [R] clustering with finite mixture model Message-ID: <267881.57915.qm@web94503.mail.in2.yahoo.com> An embedded and charset-unspecified text was scrubbed... Name: not available URL: From lucia.rueda at ba.ieo.es Wed Feb 2 12:10:30 2011 From: lucia.rueda at ba.ieo.es (Lucia Rueda) Date: Wed, 2 Feb 2011 03:10:30 -0800 (PST) Subject: [R] reshape data, adding rows to dataframe In-Reply-To: <20110202110055.GA27170@praha1.ff.cuni.cz> References: <1296637991399-3253640.post@n4.nabble.com> <20110202110055.GA27170@praha1.ff.cuni.cz> Message-ID: <1296645030642-3253793.post@n4.nabble.com> Exactly!! Thanks a lot Petr. It worked! Thansk to you as well Ivan! -- View this message in context: http://r.789695.n4.nabble.com/reshape-data-adding-rows-to-dataframe-tp3253640p3253793.html Sent from the R help mailing list archive at Nabble.com. From you at ifn-magdeburg.de Wed Feb 2 12:55:05 2011 From: you at ifn-magdeburg.de (Wonsang You) Date: Wed, 2 Feb 2011 03:55:05 -0800 (PST) Subject: [R] Error of 'memory not mapped' in ff Package with VirtualBox Message-ID: <1296647705309-3253856.post@n4.nabble.com> Dear R Helpers, I would like to report on an error in the ff package here. The ff package is an R package which enables us to store large data on disk systematically and have fast access to the database. I used the package in Linux as a guest OS of VirtualBox, and executed the following commands. library(ff) x<-ff(1:5,length=5,update=TRUE,vmode="double",filename="header.ff",overwrite=TRUE) Afterwards, I got the following error message. *** caught segfault *** address 0xffffffff, cause 'memory not mapped' Traceback: 1: .Call("get_vector", .ffmode[vmode], attr(x, "physical"), index, nreturn, PACKAGE = "ff") 2: `[.ff`(ret, 1) 3: ret[1] 4: as.vector(ret[1]) 5: identical(as.vector(initdata[1]), as.vector(ret[1])) 6: ff(1:5, length = 5, update = TRUE, vmode = "double", filename = "header.ff", overwrite = TRUE) Possible actions: 1: abort (with core dump, if enabled) 2: normal R exit 3: exit R without saving workspace 4: exit R saving workspace Selection: Can anyone give an advice to solve the problem? Best Regards, Ryan ----- Wonsang You Leibniz Institute for Neurobiology -- View this message in context: http://r.789695.n4.nabble.com/Error-of-memory-not-mapped-in-ff-Package-with-VirtualBox-tp3253856p3253856.html Sent from the R help mailing list archive at Nabble.com. From wwwhsd at gmail.com Wed Feb 2 13:00:43 2011 From: wwwhsd at gmail.com (Henrique Dallazuanna) Date: Wed, 2 Feb 2011 10:00:43 -0200 Subject: [R] reshape data, adding rows to dataframe In-Reply-To: <1296644285371-3253780.post@n4.nabble.com> References: <1296637991399-3253640.post@n4.nabble.com> <4D492D56.6090601@uni-hamburg.de> <1296644285371-3253780.post@n4.nabble.com> Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From kaveh.vakili at ulb.ac.be Wed Feb 2 13:10:02 2011 From: kaveh.vakili at ulb.ac.be (kv) Date: Wed, 2 Feb 2011 04:10:02 -0800 (PST) Subject: [R] multicore + xeon ? Message-ID: <1296648602040-3253882.post@n4.nabble.com> Is there any reason to expect a problem ? i'm running this script on the cluster down the hall: module load R/2.11.0 R library(multicore) fxx<-function(ll) runif(1) mclapply(1:10,fxx) i get: Error in fork() : Unable to fork. less /proc/cpuinfo yields: processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 15 model name : Intel(R) Xeon(R) CPU X5365 @ 3.00GHz stepping : 11 cpu MHz : 2992.502 cache size : 4096 KB physical id : 0 siblings : 4 core id : 0 cpu cores : 4 fpu : yes fpu_exception : yes cpuid level : 10 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm constant_tsc pni monito r ds_cpl vmx est tm2 cx16 xtpr dca lahf_lm bogomips : 5990.06 clflush size : 64 cache_alignment : 64 address sizes : 38 bits physical, 48 bits virtual -- View this message in context: http://r.789695.n4.nabble.com/multicore-xeon-tp3253882p3253882.html Sent from the R help mailing list archive at Nabble.com. From savicky at praha1.ff.cuni.cz Wed Feb 2 13:11:40 2011 From: savicky at praha1.ff.cuni.cz (Petr Savicky) Date: Wed, 2 Feb 2011 13:11:40 +0100 Subject: [R] help In-Reply-To: <734603.74038.qm@web57504.mail.re1.yahoo.com> References: <734603.74038.qm@web57504.mail.re1.yahoo.com> Message-ID: <20110202121140.GA14067@praha1.ff.cuni.cz> On Tue, Feb 01, 2011 at 12:51:18PM -0800, Kiogou Lydie wrote: > > > PLEASE HELP > > I actually want to do the following: > > a[j] = (1/(j!))*?? (i-1-d), j = 500, ?? means product i = 1 to > j > > ?? > > Yet, j! will stop at 170 and ?? (i-1-d) at 172; so, a[j] will > not exceed 170. > > I would like to have at least 200 a[j]. > > ?? > > WHAT SHOULD I DO? Computing factorial of 171 and larger numbers may be done using extended arithmetic in Rmpfr as already suggested. Depending on the purpose of computing factorial of large numbers, consider also the function lfactorial(), which computes the logarithm in the standard numeric type. lfactorial(1000) [1] 5912.128 Hope this helps. Petr Savicky. From romildo.martins at gmail.com Wed Feb 2 13:12:02 2011 From: romildo.martins at gmail.com (Romildo Martins) Date: Wed, 2 Feb 2011 09:12:02 -0300 Subject: [R] String to Matrix Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From wwwhsd at gmail.com Wed Feb 2 13:18:35 2011 From: wwwhsd at gmail.com (Henrique Dallazuanna) Date: Wed, 2 Feb 2011 10:18:35 -0200 Subject: [R] String to Matrix In-Reply-To: References: Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From ripley at stats.ox.ac.uk Wed Feb 2 13:20:59 2011 From: ripley at stats.ox.ac.uk (Prof Brian Ripley) Date: Wed, 2 Feb 2011 12:20:59 +0000 Subject: [R] Strange result from sort: sort(c("aa", "ff")) gives "ff" "aa" with R.2.12.1 on windows 7 In-Reply-To: References: <9F0721FDD4F12D4B95AD894274F388EC020C63F0FA13@DJFEXMBX01.djf.agrsci.dk> Message-ID: 'Strange' to have no response on this. Can a knowledgeable Danish writer please confirm that this is how the OSes are supposed to handle Danish collation? On Mon, 24 Jan 2011, Prof Brian Ripley wrote: > On Mon, 24 Jan 2011, S?ren H?jsgaard wrote: > >> Dear list, >> >> Please consider the following call of sort >> >>> sort(c("a","f")) >> [1] "a" "f" >>> sort(c("f","a")) >> [1] "a" "f" >>> >>> sort(c("aa","ff")) >> [1] "ff" "aa" >>> sort(c("ff","aa")) >> [1] "ff" "aa" >> The last two results look strange to me. Is that a bug??? > > It seems that you and your OS disagree about Danish, and I'm in no position > to know which is correct. But this is not an R issue: the sorting is done by > OS services. > >> The result seems to come from calls to order: >> >>> order(c("a","f")) >> [1] 1 2 >>> order(c("f","a")) >> [1] 2 1 >>> >>> order(c("aa","ff")) >> [1] 2 1 >>> order(c("ff","aa")) >> [1] 1 2 > >> I get the same results on R.2.12.1, R.2.11.1 and R.2.13.0 on Windows 7. >> However on Linux, I get the "right answer" (the answer I expected). From >> the help pages I get the impression that there might be an issue about >> locale, but I didn't understand the details. >> >> Can anyone tell me what goes on here, please > > I recall that 'aa' used to sort at the end of the alphabet in Danish > telephone books, so it seems the sort used on Windows thinks so too. See > ?Comparison for some further details. What I don't understand is that > someone resident in Denmark finds this strange .... > > I get exactly the same in a Danish locale on Mac OS X, for example: > >> sort(c("aa","ff")) > [1] "ff" "aa" > > and also on my Linux box (Fedora 14 with LC_COLLATE=da_DK.utf8) > >> sort(c("aa","ff")) > [1] "ff" "aa" > > en_DK is not a Danish locale (in is English in Denmark). If you want an > English sort, try an English locale for LC_COLLATE (there may well be > several, hence 'an'). > >> >> Regards >> S?ren >> >> >> >> >> >> >>> sessionInfo() >> R version 2.12.1 Patched (2010-12-27 r53883) >> Platform: i386-pc-mingw32/i386 (32-bit) >> locale: >> [1] LC_COLLATE=Danish_Denmark.1252 LC_CTYPE=Danish_Denmark.1252 >> [3] LC_MONETARY=Danish_Denmark.1252 LC_NUMERIC=C >> [5] LC_TIME=Danish_Denmark.1252 >> attached base packages: >> [1] stats graphics grDevices utils datasets methods base >> other attached packages: >> [1] SHDtools_1.0 >> >> >>> sessionInfo() >> R version 2.12.1 (2010-12-16) >> Platform: i686-pc-linux-gnu (32-bit) >> locale: >> [1] LC_CTYPE=en_DK.utf8 LC_NUMERIC=C >> [3] LC_TIME=en_DK.utf8 LC_COLLATE=en_DK.utf8 >> [5] LC_MONETARY=C LC_MESSAGES=en_DK.utf8 >> [7] LC_PAPER=en_DK.utf8 LC_NAME=C >> [9] LC_ADDRESS=C LC_TELEPHONE=C >> [11] LC_MEASUREMENT=en_DK.utf8 LC_IDENTIFICATION=C >> attached base packages: >> [1] stats graphics grDevices utils datasets methods base >> >> ______________________________________________ >> R-help at 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, reproducible code. >> > > -- > Brian D. Ripley, ripley at stats.ox.ac.uk > Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ > University of Oxford, Tel: +44 1865 272861 (self) > 1 South Parks Road, +44 1865 272866 (PA) > Oxford OX1 3TG, UK Fax: +44 1865 272595 -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 From ripley at stats.ox.ac.uk Wed Feb 2 13:34:27 2011 From: ripley at stats.ox.ac.uk (Prof Brian Ripley) Date: Wed, 2 Feb 2011 12:34:27 +0000 (GMT) Subject: [R] Error of 'memory not mapped' in ff Package with VirtualBox In-Reply-To: <1296647705309-3253856.post@n4.nabble.com> References: <1296647705309-3253856.post@n4.nabble.com> Message-ID: This is clearly a problem occuring in the C code of the ff package. Please report to the package maintainer, Cced here (with the 'at a minimum' information requested in the posting guide, most importantly the Linux architecture and the versions involved). FWIW it works for me on > sessionInfo() R version 2.12.1 (2010-12-16) Platform: x86_64-unknown-linux-gnu (64-bit) ... other attached packages: [1] ff_2.2-1 bit_1.1-6 If possible, try running this under valgrind (see 'Writing R Extensions') to get more info on the cause: at least run under gdb to get more precise info on what was not mapped. You don't say what the host OS of VirtualBox was. We've found I/O under VirtualBox with a x86_64 Linux host to be slow, but R to run reliably. On Wed, 2 Feb 2011, Wonsang You wrote: > > Dear R Helpers, > > I would like to report on an error in the ff package here. > The ff package is an R package which enables us to store large data on disk > systematically and have fast access to the database. > I used the package in Linux as a guest OS of VirtualBox, and executed the > following commands. > > library(ff) > x<-ff(1:5,length=5,update=TRUE,vmode="double",filename="header.ff", overwrite=TRUE) > > Afterwards, I got the following error message. > > *** caught segfault *** > address 0xffffffff, cause 'memory not mapped' > > Traceback: > 1: .Call("get_vector", .ffmode[vmode], attr(x, "physical"), index, > nreturn, PACKAGE = "ff") > 2: `[.ff`(ret, 1) > 3: ret[1] > 4: as.vector(ret[1]) > 5: identical(as.vector(initdata[1]), as.vector(ret[1])) > 6: ff(1:5, length = 5, update = TRUE, vmode = "double", filename = > "header.ff", overwrite = TRUE) > > Possible actions: > 1: abort (with core dump, if enabled) > 2: normal R exit > 3: exit R without saving workspace > 4: exit R saving workspace > Selection: > > Can anyone give an advice to solve the problem? > > Best Regards, > Ryan > > ----- > Wonsang You > Leibniz Institute for Neurobiology > -- > View this message in context: http://r.789695.n4.nabble.com/Error-of-memory-not-mapped-in-ff-Package-with-VirtualBox-tp3253856p3253856.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at 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, reproducible code. > -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 From Soren.Hojsgaard at agrsci.dk Wed Feb 2 13:56:28 2011 From: Soren.Hojsgaard at agrsci.dk (=?iso-8859-1?Q?S=F8ren_H=F8jsgaard?=) Date: Wed, 2 Feb 2011 13:56:28 +0100 Subject: [R] Strange result from sort: sort(c("aa", "ff")) gives "ff" "aa" with R.2.12.1 on windows 7 In-Reply-To: References: <9F0721FDD4F12D4B95AD894274F388EC020C63F0FA13@DJFEXMBX01.djf.agrsci.dk> Message-ID: <9F0721FDD4F12D4B95AD894274F388EC020C63EC4775@DJFEXMBX01.djf.agrsci.dk> Not sure if I qualify as being knowledgeable, but... You write > I recall that 'aa' used to sort at the end of the alphabet in Danish > telephone books, so it seems the sort used on Windows thinks so too. See > ?Comparison for some further details. What I don't understand is that > someone resident in Denmark finds this strange .... Yes, I can confirm that "aa" resides at the end of the Danish alphabet (as an old way of writing the letter which in modern writing is "?"). But what should one then do if one wants "aa" to mean "an a followed by another a" and not "aa" (="?") when calling sort?? Regards S?ren H?jsgaard -----Oprindelig meddelelse----- Fra: Prof Brian Ripley [mailto:ripley at stats.ox.ac.uk] Sendt: 2. februar 2011 13:21 Til: S?ren H?jsgaard Cc: r-help at stat.math.ethz.ch Emne: Re: [R] Strange result from sort: sort(c("aa", "ff")) gives "ff" "aa" with R.2.12.1 on windows 7 'Strange' to have no response on this. Can a knowledgeable Danish writer please confirm that this is how the OSes are supposed to handle Danish collation? On Mon, 24 Jan 2011, Prof Brian Ripley wrote: > On Mon, 24 Jan 2011, S?ren H?jsgaard wrote: > >> Dear list, >> >> Please consider the following call of sort >> >>> sort(c("a","f")) >> [1] "a" "f" >>> sort(c("f","a")) >> [1] "a" "f" >>> >>> sort(c("aa","ff")) >> [1] "ff" "aa" >>> sort(c("ff","aa")) >> [1] "ff" "aa" >> The last two results look strange to me. Is that a bug??? > > It seems that you and your OS disagree about Danish, and I'm in no position > to know which is correct. But this is not an R issue: the sorting is done by > OS services. > >> The result seems to come from calls to order: >> >>> order(c("a","f")) >> [1] 1 2 >>> order(c("f","a")) >> [1] 2 1 >>> >>> order(c("aa","ff")) >> [1] 2 1 >>> order(c("ff","aa")) >> [1] 1 2 > >> I get the same results on R.2.12.1, R.2.11.1 and R.2.13.0 on Windows 7. >> However on Linux, I get the "right answer" (the answer I expected). From >> the help pages I get the impression that there might be an issue about >> locale, but I didn't understand the details. >> >> Can anyone tell me what goes on here, please > > I recall that 'aa' used to sort at the end of the alphabet in Danish > telephone books, so it seems the sort used on Windows thinks so too. See > ?Comparison for some further details. What I don't understand is that > someone resident in Denmark finds this strange .... > > I get exactly the same in a Danish locale on Mac OS X, for example: > >> sort(c("aa","ff")) > [1] "ff" "aa" > > and also on my Linux box (Fedora 14 with LC_COLLATE=da_DK.utf8) > >> sort(c("aa","ff")) > [1] "ff" "aa" > > en_DK is not a Danish locale (in is English in Denmark). If you want an > English sort, try an English locale for LC_COLLATE (there may well be > several, hence 'an'). > >> >> Regards >> S?ren >> >> >> >> >> >> >>> sessionInfo() >> R version 2.12.1 Patched (2010-12-27 r53883) >> Platform: i386-pc-mingw32/i386 (32-bit) >> locale: >> [1] LC_COLLATE=Danish_Denmark.1252 LC_CTYPE=Danish_Denmark.1252 >> [3] LC_MONETARY=Danish_Denmark.1252 LC_NUMERIC=C >> [5] LC_TIME=Danish_Denmark.1252 >> attached base packages: >> [1] stats graphics grDevices utils datasets methods base >> other attached packages: >> [1] SHDtools_1.0 >> >> >>> sessionInfo() >> R version 2.12.1 (2010-12-16) >> Platform: i686-pc-linux-gnu (32-bit) >> locale: >> [1] LC_CTYPE=en_DK.utf8 LC_NUMERIC=C >> [3] LC_TIME=en_DK.utf8 LC_COLLATE=en_DK.utf8 >> [5] LC_MONETARY=C LC_MESSAGES=en_DK.utf8 >> [7] LC_PAPER=en_DK.utf8 LC_NAME=C >> [9] LC_ADDRESS=C LC_TELEPHONE=C >> [11] LC_MEASUREMENT=en_DK.utf8 LC_IDENTIFICATION=C >> attached base packages: >> [1] stats graphics grDevices utils datasets methods base >> >> ______________________________________________ >> R-help at 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, reproducible code. >> > > -- > Brian D. Ripley, ripley at stats.ox.ac.uk > Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ > University of Oxford, Tel: +44 1865 272861 (self) > 1 South Parks Road, +44 1865 272866 (PA) > Oxford OX1 3TG, UK Fax: +44 1865 272595 -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 From r.user.spain at gmail.com Wed Feb 2 14:02:25 2011 From: r.user.spain at gmail.com (Usuario R) Date: Wed, 2 Feb 2011 14:02:25 +0100 Subject: [R] Problem with getFX function Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From jholtman at gmail.com Wed Feb 2 14:03:39 2011 From: jholtman at gmail.com (jim holtman) Date: Wed, 2 Feb 2011 08:03:39 -0500 Subject: [R] error in scan(... In-Reply-To: <1296630435806-3253487.post@n4.nabble.com> References: <1296630435806-3253487.post@n4.nabble.com> Message-ID: It is clear that you have letters in the data you are trying to process; that is the cause of the erro. What was the 'scan' statement you were using? Were you expecting all numerics in the string? The error message is consistent with your input. On Wed, Feb 2, 2011 at 2:07 AM, gked wrote: > > I know it's a common error and there is a lot of help available but still > can't resolve the issue: > all i am trying to do is to read a csv file from my folder and this is what > i get: > > Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, > : > ?scan() expected 'a real', got > '1,m,a,F,165,240,26.5,31,0.738,0.704,1.095,0.606,0.847' > > Can you help? > > -- > View this message in context: http://r.789695.n4.nabble.com/error-in-scan-tp3253487p3253487.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at 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, reproducible code. > -- Jim Holtman Data Munger Guru What is the problem that you are trying to solve? From ripley at stats.ox.ac.uk Wed Feb 2 14:16:17 2011 From: ripley at stats.ox.ac.uk (Prof Brian Ripley) Date: Wed, 2 Feb 2011 13:16:17 +0000 Subject: [R] Strange result from sort: sort(c("aa", "ff")) gives "ff" "aa" with R.2.12.1 on windows 7 In-Reply-To: <9F0721FDD4F12D4B95AD894274F388EC020C63EC4775@DJFEXMBX01.djf.agrsci.dk> References: <9F0721FDD4F12D4B95AD894274F388EC020C63F0FA13@DJFEXMBX01.djf.agrsci.dk> <9F0721FDD4F12D4B95AD894274F388EC020C63EC4775@DJFEXMBX01.djf.agrsci.dk> Message-ID: On Wed, 2 Feb 2011, S?ren H?jsgaard wrote: > Not sure if I qualify as being knowledgeable, but... > > You write > >> I recall that 'aa' used to sort at the end of the alphabet in Danish >> telephone books, so it seems the sort used on Windows thinks so too. See >> ?Comparison for some further details. What I don't understand is that >> someone resident in Denmark finds this strange .... > > Yes, I can confirm that "aa" resides at the end of the Danish > alphabet (as an old way of writing the letter which in modern > writing is "?"). But what should one then do if one wants "aa" to > mean "an a followed by another a" and not "aa" (="?") when calling > sort?? Set Sys.setlocale("LC_COLLATE", "") appropriately (sorry, that's very OS-specific but 'C' and 'en' or 'English' probably work on Windows). On platforms using ICU (most, but not Windows), see also ?icuSetCollate for further ways to tweak collation: that has "aarhus" in its examples. > > Regards > S?ren H?jsgaard > > -----Oprindelig meddelelse----- > Fra: Prof Brian Ripley [mailto:ripley at stats.ox.ac.uk] > Sendt: 2. februar 2011 13:21 > Til: S?ren H?jsgaard > Cc: r-help at stat.math.ethz.ch > Emne: Re: [R] Strange result from sort: sort(c("aa", "ff")) gives "ff" "aa" with R.2.12.1 on windows 7 > > 'Strange' to have no response on this. Can a knowledgeable Danish > writer please confirm that this is how the OSes are supposed to handle > Danish collation? > > On Mon, 24 Jan 2011, Prof Brian Ripley wrote: > >> On Mon, 24 Jan 2011, S?ren H?jsgaard wrote: >> >>> Dear list, >>> >>> Please consider the following call of sort >>> >>>> sort(c("a","f")) >>> [1] "a" "f" >>>> sort(c("f","a")) >>> [1] "a" "f" >>>> >>>> sort(c("aa","ff")) >>> [1] "ff" "aa" >>>> sort(c("ff","aa")) >>> [1] "ff" "aa" >>> The last two results look strange to me. Is that a bug??? >> >> It seems that you and your OS disagree about Danish, and I'm in no position >> to know which is correct. But this is not an R issue: the sorting is done by >> OS services. >> >>> The result seems to come from calls to order: >>> >>>> order(c("a","f")) >>> [1] 1 2 >>>> order(c("f","a")) >>> [1] 2 1 >>>> >>>> order(c("aa","ff")) >>> [1] 2 1 >>>> order(c("ff","aa")) >>> [1] 1 2 >> >>> I get the same results on R.2.12.1, R.2.11.1 and R.2.13.0 on Windows 7. >>> However on Linux, I get the "right answer" (the answer I expected). From >>> the help pages I get the impression that there might be an issue about >>> locale, but I didn't understand the details. >>> >>> Can anyone tell me what goes on here, please >> >> I recall that 'aa' used to sort at the end of the alphabet in Danish >> telephone books, so it seems the sort used on Windows thinks so too. See >> ?Comparison for some further details. What I don't understand is that >> someone resident in Denmark finds this strange .... >> >> I get exactly the same in a Danish locale on Mac OS X, for example: >> >>> sort(c("aa","ff")) >> [1] "ff" "aa" >> >> and also on my Linux box (Fedora 14 with LC_COLLATE=da_DK.utf8) >> >>> sort(c("aa","ff")) >> [1] "ff" "aa" >> >> en_DK is not a Danish locale (in is English in Denmark). If you want an >> English sort, try an English locale for LC_COLLATE (there may well be >> several, hence 'an'). >> >>> >>> Regards >>> S?ren >>> >>> >>> >>> >>> >>> >>>> sessionInfo() >>> R version 2.12.1 Patched (2010-12-27 r53883) >>> Platform: i386-pc-mingw32/i386 (32-bit) >>> locale: >>> [1] LC_COLLATE=Danish_Denmark.1252 LC_CTYPE=Danish_Denmark.1252 >>> [3] LC_MONETARY=Danish_Denmark.1252 LC_NUMERIC=C >>> [5] LC_TIME=Danish_Denmark.1252 >>> attached base packages: >>> [1] stats graphics grDevices utils datasets methods base >>> other attached packages: >>> [1] SHDtools_1.0 >>> >>> >>>> sessionInfo() >>> R version 2.12.1 (2010-12-16) >>> Platform: i686-pc-linux-gnu (32-bit) >>> locale: >>> [1] LC_CTYPE=en_DK.utf8 LC_NUMERIC=C >>> [3] LC_TIME=en_DK.utf8 LC_COLLATE=en_DK.utf8 >>> [5] LC_MONETARY=C LC_MESSAGES=en_DK.utf8 >>> [7] LC_PAPER=en_DK.utf8 LC_NAME=C >>> [9] LC_ADDRESS=C LC_TELEPHONE=C >>> [11] LC_MEASUREMENT=en_DK.utf8 LC_IDENTIFICATION=C >>> attached base packages: >>> [1] stats graphics grDevices utils datasets methods base >>> >>> ______________________________________________ >>> R-help at 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, reproducible code. >>> >> >> -- >> Brian D. Ripley, ripley at stats.ox.ac.uk >> Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ >> University of Oxford, Tel: +44 1865 272861 (self) >> 1 South Parks Road, +44 1865 272866 (PA) >> Oxford OX1 3TG, UK Fax: +44 1865 272595 > > -- > Brian D. Ripley, ripley at stats.ox.ac.uk > Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ > University of Oxford, Tel: +44 1865 272861 (self) > 1 South Parks Road, +44 1865 272866 (PA) > Oxford OX1 3TG, UK Fax: +44 1865 272595 > -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 From bbolker at gmail.com Wed Feb 2 14:22:25 2011 From: bbolker at gmail.com (Ben Bolker) Date: Wed, 2 Feb 2011 13:22:25 +0000 Subject: [R] error in density plot References: <1296630542355-3253489.post@n4.nabble.com> Message-ID: Ramya gmail.com> writes: > I have the code for the density plot > j <- 8 > plot(density(diff_in_sample[,1]), main = list.files()[j]) > for(i in 1:25){ > lines(density(diff_in_sample[,i])) > } > > This gives me an error > Error in density.default(diff_in_sample[, i]) : > 'x' contains missing values [snip] ?NA lines(na.omit(density(diff_in_sample[,i]))) Consider replacing the loop by apply() [no efficiency gain, but more compact code] From hanson at depauw.edu Wed Feb 2 14:23:15 2011 From: hanson at depauw.edu (Bryan Hanson) Date: Wed, 2 Feb 2011 08:23:15 -0500 Subject: [R] Function to locate points in 3d octants or points on two axes In-Reply-To: <20110202082105.GA7682@praha1.ff.cuni.cz> References: <20110202082105.GA7682@praha1.ff.cuni.cz> Message-ID: <437E3F8C-6B26-4C8D-9EB1-113E6F3B8191@depauw.edu> Thanks Petr, the sign function will be of help. I was not aware of it. Bryan On Feb 2, 2011, at 3:21 AM, Petr Savicky wrote: > On Tue, Feb 01, 2011 at 08:30:22PM -0500, Bryan Hanson wrote: >> [Sorry, resending with a proper subject line!] >> >> Hi Guru's... >> >> I have a set of points that may lie along any of the x, y and z axes >> in a Cartesian coordinate system. I am hoping that a function exists >> which will determine if any two selected points are on different >> axes, >> i.e, if the one of the points is on x and the other on y or z, not >> elsewhere on the x axis. Put another way, I need to determine if the >> triangle formed by the two points and the origin lies in the xy, xz >> or >> yz planes. This might be as simple as testing if any particular >> value >> is zero, i.e. if the x coordinate is zero, then the points must be on >> the z and y axes and the triangle in the yz plane. But, I'm looking >> for a fairly general solution, one that also returns the appropriate >> plane as the answer. Very closely related to this, I could use a >> function that determines which of the 8 octants a point lies in. >> Seems >> like the cross product might be part of this, but I'm a little rusty >> on how to apply it. >> >> I hope this is clear enough, and someone has a suggestion to point me >> in the right direction. Before writing my own klunky version, I >> thought I'd ask. > > Hi. > > I think that for suggesting an appropriate solution it may be needed > to know, which data structure is used for the input pairs of points. > For > example, it may a single matrix n times 3 with points as rows and a > pair > is represented by two indices of the points. Alternatively, the input > may be a single matrix n times 6, where rows are pairs of points. > > In any case, the input may be simplified using sign() function. For > example > > a <- as.matrix(expand.grid(x=c(-1.1, 0, 1.1), y=c(0, 1.2), z=c(0, > 1.3))) > a > > x y z > [1,] -1.1 0.0 0.0 > [2,] 0.0 0.0 0.0 > [3,] 1.1 0.0 0.0 > [4,] -1.1 1.2 0.0 > [5,] 0.0 1.2 0.0 > [6,] 1.1 1.2 0.0 > [7,] -1.1 0.0 1.3 > [8,] 0.0 0.0 1.3 > [9,] 1.1 0.0 1.3 > [10,] -1.1 1.2 1.3 > [11,] 0.0 1.2 1.3 > [12,] 1.1 1.2 1.3 > > sign(a) > > x y z > [1,] -1 0 0 > [2,] 0 0 0 > [3,] 1 0 0 > [4,] -1 1 0 > [5,] 0 1 0 > [6,] 1 1 0 > [7,] -1 0 1 > [8,] 0 0 1 > [9,] 1 0 1 > [10,] -1 1 1 > [11,] 0 1 1 > [12,] 1 1 1 > > This output represents a classification of the points into a finite > number of regions and keeps the information needed for any of the > tasks, which you mention. > > Hope this helps. > > Petr Savicky. > > ______________________________________________ > R-help at 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, reproducible code. From you at ifn-magdeburg.de Wed Feb 2 14:26:20 2011 From: you at ifn-magdeburg.de (Wonsang You) Date: Wed, 2 Feb 2011 14:26:20 +0100 Subject: [R] Error of 'memory not mapped' in ff Package with VirtualBox In-Reply-To: References: <1296647705309-3253856.post@n4.nabble.com> Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From alcesgabbo at hotmail.com Wed Feb 2 14:30:38 2011 From: alcesgabbo at hotmail.com (alcesgabbo) Date: Wed, 2 Feb 2011 05:30:38 -0800 (PST) Subject: [R] subset in a BIG matrix Message-ID: <1296653438458-3254115.post@n4.nabble.com> I have a matrix with a lot of values inside.. when I execute the folowing command matrix2=subset(martix, condition.....) it works... but after the previous command I execute another "subset" matrix3=subset(martix2, condition2.....) and appears the following error: (subscript) logical subscript too long How can I solve this??? I think the probles is the size of the matrix... Thanks.. -- View this message in context: http://r.789695.n4.nabble.com/subset-in-a-BIG-matrix-tp3254115p3254115.html Sent from the R help mailing list archive at Nabble.com. From Erich.Striessnig at wu.ac.at Wed Feb 2 14:25:25 2011 From: Erich.Striessnig at wu.ac.at (Striessnig, Erich) Date: Wed, 2 Feb 2011 14:25:25 +0100 Subject: [R] Significant codes in mtable Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From G.R.Nobles at rug.nl Wed Feb 2 13:43:28 2011 From: G.R.Nobles at rug.nl (Gary Nobles) Date: Wed, 2 Feb 2011 04:43:28 -0800 (PST) Subject: [R] Lattice nb/wlist help Message-ID: <1296650608647-3253962.post@n4.nabble.com> Hi all, I have a grid of points at regular intervals (taken from a raster). I want to create a listw matrix which opperates like this 1 1 1 1 1 1 1 1 1 and also like this 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 and so on I want it to work with localG from package spdep: localG(x, listw, zero.policy=NULL, spChk=NULL) Any help is much appreciated. Thanks Gary -- View this message in context: http://r.789695.n4.nabble.com/Lattice-nb-wlist-help-tp3253962p3253962.html Sent from the R help mailing list archive at Nabble.com. From lucia.rueda at ba.ieo.es Wed Feb 2 14:06:31 2011 From: lucia.rueda at ba.ieo.es (Lucia Rueda) Date: Wed, 2 Feb 2011 05:06:31 -0800 (PST) Subject: [R] reshape data, adding rows to dataframe In-Reply-To: References: <1296637991399-3253640.post@n4.nabble.com> <4D492D56.6090601@uni-hamburg.de> <1296644285371-3253780.post@n4.nabble.com> Message-ID: <1296651991517-3254038.post@n4.nabble.com> Thanks Henrique! It solves the problem of having the column "N" with unreal number of individuals since N=1 with Petr's example: expand <- transform(dat[rep(1:nrow(dat), times=dat$N), ] ,N=1) rownames(expand) <- NULL expand > expand animal N 1 a 1 2 a 1 3 b 1 4 c 1 5 c 1 6 c 1 Cheers! -- View this message in context: http://r.789695.n4.nabble.com/reshape-data-adding-rows-to-dataframe-tp3253640p3254038.html Sent from the R help mailing list archive at Nabble.com. From sandy.small at nhs.net Wed Feb 2 14:39:26 2011 From: sandy.small at nhs.net (Sandy Small) Date: Wed, 2 Feb 2011 13:39:26 +0000 Subject: [R] Finding the dominant factor in an unbalanced group Message-ID: <4D495E8E.7090507@nhs.net> Hi all. This is perhaps more a statistics question but I'm hoping someone can help me. I have a group of patients for whom I'm looking at beat to beat RR interval changes. I have plotted the difference between one beat length and the next against the difference between the previous beat length and the current one. This gives me a plot with four quadrants: the bottom left corresponding to successively shorter beats, the top right to succesively longer, the top left to a shorter followed by a longer beat and the bottom right to a longer by a shorter. In theory if successive changes in beat length are random there should be an approximately equal number of counts in each quadrant of my plot. I have a dataframe which for each of my patients lists the number of counts in each quadrant: (dput data at the end of this mail) I can determine whether the distribution is balanced or not with a Chi Squared (chisq.test) However what I would like to do is determine whether there is a dominant quadrant (eg. CBP06118 in the example data), or a dominant pair of quadrants (eg CBP06036 in the example data) and if so which they are. If my dataset were only 10 patients it probably wouldn't be a problem (although I'm not certain what statistical check I could do beyond re-applying chisquared tests with only the relevant quadrants which sounds dodgy to me) the problem occurs because my data set is a couple of orders of magnitude bigger, Can anyone help? dput data is: structure(list(basestudy = structure(1:10, .Label = c("CBP06036", "CBP06095", "CBP06098", "CBP06100", "CBP06112", "CBP06118", "CBP06127", "CBP06158", "CBP06163", "CBP06166"), class = "factor"), tl = c(302L, 211L, 347L, 223L, 178L, 230L, 243L, 278L, 391L, 252L), tr = c(99L, 134L, 171L, 210L, 158L, 252L, 89L, 247L, 258L, 168L), br = c(305L, 212L, 346L, 223L, 178L, 231L, 244L, 277L, 388L, 254L), bl = c(142L, 288L, 284L, 191L, 144L, 360L, 147L, 184L, 164L, 186L)), .Names = c("basestudy", "tl", "tr", "br", "bl"), row.names = c(NA, 10L), class = "data.frame") Many thanks -- Sandy Small Clinical Physicist NHS Greater Glasgow and Clyde and NHS Forth Valley ******************************************************************************************************************** This message may contain confidential information. If yo...{{dropped:21}} From nick.torenvliet at gmail.com Wed Feb 2 14:40:36 2011 From: nick.torenvliet at gmail.com (Nick Torenvliet) Date: Wed, 2 Feb 2011 08:40:36 -0500 Subject: [R] Error w tokenizer .jcall unless run as root Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From chuse22 at gmail.com Wed Feb 2 14:43:42 2011 From: chuse22 at gmail.com (Chuse chuse) Date: Wed, 2 Feb 2011 15:43:42 +0200 Subject: [R] Acf of Frima Message-ID: Hello, I am trying to calculate the autocovariance matrix for any general farima(p,d,q) with p,q > 1. Could anyone give an idea how to implement in R or if there is any package for this? thank you beforehand. Jose. From wwwhsd at gmail.com Wed Feb 2 14:49:18 2011 From: wwwhsd at gmail.com (Henrique Dallazuanna) Date: Wed, 2 Feb 2011 11:49:18 -0200 Subject: [R] Significant codes in mtable In-Reply-To: References: Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From dwinsemius at comcast.net Wed Feb 2 14:51:46 2011 From: dwinsemius at comcast.net (David Winsemius) Date: Wed, 2 Feb 2011 08:51:46 -0500 Subject: [R] Finding the maximum in a particular group in a dataframe In-Reply-To: <621748.74621.qm@web44705.mail.sp1.yahoo.com> References: <621748.74621.qm@web44705.mail.sp1.yahoo.com> Message-ID: On Feb 2, 2011, at 3:48 AM, Asan Ramzan wrote: > Hello > > I am trying to find a way to find the max value, for only a subset > of a > dataframe, depending on how the data is grouped for example, > > How would I find the maxmium responce, for all the GPR119a condition > below: > > I've tried tapply > >> tapply(GPR119data$responce, GPR119data$GPR119a, max) > Error in tapply(GPR119data$responce, GPR119data$GPR119a, max) : > arguments must have same length > You need to use tapply on the names of the columns , not on the values: tapply(GPR119data$responce, GPR119data$condition, max) > tapply(GPR119data$responce, GPR119data$condition, max) con GPR119a GPR119b GPR119c GPR119d GPR119e GPR119f 0.3350084 0.6451204 0.8240356 0.5729588 0.3099644 0.4677268 1.0184191 Then you can choose the GPR119a value for further examination or display; > tapply(GPR119data$responce, GPR119data$condition, max)["GPR119a"] GPR119a 0.6451204 > responce,mouce,condition I'm guessing from this display that when you read this data in you used the default separator which is white-space and that does not include commas. In addition to the above, try adding sep="," in your read.table function. > 0.105902,KO,con > 0.232018561,KO,con > 0.335008375,KO,con > 0.387025433,KO,GPR119a > 0.576769897,KO,GPR119a > 0.645120419,KO,GPR119a > 0.2538608,KO,GPR119b > 0.183061952,KO,GPR119b > 0.824035587,KO,GPR119b > 0.399201597,KO,GPR119c > 0.417006618,KO,GPR119c > 0.572958834,KO,GPR119c > 0.229467444,KO,GPR119d > 0.294089745,KO,GPR119d > 0.309964445,KO,GPR119d > 0.30474325,KO,GPR119e > 0.159374839,KO,GPR119e > 0.467726848,KO,GPR119e > 1.01841912,KO,GPR119f > 0.423028621,KO,GPR119f > 0.223588597,KO,GPR119f > > Thank > > > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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, reproducible code. David Winsemius, MD West Hartford, CT From ghasem2094.amini at gmail.com Wed Feb 2 14:35:51 2011 From: ghasem2094.amini at gmail.com (ghasem amini) Date: Wed, 2 Feb 2011 17:05:51 +0330 Subject: [R] help Message-ID: hello I have recently started using the LOCFIT package, together with Clive Loader's book. I need to implement some method for automatic (plug-in) bandwidth selection in a multivariate kernel regression. From the book, and the LOCFIT documentation, it is not clear whether this is possible. As far as I can see, the only time the various automated procedures, e.g., SJPI, are used is in the kdeb function, which is for preparing a summary comparison of various selection methods, and only for a *univariate kernel density. *Does anyone here know of a way to implement automatic (plug-in) bandwidth selection for kernel regression, maybe with some R function that calls LOCFIT? Or can you suggest a good alternative package for this, either in R/Matlab or a stand-alone? Thanks a lot, and regards From Matt.Shotwell at Vanderbilt.Edu Wed Feb 2 14:58:22 2011 From: Matt.Shotwell at Vanderbilt.Edu (Matt Shotwell) Date: Wed, 2 Feb 2011 07:58:22 -0600 Subject: [R] clustering with finite mixture model In-Reply-To: <267881.57915.qm@web94503.mail.in2.yahoo.com> References: <267881.57915.qm@web94503.mail.in2.yahoo.com> Message-ID: <4D4962FE.9080304@Vanderbilt.edu> There are quite a few packages that work with finite mixtures, as evidenced by the descriptions here: http://cran.r-project.org/web/packages/index.html These might be useful: http://cran.r-project.org/web/packages/flexmix/index.html http://cran.r-project.org/web/packages/mclust/index.html -Matt On 02/02/2011 04:28 AM, karuna m wrote: > Dear R-help, > I am doing clustering via finite mixture model. Please suggest some packages in > R to find clusters via finite mixture model with continuous variables. And > also I wish to verify the distributional properties of the mixture distributions > by fitting the model with lognormal, gamma, exponentials etc,. > Thanks in advance, > warm regards,Ms.Karunambigai M > PhD Scholar > Dept. of Biostatistics > NIMHANS > Bangalore > India > > > [[alternative HTML version deleted]] > > > > > ______________________________________________ > R-help at 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, reproducible code. -- Matthew S Shotwell Assistant Professor School of Medicine Department of Biostatistics Vanderbilt University From karl at huftis.org Wed Feb 2 14:59:16 2011 From: karl at huftis.org (Karl Ove Hufthammer) Date: Wed, 2 Feb 2011 14:59:16 +0100 Subject: [R] Applying multiple functions to one object Message-ID: Dear list members, I recall seeing a convenience function for applying multiple functions to one object (i.e., almost the opposite of 'mapply?) somewhere. Example: If the function was named ?fun? the output of fun(3.14, mode, typeof, class) would be identical to the output of c(mode(3.14), typeof(3.14), class(3.14)) Is my memory failing me, or does such a function already exists in a package? Of course, it?s not difficult to define a summary function and apply this to the object, but writing, for example, fun(x, mean, median, sd, mad) to quickly show the relevant information is much more *convient*. It would be even nicer with a function that could also handle vectors and lists of values, and output the result as data frames or matrices. Example: x = c("foo", "bar", "foobar") fun(x, nchar, function(st) substr(st, 1 ,2) ) y = list(3, 3L, 3.14, factor(3)) fun(x, mode, typeof, class) -- Karl Ove Hufthammer From dwinsemius at comcast.net Wed Feb 2 15:05:25 2011 From: dwinsemius at comcast.net (David Winsemius) Date: Wed, 2 Feb 2011 09:05:25 -0500 Subject: [R] Help in getting info from a DataFrame In-Reply-To: <1296463440594-3248276.post@n4.nabble.com> References: <1296426479557-3247740.post@n4.nabble.com> <1296463440594-3248276.post@n4.nabble.com> Message-ID: On Jan 31, 2011, at 3:44 AM, ADias wrote: > > > David Winsemius wrote: >> >> >> On Jan 30, 2011, at 5:27 PM, ADias wrote: >> >>> dados<- >>> data >>> .frame >>> (Store >>> = >>> c >>> ("Setubal >>> ","lx >>> ","Aveiro >>> ","Coimbra >>> ","Aveiro","Evora","Aveiro","Coimbra","Setubal"),Prod=c("Bloco >>> Desenho","Bloco >>> Desenho >>> ","Tinteiro >>> ","R?gua >>> ","Lapiseira >>> ","Regua >>> ","Tinteiro","Lapiseira","Lapiseira"),qtd=c(2,1,2,1,3,1,1,1,1)) >> >> >> See if this is a more useful approach: >> >>> lapsales <- dados[dados$Prod=="Lapiseira", ] >>> lapsales[which.max(lapsales[ , "qtd" ]), "Store"] >> [1] Aveiro >> Levels: Aveiro Coimbra Evora lx Setubal >> >> -- >> David Winsemius, MD >> West Hartford, CT >> >> ______________________________________________ >> R-help at 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, reproducible code. >> >> > Hi, > > thank you for the help. > > Two questions I would like to make. > > Suppose I have put your answer on an object like this: > > r<-lapsales[which.max(lapsales[ , "qtd" ]), "Store"] > > so >> r > [1] Aveiro > Levels: Aveiro Coimbra Evora lx Setubal > > and suppoese I wish to add this year result to previous years results: > > results<-c("Lx","Setubal") > so I did: > > results<-c(results,r) > > and what I get is: > >> results > [1] "Lx" "Setubal" "1" Right. You appended a factor variable to a character variable and got the numeric representation for the Aveiro values which is 1 and it then got coerced into "1" because the firts element offered to the c() function was character. > > > why "1" and not "Aveiro"? > > Second question is: > >> lapsales > Store Prod qtd > 5 Aveiro Lapiseira 3 > 8 Coimbra Lapiseira 1 > 9 Setubal Lapiseira 1 >> lapsales[max(lapsales$qtd),"Store"] > [1] Setubal > Levels: Aveiro Coimbra Evora lx Setubal The max of lapsales$qtd is 3 to it is looking up the third store == Setubal. -- David. > > why Setubal and not Aveiro? > > many thanks > AD > -- > View this message in context: http://r.789695.n4.nabble.com/Help-in-getting-info-from-a-DataFrame-tp3247740p3248276.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at 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, reproducible code. David Winsemius, MD West Hartford, CT From E.Vettorazzi at uke.uni-hamburg.de Wed Feb 2 15:19:23 2011 From: E.Vettorazzi at uke.uni-hamburg.de (Eik Vettorazzi) Date: Wed, 2 Feb 2011 15:19:23 +0100 Subject: [R] Applying multiple functions to one object In-Reply-To: References: Message-ID: <4D4967EB.4090808@uke.uni-hamburg.de> Hi Karl, same to me. Much of the times when coding I think, 'damn it, I have seen that before, but where...' ... and so the following is from scratch, not from memory. fun<-function(x,...){ mthd<-list(...) lapply(mthd,function(m) do.call(m,list(x))) } fun(3.14, mode, typeof, class) there is no error-catching for non-existing functions, no naming of results and so on, but it may be a start. hth. Am 02.02.2011 14:59, schrieb Karl Ove Hufthammer: > Dear list members, > > I recall seeing a convenience function for applying multiple functions to > one object (i.e., almost the opposite of 'mapply?) somewhere. > Example: If the function was named ?fun? the output of > > fun(3.14, mode, typeof, class) > > would be identical to the output of > > c(mode(3.14), typeof(3.14), class(3.14)) > > Is my memory failing me, or does such a function already exists in a > package? Of course, it?s not difficult to define a summary function and > apply this to the object, but writing, for example, > > fun(x, mean, median, sd, mad) > > to quickly show the relevant information is much more *convient*. > > > It would be even nicer with a function that could also handle vectors and > lists of values, and output the result as data frames or matrices. Example: > > x = c("foo", "bar", "foobar") > fun(x, nchar, function(st) substr(st, 1 ,2) ) > > y = list(3, 3L, 3.14, factor(3)) > fun(x, mode, typeof, class) > -- Eik Vettorazzi Institut f?r Medizinische Biometrie und Epidemiologie Universit?tsklinikum Hamburg-Eppendorf Martinistr. 52 20246 Hamburg T ++49/40/7410-58243 F ++49/40/7410-57790 From hanson at depauw.edu Wed Feb 2 15:22:18 2011 From: hanson at depauw.edu (Bryan Hanson) Date: Wed, 2 Feb 2011 09:22:18 -0500 Subject: [R] General Solution to Drawing a Spline Curve in 3d? Message-ID: <89FA84ED-7678-4A25-984B-B2FFAA1AB23F@depauw.edu> Hello Again... I know that R has plenty of functions for drawing splines between two points in 2d, and plenty of ways to fit a spline curve among various points in 2d or 3d (I think), but, is there a function which can be used to draw a simple spline curve between any two points in 3d space? Since such a spline curve would be fundamentally a 2d object, I imagine that if a 3d version exists it would have to have some sort of argument specifying where that 2d plane should be drawn (maybe in cylindrical coordinates?). What I'm looking for would be the 3d analog of grid.curve or xspline. What I'm trying to do is related to the idea of great circles, as implemented in package geosphere, but the curves I'd like to draw are not on the surface of a sphere nor are they parts of a circle. Thanks for any suggestions! Bryan *********** Bryan Hanson Professor of Chemistry & Biochemistry From dwinsemius at comcast.net Wed Feb 2 15:29:02 2011 From: dwinsemius at comcast.net (David Winsemius) Date: Wed, 2 Feb 2011 09:29:02 -0500 Subject: [R] error in density plot In-Reply-To: References: <1296630542355-3253489.post@n4.nabble.com> Message-ID: On Feb 2, 2011, at 8:22 AM, Ben Bolker wrote: > Ramya gmail.com> writes: > >> I have the code for the density plot >> j <- 8 >> plot(density(diff_in_sample[,1]), main = list.files()[j]) >> for(i in 1:25){ >> lines(density(diff_in_sample[,i])) >> } >> >> This gives me an error >> Error in density.default(diff_in_sample[, i]) : >> 'x' contains missing values > > [snip] > > ?NA > > lines(na.omit(density(diff_in_sample[,i]))) I don't know if that will work, but since Bolker wrtote it, it's got a reasonable probability of being correct code. I generally use the na.rm argument inside the density function rather than na.omit wrapped around it. lines(density(diff_in_sample[,i], na.rm=TRUE)) Although if there are a lot of NA's then the registration of the lines results are going to be way off from the original plot axis. -- David. > > Consider replacing the loop by apply() [no efficiency > gain, but more compact code] > > ______________________________________________ > R-help at 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, reproducible code. David Winsemius, MD West Hartford, CT From luridao at gmail.com Wed Feb 2 15:42:17 2011 From: luridao at gmail.com (Luis Ridao) Date: Wed, 2 Feb 2011 14:42:17 +0000 Subject: [R] update not working Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From juapin at gmail.com Wed Feb 2 15:22:56 2011 From: juapin at gmail.com (misil) Date: Wed, 2 Feb 2011 06:22:56 -0800 (PST) Subject: [R] Regression type 2, x measured with error In-Reply-To: References: <1296574869381-3251875.post@n4.nabble.com> Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From diasandre at gmail.com Wed Feb 2 15:12:01 2011 From: diasandre at gmail.com (ADias) Date: Wed, 2 Feb 2011 06:12:01 -0800 (PST) Subject: [R] matrix and a function - apply function Message-ID: <1296655921644-3254271.post@n4.nabble.com> Hi I have this function and this matrix: function(x,y) x+y/x m<-matrix(c(1,2,4,2,10,8),3,2) > m [,1] [,2] [1,] 1 2 [2,] 2 10 [3,] 4 8 each row represent a point (x,y) in a chart and I want via my fucntion to calculate the image in order to get this results: for point (1,2) I would get 1+2/1 = 3 for point (2,10) I would get 2+10/2 = 7 for point (4,8) I would get 4+8/4 = 6 I have tried using sapply here but I get this: > sapply(m,function(x,y) x+y/x) Error in y/x : 'y' is missing what I am doing wrong? thanks ADias -- View this message in context: http://r.789695.n4.nabble.com/matrix-and-a-function-apply-function-tp3254271p3254271.html Sent from the R help mailing list archive at Nabble.com. From nathanielrayl at Hotmail.com Wed Feb 2 15:04:03 2011 From: nathanielrayl at Hotmail.com (Nathaniel) Date: Wed, 2 Feb 2011 06:04:03 -0800 (PST) Subject: [R] Need help subsetting time series data Message-ID: <1296655443067-3254236.post@n4.nabble.com> Hi all, I have multiple datasets of time series data taken from GPS collars. The collars are supposed to take a fix every hour on the half hour, i.e., 0:30, 1:30, 2:30...23:30, (because it sometimes takes longer for the collars to acquire a location the minute of these locations vary from 30-34) but because of a software glitch in the collars, at random times the collars start taking multiple fixes between programmed fixes, i.e., 22:31, 23:31, 0:31, 1:26, 1:29, 1:30, 1:31, 1:32, 1:33, 1:35, 1:35, 1:35, 1:35, 1:36, 1:36, 1:36, 2:30. These glitches occur approximately once a day throughout the 24 hour and 60 minute cycle. I want to remove all these extra locations from my dataset, but am new to R and haven't figured out a way to do so. I've tried some inelegant solutions involving verbose code, but haven't been able to come up with something that works correctly. Some things I've tried: #Subsetting out by minute value: >MR1001=read.csv(etc) >datetime<-paste(MR1001$date,MR1001$time) >datetime<-as.POSIXlt(strptime(as.character(datetime), tz="UTC", "%m/%d%Y %H:%M:%S")) >MR1001$min<-datetime$min >t1<-subset(MR1001,min==30|min==31|min==32|min==33|min==34) This works for most of the data, but when the unwanted fixes occur during the 30-34 minute mark of an hour (see example above) they are kept, which I don't want. To deal with this I tried to incorporate the time between fixes in an attempt to write an "ifelse" statement and subset the data that way: >MR1001=read.csv(etc) >MR1001=read.csv(etc) >datetime<-paste(MR1001$date,MR1001$time) >datetime<-as.POSIXlt(strptime(as.character(datetime), tz="UTC", "%m/%d%Y %H:%M:%S")) >MR1001$min<-datetime$min >t1<-subset(MR1001,min==30|min==31|min==32|min==33|min==34) >datetime<-paste(MR1001$date,MR1001$time) >datetime<-as.POSIXct(strptime(as.character(datetime), tz="UTC", "%m/%d%Y %H:%M:%S")) >datetime2<-datetime[-1] >datetime2[length(datetime)]<-datetime2[length(datetime)-1]+3600 >datetime3<-datetime2-datetime >datetime4<-datetime3/60 >datetime5<-as.numeric(datetime4) >t1$diff<-datetime5 This didn't work either though, because when an unwanted fix occurred after a wanted fix the value in the "diff" column was small, and I couldn't figure out how to subset the data in that format (I want to keep the 1st, 2nd, 3rd, and last fix in the example columns below (23:31, 00:31, 01:30, 2:30)): time diff 23:31 60 00:31 58.78 01:30 1.07 01:31 1.07 01:32 1.07 01:33 1.07 01:34 1.08 2:30 60 I hope this explanation is clear and that someone with more experience than me can help with a solution. Thanks very much in advance for your time and help! Nathaniel -- View this message in context: http://r.789695.n4.nabble.com/Need-help-subsetting-time-series-data-tp3254236p3254236.html Sent from the R help mailing list archive at Nabble.com. From alaios at yahoo.com Wed Feb 2 15:50:29 2011 From: alaios at yahoo.com (Alaios) Date: Wed, 2 Feb 2011 06:50:29 -0800 (PST) Subject: [R] Help me apply mapply Message-ID: <872264.12082.qm@web120118.mail.ne1.yahoo.com> Hello all I would like to ask your help use mapply. I have a function called findCell that takes two arguments(x,sr) where x is a vector of size two (e.g x<-c(2,3) and sr is a matrix. I would like to call many times the findCell function (thus I need mapply) for different x inputs but always for the same sr. as x is a vector of size two (two cells) I want to pass inside inside the following 2*10 matrix. -The first input is the two elements of the first row cbin(test[1,1],test[1,2]) -the second input is cbind(test[2,1],test[2,2] -the third input is cbind(test[3,1],test[3,2] and so on This is the str: str(cbind(test[,1],test[,2])) num [1:30, 1:2] -1 -0.667 -0.333 0 0.333 ... so I tried the following: > mapply(findCell,x=cbind(test[,1],test[,2]),sr=sr) Error in if (!is.finite(length.out) || length.out < 0L) stop("length must be non-negative number") else if (length.out == : missing value where TRUE/FALSE needed Calls: mapply -> .Call -> -> seq -> seq.default I have spend time reading the ?mapply but I am not sure what is the problem here. Could you please help me understand what is missing? Best Regards Alex From cttobin at hotmail.com Wed Feb 2 15:56:43 2011 From: cttobin at hotmail.com (Brian) Date: Wed, 2 Feb 2011 06:56:43 -0800 (PST) Subject: [R] SVM Prediction and Plot Message-ID: <1296658603593-3254421.post@n4.nabble.com> Hi I'm trying to predict using a model I fitted with SVM. I constructed the model (called Svm) using a training set, and now I want to use a test set (called BankTest) for prediction. The response variable is in the first column of BankTest. > SvmPred = predict(Svm, BankTest[,-1], probability=TRUE) > SvmPredRes = table(Pred = SvmPred, True = BankTest[,1]) I get this error: Error in table(Pred = SvmPred, True = BankTest) : all arguments must have the same length I checked the length of both BankTest[,1] and SvmPredict. > length(SvmPred) [1] 2282 > length(BankTest[,1]) [1] 2598 How are these two columns not the same size? Surely the prediction should try to predict all the values of BankTest[,1]? Any help would be much appreciated. -- View this message in context: http://r.789695.n4.nabble.com/SVM-Prediction-and-Plot-tp3254421p3254421.html Sent from the R help mailing list archive at Nabble.com. From dwinsemius at comcast.net Wed Feb 2 16:05:21 2011 From: dwinsemius at comcast.net (David Winsemius) Date: Wed, 2 Feb 2011 10:05:21 -0500 Subject: [R] matrix and a function - apply function In-Reply-To: <1296655921644-3254271.post@n4.nabble.com> References: <1296655921644-3254271.post@n4.nabble.com> Message-ID: On Feb 2, 2011, at 9:12 AM, ADias wrote: > > Hi > > I have this function and this matrix: > > function(x,y) x+y/x > > m<-matrix(c(1,2,4,2,10,8),3,2) > >> m > [,1] [,2] > [1,] 1 2 > [2,] 2 10 > [3,] 4 8 > > each row represent a point (x,y) in a chart and I want via my > fucntion to > calculate the image in order to get this results: > > for point (1,2) I would get 1+2/1 = 3 > for point (2,10) I would get 2+10/2 = 7 > for point (4,8) I would get 4+8/4 = 6 > > I have tried using sapply here but I get this: > >> sapply(m,function(x,y) x+y/x) > Error in y/x : 'y' is missing I'm not sure what sapply does with a matrix argument. I've only used t with vectors and lists. I suspect that it would straighten out the argument to a length = 6 vector. (And then, of course, the "y" wouldn't be there.) > > what I am doing wrong? Two things: instead use apply() and realize that the argument is passed as a vector apply(m, 1, function(x) x[1] +x[2]/x[1] ) -- David Winsemius, MD West Hartford, CT From mailinglist.honeypot at gmail.com Wed Feb 2 16:06:43 2011 From: mailinglist.honeypot at gmail.com (Steve Lianoglou) Date: Wed, 2 Feb 2011 10:06:43 -0500 Subject: [R] SVM Prediction and Plot In-Reply-To: <1296658603593-3254421.post@n4.nabble.com> References: <1296658603593-3254421.post@n4.nabble.com> Message-ID: Hi, On Wed, Feb 2, 2011 at 9:56 AM, Brian wrote: > > Hi > > I'm trying to predict using a model I fitted with SVM. > > I constructed the model (called Svm) using a training set, and now I want to > use a test set (called BankTest) for prediction. > > The response variable is in the first column of BankTest. > >> SvmPred = predict(Svm, BankTest[,-1], probability=TRUE) >> SvmPredRes = table(Pred = SvmPred, True = BankTest[,1]) > > I get this error: > Error in table(Pred = SvmPred, True = BankTest) : ?all arguments must have > the same length > > ?I checked the length of both BankTest[,1] and SvmPredict. >> length(SvmPred) > [1] 2282 >> length(BankTest[,1]) > [1] 2598 > > How are these two columns not the same size? Surely the prediction should > try to predict all the values of BankTest[,1]? What do you get when you type: R> head(SvmPred) -- Steve Lianoglou Graduate Student: Computational Systems Biology ?| Memorial Sloan-Kettering Cancer Center ?| Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org/~lianos/contact From E.Vettorazzi at uke.uni-hamburg.de Wed Feb 2 16:11:28 2011 From: E.Vettorazzi at uke.uni-hamburg.de (Eik Vettorazzi) Date: Wed, 02 Feb 2011 16:11:28 +0100 Subject: [R] matrix and a function - apply function In-Reply-To: <1296655921644-3254271.post@n4.nabble.com> References: <1296655921644-3254271.post@n4.nabble.com> Message-ID: <4D497420.4040003@uke.uni-hamburg.de> there is no need for 'apply' here, because R can handle vectors. ord<-m[,1]+m[,2]/m[,1] Am 02.02.2011 15:12, schrieb ADias: > > Hi > > I have this function and this matrix: > > function(x,y) x+y/x > > m<-matrix(c(1,2,4,2,10,8),3,2) > >> m > [,1] [,2] > [1,] 1 2 > [2,] 2 10 > [3,] 4 8 > > each row represent a point (x,y) in a chart and I want via my fucntion to > calculate the image in order to get this results: > > for point (1,2) I would get 1+2/1 = 3 > for point (2,10) I would get 2+10/2 = 7 > for point (4,8) I would get 4+8/4 = 6 > > I have tried using sapply here but I get this: > >> sapply(m,function(x,y) x+y/x) > Error in y/x : 'y' is missing > > what I am doing wrong? > > thanks > ADias -- Eik Vettorazzi Institut f?r Medizinische Biometrie und Epidemiologie Universit?tsklinikum Hamburg-Eppendorf Martinistr. 52 20246 Hamburg T ++49/40/7410-58243 F ++49/40/7410-57790 From petr.pikal at precheza.cz Wed Feb 2 16:11:17 2011 From: petr.pikal at precheza.cz (Petr PIKAL) Date: Wed, 2 Feb 2011 16:11:17 +0100 Subject: [R] matrix and a function - apply function In-Reply-To: References: <1296655921644-3254271.post@n4.nabble.com> Message-ID: Hi r-help-bounces at r-project.org napsal dne 02.02.2011 16:05:21: > > On Feb 2, 2011, at 9:12 AM, ADias wrote: > > > > > Hi > > > > I have this function and this matrix: > > > > function(x,y) x+y/x > > > > m<-matrix(c(1,2,4,2,10,8),3,2) > > > >> m > > [,1] [,2] > > [1,] 1 2 > > [2,] 2 10 > > [3,] 4 8 > > > > each row represent a point (x,y) in a chart and I want via my > > fucntion to > > calculate the image in order to get this results: > > > > for point (1,2) I would get 1+2/1 = 3 > > for point (2,10) I would get 2+10/2 = 7 > > for point (4,8) I would get 4+8/4 = 6 > > > > I have tried using sapply here but I get this: > > > >> sapply(m,function(x,y) x+y/x) > > Error in y/x : 'y' is missing > > I'm not sure what sapply does with a matrix argument. I've only used t > with vectors and lists. I suspect that it would straighten out the > argument to a length = 6 vector. (And then, of course, the "y" > wouldn't be there.) > > > > > > what I am doing wrong? > > Two things: instead use apply() and realize that the argument is > passed as a vector > > apply(m, 1, function(x) x[1] +x[2]/x[1] ) Maybe apply is not necessary here > m[,1]+m[,2]/m[,1] [1] 3 7 6 Regards Petr > > > -- > David Winsemius, MD > West Hartford, CT > > ______________________________________________ > R-help at 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, reproducible code. From sebastian.daza at gmail.com Wed Feb 2 16:26:07 2011 From: sebastian.daza at gmail.com (=?ISO-8859-1?Q?Sebasti=E1n_Daza?=) Date: Wed, 2 Feb 2011 09:26:07 -0600 Subject: [R] grey scale graphs Message-ID: <4D49778F.8030308@gmail.com> Hi everyone, Does anyone know how to get "black and white theme" (grey scale,, I would say) graphs using lattice or ggplot2, as it is shown in this webpage: http://lmdvr.r-forge.r-project.org/figures/figures.html? I am using Sweave, and I cannot get that color configuration. I have added the following option: trellis.device(color=FALSE) but I got a pdf file with color graphs. Thank in advance. -- Sebasti?n Daza sebastian.daza at gmail.com From izahn at psych.rochester.edu Wed Feb 2 16:29:37 2011 From: izahn at psych.rochester.edu (Ista Zahn) Date: Wed, 2 Feb 2011 10:29:37 -0500 Subject: [R] update not working In-Reply-To: References: Message-ID: Hi Luis, Well, when I copied your code I discovered that On Wed, Feb 2, 2011 at 9:42 AM, Luis Ridao wrote: > R-help, > > I'm using the "update" command for a multiple regression model and it is > just not working: > >> update(model1, . ~ . ? temp:wind:rad,data=ozone.pollution) ^ this is not a minus sign! Are you using a word processer to write your code? update(ozone ~ temp * wind * rad + I(rad^2) + I(temp^2) + I(wind^2), . ~ . -temp:wind:rad) works for me. Best, Ista > Error: unexpected input in "model2<-update(model1, . ~ . ?" > >> summary(model1) > > Call: > lm(formula = ozone ~ temp * wind * rad + I(rad^2) + I(temp^2) + > ? ?I(wind^2), data = ozone.pollution) > > Residuals: > ? ?Min ? ? ?1Q ?Median ? ? ?3Q ? ? Max > -38.894 -11.205 ?-2.736 ? 8.809 ?70.551 > > Coefficients: > ? ? ? ? ? ? ? ?Estimate Std. Error t value Pr(>|t|) > (Intercept) ? ?5.683e+02 ?2.073e+02 ? 2.741 ?0.00725 ** > temp ? ? ? ? ?-1.076e+01 ?4.303e+00 ?-2.501 ?0.01401 * > wind ? ? ? ? ?-3.237e+01 ?1.173e+01 ?-2.760 ?0.00687 ** > rad ? ? ? ? ? -3.117e-01 ?5.585e-01 ?-0.558 ?0.57799 > I(rad^2) ? ? ?-3.619e-04 ?2.573e-04 ?-1.407 ?0.16265 > I(temp^2) ? ? ?5.833e-02 ?2.396e-02 ? 2.435 ?0.01668 * > I(wind^2) ? ? ?6.106e-01 ?1.469e-01 ? 4.157 6.81e-05 *** > temp:wind ? ? ?2.377e-01 ?1.367e-01 ? 1.739 ?0.08519 . > temp:rad ? ? ? 8.403e-03 ?7.512e-03 ? 1.119 ?0.26602 > wind:rad ? ? ? 2.054e-02 ?4.892e-02 ? 0.420 ?0.67552 > temp:wind:rad -4.324e-04 ?6.595e-04 ?-0.656 ?0.51358 > --- > Signif. codes: ?0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1 > > Residual standard error: 17.82 on 100 degrees of freedom > Multiple R-squared: 0.7394, ? ? Adjusted R-squared: 0.7133 > F-statistic: 28.37 on 10 and 100 DF, ?p-value: < 2.2e-16 > >> > > Can anyone help with this? > > Thanks in advance > > ? ? ? ?[[alternative HTML version deleted]] > > > ______________________________________________ > R-help at 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, reproducible code. > > -- Ista Zahn Graduate student University of Rochester Department of Clinical and Social Psychology http://yourpsyche.org From waku at idi.ntnu.no Wed Feb 2 16:35:58 2011 From: waku at idi.ntnu.no (Wacek Kusnierczyk) Date: Wed, 02 Feb 2011 09:35:58 -0600 Subject: [R] help In-Reply-To: References: <734603.74038.qm@web57504.mail.re1.yahoo.com> <4D48DBF8.5000106@idi.ntnu.no> Message-ID: <4D4979DE.2070006@idi.ntnu.no> On 2/2/11 3:59 AM, ?ukasz R?c?awowicz wrote: > We don't need a loop! > > require(Rmpfr) > factorial(mpfr(1:500,3800)) This is very good! I get an unexpected warning, though: Warning message: In if (mpfr.is.integer(x)) round(r) else r : the condition has length > 1 and only the first element will be used vQ From izahn at psych.rochester.edu Wed Feb 2 16:45:42 2011 From: izahn at psych.rochester.edu (Ista Zahn) Date: Wed, 2 Feb 2011 10:45:42 -0500 Subject: [R] grey scale graphs In-Reply-To: <4D49778F.8030308@gmail.com> References: <4D49778F.8030308@gmail.com> Message-ID: Well, if you're using pdf, you could set the gray option there, e.g., pdf.options(colormodel="gray") Or you could just use a gray theme. In ggplot2 use + theme_gray() Not sure in lattice, but I think it also has a themeing system. Best, Ista 2011/2/2 Sebasti?n Daza : > Hi everyone, > Does anyone know how to get "black and white theme" (grey scale,, I would > say) graphs using lattice or ggplot2, as it is shown in this webpage: > http://lmdvr.r-forge.r-project.org/figures/figures.html? > > I am using Sweave, and I cannot get that color configuration. > I have added the following option: trellis.device(color=FALSE) but I got a > pdf file with color graphs. > > Thank in advance. > -- > Sebasti?n Daza > sebastian.daza at gmail.com > > ______________________________________________ > R-help at 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, reproducible code. > -- Ista Zahn Graduate student University of Rochester Department of Clinical and Social Psychology http://yourpsyche.org From mark.heckmann at gmx.de Wed Feb 2 16:49:46 2011 From: mark.heckmann at gmx.de (Mark Heckmann) Date: Wed, 02 Feb 2011 16:49:46 +0100 Subject: [R] drawing from one cell to another using layout() - possible? Message-ID: <20110202154946.35840@gmx.net> Is it possible to cross the cell boundaries set by layout using base graphics? I.e. I want to draw e.g. a line from one layout cell to another. Is there a way to do that? layout(matrix(c(1,2), byrow=TRUE, ncol=2)) plot.new() text(0,0,paste(rep("a", 200), collapse=""), xpd=T) layout.show(2) I would like the a's to not end at the layout borders of the left cell. Thanks in advance, Mark PS. I need to use base not groid graphics, though it may be simpler... -- Mark Heckmann (Dipl. Wirt.-Ing.) phone +49 (0) 421/1614618 From E.Vettorazzi at uke.uni-hamburg.de Wed Feb 2 17:08:35 2011 From: E.Vettorazzi at uke.uni-hamburg.de (Eik Vettorazzi) Date: Wed, 02 Feb 2011 17:08:35 +0100 Subject: [R] help In-Reply-To: <734603.74038.qm@web57504.mail.re1.yahoo.com> References: <734603.74038.qm@web57504.mail.re1.yahoo.com> Message-ID: <4D498183.8080006@uke.uni-hamburg.de> Hi, maybe you rethink your calculations. Just for curiosity, what's the purpose? First of all, using prod(1:j-1-.25) #and prod(1:j) instead of a loop is much more efficent. If you need all values for a[1] up to a[j] you can use cumprod But this doesn't get you rid of numeric overflow but 1/(1*2*3*4*..*j) * (-d)(1-d)(2-d)...(j-1-d) is the same as (-d)/1 * (1-d)/2 * (2-d)/3 ... * (j-1-d)/j (multiplication is commutative) j<-1:500 a<-cumprod((j-1-.25)/j) or am I missing something? Am 01.02.2011 21:51, schrieb Kiogou Lydie: > > > PLEASE HELP > > I actually want to do the following: > > a[j] = (1/(j!))*? (i-1-d), j = 500, ? means product i = 1 to > j > > > > Yet, j! will stop at 170 and ? (i-1-d) at 172; so, a[j] will > not exceed 170. > > I would like to have at least 200 a[j]. > > > > WHAT SHOULD I DO? > > > > PLEASE SEE MY CODE FOR DETAIL!! > > > #################################################### > R CODE: > ################################################### > > > > d = .25 > > # generate j! > v=j=1 > for (i in 1:200){ > v[i] = i > for (i in 2:200){ > j[1]=1 > j[i] = j[i-1]*v[i] > } > } > j > > # generate aj > l=A=a=0 > for (k in 1:200){ > l[k] = (k-1-d) > for (i in 2:200){ > A[1] = l[1] > A[i] = A[i-1]*l[i] > for ( i in 1:200){ > a[i]= (1/j[i])*A[i] > } > > } > } > a > > ######################################## END CODE ################## > ##################################################################### > > > With GOD, everything is POSSIBLE. > > Avec DIEU, tout est POSSIBLE. > > > > [[alternative HTML version deleted]] > > > > > ______________________________________________ > R-help at 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, reproducible code. -- Eik Vettorazzi Institut f?r Medizinische Biometrie und Epidemiologie Universit?tsklinikum Hamburg-Eppendorf Martinistr. 52 20246 Hamburg T ++49/40/7410-58243 F ++49/40/7410-57790 From djmuser at gmail.com Wed Feb 2 17:40:18 2011 From: djmuser at gmail.com (Dennis Murphy) Date: Wed, 2 Feb 2011 08:40:18 -0800 Subject: [R] Finding the maximum in a particular group in a dataframe In-Reply-To: <621748.74621.qm@web44705.mail.sp1.yahoo.com> References: <621748.74621.qm@web44705.mail.sp1.yahoo.com> Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From josh.m.ulrich at gmail.com Wed Feb 2 17:57:54 2011 From: josh.m.ulrich at gmail.com (Joshua Ulrich) Date: Wed, 2 Feb 2011 10:57:54 -0600 Subject: [R] SMA and EMA in package TTR In-Reply-To: References: Message-ID: Hi Anyi, That's not currently possible. You could use the rollmean function in the development version of the zoo package (on R-forge) to calculate the simple moving average as you described. I would like to add this as an option to TTR functions, but it is not high on my priority list. I would appreciate patches. Best, -- Joshua Ulrich ?| ?FOSS Trading: www.fosstrading.com On Sat, Jan 29, 2011 at 7:39 PM, Anyi Zhu wrote: > Hi, > > Just wondering for the SMA and EMA in package TTR, is it possible to me to > code it so that, say if I need to calculate SMA (x, n=100), when the sample > size is less than 100, it will give me the SMA (x, k) where k is the sample > size of the data? Right now it only gives me an invalid n error. > > Thanks! > > ? ? ? ?[[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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, reproducible code. > From djnordlund at frontier.com Wed Feb 2 17:55:31 2011 From: djnordlund at frontier.com (Daniel Nordlund) Date: Wed, 2 Feb 2011 08:55:31 -0800 Subject: [R] Function to locate points in 3d octants or points on twoaxes In-Reply-To: <437E3F8C-6B26-4C8D-9EB1-113E6F3B8191@depauw.edu> References: <20110202082105.GA7682@praha1.ff.cuni.cz> <437E3F8C-6B26-4C8D-9EB1-113E6F3B8191@depauw.edu> Message-ID: <0CA29A855DEF486CBE027F5AE5DD1065@Aragorn> > -----Original Message----- > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] > On Behalf Of Bryan Hanson > Sent: Wednesday, February 02, 2011 5:23 AM > To: Petr Savicky > Cc: r-help at r-project.org > Subject: Re: [R] Function to locate points in 3d octants or points on > twoaxes > > Thanks Petr, the sign function will be of help. I was not aware of > it. Bryan > > On Feb 2, 2011, at 3:21 AM, Petr Savicky wrote: > > > On Tue, Feb 01, 2011 at 08:30:22PM -0500, Bryan Hanson wrote: > >> [Sorry, resending with a proper subject line!] > >> > >> Hi Guru's... > >> > >> I have a set of points that may lie along any of the x, y and z axes > >> in a Cartesian coordinate system. I am hoping that a function exists > >> which will determine if any two selected points are on different > >> axes, > >> i.e, if the one of the points is on x and the other on y or z, not > >> elsewhere on the x axis. Put another way, I need to determine if the > >> triangle formed by the two points and the origin lies in the xy, xz > >> or > >> yz planes. This might be as simple as testing if any particular > >> value > >> is zero, i.e. if the x coordinate is zero, then the points must be on > >> the z and y axes and the triangle in the yz plane. But, I'm looking > >> for a fairly general solution, one that also returns the appropriate > >> plane as the answer. Very closely related to this, I could use a > >> function that determines which of the 8 octants a point lies in. > >> Seems > >> like the cross product might be part of this, but I'm a little rusty > >> on how to apply it. > >> > >> I hope this is clear enough, and someone has a suggestion to point me > >> in the right direction. Before writing my own klunky version, I > >> thought I'd ask. > > For a general solution you also need to consider how you want to deal with "boundary" conditions. For example, if the x and y coordinates are zero for both points then the points lie in both the xz and yz planes. And if one of the coordinates of a point is zero, then how do you decide which quadrant it is in? Dan Daniel Nordlund Bothell, WA USA From spencer.graves at structuremonitoring.com Wed Feb 2 18:08:23 2011 From: spencer.graves at structuremonitoring.com (Spencer Graves) Date: Wed, 02 Feb 2011 09:08:23 -0800 Subject: [R] Acf of Frima In-Reply-To: References: Message-ID: <4D498F87.7050305@structuremonitoring.com> What's farima? functional arima or fractional arima? If the former, the "fda" package includes a function "cor.fd" for "correlation matrix from functional data object(s)". If the latter, I suggest you use sos as follows: library(sos) (fr <- findFn('fractional arima')) "findFn" searches a database of help pages of contributed packages. This particular call returned 13 links in 5 packages and opened the results in a table in a web browser with hot links , sorted to put first the package with the most matches. Hope this helps. Spencer On 2/2/2011 5:43 AM, Chuse chuse wrote: > Hello, > > I am trying to calculate the autocovariance matrix for any general > farima(p,d,q) with > p,q> 1. Could anyone give an idea how to implement in R or if there > is any package for this? > > thank you beforehand. > > Jose. > > ______________________________________________ > R-help at 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, reproducible code. > > -- Spencer Graves, PE, PhD President and Chief Operating Officer Structure Inspection and Monitoring, Inc. 751 Emerson Ct. San Jos?, CA 95126 ph: 408-655-4567 From hanson at depauw.edu Wed Feb 2 18:28:40 2011 From: hanson at depauw.edu (Bryan Hanson) Date: Wed, 2 Feb 2011 12:28:40 -0500 Subject: [R] Function to locate points in 3d octants or points on twoaxes In-Reply-To: <0CA29A855DEF486CBE027F5AE5DD1065@Aragorn> References: <20110202082105.GA7682@praha1.ff.cuni.cz> <437E3F8C-6B26-4C8D-9EB1-113E6F3B8191@depauw.edu> <0CA29A855DEF486CBE027F5AE5DD1065@Aragorn> Message-ID: Thanks Dan for pointing that out. My question really arose from the need to draw splines between arbitrary 3d pairs of points, so I posted a new question to the list addressing that more specifically. While the issue of 3d splines must have been dealt with in graphics/ animation oriented programs/languages, I think I may have to "grow my own" and I'll need the suggestions offered by you and Petr. Thanks, Bryan On Feb 2, 2011, at 11:55 AM, Daniel Nordlund wrote: >> -----Original Message----- >> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org >> ] >> On Behalf Of Bryan Hanson >> Sent: Wednesday, February 02, 2011 5:23 AM >> To: Petr Savicky >> Cc: r-help at r-project.org >> Subject: Re: [R] Function to locate points in 3d octants or points on >> twoaxes >> >> Thanks Petr, the sign function will be of help. I was not aware of >> it. Bryan >> >> On Feb 2, 2011, at 3:21 AM, Petr Savicky wrote: >> >>> On Tue, Feb 01, 2011 at 08:30:22PM -0500, Bryan Hanson wrote: >>>> [Sorry, resending with a proper subject line!] >>>> >>>> Hi Guru's... >>>> >>>> I have a set of points that may lie along any of the x, y and z >>>> axes >>>> in a Cartesian coordinate system. I am hoping that a function >>>> exists >>>> which will determine if any two selected points are on different >>>> axes, >>>> i.e, if the one of the points is on x and the other on y or z, not >>>> elsewhere on the x axis. Put another way, I need to determine if >>>> the >>>> triangle formed by the two points and the origin lies in the xy, xz >>>> or >>>> yz planes. This might be as simple as testing if any particular >>>> value >>>> is zero, i.e. if the x coordinate is zero, then the points must >>>> be on >>>> the z and y axes and the triangle in the yz plane. But, I'm >>>> looking >>>> for a fairly general solution, one that also returns the >>>> appropriate >>>> plane as the answer. Very closely related to this, I could use a >>>> function that determines which of the 8 octants a point lies in. >>>> Seems >>>> like the cross product might be part of this, but I'm a little >>>> rusty >>>> on how to apply it. >>>> >>>> I hope this is clear enough, and someone has a suggestion to >>>> point me >>>> in the right direction. Before writing my own klunky version, I >>>> thought I'd ask. >>> > > For a general solution you also need to consider how you want to > deal with "boundary" conditions. For example, if the x and y > coordinates are zero for both points then the points lie in both the > xz and yz planes. And if one of the coordinates of a point is zero, > then how do you decide which quadrant it is in? > > Dan > > Daniel Nordlund > Bothell, WA USA > > ______________________________________________ > R-help at 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, reproducible code. From jholtman at gmail.com Wed Feb 2 18:34:01 2011 From: jholtman at gmail.com (jim holtman) Date: Wed, 2 Feb 2011 12:34:01 -0500 Subject: [R] subset in a BIG matrix In-Reply-To: <1296653438458-3254115.post@n4.nabble.com> References: <1296653438458-3254115.post@n4.nabble.com> Message-ID: To solve it, a little more data would help. At least provide exactly the statements you are using and an 'str' of the objects; e.g., str(matrix2) str(condition2) error message might indicate that the length of condition2 is larger than the subset of matrix2 that you want. On Wed, Feb 2, 2011 at 8:30 AM, alcesgabbo wrote: > > I have a matrix with a lot of values inside.. > > when I execute the folowing command > > matrix2=subset(martix, condition.....) > > it works... > > but after the previous command I execute another "subset" > > matrix3=subset(martix2, condition2.....) > > and appears the following error: > > (subscript) logical subscript too long > > How can I solve this??? > I think the probles is the size of the matrix... > Thanks.. > -- > View this message in context: http://r.789695.n4.nabble.com/subset-in-a-BIG-matrix-tp3254115p3254115.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at 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, reproducible code. > -- Jim Holtman Data Munger Guru What is the problem that you are trying to solve? From mailinglist.honeypot at gmail.com Wed Feb 2 18:39:06 2011 From: mailinglist.honeypot at gmail.com (Steve Lianoglou) Date: Wed, 2 Feb 2011 12:39:06 -0500 Subject: [R] subset in a BIG matrix In-Reply-To: <1296653438458-3254115.post@n4.nabble.com> References: <1296653438458-3254115.post@n4.nabble.com> Message-ID: Hi, On Wed, Feb 2, 2011 at 8:30 AM, alcesgabbo wrote: > > I have a matrix with a lot of values inside.. > > when I execute the folowing command > > matrix2=subset(martix, condition.....) > > it works... > > but after the previous command I execute another "subset" > > matrix3=subset(martix2, condition2.....) > > and appears the following error: > > (subscript) logical subscript too long > > How can I solve this??? > I think the probles is the size of the matrix... Without your actual code, it's hard to tell, but if I were to take a guess, I think you're generating your `condition2` logic vector based on your original `matrix` maybe? If you aren't already doing so, put your subsetting "logic" into your `subset` call, eg: matrix3 <- subset(matrix2, some.column <= some.value) ## or whatever -steve -- Steve Lianoglou Graduate Student: Computational Systems Biology ?| Memorial Sloan-Kettering Cancer Center ?| Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org/~lianos/contact From dwinsemius at comcast.net Wed Feb 2 16:40:30 2011 From: dwinsemius at comcast.net (David Winsemius) Date: Wed, 2 Feb 2011 10:40:30 -0500 Subject: [R] grey scale graphs In-Reply-To: <4D49778F.8030308@gmail.com> References: <4D49778F.8030308@gmail.com> Message-ID: On Feb 2, 2011, at 10:26 AM, Sebasti?n Daza wrote: > Hi everyone, > Does anyone know how to get "black and white theme" (grey scale,, I > would say) graphs using lattice or ggplot2, as it is shown in this > webpage: http://lmdvr.r-forge.r-project.org/figures/figures.html? > > I am using Sweave, and I cannot get that color configuration. > I have added the following option: trellis.device(color=FALSE) but I > got a pdf file with color graphs. Maybe you should use postscript as a device for which the default is for color=FALSE. ?trellis.device > > Thank in advance. > -- > Sebasti?n Daza > sebastian.daza at gmail.com > > ______________________________________________ > R-help at 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, reproducible code. David Winsemius, MD West Hartford, CT From cstrieder at gmail.com Wed Feb 2 17:00:14 2011 From: cstrieder at gmail.com (Cristiano Strieder) Date: Wed, 2 Feb 2011 14:00:14 -0200 Subject: [R] Why my package is not being generated? Message-ID: Hi all, I have commited a new release of my package and waited for more than one day. After that "install.packages("tests",repos="http://r-forge.r-projet.org")" still returns "package 'tests' is not available". I have done the local build & check and the package seems ok. Also have mofified the Title in the DESCRIPTION file. What can be wrong? Is there any tool or recomendation to validade my package before submit it? -- Cristiano Strieder S?o Jos? dos Campos - SP From cttobin at hotmail.com Wed Feb 2 16:35:50 2011 From: cttobin at hotmail.com (Brian) Date: Wed, 2 Feb 2011 07:35:50 -0800 (PST) Subject: [R] SVM Prediction and Plot In-Reply-To: References: <1296658603593-3254421.post@n4.nabble.com> Message-ID: <1296660950138-3254570.post@n4.nabble.com> Thanks for the reply. When I run this: > head(SvmPred) 3570 2361 5406 2041 3440 4123 N N Y Y Y Y Levels: N Y -- View this message in context: http://r.789695.n4.nabble.com/SVM-Prediction-and-Plot-tp3254421p3254570.html Sent from the R help mailing list archive at Nabble.com. From d.kazakiewicz at gmail.com Wed Feb 2 17:43:14 2011 From: d.kazakiewicz at gmail.com (Den) Date: Wed, 02 Feb 2011 18:43:14 +0200 Subject: [R] exact logistic regression Message-ID: <1296664994.11047.7.camel@den2042-desktop> Hello to R people Does anybody know to calculate exact logistic regression in R? Does such option exist anywhere? Surprisingly, could not find it using search engine. It is hard to believe, however, that such useful function is not implemented in R yet? Could you help, please Thank you Denis From hrbuilder at hotmail.com Wed Feb 2 16:49:01 2011 From: hrbuilder at hotmail.com (H Roark) Date: Wed, 2 Feb 2011 09:49:01 -0600 Subject: [R] Efficient way to determine if a data frame has missing observations Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From hrbuilder at hotmail.com Wed Feb 2 17:36:13 2011 From: hrbuilder at hotmail.com (H Roark) Date: Wed, 2 Feb 2011 10:36:13 -0600 Subject: [R] Merging by factor variables Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From m.r.nixon at ex.ac.uk Wed Feb 2 17:44:32 2011 From: m.r.nixon at ex.ac.uk (mattnixon) Date: Wed, 2 Feb 2011 08:44:32 -0800 (PST) Subject: [R] Average of several line plots Message-ID: <1296665072493-3254850.post@n4.nabble.com> Hi, I have several data sets which are all approximately within the same values as each other (both X and Y) and all of these data sets more or less overlap each other when plotted on the same graph. However, although each data set varies between approximately the same range, there are vastly different numbers of data points within each data set (due to the nature of how these values had to be measured). Currently, I am trying to figure out a way to produce a graph showing all these data sets and a line showing the average of all of the data sets. Given the different number of data points, I can't think of an easy way to do this. Can anybody help? Thanks! -- View this message in context: http://r.789695.n4.nabble.com/Average-of-several-line-plots-tp3254850p3254850.html Sent from the R help mailing list archive at Nabble.com. From dwinsemius at comcast.net Wed Feb 2 18:51:34 2011 From: dwinsemius at comcast.net (David Winsemius) Date: Wed, 2 Feb 2011 12:51:34 -0500 Subject: [R] Function to locate points in 3d octants or points on twoaxes In-Reply-To: References: <20110202082105.GA7682@praha1.ff.cuni.cz> <437E3F8C-6B26-4C8D-9EB1-113E6F3B8191@depauw.edu> <0CA29A855DEF486CBE027F5AE5DD1065@Aragorn> Message-ID: <5C302933-2268-4DA4-A921-8E6C4850BAE0@comcast.net> On Feb 2, 2011, at 12:28 PM, Bryan Hanson wrote: > Thanks Dan for pointing that out. My question really arose from the > need to draw splines between arbitrary 3d pairs of points, so I > posted a new question to the list addressing that more > specifically. While the issue of 3d splines must have been dealt > with in graphics/animation oriented programs/languages, I think I > may have to "grow my own" and I'll need the suggestions offered by > you and Petr. Thanks, Bryan I fit crossed cubic regression splines using the rms package, which might provide this functionality. However, I get the idea you want an exact fit rather than a fit that is constrained to a particular functional form with parameters determined by a minimization metric involving a large number of points. -- David > > On Feb 2, 2011, at 11:55 AM, Daniel Nordlund wrote: > >>> -----Original Message----- >>> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org >>> ] >>> On Behalf Of Bryan Hanson >>> Sent: Wednesday, February 02, 2011 5:23 AM >>> To: Petr Savicky >>> Cc: r-help at r-project.org >>> Subject: Re: [R] Function to locate points in 3d octants or points >>> on >>> twoaxes >>> >>> Thanks Petr, the sign function will be of help. I was not aware of >>> it. Bryan >>> >>> On Feb 2, 2011, at 3:21 AM, Petr Savicky wrote: >>> >>>> On Tue, Feb 01, 2011 at 08:30:22PM -0500, Bryan Hanson wrote: >>>>> [Sorry, resending with a proper subject line!] >>>>> >>>>> Hi Guru's... >>>>> >>>>> I have a set of points that may lie along any of the x, y and z >>>>> axes >>>>> in a Cartesian coordinate system. I am hoping that a function >>>>> exists >>>>> which will determine if any two selected points are on different >>>>> axes, >>>>> i.e, if the one of the points is on x and the other on y or z, not >>>>> elsewhere on the x axis. Put another way, I need to determine >>>>> if the >>>>> triangle formed by the two points and the origin lies in the xy, >>>>> xz >>>>> or >>>>> yz planes. This might be as simple as testing if any particular >>>>> value >>>>> is zero, i.e. if the x coordinate is zero, then the points must >>>>> be on >>>>> the z and y axes and the triangle in the yz plane. But, I'm >>>>> looking >>>>> for a fairly general solution, one that also returns the >>>>> appropriate >>>>> plane as the answer. Very closely related to this, I could use a >>>>> function that determines which of the 8 octants a point lies in. >>>>> Seems >>>>> like the cross product might be part of this, but I'm a little >>>>> rusty >>>>> on how to apply it. >>>>> >>>>> I hope this is clear enough, and someone has a suggestion to >>>>> point me >>>>> in the right direction. Before writing my own klunky version, I >>>>> thought I'd ask. >>>> >> >> For a general solution you also need to consider how you want to >> deal with "boundary" conditions. For example, if the x and y >> coordinates are zero for both points then the points lie in both >> the xz and yz planes. And if one of the coordinates of a point is >> zero, then how do you decide which quadrant it is in? >> >> Dan >> >> Daniel Nordlund >> Bothell, WA USA >> >> ______________________________________________ >> R-help at 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, reproducible code. > > ______________________________________________ > R-help at 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, reproducible code. David Winsemius, MD West Hartford, CT From eriki at ccbr.umn.edu Wed Feb 2 19:01:56 2011 From: eriki at ccbr.umn.edu (Erik Iverson) Date: Wed, 02 Feb 2011 12:01:56 -0600 Subject: [R] Merging by factor variables In-Reply-To: References: Message-ID: <4D499C14.7030509@ccbr.umn.edu> H Roark wrote: > I'm wondering about the behavior of the merge function when using factors as by variables. I know that when you combine two factors using c() the results can be odd, as in: > > c(factor(1:5),factor(6:10)) > > which prints: [1] 1 2 3 4 5 1 2 3 4 5 > > I presume this is because factors are actually stored as integers, with 6,7,8,9,10 stored internally as 1,2,3,4,5. > > This concerns me somewhat, as I often merge data frames using factors as the by variables. From what I can tell, the merge function creates matches based on factor labels (i.e. the result of as.character(factor_var)) and not the internally stored integers, but I'm wondering if there are particular lurking problems that I should be aware of? I'm especially curious as to how R recalculates the levels of the by variables in outer joins where not every observation is matched, as in: > > df1<-data.frame(a=factor(c("a","b")),b=1:2) > df2<-data.frame(a=factor(c("b","c")),c=2:3) > df3<-merge(df1,df2,by="a",all=T) As far as I know, there is no reason to be concerned when using merge as you do. The magic that ?merge is performing is actually being done in ?rbind, and you should read the help for that, particularly under "Data frame methods". You can also study the code of base.rbind.data.frame to see what it's actually doing. --Erik From eriki at ccbr.umn.edu Wed Feb 2 19:07:19 2011 From: eriki at ccbr.umn.edu (Erik Iverson) Date: Wed, 02 Feb 2011 12:07:19 -0600 Subject: [R] Efficient way to determine if a data frame has missing observations In-Reply-To: References: Message-ID: <4D499D57.3010500@ccbr.umn.edu> H Roark wrote: > I have a data set covering a large number of cities with values for characteristics such as land area, population, and employment. The problem I have is that some cities lack observations for some of the characteristics and I'd like a quick way to determine which cities have missing data. For example: > > city<-c("A","A","A","B","B","C") > var<-c("sqmi","pop","emp","pop","emp","pop") > value<-c(10,100,40,30,10,20) > df<-data.frame(city,var,value) > > In this data frame, city A has complete data for the three variables, while city B is missing land area, and city C only has population data. In the full data frame, my approach to finding the missing observations has been to create a data frame with all combinations of 'city' and 'var', merge this onto the original data frame, and then extract the observations with missing data for 'value': > > city_unq<-c("A","B","C") > var_unq<-c("sqmi","pop","emp") > comb<-expand.grid(city=city_unq,var=var_unq) > > mrg<-merge(comb,df,by=c("city","var"),all=T) > missing<-mrg[is.na(mrg$value),] Perhaps the following, or a variation thereof? subset(as.data.frame(table(city = df$city, var = df$var)), Freq == 0) From mailinglist.honeypot at gmail.com Wed Feb 2 19:10:16 2011 From: mailinglist.honeypot at gmail.com (Steve Lianoglou) Date: Wed, 2 Feb 2011 13:10:16 -0500 Subject: [R] SVM Prediction and Plot In-Reply-To: <1296660950138-3254570.post@n4.nabble.com> References: <1296658603593-3254421.post@n4.nabble.com> <1296660950138-3254570.post@n4.nabble.com> Message-ID: Hi, On Wed, Feb 2, 2011 at 10:35 AM, Brian wrote: > > Thanks for the reply. > > When I run this: > >> head(SvmPred) > 3570 2361 5406 2041 3440 4123 > ? N ? ?N ? ?Y ? ?Y ? ?Y ? ?Y > Levels: N Y Hmmm ... I think we'll need more info. It looks like it should be working. By your output, your `probabilites=TRUE` parameter in your call to `predict` isn't actually doing anything. You need to train the svm and set `probability=TRUE` if you're really after class probabilties. Also, maybe there are some NA's in your data? Also, to be extra careful, the second argument to predict should be a matrix, I guess it already is, but ... what happens if you call predict like so: R> SvmPred = predict(Svm, as.matrix(BankTest[,-1]), na.omit=na.fail) -steve -- Steve Lianoglou Graduate Student: Computational Systems Biology ?| Memorial Sloan-Kettering Cancer Center ?| Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org/~lianos/contact From wwwhsd at gmail.com Wed Feb 2 19:13:28 2011 From: wwwhsd at gmail.com (Henrique Dallazuanna) Date: Wed, 2 Feb 2011 16:13:28 -0200 Subject: [R] Efficient way to determine if a data frame has missing observations In-Reply-To: References: Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From ehlers at ucalgary.ca Wed Feb 2 20:05:36 2011 From: ehlers at ucalgary.ca (Peter Ehlers) Date: Wed, 02 Feb 2011 11:05:36 -0800 Subject: [R] Average of several line plots In-Reply-To: <1296665072493-3254850.post@n4.nabble.com> References: <1296665072493-3254850.post@n4.nabble.com> Message-ID: <4D49AB00.9030909@ucalgary.ca> On 2011-02-02 08:44, mattnixon wrote: > > Hi, > > I have several data sets which are all approximately within the same values > as each other (both X and Y) and all of these data sets more or less overlap > each other when plotted on the same graph. However, although each data set > varies between approximately the same range, there are vastly different > numbers of data points within each data set (due to the nature of how these > values had to be measured). > > Currently, I am trying to figure out a way to produce a graph showing all > these data sets and a line showing the average of all of the data sets. > Given the different number of data points, I can't think of an easy way to > do this. Have a look at ?approxfun Peter Ehlers > > Can anybody help? > > Thanks! From ross.dunne at tcd.ie Wed Feb 2 20:06:28 2011 From: ross.dunne at tcd.ie (dunner) Date: Wed, 2 Feb 2011 11:06:28 -0800 (PST) Subject: [R] Indexing from two variables Message-ID: <1296673588777-3255405.post@n4.nabble.com> Hello, thank you all for your patience and time I am essentially trying to get disorganised data into long form for linear modelling. I have 2 dataframes "rec" and "book" Each row in "book" needs to be pasted onto the end of several of the rows of "rec" according to two variables in the row:" MRN" and "COURSE" which match. I have tried the following and variations thereon to no avail: #for each line of the recovery dataframe #insert the one line of the "book" dataset that corresponds to the MRN AND the course-of-treatment (COURSE) #get the mrn and course from the first line of the recovery dataframe (rec) i=1 newlist=list() colnames(newlist)=colnames(book) for ( i in 1:dim(rec)[1]) { mrn=as.numeric(as.vector(rec$MRN[i])); course=as.character(rec$COURSE[i]); ## find the corresponding row in the book dataframe ## by generating a logical vector and using ## it to access "book" get.vector<-as.vector(((as.numeric(as.vector(book$MRN))==mrn) & (as.character(book$COURSE)==course))) #gives you a vector of logicals (works) newlist[i]<-book[get.vector,] ### (doesn't work) i=i+1; } If anyone has any suggestions on 1)getting this to work 2) making it more elegant (or perhaps just less clumsy) If I have been unclear in any way I beg your pardons. I do understand I haven't combined any data above, I think if I can generate a long-format dataframe I can combine them all on my own. Apologies to anybody who receives this twice, I had a "bounced" reply the first time, and assumed it was unsuccessful. Ross Dunne MB MRCPsych ross.dunne at tcd.ie -- View this message in context: http://r.789695.n4.nabble.com/Indexing-from-two-variables-tp3255405p3255405.html Sent from the R help mailing list archive at Nabble.com. From eduardo.oliveirahorta at gmail.com Wed Feb 2 20:07:12 2011 From: eduardo.oliveirahorta at gmail.com (Eduardo de Oliveira Horta) Date: Wed, 2 Feb 2011 17:07:12 -0200 Subject: [R] Average of several line plots In-Reply-To: <1296665072493-3254850.post@n4.nabble.com> References: <1296665072493-3254850.post@n4.nabble.com> Message-ID: It is not clear from your message whether these data represent functions or such. Could you perhaps bring up an example? I'm guessing each data set contains evaluation points and function values at those points, and that you would like to plot these functions and the mean function all on the same graph, is that right? If the points in the domain differ from each other, it's not as immediate to build a mean function. A quick recipe would be to use splinefun on each data set, generate a new grid for the domain, evaluate each obtained spline on this grid to get new data sets and build the mean function from there. But without an example it's really just guessing. Hope this helps anyway. ?splinefun Best regards, Eduardo On Wed, Feb 2, 2011 at 2:44 PM, mattnixon wrote: > > Hi, > > I have several data sets which are all approximately within the same values > as each other (both X and Y) and all of these data sets more or less overlap > each other when plotted on the same graph. However, although each data set > varies between approximately the same range, there are vastly different > numbers of data points within each data set (due to the nature of how these > values had to be measured). > > Currently, I am trying to figure out a way to produce a graph showing all > these data sets and a line showing the average of all of the data sets. > Given the different number of data points, I can't think of an easy way to > do this. > > Can anybody help? > > Thanks! > -- > View this message in context: http://r.789695.n4.nabble.com/Average-of-several-line-plots-tp3254850p3254850.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at 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, reproducible code. > From izahn at psych.rochester.edu Wed Feb 2 20:13:09 2011 From: izahn at psych.rochester.edu (Ista Zahn) Date: Wed, 2 Feb 2011 14:13:09 -0500 Subject: [R] Indexing from two variables In-Reply-To: <1296673588777-3255405.post@n4.nabble.com> References: <1296673588777-3255405.post@n4.nabble.com> Message-ID: Hard to know exactly without seeing the structrure of rec and book, but I would start with ?merge Best, Ista On Wed, Feb 2, 2011 at 2:06 PM, dunner wrote: > > Hello, thank you all for your patience and time > > I am essentially trying to get disorganised data into long form for linear > modelling. > > I have 2 dataframes "rec" and "book" > > Each row in "book" needs to be pasted onto the end of several of the rows of > "rec" according to two variables in the row:" MRN" and "COURSE" which match. > > I have tried the following and variations thereon to no avail: > > > #for each line of the recovery dataframe #insert the one line of the "book" > dataset that corresponds to the MRN AND the course-of-treatment (COURSE) > > #get the mrn and course from the first line of the recovery dataframe (rec) > > i=1 > newlist=list() > colnames(newlist)=colnames(book) > for ( i in 1:dim(rec)[1]) { > > ? ? ? ?mrn=as.numeric(as.vector(rec$MRN[i])); > ? ? ? ?course=as.character(rec$COURSE[i]); > > ## find the corresponding row in the book dataframe ## by generating a > logical vector and using ## it to access "book" > > get.vector<-as.vector(((as.numeric(as.vector(book$MRN))==mrn) & > (as.character(book$COURSE)==course))) > > #gives you a vector of logicals (works) > > newlist[i]<-book[get.vector,] ?### (doesn't work) > > i=i+1; > } > > > If anyone has any suggestions on > > 1)getting this to work > 2) making it more elegant (or perhaps just less clumsy) > > If I have been unclear in any way I beg your pardons. > > I do understand I haven't combined any data above, I think if I can generate > a long-format dataframe I can combine them all on my own. Apologies to > anybody who receives this twice, I had a "bounced" reply the first time, and > assumed it was unsuccessful. > > Ross Dunne > MB MRCPsych > ross.dunne at tcd.ie > > > > -- > View this message in context: http://r.789695.n4.nabble.com/Indexing-from-two-variables-tp3255405p3255405.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at 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, reproducible code. > -- Ista Zahn Graduate student University of Rochester Department of Clinical and Social Psychology http://yourpsyche.org From moor0554 at umn.edu Wed Feb 2 20:20:05 2011 From: moor0554 at umn.edu (Christopher T. Moore) Date: 02 Feb 2011 13:20:05 -0600 Subject: [R] Flexibly Retrieving Objects with an Index Message-ID: Greetings, I would like to flexibly combine several data frames objects without specifying the exact names of the objects in memory. Should I use indexing to call those objects out of memory? I regularly use indexes to flexibly extract parts of data frames and lists and to read files from my hard drive, but I can't figure out how to do so with stored objects. In my case, all of the data frames of interest are formatted the same way and have been assigned to objects with the prefix "data.". The following examples combine only the names (not the objects themselves): rbind(ls()[grep("data.", ls(), fixed=T)]) list(ls()[grep("data.", ls(), fixed=T)]) Is there a way to get ls() (or some other function) to return the object instead of just the name? I searched the help files and the R-help archives but couldn't find a solution. Thanks in advance. Sincerely, Chris -- Christopher T. Moore, M.P.P. Doctoral Student Quantitative Methods in Education University of Minnesota 44.9785?N, 93.2396?W moor0554 at umn.edu http://umn.edu/~moor0554 From xie at yihui.name Wed Feb 2 20:22:59 2011 From: xie at yihui.name (Yihui Xie) Date: Wed, 2 Feb 2011 13:22:59 -0600 Subject: [R] Why my package is not being generate? In-Reply-To: References: Message-ID: First, you had a typo in install.packages("tests",repos="http://r-forge.r-projet.org") the URL should be http://r-forge.r-project.org Second, R-Forge might not be as fast as you think in terms of building new packages; you can check out the schedule here: http://site.r-forge.r-project.org/ If you don't want to wait for so long, you can simply upload your package to CRAN via FTP, as long as it has passed the "R CMD check" procedure (no errors or warnings). Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Tue, Feb 1, 2011 at 10:49 PM, Cristiano Strieder wrote: > Hi all, > > I have commited a new release of my package and waited for more than one > day. After that "install.packages("tests",repos="http://r-forge.r-projet.org")" > still returns "package 'tests' is not available". I have done the local > build & check and the package seems ok. Also have mofified the Title in the > DESCRIPTION ?file. > > What can be wrong? > > Is there any tool or recomendation to validade my package before submit it? > > > -- > Cristiano Strieder > S?o Jos? dos Campos - SP > > ? ? ? ?[[alternative HTML version deleted]] > > > ______________________________________________ > R-help at 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, reproducible code. > > From wwwhsd at gmail.com Wed Feb 2 20:23:42 2011 From: wwwhsd at gmail.com (Henrique Dallazuanna) Date: Wed, 2 Feb 2011 17:23:42 -0200 Subject: [R] Flexibly Retrieving Objects with an Index In-Reply-To: References: Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From moor0554 at umn.edu Wed Feb 2 20:35:14 2011 From: moor0554 at umn.edu (Christopher T. Moore) Date: 02 Feb 2011 13:35:14 -0600 Subject: [R] Flexibly Retrieving Objects with an Index In-Reply-To: References: Message-ID: That works great. Thanks, Henrique. -Chris -- Christopher T. Moore, M.P.P. Doctoral Student Quantitative Methods in Education University of Minnesota 44.9785?N, 93.2396?W moor0554 at umn.edu http://umn.edu/~moor0554 On Feb 2 2011, Henrique Dallazuanna wrote: >Try this: > >do.call(rbind, mget(ls(pattern = 'data'), envir = .GlobalEnv)) > On Wed, Feb 2, 2011 at 5:20 PM, Christopher T. Moore wrote: > >> Greetings, >> >> I would like to flexibly combine several data frames objects without specifying the exact names of the objects in memory. Should I use indexing >> to call those objects out of memory? I regularly use indexes to flexibly extract parts of data frames and lists and to read files from my hard drive, >> but I can't figure out how to do so with stored objects. >> >> In my case, all of the data frames of interest are formatted the same way >> and have been assigned to objects with the prefix "data.". The following >> examples combine only the names (not the objects themselves): >> rbind(ls()[grep("data.", ls(), fixed=T)]) >> list(ls()[grep("data.", ls(), fixed=T)]) >> >> Is there a way to get ls() (or some other function) to return the object instead of just the name? I searched the help files and the R-help archives >> but couldn't find a solution. Thanks in advance. >> >> Sincerely, >> Chris >> >> -- >> Christopher T. Moore, M.P.P. >> Doctoral Student >> Quantitative Methods in Education >> University of Minnesota >> 44.9785?N, 93.2396?W >> moor0554 at umn.edu >> http://umn.edu/~moor0554 >> >> ______________________________________________ >> R-help at 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, reproducible code. >> > > > > From cstrieder at gmail.com Wed Feb 2 18:44:48 2011 From: cstrieder at gmail.com (Cristiano Strieder) Date: Wed, 2 Feb 2011 15:44:48 -0200 Subject: [R] Source code of rnorm, where can I find it? Message-ID: Hi all, I want to check the source code of common functions available on R prompt. For example rnorm, where can I find the source code of that? -- Cristiano Strieder S?o Jos? dos Campos - SP From cttobin at hotmail.com Wed Feb 2 19:40:18 2011 From: cttobin at hotmail.com (Brian) Date: Wed, 2 Feb 2011 10:40:18 -0800 (PST) Subject: [R] SVM Prediction and Plot In-Reply-To: References: <1296658603593-3254421.post@n4.nabble.com> <1296660950138-3254570.post@n4.nabble.com> Message-ID: <1296672018466-3255323.post@n4.nabble.com> There are a good few blanks in some variables in the data. There were in the training set too. Is that a problem? I don't have any na.action in my svm call either. So na.omit=na.fail causes this error: Error in na.fail.default(newdata) : missing values in object I tried the matrix. >SvmPred = predict(Svm, as.matrix(BankTest[,-1])) Error in scale.default(newdata[, object$scaled, drop = FALSE], center = object$x.scale$"scaled:center", : length of 'center' must equal the number of columns of 'x' Also is.matrix fails for BankTest so it isn't actually a matrix. Not sure it matters though. The prediction is actually working somewhat, but it only predicts for 2282 cases instead of 2598. P.s. I do have the probability set to TRUE in the Svm call already. -- View this message in context: http://r.789695.n4.nabble.com/SVM-Prediction-and-Plot-tp3254421p3255323.html Sent from the R help mailing list archive at Nabble.com. From lou.belle.nyc at gmail.com Wed Feb 2 20:16:58 2011 From: lou.belle.nyc at gmail.com (Lou Belle) Date: Wed, 2 Feb 2011 11:16:58 -0800 (PST) Subject: [R] JGR crashes if more than 1 script executed Message-ID: <1296674218278-3255443.post@n4.nabble.com> I've tried this on 2 different PCs now. I'm trying to run more than one R script w/o closing and restarting JGR. In other words, if I run one script which uses the PerformanceAnalytics package and subsequently attempt to run another script, using a package such as lattice, then JGR crashes on me every time. This doesn't happen with the regular old RGui. Another problem is that I can't change CRAN mirrors in JGR w/o restarting JGR. While neither of these problems is enough to stop me from trying to use JGR they're both really annoying. Any suggestions? -- View this message in context: http://r.789695.n4.nabble.com/JGR-crashes-if-more-than-1-script-executed-tp3255443p3255443.html Sent from the R help mailing list archive at Nabble.com. From pieroleone at hotmail.it Wed Feb 2 19:14:10 2011 From: pieroleone at hotmail.it (pete) Date: Wed, 2 Feb 2011 10:14:10 -0800 (PST) Subject: [R] clustering fuzzy In-Reply-To: <1295709562131-3231477.post@n4.nabble.com> References: <1295622456781-3229853.post@n4.nabble.com> <1295709562131-3231477.post@n4.nabble.com> Message-ID: <1296670450547-3255223.post@n4.nabble.com> After ordering the table of membership degrees , i must get the difference between the first and second coloumns , between the first and second largest membership degree of object i. This for K=2,K=3,....to K.max=6. This difference is multiplyed by the Crisp silhouette index vector (si). Too it dependending on K=2,...,K.max=6; the result divided by the sum of these differences I need a final vector composed of the indexes for each clustering (K=2,...,K.max=6). There is a method, i think that is classe.memb, but i can't to solve problem because trasformation of the membership degrees matrix( (ris$membership) and of list object (ris$silinfo), does not permit me to use classe.memb propertyes. . ??(u?1-u?2)s?/??(u?1-u?2) > head(t(A.sort)) membership degrees table ordering by max to min value [,1] [,2] [,3] [,4] 1 0.66 0.30 0.04 0.01 2 0.89 0.09 0.02 0.00 3 0.92 0.06 0.01 0.01 4 0.71 0.21 0.07 0.01 5 0.85 0.10 0.04 0.01 6 0.91 0.04 0.02 0.02 > head(t(A.sort)) [,1] [,2] [,3] [,4] 1 0.66 0.30 0.04 0.01 2 0.89 0.09 0.02 0.00 3 0.92 0.06 0.01 0.01 4 0.71 0.21 0.07 0.01 5 0.85 0.10 0.04 0.01 6 0.91 0.04 0.02 0.02 > H.Asort=head(t(A.sort)) > H.Asort[,1]-H.Asort[,2] 1 2 3 4 5 6 0.36 0.80 0.86 0.50 0.75 0.87 > H.Asort=t(H.Asort[,1]-H.Asort[,2]) This is the differences vector by multiplying trasformed table ris$silinfo. > ris$silinfo $widths cluster neighbor sil_width 72 1 3 0.43820207 54 1 3 0.43427773 29 1 6 0.41729079 62 1 6 0.40550562 64 1 6 0.32686757 32 1 3 0.30544722 45 1 3 0.30428723 79 1 3 0.30192624 12 1 3 0.30034472 60 1 6 0.29642495 41 1 3 0.29282778 1 1 3 0.28000788 85 1 3 0.24709237 74 1 3 0.239 > P=ris$silinfo > P=P[1] > P=as.data.frame(P) > V4=rownames(P) > mode(V4)="numeric" > P[,4]=V4 > P[order(P$V4),] widths.cluster widths.neighbor widths.sil_width V4 1 1 3 0.28000788 1 2 2 4 0.07614849 2 3 2 3 -0.11676440 3 4 2 4 0.15436648 4 5 2 3 0.14693927 5 6 3 1 0.57083836 6 7 4 5 0.36391826 7 8 5 4 0.63491118 8 9 4 2 0.54458733 9 10 5 4 0.51059626 10 11 2 5 0.03908952 11 12 1 3 0.30034472 12 13 1 3 -0.04928562 13 14 4 3 0.20337180 14 15 3 4 0.46164324 15 18 5 4 0.52066782 18 20 4 3 0.45517287 20 21 3 4 0.39405507 21 22 4 5 0.05574547 22 23 6 1 -0.06750403 23 > P= P[order(P$V4),] P=P[,3] This is trasformed vector ris$silinfo =P. I can't to use this vector object in the classe.memb. K=2 K.max=6 while (K<=K.max) { ris=fanny(frj,K,memb.exp=m,metric="SqEuclidean",stand=TRUE,maxit=1000,tol=1e-6) ris$centroid=matrix(0,nrow=K,ncol=J) for (k in 1:K) { ris$centroid[k,]=(t(ris$membership[,k]^m)%*%as.matrix(frj))/sum(ris$membership[,k]^m) } rownames(ris$centroid)=1:K colnames(ris$centroid)=colnames(frj) print(K) print(round(ris$centroid,2)) print(classe.memb(ris$membership)$table.U) print(ris$silinfo$avg.width) K=K+1 } this should be scheme clearly are determined centroid based on classe.memb. classe.memb=function(U) { info.U=cbind(max.col(U),apply(U,1,max)) i=1 while (i <= nrow(U)) { if (apply(U,1,max)[i]<0.5) info.U[i,1]=0 i=i+1 } K=ncol(U) table.U=matrix(0,nrow=K,ncol=4) cl=1 while (cl <= K) { table.U[cl,1] = length(which(info.U[info.U[,1]==cl,2]>=.90)) table.U[cl,2] = length(which(info.U[info.U[,1]==cl,2]>=.70)) - table.U[cl,1] table.U[cl,3] = length(which(info.U[info.U[,1]==cl,2]>=.50)) - table.U[cl,1] - table.U[cl,2] table.U[cl,4] = sum(table.U[cl,]) cl = cl+1 } rownames(table.U) = c(1:K) colnames(table.U) = c("Alto", "Medio", "Basso", "Totale") out=list() out$info.U=round(info.U,2) out$table.U=table.U return(out) } -- View this message in context: http://r.789695.n4.nabble.com/clustering-fuzzy-tp3229853p3255223.html Sent from the R help mailing list archive at Nabble.com. From DUNNER6 at tcd.ie Wed Feb 2 19:31:44 2011 From: DUNNER6 at tcd.ie (Ross Dunne) Date: Wed, 2 Feb 2011 18:31:44 +0000 Subject: [R] Indexing from two variables Message-ID: Hello, thank you all for your patience and time I am essentially trying to get disorganised data into long form for linear modelling. I have 2 dataframes "rec" and "book" Each row in "book" needs to be pasted onto the end of several of the rows of "rec" according to two variables in the row:" MRN" and "COURSE" which match. I have tried the following and variations thereon to no avail: #for each line of the recovery dataframe #insert the one line of the "book" dataset that corresponds to the MRN AND the course-of-treatment (COURSE) #get the mrn and course from the first line of the recovery dataframe (rec) i=1 newlist=list() colnames(newlist)=colnames(book) for ( i in 1:dim(rec)[1]) { mrn=as.numeric(as.vector(rec$MRN[i])); course=as.character(rec$COURSE[i]); ## find the corresponding row in the book dataframe ## by generating a logical vector and using ## it to access "book" get.vector<-as.vector(((as.numeric(as.vector(book$MRN))==mrn) & (as.character(book$COURSE)==course))) #gives you a vector of logicals (works) newlist[i]<-book[get.vector,] ### (doesn't work) i=i+1; } If anyone has any suggestions on 1)getting this to work 2) making it more elegant (or perhaps just less clumsy) If I have been unclear in any way I beg your pardons. I do understand I haven't combined any data above, I think if I can generate a long-format dataframe I can combine them all on my own Ross Dunne MB MRCPsych ross.dunne at tcd.ie From billhyman1 at yahoo.com Wed Feb 2 19:39:14 2011 From: billhyman1 at yahoo.com (Bill Hyman) Date: Wed, 2 Feb 2011 10:39:14 -0800 (PST) Subject: [R] Matching patients In-Reply-To: <1296636956.12501.2.camel@R3-thux> References: <92497.51887.qm@web52803.mail.re2.yahoo.com> <1296636956.12501.2.camel@R3-thux> Message-ID: <414440.87533.qm@web52808.mail.re2.yahoo.com> Hi Bernardo, Thank you so much. I appreciate it. Bill ----- Original Message ---- From: Bernardo Rangel Tura To: Bill Hyman Sent: Wed, February 2, 2011 12:55:56 AM Subject: Re: [R] Matching patients On Tue, 2011-02-01 at 11:01 -0800, Bill Hyman wrote: > May I ask a clinical question? For a trial, we have a treatment group of small > size, say 30 patients. We want to selectmatching control patients from a bigger > > group (100 patients) in terms of several clinical variables, such as age, tumor > > stage etc. This practice is to select the closest matching set of control >cases. > > I wonder if R has any routine or package that can help with this problem. Thank > > you. Looking forward... > > ______________________________________________ > R-help at 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, reproducible code. Hi Bill, The package MatchIt solve your problem. This allow you use several methods for matching and you can use formula for create relations between variable if necessary -- Bernardo Rangel Tura, M.D,MPH,Ph.D National Institute of Cardiology Brazil From lukasz.reclawowicz at gmail.com Wed Feb 2 20:41:20 2011 From: lukasz.reclawowicz at gmail.com (=?ISO-8859-2?B?o3VrYXN6IFLqY7Nhd293aWN6?=) Date: Wed, 2 Feb 2011 20:41:20 +0100 Subject: [R] help In-Reply-To: <4D4979DE.2070006@idi.ntnu.no> References: <734603.74038.qm@web57504.mail.re1.yahoo.com> <4D48DBF8.5000106@idi.ntnu.no> <4D4979DE.2070006@idi.ntnu.no> Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From izahn at psych.rochester.edu Wed Feb 2 20:50:48 2011 From: izahn at psych.rochester.edu (Ista Zahn) Date: Wed, 2 Feb 2011 14:50:48 -0500 Subject: [R] Source code of rnorm, where can I find it? In-Reply-To: References: Message-ID: R source is available on CRAN, e.g., http://cran.r-project.org/src/base/R-2/R-2.12.1.tar.gz Many functions can be displayed simply by typing theme , e.g., > methods(mean) [1] mean.data.frame mean.Date mean.default mean.difftime [5] mean.POSIXct mean.POSIXlt > mean.default Many other functions are net exported (methods() will mark these with an asterisk), but can be retrieved using getAnywhere("fun") .Internal functions such as rnorm cannot be retrieved in this way as far as I know. You may have to download the source and find it direclty. Best, Ista On Wed, Feb 2, 2011 at 12:44 PM, Cristiano Strieder wrote: > Hi all, > > I want to check the source code of common functions available on R > prompt. For example rnorm, where can I find the source code of that? > > -- > Cristiano Strieder > S?o Jos? dos Campos - SP > > ______________________________________________ > R-help at 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, reproducible code. > -- Ista Zahn Graduate student University of Rochester Department of Clinical and Social Psychology http://yourpsyche.org From mailinglist.honeypot at gmail.com Wed Feb 2 21:05:20 2011 From: mailinglist.honeypot at gmail.com (Steve Lianoglou) Date: Wed, 2 Feb 2011 15:05:20 -0500 Subject: [R] SVM Prediction and Plot In-Reply-To: <1296672018466-3255323.post@n4.nabble.com> References: <1296658603593-3254421.post@n4.nabble.com> <1296660950138-3254570.post@n4.nabble.com> <1296672018466-3255323.post@n4.nabble.com> Message-ID: Hi, On Wed, Feb 2, 2011 at 1:40 PM, Brian wrote: > > There are a good few blanks in some variables in the data. There were in the > training set too. Is that a problem? Well, it looks like it's the root cause of what prompted you to post to R-help ... whether or not it's *really* a problem is another issue, I guess ... > I don't have any na.action in my svm > call either. Makes sense ... the SVM is just skipping these examples and not using them for training. The default setting for na.action is na.omit, which just removes these cases from training. > So na.omit=na.fail causes this error: > Error in na.fail.default(newdata) : missing values in object Bingo. > I tried the matrix. >>SvmPred = predict(Svm, as.matrix(BankTest[,-1])) > Error in scale.default(newdata[, object$scaled, drop = FALSE], center = > object$x.scale$"scaled:center", ?: > ?length of 'center' must equal the number of columns of 'x' > > Also is.matrix fails for BankTest so it isn't actually a matrix. Not sure it > matters though. The prediction is actually working somewhat, but it only > predicts for 2282 cases instead of 2598. We know why now. Please read the help for the predict.svm function: R> ?predict.svm Specifically the documentation for the `na.action` Argument. Perhaps it would be more friendly if predict just returned an NA in these situations, but I guess this is how it works for the time being. Anyway, it looks like this explains why you have a different number of predictions than you have observations in your BankTest. -steve -- Steve Lianoglou Graduate Student: Computational Systems Biology ?| Memorial Sloan-Kettering Cancer Center ?| Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org/~lianos/contact From johnfilben at yahoo.com Wed Feb 2 21:15:50 2011 From: johnfilben at yahoo.com (John Filben) Date: Wed, 2 Feb 2011 12:15:50 -0800 (PST) Subject: [R] Help with Help Message-ID: <36308.78091.qm@web33804.mail.mud.yahoo.com> An embedded and charset-unspecified text was scrubbed... Name: not available URL: From waku at idi.ntnu.no Wed Feb 2 21:22:29 2011 From: waku at idi.ntnu.no (Waclaw Kusnierczyk) Date: Wed, 02 Feb 2011 14:22:29 -0600 Subject: [R] Source code of rnorm, where can I find it? In-Reply-To: References: Message-ID: <4D49BD05.9070400@idi.ntnu.no> On 02/02/2011 01:50 PM, Ista Zahn wrote: > > .Internal functions such as rnorm cannot be retrieved in this way as > far as I know. You may have to download the source and find it > direclty. In this particular case you can find the implementation of rnorm with grep -rn --include=*.c '"rnorm"' . # ./src/main/names.c:449:{"rnorm", do_random2, ... grep -rn --include=*.c 'do_random2(' . # ./src/main/random.c:131:SEXP attribute_hidden do_random2(SEXP call, SEXP op, SEXP args, SEXP rho) Starting with line 131 in src/main/random.c you can follow the chain of macro executions and calls to see how rnorm is actually implemented. vQ From djmuser at gmail.com Wed Feb 2 21:25:56 2011 From: djmuser at gmail.com (Dennis Murphy) Date: Wed, 2 Feb 2011 12:25:56 -0800 Subject: [R] exact logistic regression In-Reply-To: <1296664994.11047.7.camel@den2042-desktop> References: <1296664994.11047.7.camel@den2042-desktop> Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From tweedie-d at web.de Wed Feb 2 21:37:20 2011 From: tweedie-d at web.de (Sacha Viquerat) Date: Wed, 02 Feb 2011 21:37:20 +0100 Subject: [R] slightly off topic... Message-ID: <4D49C080.8010206@web.de> i'm sorry to bother but... sometimes theres an attachment in the posts on the list, a single file called: Teil 1.2 whys that? i dont want to open it to find out, as i have used computers before ;) therefore i suspect it to be either some security problem OR to be the alternative HTML version that is claimed to have been deleted. any light-shedding would be appreciated! From dhimanbhadra at gmail.com Wed Feb 2 21:49:43 2011 From: dhimanbhadra at gmail.com (DHIMAN BHADRA) Date: Wed, 2 Feb 2011 15:49:43 -0500 Subject: [R] Testing whether a number belong to a set Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From Seeliger.Curt at epamail.epa.gov Wed Feb 2 22:04:27 2011 From: Seeliger.Curt at epamail.epa.gov (Seeliger.Curt at epamail.epa.gov) Date: Wed, 2 Feb 2011 13:04:27 -0800 Subject: [R] Testing whether a number belong to a set In-Reply-To: References: Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From E.Vettorazzi at uke.uni-hamburg.de Wed Feb 2 22:05:05 2011 From: E.Vettorazzi at uke.uni-hamburg.de (Eik Vettorazzi) Date: Wed, 02 Feb 2011 22:05:05 +0100 Subject: [R] Testing whether a number belong to a set In-Reply-To: References: Message-ID: <4D49C701.3080503@uke.uni-hamburg.de> Hi, i think %in% will do exactly what you want eg. 5 %in% 1:10 Am 02.02.2011 21:49, schrieb DHIMAN BHADRA: > Hello everyone, > > I am stuck with an apparently simple issue : > > i) I have two sets S1 and S2, each containing a large number of integers, > say zip codes. > ii) Now, I just want to test whether a particular zip code belong to S1 or > S2 or neither of them. > iii) If it belongs to S1, the area/region gets a particular label, say 1; if > it belongs to S2, it gets a label 2 and if it doesnot belong to either S1 or > S2, it gets a label 0. > iv) I have to do this for a large number of zip codes as well. > > So I was thinking of embedding it into a if else loop but I am stuck on how > to define the "belongs to" in R syntax. Any hint will be much appreciated. > Best regards, > Dhiman Bhadra > > WPI, Worcester, MA 01609 > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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, reproducible code. -- Eik Vettorazzi Institut f?r Medizinische Biometrie und Epidemiologie Universit?tsklinikum Hamburg-Eppendorf Martinistr. 52 20246 Hamburg T ++49/40/7410-58243 F ++49/40/7410-57790 From djmuser at gmail.com Wed Feb 2 22:05:50 2011 From: djmuser at gmail.com (Dennis Murphy) Date: Wed, 2 Feb 2011 13:05:50 -0800 Subject: [R] Testing whether a number belong to a set In-Reply-To: References: Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From mailinglist.honeypot at gmail.com Wed Feb 2 22:02:11 2011 From: mailinglist.honeypot at gmail.com (Steve Lianoglou) Date: Wed, 2 Feb 2011 16:02:11 -0500 Subject: [R] slightly off topic... In-Reply-To: <4D49C080.8010206@web.de> References: <4D49C080.8010206@web.de> Message-ID: Hi, On Wed, Feb 2, 2011 at 3:37 PM, Sacha Viquerat wrote: > i'm sorry to bother but... > sometimes theres an attachment in the posts on the list, a single file > called: > > Teil 1.2 > > whys that? i dont want to open it to find out, as i have used computers > before ;) > therefore i suspect it to be either some security problem OR to be the > alternative HTML version that is claimed to have been deleted. any > light-shedding would be appreciated! That's weird -- I don't ever recall seeing an attachment come through on this list before. If I'm not mistaken, I think mailman is set to explicitly removes attachments from emails before it is broadcast to this list ... but I'm not 100% sure. -steve -- Steve Lianoglou Graduate Student: Computational Systems Biology ?| Memorial Sloan-Kettering Cancer Center ?| Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org/~lianos/contact From dwinsemius at comcast.net Wed Feb 2 22:20:26 2011 From: dwinsemius at comcast.net (David Winsemius) Date: Wed, 2 Feb 2011 16:20:26 -0500 Subject: [R] slightly off topic... In-Reply-To: References: <4D49C080.8010206@web.de> Message-ID: On Feb 2, 2011, at 4:02 PM, Steve Lianoglou wrote: > Hi, > > On Wed, Feb 2, 2011 at 3:37 PM, Sacha Viquerat > wrote: >> i'm sorry to bother but... >> sometimes theres an attachment in the posts on the list, a single >> file >> called: >> >> Teil 1.2 >> >> whys that? i dont want to open it to find out, as i have used >> computers >> before ;) >> therefore i suspect it to be either some security problem OR to be >> the >> alternative HTML version that is claimed to have been deleted. any >> light-shedding would be appreciated! > > That's weird -- I don't ever recall seeing an attachment come through > on this list before. > > If I'm not mistaken, I think mailman is set to explicitly removes > attachments from emails before it is broadcast to this list ... but > I'm not 100% sure. Steve; Your mail client may be doing further filtering than the server. he server passes on .txt and .pdf files. There was a posting with an attachment two days ago. The third item in this thread: [R] barplot with varaible-width bars You should be able to see something with your browser. The fact that the attachment to someone with a .de domain has them labeled mit de Wort "Teil" suggests that the labeling is being done at the final destination, since the server is set up with English messages. > > -steve David Winsemius, MD West Hartford, CT From mailinglist.honeypot at gmail.com Wed Feb 2 22:31:01 2011 From: mailinglist.honeypot at gmail.com (Steve Lianoglou) Date: Wed, 2 Feb 2011 16:31:01 -0500 Subject: [R] slightly off topic... In-Reply-To: References: <4D49C080.8010206@web.de> Message-ID: On Wed, Feb 2, 2011 at 4:20 PM, David Winsemius wrote: [snip] > Steve; > > Your mail client may be doing further filtering than the server. he server > passes on .txt and .pdf files. There was a posting with an attachment two > days ago. The third item in this thread: > [R] barplot with varaible-width bars > > You should be able to see something with your browser. [/snip] Turns out I just wasn't looking closely enough -- I use gmail through my webrowser, so attachments do come through. I guess I confused this mailing list with another (which does strip attachments). Anyway, thanks for the clarification. > The fact that the attachment to someone with a .de domain has them labeled > mit de Wort "Teil" suggests that the labeling is being done at the final > destination, since the server is set up with English messages. wie er scharfsinnig bemerkte[1] -steve [1] Blame these guys if that's actually something offensive: http://dictionary.reverso.net/german-english/scharfsinnig -- Steve Lianoglou Graduate Student: Computational Systems Biology ?| Memorial Sloan-Kettering Cancer Center ?| Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org/~lianos/contact From spector at stat.berkeley.edu Wed Feb 2 22:40:07 2011 From: spector at stat.berkeley.edu (Phil Spector) Date: Wed, 2 Feb 2011 13:40:07 -0800 (PST) Subject: [R] Testing whether a number belong to a set In-Reply-To: References: Message-ID: Dhiman - You don't say what you want the result to be if the value is in both S1 and S2, but here's an example that may give you some ideas: > S1 = c('one','two','three') > S2 = c('four','five','six') > test = c('one','two','three','four','five','six','seven') > test %in% S1 + 2 * test %in% S2 [1] 1 1 1 2 2 2 0 - Phil Spector Statistical Computing Facility Department of Statistics UC Berkeley spector at stat.berkeley.edu On Wed, 2 Feb 2011, DHIMAN BHADRA wrote: > Hello everyone, > > I am stuck with an apparently simple issue : > > i) I have two sets S1 and S2, each containing a large number of integers, > say zip codes. > ii) Now, I just want to test whether a particular zip code belong to S1 or > S2 or neither of them. > iii) If it belongs to S1, the area/region gets a particular label, say 1; if > it belongs to S2, it gets a label 2 and if it doesnot belong to either S1 or > S2, it gets a label 0. > iv) I have to do this for a large number of zip codes as well. > > So I was thinking of embedding it into a if else loop but I am stuck on how > to define the "belongs to" in R syntax. Any hint will be much appreciated. > Best regards, > Dhiman Bhadra > > WPI, Worcester, MA 01609 > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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, reproducible code. > From Greg.Snow at imail.org Wed Feb 2 22:44:05 2011 From: Greg.Snow at imail.org (Greg Snow) Date: Wed, 2 Feb 2011 14:44:05 -0700 Subject: [R] Hidden variables In-Reply-To: <1296570452928-3251588.post@n4.nabble.com> References: <1296570452928-3251588.post@n4.nabble.com> Message-ID: Create a namespace for your package, anything not exported will be "hidden" (though a determined person can still find it). -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.snow at imail.org 801.408.8111 > -----Original Message----- > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r- > project.org] On Behalf Of Joel > Sent: Tuesday, February 01, 2011 7:28 AM > To: r-help at r-project.org > Subject: [R] Hidden variables > > > Hi Im trying to make a package in R just to learn how it works. > > One thing I dont manage to do is to make a hidden environment or > variable so > to say. > > I want a "hash list" that I create my useing: > > TestEnv<-new.env() > assign("Key1","Ans1",envir=TestEnv) > assign("Key2","Ans2",envir=TestEnv) > > Then I just have this function to try it: > > TestFunc<- function(Key, ...) UseMethod("TestFunc") > > TestFunc.default <- function(Key,...){ > Ans<-get(Key, envir=TestEnv) > print(Ans) > } > > But when I load this package I can access the TestEnv by just typing > TestEnv, but I want this one hidden so that you only can get the "Ans" > from > the "Key" via the TestFunc. > > Thx for the help > Joel > -- > View this message in context: http://r.789695.n4.nabble.com/Hidden- > variables-tp3251588p3251588.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at 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, reproducible code. From Greg.Snow at imail.org Wed Feb 2 22:45:13 2011 From: Greg.Snow at imail.org (Greg Snow) Date: Wed, 2 Feb 2011 14:45:13 -0700 Subject: [R] arranging pie charts in a matrix layout with row/col labels In-Reply-To: References: Message-ID: Yes, the better way to achieve this is to not use pie charts. Look at dotplots instead. Single pie charts are hard enough to read, multiple ones in the same plot will invite comparisons that at best are hard and are often wrong and misleading. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.snow at imail.org 801.408.8111 > -----Original Message----- > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r- > project.org] On Behalf Of Rajarshi Guha > Sent: Monday, January 31, 2011 3:35 PM > To: R > Subject: [R] arranging pie charts in a matrix layout with row/col > labels > > Hi, I have a vector of data, that I group based on two factors via > tapply. For each such grouping I would like to plot a pie chart. I > can layout these pie charts in a matrix layout, correpsonding to the > levels of the two factors. But I am getting stuck on how to label the > rows and colums. My current approach looks like this: > > x <- data.frame(obs=sample(c('low', 'high'),100, replace=TRUE), > grp1=sample(1:10, 100, replace=TRUE), > grp2=runif(100)) > > cut.grp1 <- cut(x$grp1, 3) > cut.grp2 <- cut(x$grp2, 3) > > par(mfrow=c(3,3)) > tapply(x$obs, list(cut.grp1, cut.grp2), function(z) { > pie(table(z), col=c('red', 'green')) > }) > > One possibility is to add an extra row and column to the layout and > loop over the results of the tapply, adding a text label for the row > and column labels. > > Is there a better way to achieve this? > > -- > Rajarshi Guha > NIH Chemical Genomics Center > > ______________________________________________ > R-help at 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, reproducible code. From rjeffries at ucla.edu Wed Feb 2 22:08:41 2011 From: rjeffries at ucla.edu (Robin Jeffries) Date: Wed, 2 Feb 2011 13:08:41 -0800 Subject: [R] Help with one of "those" apply functions Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From spector at stat.berkeley.edu Wed Feb 2 22:54:05 2011 From: spector at stat.berkeley.edu (Phil Spector) Date: Wed, 2 Feb 2011 13:54:05 -0800 (PST) Subject: [R] Help with one of "those" apply functions In-Reply-To: References: Message-ID: Robin - Does tapply(value,id,sum) do what you want? - Phil Spector Statistical Computing Facility Department of Statistics UC Berkeley spector at stat.berkeley.edu On Wed, 2 Feb 2011, Robin Jeffries wrote: > Hello there, > > I'm still struggling with the *apply commands. I have 5 people with id's > from 10 to 14. I have varying amounts (nrep) of repeated outcome (value) > measured on them. > > nrep <- 1:5 > id <- rep(c("p1", "p2", "p3", "p4", "p5"), nrep) > value <- rnorm(length(id)) > > I want to create a new vector that contains the sum of the values per > person. > > subject.value[1] <- value[1] # 1 measurement > subject.value[2] <- sum(value[2:3]) # the next 2 measurements > ... > subject.value[5] <- sum(value[11:15]) # the next 5 measurements > > > I'd imagine it'll be some sort of *apply(value, nrep, sum) but I can't seem > to land on the right format. > > Can someone give me a heads up as to what the correct syntax and function > is? > > Danke, > > Robin Jeffries > MS, DrPH Candidate > Department of Biostatistics > UCLA > 530-624-0428 > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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, reproducible code. > From asanramzan at yahoo.com Wed Feb 2 20:40:53 2011 From: asanramzan at yahoo.com (Asan Ramzan) Date: Wed, 2 Feb 2011 11:40:53 -0800 (PST) Subject: [R] unequally spaced factor levels orthogonal polynomial contrasts coefficients trend analysis Message-ID: <903766.61252.qm@web44714.mail.sp1.yahoo.com> An embedded and charset-unspecified text was scrubbed... Name: not available URL: From jonmosco at gmail.com Wed Feb 2 21:36:55 2011 From: jonmosco at gmail.com (hypermonkey22) Date: Wed, 2 Feb 2011 12:36:55 -0800 (PST) Subject: [R] looping variable names Message-ID: <1296679015099-3255711.post@n4.nabble.com> Hi all, I've been looking for a simple answer to the following problem. Let's say that I can loop through, say, 100 values that need to be assigned to, say, the variables var1:var100. Is there an elegant way to do this? I have seen one or two similar questions...but they tend to be in more complicated contexts. Simple question, hopefully with a simple answer. Thanks very much! -- View this message in context: http://r.789695.n4.nabble.com/looping-variable-names-tp3255711p3255711.html Sent from the R help mailing list archive at Nabble.com. From Patrick.Boily at tpsgc-pwgsc.gc.ca Wed Feb 2 21:02:40 2011 From: Patrick.Boily at tpsgc-pwgsc.gc.ca (Patrick Boily) Date: Wed, 2 Feb 2011 15:02:40 -0500 Subject: [R] A question about sampling Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From gkakaron at yahoo.gr Wed Feb 2 21:35:01 2011 From: gkakaron at yahoo.gr (George Kakarontzas) Date: Wed, 2 Feb 2011 22:35:01 +0200 Subject: [R] Read a similarity matrix from excel In-Reply-To: References: <001d01cbc1f1$50d7cc30$f2876490$@yahoo.gr> Message-ID: <003301cbc318$ab6622a0$023267e0$@yahoo.gr> Dear Petr, It worked fine. Thanks for helping. George -----Original Message----- From: Petr PIKAL [mailto:petr.pikal at precheza.cz] Sent: Wednesday, February 02, 2011 1:18 PM To: George Kakarontzas Cc: r-help at r-project.org Subject: Odp: [R] Read a similarity matrix from excel Hi r-help-bounces at r-project.org napsal dne 01.02.2011 10:20:48: > Good morning, > > I have an excel spreadsheet with similarities among objects. The > format of > the file is the following: > > 1st row: ,,,..., > 2nd row: ,0,s<1,2>,s<1,3>,...,s<1,N> > 3rd row: ,s<2,1>,0,s<2,3>,...,s<2,N> > > The table is symmetrical and contains the similarities among the > objects (s stands for similarity among x and k). The first row > contains the name of the objects (strings of characters) in the same > order that these same names are contained in the first column. The cell <1,1> is empty. > > How can I read this in R so that after reading it I can perform a > hierarchical clustering. The table is 78x78 so it is relatively easy > to manually change something if it makes it easier to read. Select your table in Excel Press Ctrl-C In R do test<-read.delim("clipboard") you shall get something like that > test X a b c 1 a 1 23 3 2 b 4 5 6 3 c 7 8 9 > you has to get rid of first column > mat<-as.matrix(test[,-1]) and if you want you can put row.names tou your matrix > row.names(mat)<-colnames(mat) > mat a b c a 1 23 3 b 4 5 6 c 7 8 9 > row.names(mat)<-test$X > mat a b c a 1 23 3 b 4 5 6 c 7 8 9 > Regards Petr > > I found many articles about reading a data table with variables and > then constructing the distance matrix from within R, but I have the similarity > matrix instead. > > Thank you for your help > > George > > ______________________________________________ > R-help at 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, reproducible code. From mailinglist.honeypot at gmail.com Wed Feb 2 23:34:34 2011 From: mailinglist.honeypot at gmail.com (Steve Lianoglou) Date: Wed, 2 Feb 2011 17:34:34 -0500 Subject: [R] Help with one of "those" apply functions In-Reply-To: References: Message-ID: Hi, On Wed, Feb 2, 2011 at 4:08 PM, Robin Jeffries wrote: > Hello there, > > I'm still struggling with the *apply commands. I have 5 people with id's > from 10 to 14. I have varying amounts (nrep) of repeated outcome (value) > measured on them. > > nrep <- 1:5 > id ? ?<- rep(c("p1", "p2", "p3", "p4", "p5"), nrep) > value <- rnorm(length(id)) > > I want to create a new vector that contains the sum of the values per > person. > > subject.value[1] <- value[1] ? ?# 1 measurement > subject.value[2] <- sum(value[2:3]) # the next 2 measurements > ... > subject.value[5] <- sum(value[11:15]) ?# the next 5 measurements > > > I'd imagine it'll be some sort of *apply(value, nrep, sum) but I can't seem > to land on the right format. > > Can someone give me a heads up as to what the correct syntax and function > is? In addition to tapply (as Phil pointed out), you can look at the functions in plyr. I somehow find them more intuitive, at times, then their sister "base" functions, especially since more often than not you'll have your data in a data.frame. For instance: R> set.seed(123) R> nrep <- 1:5 R> id <- rep(c("p1", "p2", "p3", "p4", "p5"), nrep) R> value <- rnorm(length(id)) R> DF <- data.frame(id=id, value=value) R> tapply(value, id, sum) p1 p2 p3 p4 p5 -0.5604756 1.3285308 1.9148611 -1.9366599 1.5395087 R> library(plyr) R> ddply(DF, .(id), summarize, total=sum(value)) id total 1 p1 -0.5604756 2 p2 1.3285308 3 p3 1.9148611 4 p4 -1.9366599 5 p5 1.5395087 In this case, though, I'll grant you that tapply is simpler if you already know how to use it. -- Steve Lianoglou Graduate Student: Computational Systems Biology ?| Memorial Sloan-Kettering Cancer Center ?| Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org/~lianos/contact From Greg.Snow at imail.org Wed Feb 2 23:34:44 2011 From: Greg.Snow at imail.org (Greg Snow) Date: Wed, 2 Feb 2011 15:34:44 -0700 Subject: [R] looping variable names In-Reply-To: <1296679015099-3255711.post@n4.nabble.com> References: <1296679015099-3255711.post@n4.nabble.com> Message-ID: The best way to do this is to not create those variables in the global workspace, but to create a list with the variables in the list (you can name the list elements and access them by name or by number). With lists you can use lapply and sapply to do many of the things that you think you want to loop through names with. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.snow at imail.org 801.408.8111 > -----Original Message----- > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r- > project.org] On Behalf Of hypermonkey22 > Sent: Wednesday, February 02, 2011 1:37 PM > To: r-help at r-project.org > Subject: [R] looping variable names > > > Hi all, > > I've been looking for a simple answer to the following problem. > > Let's say that I can loop through, say, 100 values that need to be > assigned > to, say, the variables var1:var100. > > Is there an elegant way to do this? > > I have seen one or two similar questions...but they tend to be in more > complicated contexts. > Simple question, hopefully with a simple answer. > > Thanks very much! > -- > View this message in context: http://r.789695.n4.nabble.com/looping- > variable-names-tp3255711p3255711.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at 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, reproducible code. From Greg.Snow at imail.org Wed Feb 2 23:38:34 2011 From: Greg.Snow at imail.org (Greg Snow) Date: Wed, 2 Feb 2011 15:38:34 -0700 Subject: [R] A question about sampling In-Reply-To: References: Message-ID: The apply functions are really just hidden loops, and loops have been made efficient enough that they are usually not much slower (and sometimes a bit faster) than the apply's. If you really want to use apply, then look at mapply (might need to convert the matrix to a list), or you could use sapply on the vector 1:500 and write a function that indexes into the matrix and vector. But if you understand the loop, then I would suggest using the loop. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.snow at imail.org 801.408.8111 > -----Original Message----- > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r- > project.org] On Behalf Of Patrick Boily > Sent: Wednesday, February 02, 2011 1:03 PM > To: 'r-help at r-project.org' > Subject: [R] A question about sampling > > Greetings, > > I am attempting to do something with R that I think should be > efficiently do-able, but I haven't yet found success. > > I have a vector of probability weights (for 17 categories), let's call > it things (it could look like the one below, for instance). > > > things > 0.026 0 0.233 0 0.131 0 0.415 0 0 0 0 0 0.192 0 0.067 0 0 > > I'd like a sample of size size.things (say, 47) of the 17 categories > (with replacement). And I'd like to produce a vector of length 17 which > enumerates the number of times each category has been selected. This is > fairly straightforward to do; for instance: > > > things2<- > table(factor(sample(1:17,size.things[1],replace=TRUE,prob=things),level > s=1:17)) > 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 > 1 0 9 0 4 0 18 0 0 0 0 0 5 0 4 0 0 > > What would I need to do if I had a matrix things (50000 x 17) of > probability weight vectors and a vector of sample sizes size.things (of > length 50000), and I wanted to simultaneously sample size.things[1] of > the 17 categories with probability weight vector things[1,], > size.things[2] of the 17 categories with probability weight vector > things[2,], etc. A loop will do the trick, but it takes a while and it > seems to me that I could more efficiently use tapply somehow. Or > something that behaves like rowSums. I'm not familiar enough with R to > see an easy way out. Perhaps there isn't? Does anybody have an idea? > > Regards, > > Patrick > > > > > > > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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, reproducible code. From rmh at temple.edu Wed Feb 2 23:38:53 2011 From: rmh at temple.edu (RICHARD M. HEIBERGER) Date: Wed, 2 Feb 2011 17:38:53 -0500 Subject: [R] unequally spaced factor levels orthogonal polynomial contrasts coefficients trend analysis In-Reply-To: <903766.61252.qm@web44714.mail.sp1.yahoo.com> References: <903766.61252.qm@web44714.mail.sp1.yahoo.com> Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From crasch2 at tigers.lsu.edu Wed Feb 2 23:40:20 2011 From: crasch2 at tigers.lsu.edu (Christian Raschke) Date: Wed, 02 Feb 2011 16:40:20 -0600 Subject: [R] set digits in xtable by row Message-ID: <1296686420.12987.14.camel@RESEARCH-GA.ISDSNET> Hello R-listers, I am using xtable to create some LaTeX tables for me to Sweave into my document. I am now trying to set the number of digits that will be reported in several _rows_ in my table. The 'digits' option in xtable() sets the number of digits to display for specified columns. Am I missing another obvious option to do the same thing for rows? A quick RSiteSearch didn't turn up anything. I can't just flip the table sideways, but it looks goofy when I report sample sizes etc as 123.0000. Thanks! -- Christian Raschke Department of Economics and ISDS Research Lab (HSRG) Louisiana State University Patrick Taylor Hall, Rm 2128 Baton Rouge, LA 70803 crasch2 at lsu.edu From Greg.Snow at imail.org Wed Feb 2 23:46:31 2011 From: Greg.Snow at imail.org (Greg Snow) Date: Wed, 2 Feb 2011 15:46:31 -0700 Subject: [R] unequally spaced factor levels orthogonal polynomial contrasts coefficients trend analysis In-Reply-To: <903766.61252.qm@web44714.mail.sp1.yahoo.com> References: <903766.61252.qm@web44714.mail.sp1.yahoo.com> Message-ID: If you know the spacing between the factor levels, then why not just treat it as a numeric vector and use the poly function to create orthogonal polynomials of the numeric variable. If you have an unequally spaced ordered factor that does not lend itself to the above, then I don't see that any type of polynomial contrasts makes sense and would use something else that does (comparing neighboring pairs maybe). -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.snow at imail.org 801.408.8111 > -----Original Message----- > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r- > project.org] On Behalf Of Asan Ramzan > Sent: Wednesday, February 02, 2011 12:41 PM > To: r-help at r-project.org > Subject: [R] unequally spaced factor levels orthogonal polynomial > contrasts coefficients trend analysis > > Hello [R]-help > > I am trying to find > > a package where you can do ANOVA based trend analysis on grouped data > > using orthogonal polynomial contrasts coefficients, for unequally > > spaced factor levels. The closest hit I've had is from this web site: > >(http://webcache.googleusercontent.com/search?q=cache:xN4K_KGuYGcJ:www > .datavis.ca/sasmac/orpoly.html+Orthogonal+polynomial > >l > > but I cannot find this package or anything like it. > > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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, reproducible code. From rjeffries at ucla.edu Wed Feb 2 23:51:25 2011 From: rjeffries at ucla.edu (Robin Jeffries) Date: Wed, 2 Feb 2011 14:51:25 -0800 Subject: [R] Help with one of "those" apply functions In-Reply-To: References: Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From carl at witthoft.com Thu Feb 3 00:01:36 2011 From: carl at witthoft.com (Carl Witthoft) Date: Wed, 02 Feb 2011 18:01:36 -0500 Subject: [R] testing randomness of random number generators with student t-test? Message-ID: <4D49E250.6010508@witthoft.com> Hi, subject more or less says it all. I freely admit to not having bothered to find some of the online papers about method of testing the quality of random number generators -- but in an idle moment I wondered what to expect from something like the following: randa<-runif(1000) randb<-runif(1000) t.test(randa,randb)$p.value var.test(randa,randb)$p.value [repeat ad nauseum] Is the range of p-values I get in any way related tothe "quality" of the random number generator? thanks Carl From crasch2 at tigers.lsu.edu Thu Feb 3 00:36:41 2011 From: crasch2 at tigers.lsu.edu (Christian Raschke) Date: Wed, 02 Feb 2011 17:36:41 -0600 Subject: [R] set digits in xtable by row In-Reply-To: <1296686420.12987.14.camel@RESEARCH-GA.ISDSNET> References: <1296686420.12987.14.camel@RESEARCH-GA.ISDSNET> Message-ID: <1296689801.12987.16.camel@RESEARCH-GA.ISDSNET> Nevermind, I just read in the documentation that 'digits' can be a matrix. No idea how I could have overlooked this the first few times of reading it. I'm sorry for the noise. CR On Wed, 2011-02-02 at 16:40 -0600, Christian Raschke wrote: > Hello R-listers, > > I am using xtable to create some LaTeX tables for me to Sweave into my > document. I am now trying to set the number of digits that will be > reported in several _rows_ in my table. > > The 'digits' option in xtable() sets the number of digits to display for > specified columns. Am I missing another obvious option to do the same > thing for rows? A quick RSiteSearch didn't turn up anything. I can't > just flip the table sideways, but it looks goofy when I report sample > sizes etc as 123.0000. > > Thanks! > > From b.rowlingson at lancaster.ac.uk Thu Feb 3 00:45:26 2011 From: b.rowlingson at lancaster.ac.uk (Barry Rowlingson) Date: Wed, 2 Feb 2011 23:45:26 +0000 Subject: [R] testing randomness of random number generators with student t-test? In-Reply-To: <4D49E250.6010508@witthoft.com> References: <4D49E250.6010508@witthoft.com> Message-ID: On Wed, Feb 2, 2011 at 11:01 PM, Carl Witthoft wrote: > Hi, subject more or less says it all. > > I freely admit to not having bothered to find some of the online papers > about method of testing the quality of random number generators -- but in an > idle moment I wondered what to expect from something like the following: > > > randa<-runif(1000) > randb<-runif(1000) > t.test(randa,randb)$p.value > var.test(randa,randb)$p.value > > [repeat ad nauseum] > > > Is the range of p-values I get in any way related tothe "quality" of the > random number generator? Well yes. All pseudo random number generators have a period, after which they come back to the start and begin churning out the same sequence again. Good PRNGs have a sequence length that is astronomically high. If you have a PRNG that has a sequence of 1000, or 500, or 200 etc your two sets will be perfectly correlated... You might want to read up on RANDU, the infamous poor PRNG: http://en.wikipedia.org/wiki/RANDU ?We guarantee that each number is random individually, but we don?t guarantee that more than one of them is random.? The other things to look at are the DieHard tests: http://en.wikipedia.org/wiki/Diehard_test Barry From spector at stat.berkeley.edu Thu Feb 3 01:18:45 2011 From: spector at stat.berkeley.edu (Phil Spector) Date: Wed, 2 Feb 2011 16:18:45 -0800 (PST) Subject: [R] testing randomness of random number generators with student t-test? In-Reply-To: <4D49E250.6010508@witthoft.com> References: <4D49E250.6010508@witthoft.com> Message-ID: Carl - Under the null hypothesis, the distribution of p-values for any statistical test should be uniform over the range from 0 to 1. So while the individual p-values you see in an experiment like the one you carried out aren't really meaningful, their ensemble behaviour is. So if you did something like > pvals = replicate(10000, {randa<-runif(1000);randb<-runif(1000);t.test(randa,randb)$p.value}) > ks.test(pvals,'punif') you'd expect the ks.test to support the hypothesis that the pvals follow a U(0,1) distribution. As others have pointed out, there are many other issues regarding random number generation, but I think what I've described addresses the issue of the t.test probabilities. - Phil Spector Statistical Computing Facility Department of Statistics UC Berkeley spector at stat.berkeley.edu On Wed, 2 Feb 2011, Carl Witthoft wrote: > Hi, subject more or less says it all. > > I freely admit to not having bothered to find some of the online papers about > method of testing the quality of random number generators -- but in an idle > moment I wondered what to expect from something like the following: > > > randa<-runif(1000) > randb<-runif(1000) > t.test(randa,randb)$p.value > var.test(randa,randb)$p.value > > [repeat ad nauseum] > > > Is the range of p-values I get in any way related tothe "quality" of the > random number generator? > > thanks > Carl > > ______________________________________________ > R-help at 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, reproducible code. > From pomchip at free.fr Thu Feb 3 01:55:25 2011 From: pomchip at free.fr (=?ISO-8859-1?Q?S=E9bastien_Bihorel?=) Date: Wed, 2 Feb 2011 19:55:25 -0500 Subject: [R] Getting variable names in function output Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From edd at debian.org Thu Feb 3 02:08:05 2011 From: edd at debian.org (Dirk Eddelbuettel) Date: Wed, 2 Feb 2011 19:08:05 -0600 Subject: [R] testing randomness of random number generators with student t-test? In-Reply-To: References: <4D49E250.6010508@witthoft.com> Message-ID: <19785.65525.780902.313650@max.nulle.part> On 2 February 2011 at 23:45, Barry Rowlingson wrote: | On Wed, Feb 2, 2011 at 11:01 PM, Carl Witthoft wrote: | > Hi, subject more or less says it all. | > | > I freely admit to not having bothered to find some of the online papers | > about method of testing the quality of random number generators -- but in an | > idle moment I wondered what to expect from something like the following: | > | > | > randa<-runif(1000) | > randb<-runif(1000) | > t.test(randa,randb)$p.value | > var.test(randa,randb)$p.value | > | > [repeat ad nauseum] | > | > | > Is the range of p-values I get in any way related tothe "quality" of the | > random number generator? | | Well yes. All pseudo random number generators have a period, after | which they come back to the start and begin churning out the same | sequence again. Good PRNGs have a sequence length that is | astronomically high. If you have a PRNG that has a sequence of 1000, | or 500, or 200 etc your two sets will be perfectly correlated... | | You might want to read up on RANDU, the infamous poor PRNG: | | http://en.wikipedia.org/wiki/RANDU | | ?We guarantee that each number is random individually, but we don?t | guarantee that more than one of them is random.? | | The other things to look at are the DieHard tests: | http://en.wikipedia.org/wiki/Diehard_test And/or the DieHarder test by Robert G Brown et al -- and with that the RDieHarder package on CRAN which wraps. (And I need to catch up to the fresh development in DieHarder Dirk | Barry | | ______________________________________________ | R-help at 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, reproducible code. -- Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com From Peter.Brecknock at bp.com Thu Feb 3 02:57:46 2011 From: Peter.Brecknock at bp.com (Pete Brecknock) Date: Wed, 2 Feb 2011 17:57:46 -0800 (PST) Subject: [R] Select just numeric values from rows In-Reply-To: <1296688379182-3256237.post@n4.nabble.com> References: <1296688379182-3256237.post@n4.nabble.com> Message-ID: <1296698266683-3256670.post@n4.nabble.com> Terry Any good? list <-"A B C N1 N2 N3 N4 N5 N6 N7 N8 N9 N10 Apples Bananas Peaches 1 2 3 4 5 6 7 8 9 10 Oranges Kumquats Plums 1 1 3 5 5 5 7 6 6 12 Pears Kiwis Grapes 2 4 6 8 5 6 7 6 9 1" d = read.table(textConnection(list), header=TRUE) Nrowsums = apply(d[,sapply(d,is.numeric)],1,sum) HTH Pete -- View this message in context: http://r.789695.n4.nabble.com/Select-just-numeric-values-from-rows-tp3256237p3256670.html Sent from the R help mailing list archive at Nabble.com. From sarah.goslee at gmail.com Thu Feb 3 03:11:12 2011 From: sarah.goslee at gmail.com (Sarah Goslee) Date: Wed, 2 Feb 2011 21:11:12 -0500 Subject: [R] Indexing from two variables In-Reply-To: References: Message-ID: That's kind of hard to follow without example data, but have you looked at merge() ? On Wed, Feb 2, 2011 at 1:31 PM, Ross Dunne wrote: > Hello, thank you all for your patience and time > > I am essentially trying to get disorganised data into long form for linear modelling. > > I have 2 dataframes "rec" and "book" > > Each row in "book" needs to be pasted onto the end of several of the rows of "rec" according to two variables in the row:" MRN" and "COURSE" which match. > > I have tried the following and variations thereon to no avail: > > > #for each line of the recovery dataframe > #insert the one line of the "book" dataset that corresponds to the MRN AND the course-of-treatment (COURSE) > > #get the mrn and course from the first line of the recovery dataframe (rec) > > i=1 > newlist=list() > colnames(newlist)=colnames(book) > for ( i in 1:dim(rec)[1]) { > > ? ? ? ?mrn=as.numeric(as.vector(rec$MRN[i])); > ? ? ? ?course=as.character(rec$COURSE[i]); > > ## find the corresponding row in the book dataframe > ## by generating a logical vector and using > ## it to access "book" > > get.vector<-as.vector(((as.numeric(as.vector(book$MRN))==mrn) & (as.character(book$COURSE)==course))) > > #gives you a vector of logicals (works) > > newlist[i]<-book[get.vector,] ?### (doesn't work) > > i=i+1; > } > > > If anyone has any suggestions on > > 1)getting this to work > 2) making it more elegant (or perhaps just less clumsy) > > If I have been unclear in any way I beg your pardons. > > I do understand I haven't combined any data above, I think if I can generate a long-format dataframe I can combine them all on my own > > Ross Dunne > MB MRCPsych > ross.dunne at tcd.ie > > ________________________________ -- Sarah Goslee http://www.functionaldiversity.org From matzke at berkeley.edu Thu Feb 3 04:20:51 2011 From: matzke at berkeley.edu (Nick Matzke) Date: Wed, 02 Feb 2011 19:20:51 -0800 Subject: [R] how to check if an attribute exists Message-ID: <4D4A1F13.6050703@berkeley.edu> I am dealing with an object that sometimes has a certain attribute, sometimes doesn't. How do I check for this? "exists" doesn't work... ======================= > z=c() > z$a = c("c", "d", "f") > z $a [1] "c" "d" "f" > exists("z") [1] TRUE > exists("z$a") [1] FALSE ======================= ...basically, I want something that returns TRUE if the $a exists in z... Thanks! Nick -- ==================================================== Nicholas J. Matzke Ph.D. Candidate, Graduate Student Researcher Huelsenbeck Lab Center for Theoretical Evolutionary Genomics 4151 VLSB (Valley Life Sciences Building) Department of Integrative Biology University of California, Berkeley Graduate Student Instructor, IB200B Principles of Phylogenetics: Ecology and Evolution http://ib.berkeley.edu/courses/ib200b/ http://phylo.wikidot.com/ Lab websites: http://ib.berkeley.edu/people/lab_detail.php?lab=54 http://fisher.berkeley.edu/cteg/hlab.html Dept. personal page: http://ib.berkeley.edu/people/students/person_detail.php?person=370 Lab personal page: http://fisher.berkeley.edu/cteg/members/matzke.html Lab phone: 510-643-6299 Dept. fax: 510-643-6264 Cell phone: 510-301-0179 Email: matzke at berkeley.edu Mailing address: Department of Integrative Biology 3060 VLSB #3140 Berkeley, CA 94720-3140 ----------------------------------------------------- "[W]hen people thought the earth was flat, they were wrong. When people thought the earth was spherical, they were wrong. But if you think that thinking the earth is spherical is just as wrong as thinking the earth is flat, then your view is wronger than both of them put together." Isaac Asimov (1989). "The Relativity of Wrong." The Skeptical Inquirer, 14(1), 35-44. Fall 1989. http://chem.tufts.edu/AnswersInScience/RelativityofWrong.htm From matzke at berkeley.edu Thu Feb 3 04:22:25 2011 From: matzke at berkeley.edu (Nick Matzke) Date: Wed, 02 Feb 2011 19:22:25 -0800 Subject: [R] how to check if an attribute exists In-Reply-To: <4D4A1F13.6050703@berkeley.edu> References: <4D4A1F13.6050703@berkeley.edu> Message-ID: <4D4A1F71.5000608@berkeley.edu> Oh wait, this basically does it: > if ("a" %in% attributes(z)$names) + print(TRUE) [1] TRUE (but there may be a better way) Cheers! Nick On 2/2/11 7:20 PM, Nick Matzke wrote: > I am dealing with an object that sometimes has a certain > attribute, sometimes doesn't. How do I check for this? > "exists" doesn't work... > > ======================= > > z=c() > > z$a = c("c", "d", "f") > > z > $a > [1] "c" "d" "f" > > > exists("z") > [1] TRUE > > > exists("z$a") > [1] FALSE > ======================= > > ...basically, I want something that returns TRUE if the $a > exists in z... > > Thanks! > Nick > > > -- ==================================================== Nicholas J. Matzke Ph.D. Candidate, Graduate Student Researcher Huelsenbeck Lab Center for Theoretical Evolutionary Genomics 4151 VLSB (Valley Life Sciences Building) Department of Integrative Biology University of California, Berkeley Graduate Student Instructor, IB200B Principles of Phylogenetics: Ecology and Evolution http://ib.berkeley.edu/courses/ib200b/ http://phylo.wikidot.com/ Lab websites: http://ib.berkeley.edu/people/lab_detail.php?lab=54 http://fisher.berkeley.edu/cteg/hlab.html Dept. personal page: http://ib.berkeley.edu/people/students/person_detail.php?person=370 Lab personal page: http://fisher.berkeley.edu/cteg/members/matzke.html Lab phone: 510-643-6299 Dept. fax: 510-643-6264 Cell phone: 510-301-0179 Email: matzke at berkeley.edu Mailing address: Department of Integrative Biology 3060 VLSB #3140 Berkeley, CA 94720-3140 ----------------------------------------------------- "[W]hen people thought the earth was flat, they were wrong. When people thought the earth was spherical, they were wrong. But if you think that thinking the earth is spherical is just as wrong as thinking the earth is flat, then your view is wronger than both of them put together." Isaac Asimov (1989). "The Relativity of Wrong." The Skeptical Inquirer, 14(1), 35-44. Fall 1989. http://chem.tufts.edu/AnswersInScience/RelativityofWrong.htm From peter.langfelder at gmail.com Thu Feb 3 04:25:33 2011 From: peter.langfelder at gmail.com (Peter Langfelder) Date: Wed, 2 Feb 2011 19:25:33 -0800 Subject: [R] how to check if an attribute exists In-Reply-To: <4D4A1F71.5000608@berkeley.edu> References: <4D4A1F13.6050703@berkeley.edu> <4D4A1F71.5000608@berkeley.edu> Message-ID: On Wed, Feb 2, 2011 at 7:22 PM, Nick Matzke wrote: > Oh wait, this basically does it: > >> if ("a" %in% attributes(z)$names) > + print(TRUE) > [1] TRUE > > (but there may be a better way) If z is a list, you can test is.null(z$a) Peter From hb at biostat.ucsf.edu Thu Feb 3 04:48:13 2011 From: hb at biostat.ucsf.edu (Henrik Bengtsson) Date: Wed, 2 Feb 2011 19:48:13 -0800 Subject: [R] how to check if an attribute exists In-Reply-To: References: <4D4A1F13.6050703@berkeley.edu> <4D4A1F71.5000608@berkeley.edu> Message-ID: On Wed, Feb 2, 2011 at 7:25 PM, Peter Langfelder wrote: > On Wed, Feb 2, 2011 at 7:22 PM, Nick Matzke wrote: >> Oh wait, this basically does it: >> >>> if ("a" %in% attributes(z)$names) >> + print(TRUE) >> [1] TRUE >> >> (but there may be a better way) > > If z is a list, you can test > > is.null(z$a) Nope, e.g. > z <- list(a=NULL) > str(z) List of 1 $ a: NULL Instead, test by: > is.element("a", names(z)) [1] TRUE or equivalently > ("a" %in% names(z)) [1] TRUE or > any(names(z) == "a") [1] TRUE My $.02 /Henrik > > Peter > > ______________________________________________ > R-help at 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, reproducible code. > From cbeleites at units.it Thu Feb 3 08:24:19 2011 From: cbeleites at units.it (Claudia Beleites) Date: Thu, 03 Feb 2011 08:24:19 +0100 Subject: [R] slightly off topic... Message-ID: <4D4A5823.9090000@units.it> >> The fact that the attachment to someone with a .de domain has them labeled >> mit de Wort "Teil" suggests that the labeling is being done at the final >> destination, since the server is set up with English messages. > > wie er scharfsinnig bemerkte[1] :-) Looking at the ASCII version of one such email reveals: - the part or Teil is how my thunderbird (English at work, German at home) announces the parts of multipart emails. Neither "part 1.2" nor "Teil 1.2" is written anywhere in the source. - the r-help list footer somehow ended up as separate part of the email Cheers, Claudia -- Claudia Beleites Dipartimento dei Materiali e delle Risorse Naturali Universit? degli Studi di Trieste Via Alfonso Valerio 6/a I-34127 Trieste phone: +39 0 40 5 58-37 68 email: cbeleites at units.it From cstrieder at gmail.com Thu Feb 3 00:06:57 2011 From: cstrieder at gmail.com (Cristiano Strieder) Date: Wed, 2 Feb 2011 21:06:57 -0200 Subject: [R] Two packages with the same name in different projects at r-forge Message-ID: Hi all, I have recently registered two projects at r-forge (let's say project A and B), in both I have a package called sads. The first project (A) was abandoned in fact. But install.packages("sads",repos="http://r-forge.r-project.org") is returning the package from project A, when I want it from project B. Today I have deleted sads and commited it in A - so I expect tomorrow get it from B. How can I specify from what project I want a certain package? -- Cristiano Strieder S?o Jos? dos Campos - SP From jonmosco at gmail.com Thu Feb 3 00:56:40 2011 From: jonmosco at gmail.com (hypermonkey22) Date: Wed, 2 Feb 2011 15:56:40 -0800 (PST) Subject: [R] looping variable names In-Reply-To: References: <1296679015099-3255711.post@n4.nabble.com> Message-ID: <1296691000799-3256356.post@n4.nabble.com> Thanks for the reply! This sounds great. Is there a nice way to store these 100 variable names in a list without typing them all out? -- View this message in context: http://r.789695.n4.nabble.com/looping-variable-names-tp3255711p3256356.html Sent from the R help mailing list archive at Nabble.com. From umesh.paduvagere at gmail.com Thu Feb 3 02:41:08 2011 From: umesh.paduvagere at gmail.com (Umesh) Date: Wed, 2 Feb 2011 17:41:08 -0800 (PST) Subject: [R] problem with D(COM) Server In-Reply-To: <5A124CF22A6ADB4C9DFC2B7D12ABBF2D04655C09@onottaxms3.AGR.GC.CA> References: <5A124CF22A6ADB4C9DFC2B7D12ABBF2D04655C09@onottaxms3.AGR.GC.CA> Message-ID: <1296697268734-3256639.post@n4.nabble.com> Benjamin, I do have the same issue, i tried all different combination as you did but I was not successful. If you have a solution to address this issue please let me know. Umesh -- View this message in context: http://r.789695.n4.nabble.com/problem-with-D-COM-Server-tp3006087p3256639.html Sent from the R help mailing list archive at Nabble.com. From Mark.Palmer at csiro.au Thu Feb 3 03:44:54 2011 From: Mark.Palmer at csiro.au (Mark.Palmer at csiro.au) Date: Thu, 3 Feb 2011 10:44:54 +0800 Subject: [R] problem with parLapply from snow Message-ID: <57DC18C299094D4299F837570C5DF1C536230D06F6@EXWA-MBX01.nexus.csiro.au> An embedded and charset-unspecified text was scrubbed... Name: not available URL: From Allan.Clark at uct.ac.za Thu Feb 3 09:46:58 2011 From: Allan.Clark at uct.ac.za (Allan Clark) Date: Thu, 03 Feb 2011 10:46:58 +0200 Subject: [R] R: mpirun .C and R Message-ID: <4D4A87A2020000D100045E14@gwiasmtp.uct.ac.za> An embedded and charset-unspecified text was scrubbed... Name: not available URL: From baptiste.auguie at googlemail.com Thu Feb 3 09:50:05 2011 From: baptiste.auguie at googlemail.com (baptiste auguie) Date: Thu, 3 Feb 2011 09:50:05 +0100 Subject: [R] rgl: draw multiple ellipsoids In-Reply-To: References: Message-ID: Hi, Thank you for the pointer; I'd overlooked that demo which contains an alternative way of generating ellipsoids. It is slightly annoying that ellipsoid3d is not defined in the main package but in the demo; I'll have to duplicate the code. Playing with this idea, I realised the bottleneck of my approach was the generation of the unit sphere mesh for each ellipsoid. I only need one, which is then duplicated, scaled, rotated, translated N times. This version is much faster, ## from rgl demo ellipsoid3d <- function(rx=1,ry=1,rz=1,n=30,ctr=c(0,0,0), qmesh=FALSE, trans = par3d("userMatrix"),...) { if (missing(trans) && !rgl.cur()) trans <- diag(4) degvec <- seq(0,2*pi,length=n) ecoord2 <- function(p) { c(rx*cos(p[1])*sin(p[2]),ry*sin(p[1])*sin(p[2]),rz*cos(p[2])) } v <- apply(expand.grid(degvec,degvec),1,ecoord2) if (qmesh) v <- rbind(v,rep(1,ncol(v))) ## homogeneous e <- expand.grid(1:(n-1),1:n) i1 <- apply(e,1,function(z)z[1]+n*(z[2]-1)) i2 <- i1+1 i3 <- (i1+n-1) %% n^2 + 1 i4 <- (i2+n-1) %% n^2 + 1 i <- rbind(i1,i2,i4,i3) if (!qmesh) quads3d(v[1,i],v[2,i],v[3,i],...) else return(rotate3d(qmesh3d(v,i,material=...),matrix=trans)) } ## the unit sphere .sphere <- ellipsoid3d(qmesh=TRUE,trans=diag(4)) ## apply transformations to the unit sphere rgl.ellipsoid2 <- function (x=0,y=0,z=0, a = 1,b=1,c=1, phi=0,theta=0,psi=0, subdivide = 3, smooth = TRUE, ...) { result <- scale3d(.sphere, a,b,c) rotM <- euler(phi,theta,psi) result <- rotate3d(result,matrix=rotM) result <- translate3d(result, x,y,z) invisible(result) } ## loop over the specification of a cluster rgl.ellipsoids2 <- function(positions, sizes, angles,...){ N <- NROW(positions) ll <- lapply(seq(1,N), function(ii) rgl.ellipsoid2(positions[ii,1],positions[ii,2],positions[ii,3], sizes[ii,1],sizes[ii,2],sizes[ii,3], angles[ii,1],angles[ii,2],angles[ii,3], ...)) shapelist3d(ll,...) } N <- 100 set.seed(123) positions <- matrix(rnorm(3*N), ncol=3) sizes <- matrix(runif(3*N, 0.01, 0.05), ncol=3) angles <- matrix(runif(3*N, 0, 2*pi), ncol=3) system.time(rgl.ellipsoids2(positions, sizes, angles, col= 1:N)) Best regards, baptiste On 1 February 2011 06:16, Ben Bolker wrote: > baptiste auguie googlemail.com> writes: > >> >> Dear list, >> >> I'm trying to visualise some ellipsoidal shapes in 3D. Their position, >> axes, and angular orientation can be arbitrary. I saw an ellipse3d >> function in rgl; however it is heavily oriented towards the >> statistical concept of ellipse of confidence, whilst I am just >> concerned with the geometrical object. >> > > ?Don't know if it will be better or not, but try > > library(rgl) > demo("shapes3d") > > ______________________________________________ > R-help at 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, reproducible code. > From asanramzan at yahoo.com Thu Feb 3 09:36:26 2011 From: asanramzan at yahoo.com (Asan Ramzan) Date: Thu, 3 Feb 2011 00:36:26 -0800 (PST) Subject: [R] interpret significance from the contr.poly() function Message-ID: <338429.42172.qm@web44715.mail.sp1.yahoo.com> An embedded and charset-unspecified text was scrubbed... Name: not available URL: From bartjoosen at hotmail.com Thu Feb 3 10:30:14 2011 From: bartjoosen at hotmail.com (Bart Joosen) Date: Thu, 3 Feb 2011 01:30:14 -0800 (PST) Subject: [R] problem with D(COM) Server In-Reply-To: <1296697268734-3256639.post@n4.nabble.com> References: <5A124CF22A6ADB4C9DFC2B7D12ABBF2D04655C09@onottaxms3.AGR.GC.CA> <1296697268734-3256639.post@n4.nabble.com> Message-ID: <1296725414447-3257688.post@n4.nabble.com> I have the problem with the basic test too. But I installed D(COM) for use with the R2wd package. Despite the problem with the basic test, R2wd works like a charm. So just try your code, it actually might work fine. Bart -- View this message in context: http://r.789695.n4.nabble.com/problem-with-D-COM-Server-tp3006087p3257688.html Sent from the R help mailing list archive at Nabble.com. From m.r.nixon at ex.ac.uk Thu Feb 3 10:36:57 2011 From: m.r.nixon at ex.ac.uk (mattnixon) Date: Thu, 3 Feb 2011 01:36:57 -0800 (PST) Subject: [R] Average of several line plots In-Reply-To: <1296665072493-3254850.post@n4.nabble.com> References: <1296665072493-3254850.post@n4.nabble.com> Message-ID: <1296725817220-3257696.post@n4.nabble.com> Hi, Peter: thank you, I have taken a look at ?approxfun but I'm not sure it does what I'm after. Eduardo: The data doesn't represent functions. Basically the X values represent the distance across a sample and the Y values are a measure of the colour intensity at that point across the sample (i.e. a line plot across the sample). Each data set represents a measurement across a different section of the sample. All data sets show alternating 'light' and 'dark' sections, though the sample isn't perfect so the widths of each section do not entirely match up from one data set to another. The problem comes from the fact that some data sets contain as many as 400 measurements across the sample whereas others contain as few as 150 measurements. This means that measurements do not necessarily occur at the same value of X on different data sets. Therefore I think I need some way to average the lines ('of best fit') that each data set creates on the graph, rather than averaging the data ponits themselfs as I can't see how I can take averages/weighted averages of the data points when they occur at different values of X (and at different intervals) across the sample. Is my description any better this time? -- View this message in context: http://r.789695.n4.nabble.com/Average-of-several-line-plots-tp3254850p3257696.html Sent from the R help mailing list archive at Nabble.com. From petr.pikal at precheza.cz Thu Feb 3 10:44:14 2011 From: petr.pikal at precheza.cz (Petr PIKAL) Date: Thu, 3 Feb 2011 10:44:14 +0100 Subject: [R] looping variable names In-Reply-To: <1296691000799-3256356.post@n4.nabble.com> References: <1296679015099-3255711.post@n4.nabble.com> <1296691000799-3256356.post@n4.nabble.com> Message-ID: Hi r-help-bounces at r-project.org napsal dne 03.02.2011 00:56:40: > > Thanks for the reply! > > This sounds great. Is there a nice way to store these 100 variable names in > a list without typing them all out? Why? When you need your 42nd variable from a list lll you can just use lll[42] and if you want each variable to have completely different name like foo, asdsdf, jgjgjgjg, ble, bla or other you need to do it manually. Or maybe use sample(letters, 6) to get random 6 letters names. Regards Petr > -- > View this message in context: http://r.789695.n4.nabble.com/looping-variable- > names-tp3255711p3256356.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at 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, reproducible code. From petr.pikal at precheza.cz Thu Feb 3 10:56:13 2011 From: petr.pikal at precheza.cz (Petr PIKAL) Date: Thu, 3 Feb 2011 10:56:13 +0100 Subject: [R] Average of several line plots In-Reply-To: <1296725817220-3257696.post@n4.nabble.com> References: <1296665072493-3254850.post@n4.nabble.com> <1296725817220-3257696.post@n4.nabble.com> Message-ID: Hi r-help-bounces at r-project.org napsal dne 03.02.2011 10:36:57: > > Hi, > > Peter: thank you, I have taken a look at ?approxfun but I'm not sure it does > what I'm after. Hm, maybe yes. But not approxfun but approx x1<-1:15 x2<-50:100 y1<-rnorm(15) y2<-rnorm(51) yy2<-approx(x2,y2)$y yy1<-approx(x1,y1)$y plot(1:50,yy1) points(1:50,yy2, col=2) Regards Petr > > Eduardo: > > The data doesn't represent functions. Basically the X values represent the > distance across a sample and the Y values are a measure of the colour > intensity at that point across the sample (i.e. a line plot across the > sample). Each data set represents a measurement across a different section > of the sample. All data sets show alternating 'light' and 'dark' sections, > though the sample isn't perfect so the widths of each section do not > entirely match up from one data set to another. > > The problem comes from the fact that some data sets contain as many as 400 > measurements across the sample whereas others contain as few as 150 > measurements. This means that measurements do not necessarily occur at the > same value of X on different data sets. Therefore I think I need some way to > average the lines ('of best fit') that each data set creates on the graph, > rather than averaging the data ponits themselfs as I can't see how I can > take averages/weighted averages of the data points when they occur at > different values of X (and at different intervals) across the sample. Is my > description any better this time? > -- > View this message in context: http://r.789695.n4.nabble.com/Average-of- > several-line-plots-tp3254850p3257696.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at 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, reproducible code. From kafkasbane at gmail.com Thu Feb 3 10:58:13 2011 From: kafkasbane at gmail.com (sambit rath) Date: Thu, 3 Feb 2011 15:28:13 +0530 Subject: [R] glmnet with binary predictors Message-ID: Hi Everybody! I must start with a declaration that I am a sparse user of R. I am creating a credit scorecard using a dataset which has a variable depicting actual credit history (good/bad) and 41 other variables of yes/no type. The procedure I am asked to follow is to use a penalized logistic procedure for variable selection. I have located the package "glmnet" which gives the complete elasticnet regularization path for logistic models. I want some help in setting up the process. Can someone point out the basic steps? Thanks Sambit From alaios at yahoo.com Thu Feb 3 10:59:34 2011 From: alaios at yahoo.com (Alaios) Date: Thu, 3 Feb 2011 01:59:34 -0800 (PST) Subject: [R] Loop to mapply. Error In-Reply-To: <872264.12082.qm@web120118.mail.ne1.yahoo.com> Message-ID: <796797.36755.qm@web120117.mail.ne1.yahoo.com> Goodmorning List Member, I would like to ask your help using mapply or Vectorize to make a loop more efficient. I have a m*4 matrix called borders and I would like to add a 5th column. Thus first A. I add the new 5th column borders<-cbind(borders,matrix(data=NA,nrow=nrow(borders))) B. For every cell in this new column I call a function and I put the results in for (i in c(1:nrow(borders))) # How can I can improve that with mapply? borders[i,5]<-findCell(c(borders[i,1],borders[i,2]),sr) As you can see from B I call a function called findCell that takes as input two arguments -x: a vector with two cells thus the c(borders[i,1],borders[i,2]) -sr: a matrix that is always the same (this input is always constant) Then I tried to change the loop in B and use mapply. mapply(findCell,x=cbind(test[,1],test[,2]),sr=sr) > Error in if (!is.finite(length.out) || length.out < 0L) > stop("length must be non-negative number") else if > (length.out ==? : > ? missing value where TRUE/FALSE needed > Calls: mapply -> .Call -> -> seq > -> seq.default I would be grateful if you can help me understand me what this error message is about. Best Regards Alex From E.Vettorazzi at uke.uni-hamburg.de Thu Feb 3 11:34:10 2011 From: E.Vettorazzi at uke.uni-hamburg.de (Eik Vettorazzi) Date: Thu, 03 Feb 2011 11:34:10 +0100 Subject: [R] looping variable names In-Reply-To: <1296679015099-3255711.post@n4.nabble.com> References: <1296679015099-3255711.post@n4.nabble.com> Message-ID: <4D4A84A2.20804@uke.uni-hamburg.de> As Greg wrote, a list is in most circumstances a better way to store many objects. But you can use 'assign' and 'get' to create and access (global) variables #creation for (i in 1:100) assign(paste("var",i,sep=""),rnorm(5)) #access i-th variable i<-15 get(paste("var",i,sep="")) hth. Am 02.02.2011 21:36, schrieb hypermonkey22: > > Hi all, > > I've been looking for a simple answer to the following problem. > > Let's say that I can loop through, say, 100 values that need to be assigned > to, say, the variables var1:var100. > > Is there an elegant way to do this? > > I have seen one or two similar questions...but they tend to be in more > complicated contexts. > Simple question, hopefully with a simple answer. > > Thanks very much! -- Eik Vettorazzi Institut f?r Medizinische Biometrie und Epidemiologie Universit?tsklinikum Hamburg-Eppendorf Martinistr. 52 20246 Hamburg T ++49/40/7410-58243 F ++49/40/7410-57790 From alaios at yahoo.com Thu Feb 3 11:48:42 2011 From: alaios at yahoo.com (Alaios) Date: Thu, 3 Feb 2011 02:48:42 -0800 (PST) Subject: [R] looping variable names In-Reply-To: <4D4A84A2.20804@uke.uni-hamburg.de> Message-ID: <183236.80568.qm@web120107.mail.ne1.yahoo.com> Hello I would like to ask you if I can use the same method but for functions. That means that I want not to assign some value but a function. So is it possible to try something like that: for (i in 1:10) for (j in 1:10) assign(paste("var",i,j,sep=""),myfunction) I would like to thank you in advance for your help best Regards Alexandros --- On Thu, 2/3/11, Eik Vettorazzi wrote: > From: Eik Vettorazzi > Subject: Re: [R] looping variable names > To: "hypermonkey22" > Cc: r-help at r-project.org > Date: Thursday, February 3, 2011, 10:34 AM > As Greg wrote, a list is in most > circumstances a better way to store > many objects. > But you can use 'assign' and 'get' to create and access > (global) variables > > #creation > for (i in 1:100) assign(paste("var",i,sep=""),rnorm(5)) > > #access i-th variable > i<-15 > get(paste("var",i,sep="")) > > hth. > > Am 02.02.2011 21:36, schrieb hypermonkey22: > > > > Hi all, > > > > I've been looking for a simple answer to the following > problem. > > > > Let's say that I can loop through, say, 100 values > that need to be assigned > > to, say, the variables var1:var100. > > > > Is there an elegant way to do this? > > > > I have seen one or two similar questions...but they > tend to be in more > > complicated contexts. > > Simple question, hopefully with a simple answer. > > > > Thanks very much! > > > -- > Eik Vettorazzi > Institut f?r Medizinische Biometrie und Epidemiologie > Universit?tsklinikum Hamburg-Eppendorf > > Martinistr. 52 > 20246 Hamburg > > T ++49/40/7410-58243 > F ++49/40/7410-57790 > > ______________________________________________ > R-help at 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, > reproducible code. > From raji.sankaran at gmail.com Thu Feb 3 11:19:02 2011 From: raji.sankaran at gmail.com (Raji) Date: Thu, 3 Feb 2011 02:19:02 -0800 (PST) Subject: [R] Reg : read missing values from database using RJDBC Message-ID: <1296728342074-3257766.post@n4.nabble.com> Hi R-helpers, i am using the following dataset.This dataset is stored in a mysql database. W(x) pH(y) 10 1 15 1 20 4 5 7.5 3 13 9 5 11.5 13.5 3 16 2 1 9.6 1 I am using RJDBC package to read the data from the database into a dataFrame.The commands used are, jdbcDriver<-JDBC(driverClass="com.mysql.jdbc.Driver", classPath="E:/PAS/trunk/lib/mysql-connector-java-5.1.13-bin.jar", identifier.quote = NA) conn<-dbConnect(jdbcDriver,"jdbc:mysql://localhost/mysql","root","sa") dbSendQuery(conn,"SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED") dataFrame<-dbReadTable(conn,"1392_1_Result") But, the resulting dataFrame has 0.0 /0 in place of the missing values.Can you please let me know how i can avoid this and retain the missing values as NA in my dataFrame? -- View this message in context: http://r.789695.n4.nabble.com/Reg-read-missing-values-from-database-using-RJDBC-tp3257766p3257766.html Sent from the R help mailing list archive at Nabble.com. From nutini.francesco at gmail.com Thu Feb 3 11:58:35 2011 From: nutini.francesco at gmail.com (Francesco Nutini) Date: Thu, 3 Feb 2011 10:58:35 +0000 Subject: [R] [r] align xyplot In-Reply-To: References: , Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From petr.pikal at precheza.cz Thu Feb 3 12:02:19 2011 From: petr.pikal at precheza.cz (Petr PIKAL) Date: Thu, 3 Feb 2011 12:02:19 +0100 Subject: [R] Odp: Loop to mapply. Error In-Reply-To: <796797.36755.qm@web120117.mail.ne1.yahoo.com> References: <872264.12082.qm@web120118.mail.ne1.yahoo.com> <796797.36755.qm@web120117.mail.ne1.yahoo.com> Message-ID: Hi Well, no data so a wild guess. You want select values from matrix sr based on values in borders[,1] and borders[,2]. If it is the case plain selection could be far better > mat<-matrix(1:12, 4,4) > mat [,1] [,2] [,3] [,4] [1,] 1 5 9 1 [2,] 2 6 10 2 [3,] 3 7 11 3 [4,] 4 8 12 4 > b1<-sample(1:4, 3) > b2<-sample(1:4, 3) > cbind(b1,b2) b1 b2 [1,] 3 2 [2,] 4 1 [3,] 2 3 > mat[cbind(b1,b2)] [1] 7 4 10 > If you want something else please provide some sample code and data which can be used for reproduction of your problem. >From the error it seems that your function is somehow incompatible with mapply expectation. Regards Petr r-help-bounces at r-project.org napsal dne 03.02.2011 10:59:34: > Goodmorning List Member, > I would like to ask your help using mapply or Vectorize to make a loop more efficient. > I have a m*4 matrix called borders and I would like to add a 5th column. Thus first > A. I add the new 5th column > borders<-cbind(borders,matrix(data=NA,nrow=nrow(borders))) > B. For every cell in this new column I call a function and I put the results in > for (i in c(1:nrow(borders))) # How can I can improve that with mapply? > borders[i,5]<-findCell(c(borders[i,1],borders[i,2]),sr) > > As you can see from B I call a function called findCell that takes as input > two arguments > -x: a vector with two cells thus the c(borders[i,1],borders[i,2]) > -sr: a matrix that is always the same (this input is always constant) > > Then I tried to change the loop in B and use mapply. > mapply(findCell,x=cbind(test[,1],test[,2]),sr=sr) > > Error in if (!is.finite(length.out) || length.out < 0L) > > stop("length must be non-negative number") else if > > (length.out == : > > missing value where TRUE/FALSE needed > > Calls: mapply -> .Call -> -> seq > > -> seq.default > > I would be grateful if you can help me understand me what this error message is about. > > Best Regards > Alex > > > > > ______________________________________________ > R-help at 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, reproducible code. From nick.sabbe at ugent.be Thu Feb 3 12:03:08 2011 From: nick.sabbe at ugent.be (Nick Sabbe) Date: Thu, 3 Feb 2011 12:03:08 +0100 Subject: [R] glmnet with binary predictors In-Reply-To: References: Message-ID: <060a01cbc391$f1235550$d369fff0$@sabbe@ugent.be> Hello Sambit. Step1: Create a matrix out of your predictor data, having columns for every predictor, coding 1 for yes and 0 for no. he matrix should have a row for each observation (called pred.mat below) Besides that, you need a vector with the outcome variable for each observation (best if this is a factor with 2 levels) (called out.v below) Step2 Because you are working with categorical variables, don't forget to always use " standardize = FALSE " in any call to the glmnet functions (see the docs) Step3 To see how the predictor coefficients move over different values of your penalization parameter, simply do something like myLognet<-glmnet(x=pred.mat, y=out.v, standardize = FALSE, family="binomial") and then plot(myLognet, xvar= "lambda", label = TRUE) Note: the labels in the plot indicate column numbers in pred.mat Step4 To find the 'best' value of the penalization parameter, use cv.glmnet with the same parameters plus a type (see ?cv.glmnet). Note: if the criterion you want is not provided 'out of the box', it will take you quite a bit of coding, so if you can, take one of the provided ones. Visually, you can select the 'best' value for the penalization parameter from the plot (see ?plot.cv.glmnet), or you can use some numerical argument to find the reasonable extreme value for the criterion. Really boilerplate, I guess. Good luck. Nick Sabbe -- ping: nick.sabbe at ugent.be link: http://biomath.ugent.be wink: A1.056, Coupure Links 653, 9000 Gent ring: 09/264.59.36 -- Do Not Disapprove -----Original Message----- From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of sambit rath Sent: donderdag 3 februari 2011 10:58 To: r-help at r-project.org Subject: [R] glmnet with binary predictors Hi Everybody! I must start with a declaration that I am a sparse user of R. I am creating a credit scorecard using a dataset which has a variable depicting actual credit history (good/bad) and 41 other variables of yes/no type. The procedure I am asked to follow is to use a penalized logistic procedure for variable selection. I have located the package "glmnet" which gives the complete elasticnet regularization path for logistic models. I want some help in setting up the process. Can someone point out the basic steps? Thanks Sambit ______________________________________________ R-help at 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, reproducible code. From p.pagel at wzw.tum.de Thu Feb 3 12:12:15 2011 From: p.pagel at wzw.tum.de (Philipp Pagel) Date: Thu, 3 Feb 2011 12:12:15 +0100 Subject: [R] Average of several line plots In-Reply-To: <1296725817220-3257696.post@n4.nabble.com> References: <1296665072493-3254850.post@n4.nabble.com> <1296725817220-3257696.post@n4.nabble.com> Message-ID: <20110203111215.GA5910@maker> On Thu, Feb 03, 2011 at 01:36:57AM -0800, mattnixon wrote: > > The data doesn't represent functions. Basically the X values represent the > distance across a sample and the Y values are a measure of the colour > intensity at that point across the sample (i.e. a line plot across the > sample). Each data set represents a measurement across a different section > of the sample. All data sets show alternating 'light' and 'dark' sections, > though the sample isn't perfect so the widths of each section do not > entirely match up from one data set to another. > > The problem comes from the fact that some data sets contain as many as 400 > measurements across the sample whereas others contain as few as 150 > measurements. This means that measurements do not necessarily occur at the > same value of X on different data sets. Therefore I think I need some way to > average the lines ('of best fit') that each data set creates on the graph, > rather than averaging the data ponits themselfs as I can't see how I can > take averages/weighted averages of the data points when they occur at > different values of X (and at different intervals) across the sample. Is my > description any better this time? I am not 100% sure, but if I understand your problem correctly, loess() may be applicable. cu Philipp -- Dr. Philipp Pagel Lehrstuhl f?r Genomorientierte Bioinformatik Technische Universit?t M?nchen Wissenschaftszentrum Weihenstephan Maximus-von-Imhof-Forum 3 85354 Freising, Germany http://webclu.bio.wzw.tum.de/~pagel/ From alaios at yahoo.com Thu Feb 3 12:16:45 2011 From: alaios at yahoo.com (Alaios) Date: Thu, 3 Feb 2011 03:16:45 -0800 (PST) Subject: [R] Odp: Loop to mapply. Error In-Reply-To: Message-ID: <530568.6484.qm@web120109.mail.ne1.yahoo.com> Hello Petr, I am sorry that I did not provide all the required data (for me is not very straight-forward to understand what I have to provide and what not) findCell<-function(x,sr){ # It is just for me understand how mapply works sr[x[1],x[2]] } and I want to call mapply like that. mapply(findCell,x=cbind(borders[1:nrow(borders),1],borders[1:nrow(borders),2]),sr=sr) where borders is str(borders) 'data.frame': 30 obs. of 2 variables: $ Var1 : num -1 -0.667 -0.333 0 0.333 ... $ Var2 : num -1 -1 -1 -1 -1 ... small example is borders[1:2,1:2] Var1 Var2 1 -1.0000000 -1 2 -0.6666667 -1 > From: Petr PIKAL > Subject: Odp: [R] Loop to mapply. Error > To: "Alaios" > Cc: R-help at r-project.org > Date: Thursday, February 3, 2011, 11:02 AM > Hi > > Well, no data so a wild guess. You want select values from > matrix sr based > on values in borders[,1] and borders[,2]. > > If it is the case plain selection could be far better > > > mat<-matrix(1:12, 4,4) > > mat > ? ???[,1] [,2] [,3] [,4] > [1,]? ? 1? ? 5? ? 9? > ? 1 > [2,]? ? 2? ? > 6???10? ? 2 > [3,]? ? 3? ? > 7???11? ? 3 > [4,]? ? 4? ? > 8???12? ? 4 > > b1<-sample(1:4, 3) > > b2<-sample(1:4, 3) > > cbind(b1,b2) > ? ???b1 b2 > [1,]? 3? 2 > [2,]? 4? 1 > [3,]? 2? 3 > > mat[cbind(b1,b2)] > [1]? 7? 4 10 > > > > If you want something else please provide some sample code > and data which > can be used for reproduction of your problem. > > From the error it seems that your function is somehow > incompatible with > mapply expectation. > > Regards > Petr > > > r-help-bounces at r-project.org > napsal dne 03.02.2011 10:59:34: > > > Goodmorning List Member, > > I would like to ask your help using mapply or > Vectorize to make a loop > more efficient. > > I have a m*4 matrix called borders and I would like to > add a 5th column. > Thus first > > A. I add the new 5th column > > > borders<-cbind(borders,matrix(data=NA,nrow=nrow(borders))) > > B. For every cell in this new column I call a function > and I put the > results in > > for (i in c(1:nrow(borders))) # How can I can improve > that with mapply? > >? ? > borders[i,5]<-findCell(c(borders[i,1],borders[i,2]),sr) > > > > As you can see from B I call a function called > findCell that takes as > input > > two arguments > > -x: a vector with two cells thus the > c(borders[i,1],borders[i,2]) > > -sr: a matrix that is always the same (this input is > always constant) > > > > Then I tried to change the loop in B and use mapply. > > mapply(findCell,x=cbind(test[,1],test[,2]),sr=sr) > > > Error in if (!is.finite(length.out) || length.out > < 0L) > > > stop("length must be non-negative number") else > if > > > (length.out ==? : > > >???missing value where TRUE/FALSE > needed > > > Calls: mapply -> .Call -> > -> seq > > > -> seq.default > > > > I would be grateful if you can help me understand me > what this error > message is about. > > > > Best Regards > > Alex > > > > > > > > > > ______________________________________________ > > R-help at 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, > reproducible code. > > From fomcl at yahoo.com Thu Feb 3 12:26:41 2011 From: fomcl at yahoo.com (Albert-Jan Roskam) Date: Thu, 3 Feb 2011 03:26:41 -0800 (PST) Subject: [R] mapply question (?) Message-ID: <672015.25112.qm@web110714.mail.gq1.yahoo.com> An embedded and charset-unspecified text was scrubbed... Name: not available URL: From kmoore at tcd.ie Thu Feb 3 12:47:21 2011 From: kmoore at tcd.ie (Karen Moore) Date: Thu, 3 Feb 2011 11:47:21 +0000 Subject: [R] Error message: number of items to replace is not a multiple of replacement length Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From lebatsnok at gmail.com Thu Feb 3 12:50:22 2011 From: lebatsnok at gmail.com (Kenn Konstabel) Date: Thu, 3 Feb 2011 13:50:22 +0200 Subject: [R] mapply question (?) In-Reply-To: <672015.25112.qm@web110714.mail.gq1.yahoo.com> References: <672015.25112.qm@web110714.mail.gq1.yahoo.com> Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From petr.pikal at precheza.cz Thu Feb 3 13:06:25 2011 From: petr.pikal at precheza.cz (Petr PIKAL) Date: Thu, 3 Feb 2011 13:06:25 +0100 Subject: [R] Odp: Loop to mapply. Error In-Reply-To: <530568.6484.qm@web120109.mail.ne1.yahoo.com> References: <530568.6484.qm@web120109.mail.ne1.yahoo.com> Message-ID: Hi Alaios napsal dne 03.02.2011 12:16:45: > Hello Petr, > I am sorry that I did not provide all the required data (for me is not very > straight-forward to understand what I have to provide and what not) > > > findCell<-function(x,sr){ # It is just for me understand how mapply works > sr[x[1],x[2]] > } > > and I want to call mapply like that. > > mapply(findCell,x=cbind(borders[1:nrow(borders),1],borders[1:nrow(borders),2]),sr=sr) > > where borders is > str(borders) > 'data.frame': 30 obs. of 2 variables: > $ Var1 : num -1 -0.667 -0.333 0 0.333 ... > $ Var2 : num -1 -1 -1 -1 -1 ... > > small example is > borders[1:2,1:2] > Var1 Var2 > 1 -1.0000000 -1 > 2 -0.6666667 -1 For your purpose there is no need to call mapply and function. sr[borders[,1], borders[,2]] shall be enough. However values in borders are not integer and are negative. So in that case your function excludes respective column and row and in case of fractional value it is rounded (actually from help page truncated) i, j, ... indices specifying elements to extract or replace. Indices are numeric or character vectors or empty (missing) or NULL. Numeric values are coerced to integer as by as.integer (and hence truncated towards zero) In that case I do not understand what you really want as an output of your findCell function based on data you provided. Again if you want to choose values from sr based on values in borders variable plain selection procedure (without mapply, without function) is AFAIK better. If you want something else you need to state it See also the difference > mat [,1] [,2] [,3] [,4] [1,] 1 5 9 1 [2,] 2 6 10 2 [3,] 3 7 11 3 [4,] 4 8 12 4 > findCell(c(1,3),mat) [1] 9 > mat[1,3] [1] 9 > findCell(cbind(1:2,3:4),mat) [1] 5 > mat[1:2,3:4] [,1] [,2] [1,] 9 1 [2,] 10 2 > findCell(cbind(-(1:2),-(3:4)),mat) [,1] [,2] [,3] [1,] 2 10 2 [2,] 3 11 3 [3,] 4 12 4 > mat[-(1:2),-(3:4)] [,1] [,2] [1,] 3 7 [2,] 4 8 Which result is "correct" from your point of wiev? Regards Petr > > > > From: Petr PIKAL > > Subject: Odp: [R] Loop to mapply. Error > > To: "Alaios" > > Cc: R-help at r-project.org > > Date: Thursday, February 3, 2011, 11:02 AM > > Hi > > > > Well, no data so a wild guess. You want select values from > > matrix sr based > > on values in borders[,1] and borders[,2]. > > > > If it is the case plain selection could be far better > > > > > mat<-matrix(1:12, 4,4) > > > mat > > [,1] [,2] [,3] [,4] > > [1,] 1 5 9 > > 1 > > [2,] 2 > > 6 10 2 > > [3,] 3 > > 7 11 3 > > [4,] 4 > > 8 12 4 > > > b1<-sample(1:4, 3) > > > b2<-sample(1:4, 3) > > > cbind(b1,b2) > > b1 b2 > > [1,] 3 2 > > [2,] 4 1 > > [3,] 2 3 > > > mat[cbind(b1,b2)] > > [1] 7 4 10 > > > > > > > If you want something else please provide some sample code > > and data which > > can be used for reproduction of your problem. > > > > From the error it seems that your function is somehow > > incompatible with > > mapply expectation. > > > > Regards > > Petr > > > > > > r-help-bounces at r-project.org > > napsal dne 03.02.2011 10:59:34: > > > > > Goodmorning List Member, > > > I would like to ask your help using mapply or > > Vectorize to make a loop > > more efficient. > > > I have a m*4 matrix called borders and I would like to > > add a 5th column. > > Thus first > > > A. I add the new 5th column > > > > > borders<-cbind(borders,matrix(data=NA,nrow=nrow(borders))) > > > B. For every cell in this new column I call a function > > and I put the > > results in > > > for (i in c(1:nrow(borders))) # How can I can improve > > that with mapply? > > > > > borders[i,5]<-findCell(c(borders[i,1],borders[i,2]),sr) > > > > > > As you can see from B I call a function called > > findCell that takes as > > input > > > two arguments > > > -x: a vector with two cells thus the > > c(borders[i,1],borders[i,2]) > > > -sr: a matrix that is always the same (this input is > > always constant) > > > > > > Then I tried to change the loop in B and use mapply. > > > mapply(findCell,x=cbind(test[,1],test[,2]),sr=sr) > > > > Error in if (!is.finite(length.out) || length.out > > < 0L) > > > > stop("length must be non-negative number") else > > if > > > > (length.out == : > > > > missing value where TRUE/FALSE > > needed > > > > Calls: mapply -> .Call -> > > -> seq > > > > -> seq.default > > > > > > I would be grateful if you can help me understand me > > what this error > > message is about. > > > > > > Best Regards > > > Alex > > > > > > > > > > > > > > > ______________________________________________ > > > R-help at 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, > > reproducible code. > > > > > > > From savicky at praha1.ff.cuni.cz Thu Feb 3 13:29:06 2011 From: savicky at praha1.ff.cuni.cz (Petr Savicky) Date: Thu, 3 Feb 2011 13:29:06 +0100 Subject: [R] testing randomness of random number generators with student t-test? In-Reply-To: <4D49E250.6010508@witthoft.com> References: <4D49E250.6010508@witthoft.com> Message-ID: <20110203122906.GA30929@praha1.ff.cuni.cz> On Wed, Feb 02, 2011 at 06:01:36PM -0500, Carl Witthoft wrote: > Hi, subject more or less says it all. > > I freely admit to not having bothered to find some of the online papers > about method of testing the quality of random number generators -- but > in an idle moment I wondered what to expect from something like the > following: > > > randa<-runif(1000) > randb<-runif(1000) > t.test(randa,randb)$p.value > var.test(randa,randb)$p.value > > [repeat ad nauseum] > > > Is the range of p-values I get in any way related tothe "quality" of the > random number generator? Hi. As already explained, the result of t.test() in this case confirms good quality of Mersenne Twister generator used in R. The situation is slightly more complicated with ks.test() due to the 32-bit precision of the random numbers as discussed in section Note of ?RNGkind. For example n <- 100000 ks.test(runif(n), runif(n)) typically produces a warning due to ties. This is not related to the quality of the randomness. The reason is that the random numbers have 32 bits and due to birthday paradox we get collisions already for 2^16 numbers with probability about 0.39. The null hypothesis should be changed to assume uniform distribution on the numbers in (0, 1) with at most 32 bits. See section Random Number Generators of CRAN Task View Probability Distributions by Christophe Dutang for information on CRAN packages related to random numbers. As far as i know, the only tests, which can distinguish Mersenne Twister numbers from truly random ones are linear complexity tests mod 2. This is discussed, for example, in section 7 Conclusion, Future Work, and Open Issues in http://www.iro.umontreal.ca/~lecuyer/myftp/papers/horms.pdf by P. L'Ecuyer. Applications, which do not use the bitwise mod 2 (XOR) operations, are very unlikely to interfere with the linear tests mod 2. On the other hand, if bitwise XOR is used, then Mersenne Twister numbers may be predicted due to the fact that it is defined using XOR operation and the history of the last 624 numbers. A simple demonstration of this known predictability is contained in http://www.cs.cas.cz/~savicky/predict_MT/predict_MT.R At the first glance, this may look as very bad. On the other hand, if there is a relatively simple smooth function of 625 real variables, which has a measurable difference of expected value on Mersenne Twister numbers and truly random ones, then this is likely to be an interesting mathematical discovery. Petr Savicky. From bmeyer at sozpsy.uzh.ch Thu Feb 3 13:30:23 2011 From: bmeyer at sozpsy.uzh.ch (Bertolt Meyer) Date: Thu, 3 Feb 2011 13:30:23 +0100 Subject: [R] how to read the "Sum Sq" - column from summary.aov() Message-ID: Dear R-Users, I have a trivial problem, but extensive googling and ??'ing did not solve it: I want to obtain the sums of squares from a summary.aov() object for later use. Example: > DV <- rnorm(100) > IV1 <- as.factor(rep(c("male", "female"), times = 50)) > IV2 <- as.factor(rep(c("young", "old"), times = 50)) > > summary(aov(DV ~ IV1 * IV2)) Df Sum Sq Mean Sq F value Pr(>F) IV1 1 0.215 0.21499 0.2277 0.6343 Residuals 98 92.523 0.94411 How can I store the sums of squares in a variable for later use? Like this: >some.magic.command() [1] 0.215 92.523 Thank you, Bertolt -- Dr. Bertolt Meyer Senior research and teaching associate Social Psychology, Institute of Psychology, University of Zurich Binzmuehlestrasse 14, Box 15 CH-8050 Zurich Switzerland bmeyer at sozpsy.uzh.ch From asanramzan at yahoo.com Thu Feb 3 12:41:43 2011 From: asanramzan at yahoo.com (Asan Ramzan) Date: Thu, 3 Feb 2011 03:41:43 -0800 (PST) Subject: [R] interpret significance from the contr.poly() function Message-ID: <569484.77138.qm@web44712.mail.sp1.yahoo.com> An embedded and charset-unspecified text was scrubbed... Name: not available URL: From mhairialexander at gmail.com Thu Feb 3 13:27:42 2011 From: mhairialexander at gmail.com (m234) Date: Thu, 3 Feb 2011 04:27:42 -0800 (PST) Subject: [R] boostrap an nls regression Message-ID: <1296736062500-3257974.post@n4.nabble.com> Hello there I have the following model based on the hollings disc equation for the type II functional response for 2 data sets: nls(eaten~(a*suppl)/(1+a*h*suppl) where eaten is the number of prey eaten by a predator and suppl is the number of prey initially supplied to the same predator. I have parameter estimates of 'a' and 'h' for the two populations studied and would like to know if there is a significant different in the estimates between the two i.e. a1 vs a2, h1 vs h2. I would like to bootstap the data to get multiple (~1000) estimates and compare then via a ttest or equivalent. Is it possible to do this and obtain multiple estimations which I can go on to test? Im pretty new to R and struggling to get codes to work. Any advice or to be pointed in the right direction would be much appreciated. Cheers :) -- View this message in context: http://r.789695.n4.nabble.com/boostrap-an-nls-regression-tp3257974p3257974.html Sent from the R help mailing list archive at Nabble.com. From lebatsnok at gmail.com Thu Feb 3 13:48:10 2011 From: lebatsnok at gmail.com (Kenn Konstabel) Date: Thu, 3 Feb 2011 14:48:10 +0200 Subject: [R] Odp: Loop to mapply. Error In-Reply-To: <530568.6484.qm@web120109.mail.ne1.yahoo.com> References: <530568.6484.qm@web120109.mail.ne1.yahoo.com> Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From ehlers at ucalgary.ca Thu Feb 3 13:49:49 2011 From: ehlers at ucalgary.ca (Peter Ehlers) Date: Thu, 03 Feb 2011 04:49:49 -0800 Subject: [R] how to read the "Sum Sq" - column from summary.aov() In-Reply-To: References: Message-ID: <4D4AA46D.50102@ucalgary.ca> On 2011-02-03 04:30, Bertolt Meyer wrote: > Dear R-Users, > > I have a trivial problem, but extensive googling and ??'ing did not solve it: I want to obtain the sums of squares from a summary.aov() object for later use. Example: > >> DV<- rnorm(100) >> IV1<- as.factor(rep(c("male", "female"), times = 50)) >> IV2<- as.factor(rep(c("young", "old"), times = 50)) >> >> summary(aov(DV ~ IV1 * IV2)) > > Df Sum Sq Mean Sq F value Pr(>F) > IV1 1 0.215 0.21499 0.2277 0.6343 > Residuals 98 92.523 0.94411 > > How can I store the sums of squares in a variable for later use? Like this: > >> some.magic.command() > [1] 0.215 92.523 str() is your friend. str( summary(aov(DV ~ IV1 * IV2)) ) shows that the summary is a list containing a data.frame. Use summary(aov(DV ~ IV1 * IV2))[[1]] to extract the data.frame and any one of summary(aov(DV ~ IV1 * IV2))[[1]][, 2] summary(aov(DV ~ IV1 * IV2))[[1]][, 'Sum Sq'] summary(aov(DV ~ IV1 * IV2))[[1]]$'Sum Sq' to extract the sum-of-squares vector. Peter Ehlers > > Thank you, > Bertolt > From ivan.calandra at uni-hamburg.de Thu Feb 3 13:50:55 2011 From: ivan.calandra at uni-hamburg.de (Ivan Calandra) Date: Thu, 03 Feb 2011 13:50:55 +0100 Subject: [R] how to read the "Sum Sq" - column from summary.aov() In-Reply-To: References: Message-ID: <4D4AA4AF.5010108@uni-hamburg.de> Hi, If you do test <- summary(aov(DV ~ IV1 * IV2)) str(test) you will see that test[[1]][2] gives you what you want. Reading more on indexing will also probably help you. str() is a very useful function, to use without moderation! HTH, Ivan Le 2/3/2011 13:30, Bertolt Meyer a ?crit : > summary(aov(DV ~ IV1 * IV2)) -- Ivan CALANDRA PhD Student University of Hamburg Biozentrum Grindel und Zoologisches Museum Abt. S?ugetiere Martin-Luther-King-Platz 3 D-20146 Hamburg, GERMANY +49(0)40 42838 6231 ivan.calandra at uni-hamburg.de ********** http://www.for771.uni-bonn.de http://webapp5.rrz.uni-hamburg.de/mammals/eng/1525_8_1.php From bbolker at gmail.com Thu Feb 3 14:12:25 2011 From: bbolker at gmail.com (Ben Bolker) Date: Thu, 3 Feb 2011 13:12:25 +0000 Subject: [R] Why my package is not being generated? References: Message-ID: Cristiano Strieder gmail.com> writes: > > Hi all, > > I have commited a new release of my package and waited for more than > one day. After that > "install.packages("tests",repos="http://r-forge.r-projet.org")" still > returns "package 'tests' is not available". I have done the local > build & check and the package seems ok. Also have mofified the Title > in the DESCRIPTION file. > > What can be wrong? > > Is there any tool or recomendation to validade my package before submit it? > I don't think there is any way to check before submitting beyond R CMD build and check with an up-to-date R. Have you checked the build and check logs on R-forge? The build environment on r-forge can often be slightly different from your "home" build environment. From matthias-gondan at gmx.de Thu Feb 3 14:14:34 2011 From: matthias-gondan at gmx.de (Matthias Gondan) Date: Thu, 03 Feb 2011 14:14:34 +0100 Subject: [R] random sequences for rnorm and runif Message-ID: <20110203131434.31180@gmx.net> Dear R experts, For a fixed seed, the first random number produced by rnorm and runif has the same rank within the distribution, which I find useful. The following ranks differ, however. > set.seed(123) > runif(4) [1] *0.2875775* 0.7883051 *0.4089769* 0.8830174 > set.seed(123) > pnorm(rnorm(4)) [1] 0.2875775 0.4089769 0.9404673 0.5281055 I noticed that rnorm seems to 'eat' two seeds of the random number generator, whereas runif eats only one seed. Is this intended behavior or do you think it should be fixed? The strange thing is that the 1st/3rd/5th etc number of rnorm corresponds to the 1st/2nd/3rd in runif. If two seeds are necessary, I would have expected the following correspondence, 2-1, 4-2, 6-3, etc. Temporary fix: > myrnorm = function(n, mean=0, sd=1) + { + qnorm(runif(n), mean, sd) + } # myrnorm > > set.seed(123) > pnorm(myrnorm(4)) [1] 0.2875775 0.7883051 0.4089769 0.8830174 Best wishes, Matthias Gondan -- GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit gratis Handy-Flat! http://portal.gmx.net/de/go/dsl From bmeyer at sozpsy.uzh.ch Thu Feb 3 14:27:23 2011 From: bmeyer at sozpsy.uzh.ch (Bertolt Meyer) Date: Thu, 3 Feb 2011 14:27:23 +0100 Subject: [R] how to read the "Sum Sq" - column from summary.aov() In-Reply-To: <4D4AA46D.50102@ucalgary.ca> References: <4D4AA46D.50102@ucalgary.ca> Message-ID: <30650BF6-5C17-4B7D-9EE2-EF328992BDAD@sozpsy.uzh.ch> Dear Peter, thank you so much for the quick and helpful reply - it was exactly what I was looking for. Regards, Bertolt Am 03.02.2011 um 13:49 schrieb Peter Ehlers: > On 2011-02-03 04:30, Bertolt Meyer wrote: >> Dear R-Users, >> >> I have a trivial problem, but extensive googling and ??'ing did not solve it: I want to obtain the sums of squares from a summary.aov() object for later use. Example: >> >>> DV<- rnorm(100) >>> IV1<- as.factor(rep(c("male", "female"), times = 50)) >>> IV2<- as.factor(rep(c("young", "old"), times = 50)) >>> >>> summary(aov(DV ~ IV1 * IV2)) >> >> Df Sum Sq Mean Sq F value Pr(>F) >> IV1 1 0.215 0.21499 0.2277 0.6343 >> Residuals 98 92.523 0.94411 >> >> How can I store the sums of squares in a variable for later use? Like this: >> >>> some.magic.command() >> [1] 0.215 92.523 > > str() is your friend. > > str( summary(aov(DV ~ IV1 * IV2)) ) > > shows that the summary is a list containing a data.frame. > Use > > summary(aov(DV ~ IV1 * IV2))[[1]] > > to extract the data.frame and any one of > > summary(aov(DV ~ IV1 * IV2))[[1]][, 2] > summary(aov(DV ~ IV1 * IV2))[[1]][, 'Sum Sq'] > summary(aov(DV ~ IV1 * IV2))[[1]]$'Sum Sq' > > to extract the sum-of-squares vector. > > Peter Ehlers > >> >> Thank you, >> Bertolt From ripley at stats.ox.ac.uk Thu Feb 3 14:39:02 2011 From: ripley at stats.ox.ac.uk (Prof Brian Ripley) Date: Thu, 3 Feb 2011 13:39:02 +0000 (GMT) Subject: [R] random sequences for rnorm and runif In-Reply-To: <20110203131434.31180@gmx.net> References: <20110203131434.31180@gmx.net> Message-ID: On Thu, 3 Feb 2011, Matthias Gondan wrote: > Dear R experts, > > For a fixed seed, the first random number produced by rnorm and runif > has the same rank within the distribution, which I find useful. The > following ranks differ, however. > >> set.seed(123) >> runif(4) > [1] *0.2875775* 0.7883051 *0.4089769* 0.8830174 > >> set.seed(123) >> pnorm(rnorm(4)) > [1] 0.2875775 0.4089769 0.9404673 0.5281055 > > I noticed that rnorm seems to 'eat' two seeds of the random > number generator, whereas runif eats only one seed. Is this > intended behavior or do you think it should be fixed? Yes, it is the intended and documented procedure. To achieve sufficient accuracy by the default inversion method for rnorm, 2 uniforms are required. > The strange thing is that the 1st/3rd/5th etc number of rnorm > corresponds to the 1st/2nd/3rd in runif. It would be strange if true: look again and interchange rnorm <-> runif. > If two seeds are necessary, I would have expected the following > correspondence, 2-1, 4-2, 6-3, etc. > > Temporary fix: > >> myrnorm = function(n, mean=0, sd=1) > + { > + qnorm(runif(n), mean, sd) > + } # myrnorm which for some purposes is not accurate enough. >> set.seed(123) >> pnorm(myrnorm(4)) > [1] 0.2875775 0.7883051 0.4089769 0.8830174 Better to simple take every other value in runif. > Best wishes, > > Matthias Gondan > -- > GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit > gratis Handy-Flat! http://portal.gmx.net/de/go/dsl > > ______________________________________________ > R-help at 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, reproducible code. > -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 From alaios at yahoo.com Thu Feb 3 14:47:04 2011 From: alaios at yahoo.com (Alaios) Date: Thu, 3 Feb 2011 05:47:04 -0800 (PST) Subject: [R] Odp: Loop to mapply. Error In-Reply-To: Message-ID: <842086.47674.qm@web120117.mail.ne1.yahoo.com> An embedded and charset-unspecified text was scrubbed... Name: not available URL: From amir at ac.upc.edu Thu Feb 3 14:49:18 2011 From: amir at ac.upc.edu (amir) Date: Thu, 03 Feb 2011 14:49:18 +0100 Subject: [R] minimum steiner tree Message-ID: <4D4AB25E.6070802@ac.upc.edu> Dear All, Is there any function in R that find the minimum steiner tree not minimum spanning tree? Regards, Amir From Allan.Clark at uct.ac.za Thu Feb 3 15:00:23 2011 From: Allan.Clark at uct.ac.za (Allan Clark) Date: Thu, 03 Feb 2011 16:00:23 +0200 Subject: [R] mpirun .C and R In-Reply-To: References: Message-ID: <4D4AD117020000D100045EE0@gwiasmtp.uct.ac.za> An embedded and charset-unspecified text was scrubbed... Name: not available URL: From jsorkin at grecc.umaryland.edu Thu Feb 3 15:04:46 2011 From: jsorkin at grecc.umaryland.edu (John Sorkin) Date: Thu, 03 Feb 2011 09:04:46 -0500 Subject: [R] coxme, colon2 dataframe Message-ID: <4D4A6FAE020000CB0007F828@medicine.umaryland.edu> I am exploring the coxme function. The help page uses two examples that use the colon2 dataframe. The data frame is not included in the material that is installed when one loads the coxme package. The web site that contains the colon2 data, does not have the file in an immediately usable fashion. Does anyone have a copy of colon2 as an R dataframe? Thanks, John John David Sorkin M.D., Ph.D. Chief, Biostatistics and Informatics University of Maryland School of Medicine Division of Gerontology Baltimore VA Medical Center 10 North Greene Street GRECC (BT/18/GR) Baltimore, MD 21201-1524 (Phone) 410-605-7119 (Fax) 410-605-7913 (Please call phone number above prior to faxing) Confidentiality Statement: This email message, including any attachments, is for th...{{dropped:6}} From izahn at psych.rochester.edu Thu Feb 3 15:25:17 2011 From: izahn at psych.rochester.edu (Ista Zahn) Date: Thu, 3 Feb 2011 14:25:17 +0000 Subject: [R] interpret significance from the contr.poly() function In-Reply-To: <338429.42172.qm@web44715.mail.sp1.yahoo.com> References: <338429.42172.qm@web44715.mail.sp1.yahoo.com> Message-ID: By fitting some kind of model. contr.poly doesn't fit a model or test significance, it just sets contrasts. Here is an example data(mtcars) > mtcars$carb <- factor(mtcars$carb) > contrasts(mtcars$carb) <- contr.poly(n=levels(mtcars$carb)) > contrasts(mtcars$carb) .L .Q .C ^4 ^5 1 -0.5976143 0.5455447 -0.3726780 0.1889822 -0.06299408 2 -0.3585686 -0.1091089 0.5217492 -0.5669467 0.31497039 3 -0.1195229 -0.4364358 0.2981424 0.3779645 -0.62994079 4 0.1195229 -0.4364358 -0.2981424 0.3779645 0.62994079 6 0.3585686 -0.1091089 -0.5217492 -0.5669467 -0.31497039 8 0.5976143 0.5455447 0.3726780 0.1889822 0.06299408 > mt.mod <- lm(mpg ~ carb, data=mtcars) > summary(mt.mod) Call: lm(formula = mpg ~ carb, data = mtcars) Residuals: Min 1Q Median 3Q Max -7.243 -3.325 0.000 2.360 8.557 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 19.0888 1.3373 14.274 8.18e-14 *** carb.L -7.2101 3.6566 -1.972 0.0594 . carb.Q 3.4101 3.2378 1.053 0.3019 carb.C -2.2938 3.4567 -0.664 0.5128 carb^4 -4.1155 3.3132 -1.242 0.2253 carb^5 -0.1224 2.6213 -0.047 0.9631 --- Signif. codes: 0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1 Residual standard error: 4.905 on 26 degrees of freedom Multiple R-squared: 0.4445, Adjusted R-squared: 0.3377 F-statistic: 4.161 on 5 and 26 DF, p-value: 0.006546 Best, Ista On Thu, Feb 3, 2011 at 8:36 AM, Asan Ramzan wrote: > Hello R-help > I don?t know how to interpret significance from the contr.poly() function . From > the example below > : how can I tell if data has a significant Linear/quadratic/cubic trend? >> contr.poly(4, c(1,2,4,8)) > ????????????? .L???????? .Q????????? .C > [1,] -0.51287764? 0.5296271 -0.45436947 > [2,] -0.32637668 -0.1059254? 0.79514657 > [3,]? 0.04662524 -0.7679594 -0.39757328 > [4,]? 0.79262909? 0.3442576? 0.05679618 >> >> diff(contr.poly(4, c(1,2,4,8))[,1]) > [1] 0.1865010 0.3730019 0.7460038 > Thanks > > > > ? ? ? ?[[alternative HTML version deleted]] > > > ______________________________________________ > R-help at 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, reproducible code. > > -- Ista Zahn Graduate student University of Rochester Department of Clinical and Social Psychology http://yourpsyche.org From rmh at temple.edu Thu Feb 3 16:22:08 2011 From: rmh at temple.edu (RICHARD M. HEIBERGER) Date: Thu, 3 Feb 2011 10:22:08 -0500 Subject: [R] interpret significance from the contr.poly() function In-Reply-To: <338429.42172.qm@web44715.mail.sp1.yahoo.com> References: <338429.42172.qm@web44715.mail.sp1.yahoo.com> Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From bartjoosen at hotmail.com Thu Feb 3 15:34:41 2011 From: bartjoosen at hotmail.com (Bart Joosen) Date: Thu, 3 Feb 2011 06:34:41 -0800 (PST) Subject: [R] Why my package is not being generated? In-Reply-To: References: Message-ID: <1296743681675-3258202.post@n4.nabble.com> a typo in r-projeCt.org? install.packages("tests",repos="http://r-forge.r-project.org") -- View this message in context: http://r.789695.n4.nabble.com/Why-my-package-is-not-being-generated-tp3255111p3258202.html Sent from the R help mailing list archive at Nabble.com. From alastair.andrew at gmail.com Thu Feb 3 16:12:43 2011 From: alastair.andrew at gmail.com (Alastair) Date: Thu, 3 Feb 2011 07:12:43 -0800 (PST) Subject: [R] Sorting a Data Frame by hybrid string / number key Message-ID: <1296745963667-3258283.post@n4.nabble.com> Hi, I'm trying to present a table of some experimental data, and I want to order the rows by the instance names. The issue I've got is that there are a variety of conventions for the instance names (e.g. competition01, competition13, small_1, big_20, med_9). What I want to be able to sort them first in category order so: competition < small < med < big, and then perform the secondary ordering by the final one or two digits. I've used Hadley Wickham's StringR package to split the names into the string and numeric sections so I could get those ordered easily enough. What I'm struggling with is how to sort the categories (because I don't want them in a straight alphabetic order). library(stringr) d <- data.frame(instance = c("competition11","competition01","big_20","small_4","small_2","med_9")) id <- str_extract(d$instance, "\\d{1,}$") Any pointers would be gratefully received. Thanks, Alastair -- View this message in context: http://r.789695.n4.nabble.com/Sorting-a-Data-Frame-by-hybrid-string-number-key-tp3258283p3258283.html Sent from the R help mailing list archive at Nabble.com. From dwinsemius at comcast.net Thu Feb 3 16:46:33 2011 From: dwinsemius at comcast.net (David Winsemius) Date: Thu, 3 Feb 2011 10:46:33 -0500 Subject: [R] Sorting a Data Frame by hybrid string / number key In-Reply-To: <1296745963667-3258283.post@n4.nabble.com> References: <1296745963667-3258283.post@n4.nabble.com> Message-ID: On Feb 3, 2011, at 10:12 AM, Alastair wrote: > > Hi, > > I'm trying to present a table of some experimental data, and I want > to order > the rows by the instance names. The issue I've got is that there are a > variety of conventions for the instance names (e.g. competition01, > competition13, small_1, big_20, med_9). What I want to be able to > sort them > first in category order so: competition < small < med < big, and then > perform the secondary ordering by the final one or two digits. > > I've used Hadley Wickham's StringR package to split the names into the > string and numeric sections so I could get those ordered easily > enough. What > I'm struggling with is how to sort the categories (because I don't > want them > in a straight alphabetic order). > > library(stringr) > d <- data.frame(instance = > c > ("competition11 > ","competition01","big_20","small_4","small_2","med_9")) > id <- str_extract(d$instance, "\\d{1,}$") mixedsort {gtools} R Documentation Order or Sort strings with embedded numbers so that the numbers are in the correct order > > Any pointers would be gratefully received. > Thanks, > Alastair > > -- > View this message in context: http://r.789695.n4.nabble.com/Sorting-a-Data-Frame-by-hybrid-string-number-key-tp3258283p3258283.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at 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, reproducible code. David Winsemius, MD West Hartford, CT From nfdisco at gmail.com Thu Feb 3 16:27:33 2011 From: nfdisco at gmail.com (Ernest =?iso-8859-1?Q?Adrogu=E9?=) Date: Thu, 3 Feb 2011 16:27:33 +0100 Subject: [R] get caller's name Message-ID: <20110203152733.GA26859@doriath.local> Hi, Suppose a function that checks an object: stop.if.dims <- function(x) { if (! is.null(dim(x))) { stop("cannot handle dimensional data") } } This would be used by other functions that can only work with dimensionless objects. The problem is the error message would need to include the name of the function that called stop.if.dims, so that the user knows which function got an argument that was incorrect. How do I do this? Or maybe there is another way... -- Ernest From ptit_bleu at yahoo.fr Thu Feb 3 16:50:09 2011 From: ptit_bleu at yahoo.fr (PtitBleu) Date: Thu, 3 Feb 2011 07:50:09 -0800 (PST) Subject: [R] sqlsave and mysql database with autoincremental column In-Reply-To: <1296568037168-3251425.post@n4.nabble.com> References: <1296568037168-3251425.post@n4.nabble.com> Message-ID: <1296748209927-3258351.post@n4.nabble.com> I found a solution (certainly not the best one but it works). I add a 45th column full of 0 to the 44-columns data.frame. When I copy the data.frame to the database with sqlsave, the last column of the table is not full of 0, but it autoincrements. Another small question: what is the command to copy, for example, the 5th and the 7th column to the table ? Have a nice end of day, Ptit Bleu. -- View this message in context: http://r.789695.n4.nabble.com/sqlsave-and-mysql-database-with-autoincremental-column-tp3251425p3258351.html Sent from the R help mailing list archive at Nabble.com. From sudhir.cr at gmail.com Thu Feb 3 16:57:50 2011 From: sudhir.cr at gmail.com (sudhir cr) Date: Thu, 3 Feb 2011 10:57:50 -0500 Subject: [R] R-help In-Reply-To: References: Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From wdunlap at tibco.com Thu Feb 3 17:22:27 2011 From: wdunlap at tibco.com (William Dunlap) Date: Thu, 3 Feb 2011 08:22:27 -0800 Subject: [R] Sorting a Data Frame by hybrid string / number key In-Reply-To: <1296745963667-3258283.post@n4.nabble.com> References: <1296745963667-3258283.post@n4.nabble.com> Message-ID: <77EB52C6DD32BA4D87471DCD70C8D70003DE1A33@NA-PA-VBE03.na.tibco.com> To sort a character vector in a desired order you can convert it to a factor with the levels in the desired order. To sort strings like "2" and "11" in numerical order, use convert them to numbers with as.numeric. To sort by two variables, using the second to break ties in the first, use data[order(first, second),]. E.g., > library(stringr) > d <- data.frame(instance = + c("competition11","competition01","big_20","small_4","small_2","med_9")) > mySortByInstance <- function(data) { + # assume data$instance is of form , perhaps + # with underscore between. Sort by type, breaking ties + # with number. + id <- as.numeric(str_extract(data$instance, "\\d{1,}$")) + type <- factor(str_extract(data$instance, "^[[:alpha:]]+"), + levels=c("competition", "small", "med", "big")) + data[order(type, id), , drop=FALSE] + } > mySortByInstance(d) instance 2 competition01 1 competition11 5 small_2 4 small_4 6 med_9 3 big_20 Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com > -----Original Message----- > From: r-help-bounces at r-project.org > [mailto:r-help-bounces at r-project.org] On Behalf Of Alastair > Sent: Thursday, February 03, 2011 7:13 AM > To: r-help at r-project.org > Subject: [R] Sorting a Data Frame by hybrid string / number key > > > Hi, > > I'm trying to present a table of some experimental data, and > I want to order > the rows by the instance names. The issue I've got is that there are a > variety of conventions for the instance names (e.g. competition01, > competition13, small_1, big_20, med_9). What I want to be > able to sort them > first in category order so: competition < small < med < big, and then > perform the secondary ordering by the final one or two digits. > > I've used Hadley Wickham's StringR package to split the names into the > string and numeric sections so I could get those ordered > easily enough. What > I'm struggling with is how to sort the categories (because I > don't want them > in a straight alphabetic order). > > library(stringr) > d <- data.frame(instance = > c("competition11","competition01","big_20","small_4","small_2" ,"med_9")) > id <- str_extract(d$instance, "\\d{1,}$") > > Any pointers would be gratefully received. > Thanks, > Alastair > > -- > View this message in context: > http://r.789695.n4.nabble.com/Sorting-a-Data-Frame-by-hybrid-s tring-number-key-tp3258283p3258283.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at 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, reproducible code. > From dwinsemius at comcast.net Thu Feb 3 17:25:24 2011 From: dwinsemius at comcast.net (David Winsemius) Date: Thu, 3 Feb 2011 11:25:24 -0500 Subject: [R] get caller's name In-Reply-To: <20110203152733.GA26859@doriath.local> References: <20110203152733.GA26859@doriath.local> Message-ID: <87EA64EC-0F02-4092-B8A5-DAEAFE2E515B@comcast.net> On Feb 3, 2011, at 10:27 AM, Ernest Adrogu? wrote: > Hi, > Suppose a function that checks an object: > > stop.if.dims <- function(x) { > if (! is.null(dim(x))) { > stop("cannot handle dimensional data") > } > } > > mtx <- matrix(c(1,0,0,1), 2) > stop.if.dims <- function(x) { objname <- deparse(substitute(x)) + if (! is.null(dim(x))) { + stop(paste(objname,"cannot handle dimensional data") ) + } + } > stop.if.dims(mtx) Error in stop.if.dims(mtx) : mtx cannot handle dimensional data > This would be used by other functions that can only work with > dimensionless objects. The problem is the error message would need to > include the name of the function that called stop.if.dims, so that the > user knows which function got an argument that was incorrect. > > How do I do this? Or maybe there is another way... > > -- > Ernest > > ______________________________________________ > R-help at 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, reproducible code. David Winsemius, MD West Hartford, CT From ggraves at sfwmd.gov Thu Feb 3 17:29:50 2011 From: ggraves at sfwmd.gov (Graves, Gregory) Date: Thu, 3 Feb 2011 11:29:50 -0500 Subject: [R] tapply output as a dataframe Message-ID: On Mon, Apr 13, 2009 at 12:41 PM, Dan Dube wrote: > i use tapply and by often, but i always end up banging my head against > the wall with the output. The proposed solution of Dan's problem posted on R-help was: > do.call(rbind,a) When I use this 'solution' I get 'ERROR: second argument must be a list'. So head on wall continues. My tapply output is generated as follows: > a=tapply(value,list(sampling.date,station.code),mean) which gives me this (in part): A B C D E F G H I J K 1/15/2008 0.004 0.027 0.019 0.015 0.035 0.022 0.007 0.038 0.042 0.045 0.0350 1/15/2009 0.027 0.027 0.031 0.015 0.008 0.021 0.007 0.027 0.026 0.029 0.0210 1/15/2010 0.016 0.020 0.015 0.022 0.015 0.013 0.007 0.014 0.019 0.019 0.0180 10/15/2007 0.052 0.051 0.032 0.024 0.017 0.044 0.015 0.058 0.063 0.061 0.0640 10/15/2008 0.042 0.054 0.030 0.017 0.024 0.030 0.019 0.044 0.047 0.051 0.0390 10/15/2009 0.047 0.035 0.031 0.020 0.012 0.039 0.019 0.051 0.055 0.054 0.0350 The only way I can figure out how to resolve this, such that I can, for example, plot station "A" against date, is to export the tapply output as a csv, and then reimport. Suggestions? I couldn't find a solution to this likely SIMPLE problem in Crawley or multiple searches of R help. Gregory A. Graves, Lead Scientist Everglades REstoration COoordination and VERification (RECOVER) Wetland Watershed Sciences / Restoration Sciences Department South Florida Water Management District Phones:? DESK: 561 / 682 - 2429 ?????????? ?? CELL:? 561 / 719 - 8157 From wwwhsd at gmail.com Thu Feb 3 17:30:53 2011 From: wwwhsd at gmail.com (Henrique Dallazuanna) Date: Thu, 3 Feb 2011 14:30:53 -0200 Subject: [R] get caller's name In-Reply-To: <20110203152733.GA26859@doriath.local> References: <20110203152733.GA26859@doriath.local> Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From alaios at yahoo.com Thu Feb 3 17:33:00 2011 From: alaios at yahoo.com (Alaios) Date: Thu, 3 Feb 2011 08:33:00 -0800 (PST) Subject: [R] "Matrix' with Functions Message-ID: <441663.74070.qm@web120105.mail.ne1.yahoo.com> Dear R members, I have a quite large of function that are named like that f11,f12,...f15 f21,f22,...f25 .. f51,f52,...f52 These are static (hard-coded) functions that the only common they have is that they take the same number and type of input fij(a,b,c,d). As you might understand this is really close to the notion of matrix only that my 'matrix' contains functions. It would be great if I can address all these function using a numbering-scheme like F(i,j) where for example F(1,1) will return the f11(a,b,c,d,). I am sure that this might be quite complex to implement so could you please refer me to some book/tutorial that addresses this kind of topics? I would like to thank you in advance for your help Best Regards Alex From rubenbauar at gmx.de Thu Feb 3 17:35:56 2011 From: rubenbauar at gmx.de (Chris82) Date: Thu, 3 Feb 2011 08:35:56 -0800 (PST) Subject: [R] substring and paste character with a for loop Message-ID: <1296750956418-3258449.post@n4.nabble.com> Hello R users, I have a little problem with a for loop. Below there is an simple example of my problem. I want to delet the commas in the character string. Fore this reason I create a for loop to unpick the string and rebuild him without the commas. The problem is, that "paste" does not work in the loop as I expected. text <- "aaa,bbb,ccc,ddd" characterseq <- seq(1,15,4) for (i in characterseq ){ m <- paste(substring(text,i,i+2),sep = "") } > m [1] "ddd" m should be "aaabbbcccddd" and not just "ddd" with best regards Chris -- View this message in context: http://r.789695.n4.nabble.com/substring-and-paste-character-with-a-for-loop-tp3258449p3258449.html Sent from the R help mailing list archive at Nabble.com. From bbolker at gmail.com Thu Feb 3 17:41:06 2011 From: bbolker at gmail.com (Ben Bolker) Date: Thu, 3 Feb 2011 16:41:06 +0000 Subject: [R] substring and paste character with a for loop References: <1296750956418-3258449.post@n4.nabble.com> Message-ID: Chris82 gmx.de> writes: > > > Hello R users, > > I have a little problem with a for loop. > Below there is an simple example of my problem. > > I want to delet the commas in the character string. Fore this reason I > create a for loop to unpick the string and rebuild him without the commas. > The problem is, that "paste" does not work in the loop as I expected. > > text <- "aaa,bbb,ccc,ddd" > > characterseq <- seq(1,15,4) > > for (i in characterseq ){ > m <- paste(substring(text,i,i+2),sep = "") > } > > > m > [1] "ddd" > > m should be "aaabbbcccddd" and not just "ddd" > If you want to delete commas, what about gsub(",","",c("aaa,bbb,ccc,ddd")) [1] "aaabbbcccddd" ? The problem with your loop is that you are not building m; you would need paste(m,substring(text,i,i+2),sep="") From wwwhsd at gmail.com Thu Feb 3 17:42:21 2011 From: wwwhsd at gmail.com (Henrique Dallazuanna) Date: Thu, 3 Feb 2011 14:42:21 -0200 Subject: [R] R-help In-Reply-To: References: Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From E.Vettorazzi at uke.uni-hamburg.de Thu Feb 3 17:48:07 2011 From: E.Vettorazzi at uke.uni-hamburg.de (Eik Vettorazzi) Date: Thu, 03 Feb 2011 17:48:07 +0100 Subject: [R] substring and paste character with a for loop In-Reply-To: <1296750956418-3258449.post@n4.nabble.com> References: <1296750956418-3258449.post@n4.nabble.com> Message-ID: <4D4ADC47.8050701@uke.uni-hamburg.de> Hi Chris, 'gsub' does exactly what you want: gsub(",","",text) so there is no need for a loop. Btw. your loop assigns a new value to m in each step and you see only the last assignment. you could do something like m <- paste(m,substring(text,i,i+2),sep = "") hth Am 03.02.2011 17:35, schrieb Chris82: > > Hello R users, > > I have a little problem with a for loop. > Below there is an simple example of my problem. > > I want to delet the commas in the character string. Fore this reason I > create a for loop to unpick the string and rebuild him without the commas. > The problem is, that "paste" does not work in the loop as I expected. > > text <- "aaa,bbb,ccc,ddd" > > characterseq <- seq(1,15,4) > > for (i in characterseq ){ > m <- paste(substring(text,i,i+2),sep = "") > } > >> m > [1] "ddd" > > > m should be "aaabbbcccddd" and not just "ddd" > > > > with best regards > > Chris -- Eik Vettorazzi Institut f?r Medizinische Biometrie und Epidemiologie Universit?tsklinikum Hamburg-Eppendorf Martinistr. 52 20246 Hamburg T ++49/40/7410-58243 F ++49/40/7410-57790 From cbeleites at units.it Thu Feb 3 17:49:41 2011 From: cbeleites at units.it (Claudia Beleites) Date: Thu, 03 Feb 2011 17:49:41 +0100 Subject: [R] "Matrix' with Functions In-Reply-To: <441663.74070.qm@web120105.mail.ne1.yahoo.com> References: <441663.74070.qm@web120105.mail.ne1.yahoo.com> Message-ID: <4D4ADCA5.2090604@units.it> Seems funny to me: > f <- list (mean, sd, median, sum) > dim (f) <- c (2, 2) or in one line: > f <- structure (.Data=list (mean, sd, median, sum), dim = c(2,2)) > f [,1] [,2] [1,] ? ? [2,] ? ? > f [1,1] [[1]] function (x, ...) UseMethod("mean") > f [[1,1]] (1:3) [1] 2 > f [[2,1]] (1:3) [1] 1 > f [[1,2]] (1:3) [1] 2 > f [[2,2]] (1:3) [1] 6 HTH Claudia On 02/03/2011 05:33 PM, Alaios wrote: > Dear R members, > I have a quite large of function that are named like that > f11,f12,...f15 > f21,f22,...f25 > .. > f51,f52,...f52 > > These are static (hard-coded) functions that the only common they have is that they take the same number and type of input fij(a,b,c,d). As you might understand this is really close to the notion of matrix only that my 'matrix' contains functions. It would be great if I can address all these function using a numbering-scheme like F(i,j) where for example > F(1,1) will return the f11(a,b,c,d,). > > I am sure that this might be quite complex to implement so could you please refer me to some book/tutorial that addresses this kind of topics? > > I would like to thank you in advance for your help > Best Regards > Alex > > ______________________________________________ > R-help at 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, reproducible code. -- Claudia Beleites Dipartimento dei Materiali e delle Risorse Naturali Universit? degli Studi di Trieste Via Alfonso Valerio 6/a I-34127 Trieste phone: +39 0 40 5 58-37 68 email: cbeleites at units.it From rubenbauar at gmx.de Thu Feb 3 17:51:58 2011 From: rubenbauar at gmx.de (Chris82) Date: Thu, 3 Feb 2011 08:51:58 -0800 (PST) Subject: [R] substring and paste character with a for loop In-Reply-To: References: <1296750956418-3258449.post@n4.nabble.com> Message-ID: <1296751918672-3258485.post@n4.nabble.com> Oh, that's of course a better solution. I've never red or heard about "gsub". Thanks a lot! -- View this message in context: http://r.789695.n4.nabble.com/substring-and-paste-character-with-a-for-loop-tp3258449p3258485.html Sent from the R help mailing list archive at Nabble.com. From djmuser at gmail.com Thu Feb 3 18:05:31 2011 From: djmuser at gmail.com (Dennis Murphy) Date: Thu, 3 Feb 2011 09:05:31 -0800 Subject: [R] R-help In-Reply-To: References: Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From Samuel.Le at srlglobal.com Thu Feb 3 18:22:39 2011 From: Samuel.Le at srlglobal.com (Samuel Le) Date: Thu, 3 Feb 2011 17:22:39 +0000 Subject: [R] "Matrix' with Functions In-Reply-To: <441663.74070.qm@web120105.mail.ne1.yahoo.com> References: <441663.74070.qm@web120105.mail.ne1.yahoo.com> Message-ID: Hello, Here is a quick suggestion: F<-function(i,j,a,b,c,d) { res<-eval(parse(text=paste("f",i,j,"(a,b,c,d),sep=""))) return(res) } HTH, Samuel -----Original Message----- From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Alaios Sent: 03 February 2011 16:33 To: R-help at r-project.org Subject: [R] "Matrix' with Functions Dear R members, I have a quite large of function that are named like that f11,f12,...f15 f21,f22,...f25 .. f51,f52,...f52 These are static (hard-coded) functions that the only common they have is that they take the same number and type of input fij(a,b,c,d). As you might understand this is really close to the notion of matrix only that my 'matrix' contains functions. It would be great if I can address all these function using a numbering-scheme like F(i,j) where for example F(1,1) will return the f11(a,b,c,d,). I am sure that this might be quite complex to implement so could you please refer me to some book/tutorial that addresses this kind of topics? I would like to thank you in advance for your help Best Regards Alex ______________________________________________ R-help at 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, reproducible code. __________ Information from ESET NOD32 Antivirus, version of virus signature database 5843 (20110203) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com __________ Information from ESET NOD32 Antivirus, version of virus signature database 5843 (20110203) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com From Greg.Snow at imail.org Thu Feb 3 18:23:28 2011 From: Greg.Snow at imail.org (Greg Snow) Date: Thu, 3 Feb 2011 10:23:28 -0700 Subject: [R] looping variable names In-Reply-To: <1296691000799-3256356.post@n4.nabble.com> References: <1296679015099-3255711.post@n4.nabble.com> <1296691000799-3256356.post@n4.nabble.com> Message-ID: It depends on what you are assigning. A simple example of assigning the values 1 through 100: mylist <- lapply(1:100, I) names(mylist) <- paste('var',1:100, sep='') Or if you have 100 files named dat1.txt, dat2.txt, ..., dat100.txt and you want to read them in: mylist <- lapply( paste('dat', 1:100, '.txt', sep=''), function(fname) read.table(fname, header=TRUE) ) names(mylist) <- paste('dat',1:100, sep='') if I want to use dataset 1 I can do it with: > mylist$dat1 Or > mylist[['dat1']] Or > milyst[[1]] Then if I want to do the same regression on each of the 100 datasets (assuming the names are the same) I can do that with a simple: out1 <- lapply( mylist, function(dat) lm( y ~ x, data=dat ) ) then maybe I want all the slopes in a single vector: slopes <- sapply( out1, function(fit) coef(fit)[1] ) hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.snow at imail.org 801.408.8111 > -----Original Message----- > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r- > project.org] On Behalf Of hypermonkey22 > Sent: Wednesday, February 02, 2011 4:57 PM > To: r-help at r-project.org > Subject: Re: [R] looping variable names > > > Thanks for the reply! > > This sounds great. Is there a nice way to store these 100 variable > names in > a list without typing them all out? > -- > View this message in context: http://r.789695.n4.nabble.com/looping- > variable-names-tp3255711p3256356.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at 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, reproducible code. From Greg.Snow at imail.org Thu Feb 3 18:33:30 2011 From: Greg.Snow at imail.org (Greg Snow) Date: Thu, 3 Feb 2011 10:33:30 -0700 Subject: [R] looping variable names In-Reply-To: <183236.80568.qm@web120107.mail.ne1.yahoo.com> References: <4D4A84A2.20804@uke.uni-hamburg.de> <183236.80568.qm@web120107.mail.ne1.yahoo.com> Message-ID: It is not clear what you are trying to do, but you can have lists (or vectors) of functions and that should simplify what you are trying to do: > trigfuns <- list( s=sin, c=cos, t=tan ) > trigfuns $s function (x) .Primitive("sin") $c function (x) .Primitive("cos") $t function (x) .Primitive("tan") > sapply( trigfuns, function(f) f(pi/3) ) s c t 0.8660254 0.5000000 1.7320508 > And you can write a function that creates and returns a function: > tmpfun <- function(a,b){ + force(a); force(b) + function(x) {a + b * x} + } > > myfuns <- vector('list',10*10) > dim(myfuns) <- c(10,10) > for(i in 1:10) { + for(j in 1:10) { + myfuns[[i,j]] <- tmpfun(i,j) + } + } > > myfuns[[2,3]](1:10) [1] 5 8 11 14 17 20 23 26 29 32 > myfuns[[3,2]](1:10) [1] 5 7 9 11 13 15 17 19 21 23 > -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.snow at imail.org 801.408.8111 > -----Original Message----- > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r- > project.org] On Behalf Of Alaios > Sent: Thursday, February 03, 2011 3:49 AM > To: hypermonkey22; Eik Vettorazzi > Cc: r-help at r-project.org > Subject: Re: [R] looping variable names > > Hello I would like to ask you if I can use the same method but for > functions. That means that I want not to assign some value but a > function. > So is it possible to try something like that: > > for (i in 1:10) for (j in 1:10) > assign(paste("var",i,j,sep=""),myfunction) > > > > I would like to thank you in advance for your help > > best Regards > Alexandros > --- On Thu, 2/3/11, Eik Vettorazzi > wrote: > > > From: Eik Vettorazzi > > Subject: Re: [R] looping variable names > > To: "hypermonkey22" > > Cc: r-help at r-project.org > > Date: Thursday, February 3, 2011, 10:34 AM > > As Greg wrote, a list is in most > > circumstances a better way to store > > many objects. > > But you can use 'assign' and 'get' to create and access > > (global) variables > > > > #creation > > for (i in 1:100) assign(paste("var",i,sep=""),rnorm(5)) > > > > #access i-th variable > > i<-15 > > get(paste("var",i,sep="")) > > > > hth. > > > > Am 02.02.2011 21:36, schrieb hypermonkey22: > > > > > > Hi all, > > > > > > I've been looking for a simple answer to the following > > problem. > > > > > > Let's say that I can loop through, say, 100 values > > that need to be assigned > > > to, say, the variables var1:var100. > > > > > > Is there an elegant way to do this? > > > > > > I have seen one or two similar questions...but they > > tend to be in more > > > complicated contexts. > > > Simple question, hopefully with a simple answer. > > > > > > Thanks very much! > > > > > > -- > > Eik Vettorazzi > > Institut f?r Medizinische Biometrie und Epidemiologie > > Universit?tsklinikum Hamburg-Eppendorf > > > > Martinistr. 52 > > 20246 Hamburg > > > > T ++49/40/7410-58243 > > F ++49/40/7410-57790 > > > > ______________________________________________ > > R-help at 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, > > reproducible code. > > > > > > > ______________________________________________ > R-help at 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, reproducible code. From cody at statisticssolutions.com Thu Feb 3 18:14:02 2011 From: cody at statisticssolutions.com (Cody Likavec) Date: Thu, 3 Feb 2011 12:14:02 -0500 Subject: [R] Mixed Model Logistic Weighting Message-ID: <004001cbc3c5$c16c1250$444436f0$@statisticssolutions.com> An embedded and charset-unspecified text was scrubbed... Name: not available URL: From d.kazakiewicz at gmail.com Thu Feb 3 18:30:40 2011 From: d.kazakiewicz at gmail.com (Den) Date: Thu, 03 Feb 2011 19:30:40 +0200 Subject: [R] exact logistic regression In-Reply-To: References: <1296664994.11047.7.camel@den2042-desktop> Message-ID: <1296754240.2014.20.camel@den2042-desktop> Dear Dennis Thank you again It is funny how stupid I was. I was afraid of the word "inference" in elrm package description while performing my first search. elrm package looks like what I need. They have very good intro with examples Zamar D, McNeney B and Graham J. elrm: Software Implementing Exact-like Inference for Logistic Regression Models. Journal of Statistical Software 2007, 21(3). http://www.jstatsoft.org/v21/i03 In case if someone else needs to perform exact logistic regression with R I suggest to read the paper above first. The whole idea looks pretty attractive in particular for biomedical research : binary outcome, small sample size... and smart name of analysis method:) With best regards Denis ? ???, 02/02/2011 ? 12:25 -0800, Dennis Murphy ????: > Hi: > > Try package elrm - its description file says that it performs exact > logistic regression by MCMC. I found this as the first set of hits I > got from > > # install.packages('sos') # if necessary > library(sos) > findFn('exact logistic regression') > > HTH, > Dennis > > On Wed, Feb 2, 2011 at 8:43 AM, Den wrote: > Hello to R people > Does anybody know to calculate exact logistic regression in R? > Does such option exist anywhere? > Surprisingly, could not find it using search engine. It is > hard to > believe, however, that such useful function is not implemented > in R yet? > Could you help, please > > Thank you > Denis > > ______________________________________________ > R-help at 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, reproducible > code. > From m.r.nixon at ex.ac.uk Thu Feb 3 17:56:44 2011 From: m.r.nixon at ex.ac.uk (mattnixon) Date: Thu, 3 Feb 2011 08:56:44 -0800 (PST) Subject: [R] Average of several line plots In-Reply-To: References: <1296665072493-3254850.post@n4.nabble.com> <1296725817220-3257696.post@n4.nabble.com> Message-ID: <1296752204657-3258494.post@n4.nabble.com> Yes - that is exactly what was needed. Applying approx to each data set then allowed for straight forward averaging afterwards. Many thanks. -- View this message in context: http://r.789695.n4.nabble.com/Average-of-several-line-plots-tp3254850p3258494.html Sent from the R help mailing list archive at Nabble.com. From nfdisco at gmail.com Thu Feb 3 17:45:39 2011 From: nfdisco at gmail.com (Ernest =?iso-8859-1?Q?Adrogu=E9?=) Date: Thu, 3 Feb 2011 17:45:39 +0100 Subject: [R] get caller's name In-Reply-To: <87EA64EC-0F02-4092-B8A5-DAEAFE2E515B@comcast.net> References: <20110203152733.GA26859@doriath.local> <87EA64EC-0F02-4092-B8A5-DAEAFE2E515B@comcast.net> Message-ID: <20110203164539.GA27252@doriath.local> 3/02/11 @ 11:25 (-0500), David Winsemius escriu: > On Feb 3, 2011, at 10:27 AM, Ernest Adrogu? wrote: > > >Hi, > >Suppose a function that checks an object: > > > >stop.if.dims <- function(x) { > > if (! is.null(dim(x))) { > > stop("cannot handle dimensional data") > > } > >} > > > > > mtx <- matrix(c(1,0,0,1), 2) > > stop.if.dims <- function(x) { objname <- deparse(substitute(x)) > + if (! is.null(dim(x))) { > + stop(paste(objname,"cannot handle dimensional data") ) > + } > + } > > stop.if.dims(mtx) > Error in stop.if.dims(mtx) : mtx cannot handle dimensional data Here, "mtx" is the name of the argument that stop.if.dims gets. What I want is name of the function that calls stop.if.dims. That being said, I was also interested in getting the names of arguments, so thanks :) Cheers. -- Ernest From nfdisco at gmail.com Thu Feb 3 17:58:11 2011 From: nfdisco at gmail.com (Ernest =?iso-8859-1?Q?Adrogu=E9?=) Date: Thu, 3 Feb 2011 17:58:11 +0100 Subject: [R] get caller's name In-Reply-To: References: <20110203152733.GA26859@doriath.local> Message-ID: <20110203165811.GA27334@doriath.local> 3/02/11 @ 14:30 (-0200), Henrique Dallazuanna escriu: > Try this: > > g <- function(.x) tryCatch(stop.if.dims(.x), error=function(e)sprintf("Error > in %s: %s", deparse(sys.call(1)), e$message)) > g(rbind(2, 3)) This is it. Thanks! Cheers. -- Ernest From spector at stat.berkeley.edu Thu Feb 3 18:40:44 2011 From: spector at stat.berkeley.edu (Phil Spector) Date: Thu, 3 Feb 2011 09:40:44 -0800 (PST) Subject: [R] tapply output as a dataframe In-Reply-To: References: Message-ID: Try as.data.frame(as.table(a)) - Phil Spector Statistical Computing Facility Department of Statistics UC Berkeley spector at stat.berkeley.edu On Thu, 3 Feb 2011, Graves, Gregory wrote: > On Mon, Apr 13, 2009 at 12:41 PM, Dan Dube wrote: > >> i use tapply and by often, but i always end up banging my head against >> the wall with the output. > > The proposed solution of Dan's problem posted on R-help was: > >> do.call(rbind,a) > > When I use this 'solution' I get 'ERROR: second argument must be a list'. So head on wall continues. > > My tapply output is generated as follows: > >> a=tapply(value,list(sampling.date,station.code),mean) > > which gives me this (in part): > > A B C D E F G H I J K > 1/15/2008 0.004 0.027 0.019 0.015 0.035 0.022 0.007 0.038 0.042 0.045 0.0350 > 1/15/2009 0.027 0.027 0.031 0.015 0.008 0.021 0.007 0.027 0.026 0.029 0.0210 > 1/15/2010 0.016 0.020 0.015 0.022 0.015 0.013 0.007 0.014 0.019 0.019 0.0180 > 10/15/2007 0.052 0.051 0.032 0.024 0.017 0.044 0.015 0.058 0.063 0.061 0.0640 > 10/15/2008 0.042 0.054 0.030 0.017 0.024 0.030 0.019 0.044 0.047 0.051 0.0390 > 10/15/2009 0.047 0.035 0.031 0.020 0.012 0.039 0.019 0.051 0.055 0.054 0.0350 > > The only way I can figure out how to resolve this, such that I can, for example, plot station "A" against date, is to export the tapply output as a csv, and then reimport. > > Suggestions? I couldn't find a solution to this likely SIMPLE problem in Crawley or multiple searches of R help. > > Gregory A. Graves, Lead Scientist > Everglades REstoration COoordination and VERification (RECOVER) > Wetland Watershed Sciences / Restoration Sciences Department > South Florida Water Management District > Phones:? DESK: 561 / 682 - 2429 > ?????????? ?? CELL:? 561 / 719 - 8157 > > ______________________________________________ > R-help at 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, reproducible code. > From rmh at temple.edu Thu Feb 3 18:41:02 2011 From: rmh at temple.edu (RICHARD M. HEIBERGER) Date: Thu, 3 Feb 2011 12:41:02 -0500 Subject: [R] "Matrix' with Functions In-Reply-To: References: <441663.74070.qm@web120105.mail.ne1.yahoo.com> Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From dwinsemius at comcast.net Thu Feb 3 18:50:16 2011 From: dwinsemius at comcast.net (David Winsemius) Date: Thu, 3 Feb 2011 12:50:16 -0500 Subject: [R] tapply output as a dataframe In-Reply-To: References: Message-ID: On Feb 3, 2011, at 11:29 AM, Graves, Gregory wrote: > On Mon, Apr 13, 2009 at 12:41 PM, Dan Dube > wrote: > That is pushing two years ago, so I doubt very many people still have that posting on their mail-clients. (When I did go to the archives Dan Dube's problem was posed as how to bind "a": dt = data.frame(bucket=rep(1:4,25),val=rnorm(100)) fn = function(x) { ret = c(unname(quantile(x,probs=seq(. 25,.75,.25),na.rm=T)),mean(x,na.rm=T)) } a = tapply(dt$val,dt$bucket,fn) >> i use tapply and by often, but i always end up banging my head >> against >> the wall with the output. > > The proposed solution of Dan's problem posted on R-help was: > >> do.call(rbind,a) > > When I use this 'solution' I get 'ERROR: second argument must be a > list'. So head on wall continues. > > My tapply output is generated as follows: > >> a=tapply(value,list(sampling.date,station.code),mean) Why not give us sampling.date (which is probably NOT really a date but rather a character vector) and station.code so we can show you how to create a more appropriate structure? > > which gives me this (in part): > > A B C D E F G H I > J K > 1/15/2008 0.004 0.027 0.019 0.015 0.035 0.022 0.007 0.038 0.042 > 0.045 0.0350 > 1/15/2009 0.027 0.027 0.031 0.015 0.008 0.021 0.007 0.027 0.026 > 0.029 0.0210 > 1/15/2010 0.016 0.020 0.015 0.022 0.015 0.013 0.007 0.014 0.019 > 0.019 0.0180 > 10/15/2007 0.052 0.051 0.032 0.024 0.017 0.044 0.015 0.058 0.063 > 0.061 0.0640 > 10/15/2008 0.042 0.054 0.030 0.017 0.024 0.030 0.019 0.044 0.047 > 0.051 0.0390 > 10/15/2009 0.047 0.035 0.031 0.020 0.012 0.039 0.019 0.051 0.055 > 0.054 0.0350 > The only way I can figure out how to resolve this, such that I can, > for example, plot station "A" against date, is to export the tapply > output as a csv, and then reimport. > > Suggestions? I couldn't find a solution to this likely SIMPLE problem Perhaps. but we haven't really been told what the problem is, have we? > in Crawley or multiple searches of R help. > > Gregory A. Graves, Lead Scientist David Winsemius, MD West Hartford, CT From ggraves at sfwmd.gov Thu Feb 3 19:05:54 2011 From: ggraves at sfwmd.gov (Graves, Gregory) Date: Thu, 3 Feb 2011 13:05:54 -0500 Subject: [R] tapply output as a dataframe In-Reply-To: References: Message-ID: Yes, as far as I can tell, "sampling.date" is a character vector of the format "1/15/2008". It resides in the leftmost column of the tapply output. "station.code" are the A, B, C column headers which refer actual water quality station locations, and the values below those headers correspond to the "sampling.date" when samples were taken. Actually what I have done is to take the mid-point of each month and calculated its mean to deal with multiple samples taken in one month, and to generate NAs where no sample was taken by purposefully not adding the na.rm=T to the tapply command. Normally I would do this: > rdate<-as.POSIXct(strptime(date,format="%m/%d/%Y")) #convert sampling.date to date R can handle > plot(A~rdate) If I just submit station.code like > A I get all the values for "Station A". It is in converting the sampling.date to an "rdate" that has me stumped. One reason being that in the tapply output the character vector representing date has no column name. I can't access that column. Gregory A. Graves, Lead Scientist Everglades REstoration COoordination and VERification (RECOVER) Wetland Watershed Sciences / Restoration Sciences Department South Florida Water Management District Phones:? DESK: 561 / 682 - 2429 ?????????? ?? CELL:? 561 / 719 - 8157 -----Original Message----- From: David Winsemius [mailto:dwinsemius at comcast.net] Sent: Thursday, February 03, 2011 12:50 PM To: Graves, Gregory Cc: r-help at r-project.org; Goodman, Patricia; Gorman, Patricia Subject: Re: [R] tapply output as a dataframe On Feb 3, 2011, at 11:29 AM, Graves, Gregory wrote: > My tapply output is generated as follows: > >> a=tapply(value,list(sampling.date,station.code),mean) Why not give us sampling.date (which is probably NOT really a date but rather a character vector) and station.code so we can show you how to create a more appropriate structure? > > which gives me this (in part): > > A B C D E F G H I > J K > 1/15/2008 0.004 0.027 0.019 0.015 0.035 0.022 0.007 0.038 0.042 > 0.045 0.0350 > 1/15/2009 0.027 0.027 0.031 0.015 0.008 0.021 0.007 0.027 0.026 > 0.029 0.0210 > 1/15/2010 0.016 0.020 0.015 0.022 0.015 0.013 0.007 0.014 0.019 > 0.019 0.0180 > 10/15/2007 0.052 0.051 0.032 0.024 0.017 0.044 0.015 0.058 0.063 > 0.061 0.0640 > 10/15/2008 0.042 0.054 0.030 0.017 0.024 0.030 0.019 0.044 0.047 > 0.051 0.0390 > 10/15/2009 0.047 0.035 0.031 0.020 0.012 0.039 0.019 0.051 0.055 > 0.054 0.0350 > The only way I can figure out how to resolve this, such that I can, > for example, plot station "A" against date, is to export the tapply > output as a csv, and then reimport. > > Suggestions? I couldn't find a solution to this likely SIMPLE problem Perhaps. but we haven't really been told what the problem is, have we? > in Crawley or multiple searches of R help. > > Gregory A. Graves, Lead Scientist David Winsemius, MD West Hartford, CT From dwinsemius at comcast.net Thu Feb 3 19:11:31 2011 From: dwinsemius at comcast.net (David Winsemius) Date: Thu, 3 Feb 2011 13:11:31 -0500 Subject: [R] tapply output as a dataframe In-Reply-To: References: Message-ID: <6B2FF094-E66D-4645-93FA-C1C19D5DEA3B@comcast.net> On Feb 3, 2011, at 1:05 PM, Graves, Gregory wrote: > Yes, as far as I can tell, "sampling.date" is a character vector of > the format "1/15/2008". It resides in the leftmost column of the > tapply output. > > "station.code" are the A, B, C column headers which refer actual > water quality station locations, and the values below those headers > correspond to the "sampling.date" when samples were taken. Actually > what I have done is to take the mid-point of each month and > calculated its mean to deal with multiple samples taken in one > month, and to generate NAs where no sample was taken by purposefully > not adding the na.rm=T to the tapply command. > > Normally I would do this: >> rdate<-as.POSIXct(strptime(date,format="%m/%d/%Y")) #convert >> sampling.date to date R can handle >> plot(A~rdate) > > If I just submit station.code like >> A > I get all the values for "Station A". > > It is in converting the sampling.date to an "rdate" that has me > stumped. One reason being that in the tapply output the character > vector representing date has no column name. I can't access that > column. It looks like a zoo object. "zoo" objects hold their time values in the rownames attribute. But since its not really ordered properly, it may just be a table with rownames. The str() function applied to the object from tapply would tell you the answer. -- David. > > Gregory A. Graves, Lead Scientist > Everglades REstoration COoordination and VERification (RECOVER) > Wetland Watershed Sciences / Restoration Sciences Department > South Florida Water Management District > Phones: DESK: 561 / 682 - 2429 > CELL: 561 / 719 - 8157 > > > -----Original Message----- > From: David Winsemius [mailto:dwinsemius at comcast.net] > Sent: Thursday, February 03, 2011 12:50 PM > To: Graves, Gregory > Cc: r-help at r-project.org; Goodman, Patricia; Gorman, Patricia > Subject: Re: [R] tapply output as a dataframe > > > On Feb 3, 2011, at 11:29 AM, Graves, Gregory wrote: > > >> My tapply output is generated as follows: >> >>> a=tapply(value,list(sampling.date,station.code),mean) > > Why not give us sampling.date (which is probably NOT really a date but > rather a character vector) and station.code so we can show you how to > create a more appropriate structure? > >> >> which gives me this (in part): >> >> A B C D E F G H I >> J K >> 1/15/2008 0.004 0.027 0.019 0.015 0.035 0.022 0.007 0.038 0.042 >> 0.045 0.0350 >> 1/15/2009 0.027 0.027 0.031 0.015 0.008 0.021 0.007 0.027 0.026 >> 0.029 0.0210 >> 1/15/2010 0.016 0.020 0.015 0.022 0.015 0.013 0.007 0.014 0.019 >> 0.019 0.0180 >> 10/15/2007 0.052 0.051 0.032 0.024 0.017 0.044 0.015 0.058 0.063 >> 0.061 0.0640 >> 10/15/2008 0.042 0.054 0.030 0.017 0.024 0.030 0.019 0.044 0.047 >> 0.051 0.0390 >> 10/15/2009 0.047 0.035 0.031 0.020 0.012 0.039 0.019 0.051 0.055 >> 0.054 0.0350 > >> The only way I can figure out how to resolve this, such that I can, >> for example, plot station "A" against date, is to export the tapply >> output as a csv, and then reimport. > >> >> Suggestions? I couldn't find a solution to this likely SIMPLE >> problem > > Perhaps. but we haven't really been told what the problem is, have we? > >> in Crawley or multiple searches of R help. > >> >> Gregory A. Graves, Lead Scientist > > > David Winsemius, MD > West Hartford, CT > > David Winsemius, MD West Hartford, CT From ggrothendieck at gmail.com Thu Feb 3 19:18:43 2011 From: ggrothendieck at gmail.com (Gabor Grothendieck) Date: Thu, 3 Feb 2011 13:18:43 -0500 Subject: [R] tapply output as a dataframe In-Reply-To: <6B2FF094-E66D-4645-93FA-C1C19D5DEA3B@comcast.net> References: <6B2FF094-E66D-4645-93FA-C1C19D5DEA3B@comcast.net> Message-ID: On Thu, Feb 3, 2011 at 1:11 PM, David Winsemius wrote: > > On Feb 3, 2011, at 1:05 PM, Graves, Gregory wrote: > >> Yes, as far as I can tell, "sampling.date" is a character vector of the >> format "1/15/2008". ?It resides in the leftmost column of the tapply output. >> >> "station.code" are the A, B, C column headers which refer actual water >> quality station locations, and the values below those headers correspond to >> the "sampling.date" when samples were taken. ?Actually what I have done is >> to take the mid-point of each month and calculated its mean to deal with >> multiple samples taken in one month, and to generate NAs where no sample was >> taken by purposefully not adding the na.rm=T to the tapply command. >> >> Normally I would do this: >>> >>> rdate<-as.POSIXct(strptime(date,format="%m/%d/%Y")) #convert >>> sampling.date to date R can handle >>> plot(A~rdate) >> >> If I just submit station.code like >>> >>> A >> >> I get all the values for "Station A". >> >> It is in converting the sampling.date to an "rdate" that has me stumped. >> ?One reason being that in the tapply output the character vector >> representing date has no column name. ?I can't access that column. > > It looks like a zoo object. "zoo" objects hold their time values in the > rownames attribute. But since its not really ordered properly, it may just > be a table with rownames. The str() function applied to the object from > tapply would tell you the answer. > Internally zoo objects hold their time index in the "index" attribute. > library(zoo) > dput(zoo(4:5)) structure(4:5, index = 1:2, class = "zoo") -- Statistics & Software Consulting GKX Group, GKX Associates Inc. tel: 1-877-GKX-GROUP email: ggrothendieck at gmail.com From gunter.berton at gene.com Thu Feb 3 19:32:38 2011 From: gunter.berton at gene.com (Bert Gunter) Date: Thu, 3 Feb 2011 10:32:38 -0800 Subject: [R] "Matrix' with Functions In-Reply-To: References: <441663.74070.qm@web120105.mail.ne1.yahoo.com> Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From m.chandrashekhar1977 at gmail.com Thu Feb 3 19:51:54 2011 From: m.chandrashekhar1977 at gmail.com (Maithula Chandrashekhar) Date: Fri, 4 Feb 2011 00:21:54 +0530 Subject: [R] I want to ask user to create a typical matrix, otherwise there should be some error displaying... Message-ID: Dear all, I am into some bigger project and in implementing that, I have come across a problem, wherein I have to ask user to create a Matrix with all elements either NA value or some "Date" object, preferably in mm/dd/yy format. Therefore I would like to force user to create following sort of matrix, otherwise there should be some error displaying: userMatrix = matrix(NA, 4, 6) userMatrix[1,2] = userMatrix[4,3] = userMatrix[2,6] = as.Date("2011-01-03") Can somebody give me some hint on how to accomplish above task? Thanks for your time. From wphantomfr at gmail.com Thu Feb 3 20:13:59 2011 From: wphantomfr at gmail.com (wphantomfr) Date: Thu, 03 Feb 2011 20:13:59 +0100 Subject: [R] Need advises on mixed-effect model ( a concrete example) Message-ID: <4D4AFE77.7090605@gmail.com> Dear R-help members, I'm trying to run LME model on some behavioral data and need confirmations about what I'm doing... Here's the story... I have some behavioral reaction time (RT) data (participants have to detect dome kind of auditory stimuli). the dependant variable is RT measured in milliseconds. 61 participants were tested separated in 4 age groups (unblanced groups, factor GROUP). Each participant (SUBJECT) was tested in each of the 3 experimental condition (repeated measures, factor COND). Futhermore. In each condition there were 16 trials (and thus 16 measures of RT) with 16 different stimuli. However some trials were rejected from analysis because the participant did not detect the stimulus or because RT were outliers (extremely high or low). I also have a numeric acoustic parameter with 2 possible values (A1 and A2) for each stimuli that I may be interested to take into account. Since the design was unbalanced, and after reading a lot here, I decided to try to use linear mixed effect. I thus have the Pinheiro & Bates. I have to admit that, as a psychologist, I did not understand everything in the book. However I try to applied what I have read to my data. I wanted a confirmation on what I am doing. I see two ways using my data with lme models depending on the granular level of my dependant variable that give quite different results. I tend to prefer the first approach for some reason but I need confirmation the correctness of both approach. My questions : 1) are both possibility correctly implemented in my analysis ? 2) Is one way better than the other ? 3) Is there better ways of testing the effects of group, condition and acoustQ ? 4) If one of my factor's effect is significant, how can I test correctly the difference between the modalities of this factor (since it seems that the t-values in the model summary are not a good way of doing this). Is there a specific post-hoc procedure ? Thanks in advance for any help Sylvain Cl?ment University of Lille Nord de France ###################################### 1st APPROACH Using Mean RT of participants as my DV. ###################################### # first fit a model with single fixed effects of condition and groups result.lme1<-lme(RT~CONDITION+GROUP,data= meandata,random=~1|SUBJECT, method="ML") plot(effet.lme) # residuals are goodlooking #then I try to add an interaction term in the model result.lme2<-lme(RT~CONDITION*GROUP,data= meandata,random=~1|SUBJECT, method="ML") #I then compare both models anova(result.lme1,result.lme2) #gives Model df AIC BIC logLik Test L.Ratio p-value effet.lme 1 8 3696.878 3726.822 -1840.439 effet.lme2 2 14 3705.821 3758.223 -1838.910 1 vs 2 3.056792 0.8017 # Thus I only use the 1st model without interaction term # try another model adding an acoustic parameter as a fixed effect result.lme3<-lme(RT~CONDITION+GROUP+ACOUSTQ,data= meandata,random=~1|SUBJECT, method="ML") anova(result.lme1,result.lme3) # gives : Model df AIC BIC logLik Test L.Ratio p-value effet.lme 1 8 3696.878 3726.822 -1840.439 effet.lme3 2 9 3668.755 3702.442 -1825.377 1 vs 2 30.12318 <.0001 # thus it seems interesting to add my accoustic parameter... # I refit my 3rd model using the REML method and look at the results result.lme3<-lme(RT~CONDITION+GROUP+ACOUSTQ,data= meandata,random=~1|SUBJECT, method="REML") summary(result.lme3) Linear mixed-effects model fit by maximum likelihood Data: meandata AIC BIC logLik 3668.755 3702.442 -1825.377 Random effects: Formula: ~1 | SUBJECT (Intercept) Residual StdDev: 54.41472 74.60438 Fixed effects: TR ~ CONDITION + GROUP + ACOUSTQ Value Std.Error DF t-value p-value (Intercept) 564.6296 11.908961 257 47.41216 0.0000 CONDITIONCond2 -23.1851 10.463814 257 -2.21574 0.0276 CONDITIONCond3 2.6871 10.463814 257 0.25680 0.7975 GROUP.L 119.2404 20.725884 48 5.75321 0.0000 GROUP.Q 43.7518 18.663080 48 2.34430 0.0232 GROUP.C -9.8656 16.341936 48 -0.60370 0.5489 ACOUSTQA2 -47.7384 8.543669 257 -5.58758 0.0000 Correlation: (Intr) CONDITIONCond2CONDITIONCond1GROUP.L GROUP.Q GROUP.C CONDITIONCond2 -0.439 CONDITIONCond1 -0.439 0.500 GROUP.L 0.178 0.000 0.000 GROUP.Q 0.228 0.000 0.000 0.184 GROUP.C 0.004 0.000 0.000 0.180 0.169 ACOUSTQA2 -0.359 0.000 0.000 0.000 0.000 0.000 Standardized Within-Group Residuals: Min Q1 Med Q3 Max -2.54282265 -0.59821033 -0.04686768 0.52178476 2.84475825 > anova(result.lme3) numDF denDF F-value p-value (Intercept) 1 257 3498.963 <.0001 CONDITION 2 257 3.696 0.0261 GROUP 3 48 12.769 <.0001 ACOUSTQ 1 257 31.221 <.0001 This gives me an significant effect my 3 fixed factor ###################################### 2ND APPROACH : using RT at single trial level ###################################### > result.lme1<-lme(TR~CONDITION+GRPEAGE,data= TOUTESCOND,random=~1|SUJET,method="ML") > plot(result.lme1) #residuals OK result.lme2<-lme(TR~CONDITION*GRPEAGE,data= TOUTESCOND,random=~1|SUJET,method="ML") > anova(result.lme1,result.lme2) Model df AIC BIC logLik Test L.Ratio p-value result.lme1 1 8 27464.80 27509.88 -13724.40 result.lme2 2 14 27472.97 27551.87 -13722.49 1 vs 2 3.828608 0.6999 > result.lme3<-lme(TR~CONDITION+GRPEAGE+ACOUSTQ,data= TOUTESCOND,random=~1|SUJET,method="ML") > anova(result.lme1,result.lme3) Model df AIC BIC logLik Test L.Ratio p-value result.lme1 1 8 27464.8 27509.88 -13724.40 result.lme3 2 9 27452.3 27503.02 -13717.15 1 vs 2 14.49784 1e-04 > result.lme3<-lme(TR~CONDITION+GRPEAGE+ACOUSTQ,data= TOUTESCOND,random=~1|SUJET,method="REML") Linear mixed-effects model fit by REML Data: TOUTESCOND AIC BIC logLik 27403.99 27454.68 -13693.00 Random effects: Formula: ~1 | SUJET (Intercept) Residual StdDev: 60.8684 177.9567 Fixed effects: TR ~ CONDITION + GROUP + ACOUSTQ Value Std.Error DF t-value p-value (Intercept) 627.3987 19.596021 2001 32.01664 0.0000 CONDITIONCond2 -13.0783 9.575935 2001 -1.36574 0.1722 CONDITIONCond3 6.8634 9.637296 2001 0.71217 0.4764 GROUPE8ANS -58.5550 24.369628 63 -2.40279 0.0192 GROUPE9ANS -121.7949 23.811142 63 -5.11504 0.0000 GROUPE10ANS -138.3129 26.486620 63 -5.22199 0.0000 ACOUSTQ -30.3613 7.968108 2001 -3.81036 0.0001 Correlation: (Intr) CONDITIONCnd2 CONDITIONCnd3 GROUP8 GROUP9 GROUP1 CONDITIONCond2 -0.251 CONDITIONCond3 -0.244 0.502 GROUP8ANS -0.717 0.004 0.003 GROUP9ANS -0.733 0.002 -0.001 0.590 GROUP10ANS -0.657 -0.004 -0.008 0.531 0.543 ACOUSTQ -0.166 0.018 0.006 -0.007 -0.006 -0.005 Standardized Within-Group Residuals: Min Q1 Med Q3 Max -2.6253233 -0.6573193 -0.0620116 0.5675166 4.9655693 Number of Observations: 2071 Number of Groups: 67 # Finally > anova(result.lme3) numDF denDF F-value p-value (Intercept) 1 2001 3979.373 <.0001 CONDITION 2 2001 2.079 0.1254 GROUP 3 63 12.648 <.0001 ACOUSTQ 1 2001 14.519 0.0001 This gives me no significant effect of CONDITION in this case. From bbolker at gmail.com Thu Feb 3 20:14:12 2011 From: bbolker at gmail.com (Ben Bolker) Date: Thu, 3 Feb 2011 14:14:12 -0500 Subject: [R] error in density plot In-Reply-To: References: <1296630542355-3253489.post@n4.nabble.com> Message-ID: <4D4AFE84.4020802@gmail.com> On 02/02/2011 09:29 AM, David Winsemius wrote: > > On Feb 2, 2011, at 8:22 AM, Ben Bolker wrote: > >> Ramya gmail.com> writes: >> >>> I have the code for the density plot >>> j <- 8 >>> plot(density(diff_in_sample[,1]), main = list.files()[j]) >>> for(i in 1:25){ >>> lines(density(diff_in_sample[,i])) >>> } >>> >>> This gives me an error >>> Error in density.default(diff_in_sample[, i]) : >>> 'x' contains missing values >> >> [snip] >> >> ?NA >> >> lines(na.omit(density(diff_in_sample[,i]))) > > I don't know if that will work, but since Bolker wrtote it, it's got a > reasonable probability of being correct code. I generally use the na.rm > argument inside the density function rather than na.omit wrapped around it. > na.omit() is (approximately) equivalent to x[is.na(x)] for vectors. I just used it because I couldn't remember whether density() had an na.rm argument or not. Ben From ggraves at sfwmd.gov Thu Feb 3 20:14:47 2011 From: ggraves at sfwmd.gov (Graves, Gregory) Date: Thu, 3 Feb 2011 14:14:47 -0500 Subject: [R] tapply output as a dataframe In-Reply-To: References: Message-ID: This works. Thanks. Gregory A. Graves, Lead Scientist Everglades REstoration COoordination and VERification (RECOVER) Wetland Watershed Sciences / Restoration Sciences Department South Florida Water Management District Phones:? DESK: 561 / 682 - 2429 ?????????? ?? CELL:? 561 / 719 - 8157 -----Original Message----- From: Phil Spector [mailto:spector at stat.berkeley.edu] Sent: Thursday, February 03, 2011 12:41 PM To: Graves, Gregory Cc: r-help at r-project.org; Goodman, Patricia; Gorman, Patricia Subject: Re: [R] tapply output as a dataframe Try as.data.frame(as.table(a)) - Phil Spector Statistical Computing Facility Department of Statistics UC Berkeley spector at stat.berkeley.edu On Thu, 3 Feb 2011, Graves, Gregory wrote: > On Mon, Apr 13, 2009 at 12:41 PM, Dan Dube wrote: > >> i use tapply and by often, but i always end up banging my head against >> the wall with the output. > > The proposed solution of Dan's problem posted on R-help was: > >> do.call(rbind,a) > > When I use this 'solution' I get 'ERROR: second argument must be a list'. So head on wall continues. > > My tapply output is generated as follows: > >> a=tapply(value,list(sampling.date,station.code),mean) > > which gives me this (in part): > > A B C D E F G H I J K > 1/15/2008 0.004 0.027 0.019 0.015 0.035 0.022 0.007 0.038 0.042 0.045 0.0350 > 1/15/2009 0.027 0.027 0.031 0.015 0.008 0.021 0.007 0.027 0.026 0.029 0.0210 > 1/15/2010 0.016 0.020 0.015 0.022 0.015 0.013 0.007 0.014 0.019 0.019 0.0180 > 10/15/2007 0.052 0.051 0.032 0.024 0.017 0.044 0.015 0.058 0.063 0.061 0.0640 > 10/15/2008 0.042 0.054 0.030 0.017 0.024 0.030 0.019 0.044 0.047 0.051 0.0390 > 10/15/2009 0.047 0.035 0.031 0.020 0.012 0.039 0.019 0.051 0.055 0.054 0.0350 > > The only way I can figure out how to resolve this, such that I can, for example, plot station "A" against date, is to export the tapply output as a csv, and then reimport. > > Suggestions? I couldn't find a solution to this likely SIMPLE problem in Crawley or multiple searches of R help. > > Gregory A. Graves, Lead Scientist > Everglades REstoration COoordination and VERification (RECOVER) > Wetland Watershed Sciences / Restoration Sciences Department > South Florida Water Management District > Phones:? DESK: 561 / 682 - 2429 > ?????????? ?? CELL:? 561 / 719 - 8157 > > ______________________________________________ > R-help at 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, reproducible code. > From Stephen.Bond at cibc.com Thu Feb 3 20:14:49 2011 From: Stephen.Bond at cibc.com (Bond, Stephen) Date: Thu, 3 Feb 2011 14:14:49 -0500 Subject: [R] coxph fails to survfit Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From malexander06 at qub.ac.uk Thu Feb 3 18:49:06 2011 From: malexander06 at qub.ac.uk (Mhairi) Date: Thu, 3 Feb 2011 09:49:06 -0800 (PST) Subject: [R] replacement bootstrapping Message-ID: <1296755346397-3258599.post@n4.nabble.com> Hi there I am looking at the functional response (the consumption of single predators of prey over a range of prey densities) and Im having issues with the following script when trying to obtain mutliple replicates of coefficients (a and h) from the following nls model based on Hollings disc equation: > model<-nls(eaten~(a*suppl)/(1+a*h*suppl),start=list(a=1.2,h=0.015),data=rep) #which produces the following Formula: eaten ~ (a * suppl)/(1 + a * h * suppl) Parameters: Estimate Std. Error t value Pr(>|t|) a 2.97344 1.72972 1.719 0.093340 . h 0.09447 0.02247 4.205 0.000143 *** --- Signif. codes: 0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1 Residual standard error: 4.545 on 40 degrees of freedom Number of iterations to convergence: 8 Achieved convergence tolerance: 3.002e-06 # I am then trying to bootstrap the model to obtain multiple parameter estimates which I can then compare between the two data sets I have using a t test (hopefully) > library(bootstrap) > repnew<-cbind(as.numeric(rep[,2]),as.numeric(rep[,3])) #had to convert > data to matrix as it wasnt numeric > theta<-function(repnew){coef(eval(repmod$call))} > bootstrap(repnew,10,theta) > bootstrap(repnew,100,theta) #When I repeated bootstrapping 10 and then 100 times I keep getting the same values for the coefficients a and h. This code was adapted from another users code who had the same problem and as of yet I cant figure out waht is wrong. Do I need state that I want to use replacement sampling or is this already assumed? Thank you for any help :) -- View this message in context: http://r.789695.n4.nabble.com/replacement-bootstrapping-tp3258599p3258599.html Sent from the R help mailing list archive at Nabble.com. From katerina.konarikova at seznam.cz Thu Feb 3 19:08:26 2011 From: katerina.konarikova at seznam.cz (spooky) Date: Thu, 3 Feb 2011 10:08:26 -0800 (PST) Subject: [R] My own distribution in survreg function Message-ID: <1296756506182-3258645.post@n4.nabble.com> Hello, I?m trying to do some analysis using survreg function. I need to implement there my own distribution with density: lambda*exp(-lambda*y), where y = a1/(1+exp(-a2*x)). a1, a2 are unknown parameters and x >0. I need to get estimates of a1 and a2 (and lambda of course) I?m really not good at programming. Is there any way how to implement this distribution to survreg without ?big programming skills?? Can anyone tell me how to enter unknown parameters without giving them any exact initial value? Any help would be greatly appreciated, Katerina Konarikova -- View this message in context: http://r.789695.n4.nabble.com/My-own-distribution-in-survreg-function-tp3258645p3258645.html Sent from the R help mailing list archive at Nabble.com. From longeliver at gmail.com Thu Feb 3 19:16:12 2011 From: longeliver at gmail.com (Longe) Date: Thu, 03 Feb 2011 12:16:12 -0600 Subject: [R] Changing the direction of axis labels on a plot Message-ID: <4D4AF0EC.9040701@gmail.com> Dear list, Plots generated with the plot command have labels on the vertical y axis rotated counterclockwise. How do I specify that they should be positioned horizontally (I mean each label should read from left to right)? Thank you. L. From dwinsemius at comcast.net Thu Feb 3 20:54:57 2011 From: dwinsemius at comcast.net (David Winsemius) Date: Thu, 3 Feb 2011 14:54:57 -0500 Subject: [R] Changing the direction of axis labels on a plot In-Reply-To: <4D4AF0EC.9040701@gmail.com> References: <4D4AF0EC.9040701@gmail.com> Message-ID: <45205944-EDE8-4D30-A789-FAD754741F54@comcast.net> On Feb 3, 2011, at 1:16 PM, Longe wrote: > Dear list, > > Plots generated with the plot command have labels on the vertical y > axis rotated counterclockwise. How do I specify that they should be > positioned horizontally (I mean each label should read from left to > right)? ?par The las argument. but my memory is that it applies to both x and y, so you may need to suppress the x with xaxt="n" and then draw it separately with axis(). > > Thank you. > L. > > ______________________________________________ > R-help at 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, reproducible code. David Winsemius, MD West Hartford, CT From dwinsemius at comcast.net Thu Feb 3 20:59:53 2011 From: dwinsemius at comcast.net (David Winsemius) Date: Thu, 3 Feb 2011 14:59:53 -0500 Subject: [R] error in density plot In-Reply-To: <4D4AFE84.4020802@gmail.com> References: <1296630542355-3253489.post@n4.nabble.com> <4D4AFE84.4020802@gmail.com> Message-ID: <38E714E8-164D-4DF8-864B-ADCB2E8ED075@comcast.net> On Feb 3, 2011, at 2:14 PM, Ben Bolker wrote: > On 02/02/2011 09:29 AM, David Winsemius wrote: >> >> On Feb 2, 2011, at 8:22 AM, Ben Bolker wrote: >> >>> Ramya gmail.com> writes: >>> >>>> I have the code for the density plot >>>> j <- 8 >>>> plot(density(diff_in_sample[,1]), main = list.files()[j]) >>>> for(i in 1:25){ >>>> lines(density(diff_in_sample[,i])) >>>> } >>>> >>>> This gives me an error >>>> Error in density.default(diff_in_sample[, i]) : >>>> 'x' contains missing values >>> >>> [snip] >>> >>> ?NA >>> >>> lines(na.omit(density(diff_in_sample[,i]))) >> >> I don't know if that will work, but since Bolker wrtote it, it's >> got a >> reasonable probability of being correct code. I generally use the >> na.rm >> argument inside the density function rather than na.omit wrapped >> around it. >> > > na.omit() is (approximately) equivalent to x[is.na(x)] for vectors. > I just used it because I couldn't remember whether density() had an > na.rm argument or not. My concern was that it was "outside" the density function and I thought the density function would throw an error before it passed anything to na.omit(). plot(na.omit(density(c(1,1,1,1,1,NA,4,4,4,4))) ) Error in density.default(c(1, 1, 1, 1, 1, NA, 4, 4, 4, 4)) : 'x' contains missing values plot(density(na.omit(c(1,1,1,1,1,NA,4,4,4,4))) ) # "works" > > Ben > > David Winsemius, MD West Hartford, CT From Peter.Alspach at plantandfood.co.nz Thu Feb 3 20:57:04 2011 From: Peter.Alspach at plantandfood.co.nz (Peter Alspach) Date: Fri, 4 Feb 2011 08:57:04 +1300 Subject: [R] Changing the direction of axis labels on a plot In-Reply-To: <4D4AF0EC.9040701@gmail.com> References: <4D4AF0EC.9040701@gmail.com> Message-ID: <3CD374BF2C285940A54C0A71225AF7DB3B836C50@AKLEXM01.PFR.CO.NZ> Tena koe ?par and check the las argument. HTH .... Peter Alspach > -----Original Message----- > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r- > project.org] On Behalf Of Longe > Sent: Friday, 4 February 2011 7:16 a.m. > To: r-help at r-project.org > Subject: [R] Changing the direction of axis labels on a plot > > Dear list, > > Plots generated with the plot command have labels on the vertical y > axis > rotated counterclockwise. How do I specify that they should be > positioned horizontally (I mean each label should read from left to > right)? > > Thank you. > L. > > ______________________________________________ > R-help at 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, reproducible code. The contents of this e-mail are confidential and may be subject to legal privilege. If you are not the intended recipient you must not use, disseminate, distribute or reproduce all or any part of this e-mail or attachments. If you have received this e-mail in error, please notify the sender and delete all material pertaining to this e-mail. Any opinion or views expressed in this e-mail are those of the individual sender and may not represent those of The New Zealand Institute for Plant and Food Research Limited. From bbolker at gmail.com Thu Feb 3 21:01:41 2011 From: bbolker at gmail.com (Ben Bolker) Date: Thu, 3 Feb 2011 15:01:41 -0500 Subject: [R] error in density plot In-Reply-To: <38E714E8-164D-4DF8-864B-ADCB2E8ED075@comcast.net> References: <1296630542355-3253489.post@n4.nabble.com> <4D4AFE84.4020802@gmail.com> <38E714E8-164D-4DF8-864B-ADCB2E8ED075@comcast.net> Message-ID: <4D4B09A5.9000001@gmail.com> > My concern was that it was "outside" the density function and I thought > the density function would throw an error before it passed anything to > na.omit(). > > plot(na.omit(density(c(1,1,1,1,1,NA,4,4,4,4))) ) > Error in density.default(c(1, 1, 1, 1, 1, NA, 4, 4, 4, 4)) : > 'x' contains missing values > > plot(density(na.omit(c(1,1,1,1,1,NA,4,4,4,4))) ) # "works" > > >> >> Ben >> >> > > David Winsemius, MD > West Hartford, CT > of course. sorry about that. From pdxdong at gmail.com Thu Feb 3 21:03:39 2011 From: pdxdong at gmail.com (Hongwei Dong) Date: Thu, 3 Feb 2011 12:03:39 -0800 Subject: [R] use "summary" Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From dwinsemius at comcast.net Thu Feb 3 21:10:14 2011 From: dwinsemius at comcast.net (David Winsemius) Date: Thu, 3 Feb 2011 15:10:14 -0500 Subject: [R] coxph fails to survfit In-Reply-To: References: Message-ID: <80FBBF23-BCEA-462C-8793-B8E5645AC4AC@comcast.net> On Feb 3, 2011, at 2:14 PM, Bond, Stephen wrote: > I have a model with quant vars only and the error message does not > make sense: > > (mod1 <- coxph(Surv(time=strt,time2=stp,event=(resp==1))~ +incpost > +I(amt/1e5)+rate+strata(termfac), > subset=dt<"2010-08-30", data=inc,method="efron")) > Call: > coxph(formula = Surv(time = strt, time2 = stp, event = (resp == > 1)) ~ +incpost + I(amt/1e+05) + rate + strata(termfac), data = inc, > subset = dt < "2010-08-30", method = "efron") > > > coef exp(coef) se(coef) z p > incpost 0.2563 1.292 0.02479 10.34 0.0e+00 > I(amt/1e+05) -0.0532 0.948 0.00487 -10.92 0.0e+00 > rate -0.0507 0.951 0.00945 -5.36 8.2e-08 > > Likelihood ratio test=295 on 3 df, p=0 n= 1192634 > >> length(mod1$xlevels) > [1] 0 > > # now calling survfit with just a few rows from the data >> s1 <- >> survfit >> (mod1,newdata=inc[50050:50100,],se.fit=F,individual=T,type="aa") > Error in `contrasts<-`(`*tmp*`, value = "contr.treatment") : > contrasts can be applied only to factors with 2 or more levels I obviously cannot test my theory, but would have thought the call would be: s1 <- survfit(mod1, newdata=inc[50050:50100,], c("incpost", "amt, "rate", "termfac") ], se.fit=F,individual=T,type="aa") I.e., a data.frame for newdata that matched the variables used in the RHS of the formula. > >> inc[50050:50100,] > dt inc incpost strt stp resp rate amt p1 matfac > termfac vol > 50050 2009-02-05 0.00000 0.00 0 1 0 5.35 266833 C > 5 3 14229571 > 50051 2009-02-06 -0.09575 0.00 1 2 0 5.35 266833 C > 5 3 14229571 > 50052 2009-02-09 -0.03875 0.00 4 5 0 5.35 266833 C > 5 3 14229571 > 50053 2009-02-10 0.00850 0.00 5 6 0 5.35 266833 C > 5 3 14229571 > 50054 2009-02-11 0.00250 0.00 6 7 0 5.35 266833 C > 5 3 14229571 > 50055 2009-02-12 -0.04725 0.00 7 8 0 5.35 266833 C > 5 3 14229571 > 50056 2009-02-13 -0.00075 0.00 8 9 0 5.35 266833 C > 5 3 14229571 > 50057 2009-02-16 -0.10425 0.00 11 12 0 5.35 266833 C > 5 3 14229571 > 50058 2009-02-17 -0.10425 0.00 12 13 0 5.35 266833 C > 5 3 14229571 > 50059 2009-02-18 -0.02925 0.00 13 14 0 5.35 266833 C > 5 3 14229571 > 50060 2009-02-19 -0.01300 0.00 14 15 0 5.35 266833 C > 5 3 14229571 > 50061 2009-02-20 -0.04075 0.00 15 16 0 5.35 266833 C > 5 3 14229571 > 50062 2009-02-23 -0.03100 0.00 18 19 0 5.35 266833 C > 5 3 14229571 > 50063 2009-02-24 0.01975 0.00 19 20 0 5.35 266833 C > 5 3 14229571 > 50064 2009-02-25 0.13050 0.00 20 21 0 5.35 266833 C > 5 3 14229571 > 50065 2009-02-26 0.12725 0.00 21 22 0 5.35 266833 C > 5 3 14229571 > > ... further output truncated > > Please, comment if you see what's the issue. > Thank you. > Stephen > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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, reproducible code. David Winsemius, MD West Hartford, CT From lukasz.reclawowicz at gmail.com Thu Feb 3 21:18:18 2011 From: lukasz.reclawowicz at gmail.com (=?ISO-8859-2?B?o3VrYXN6IFLqY7Nhd293aWN6?=) Date: Thu, 3 Feb 2011 21:18:18 +0100 Subject: [R] exact logistic regression In-Reply-To: <1296754240.2014.20.camel@den2042-desktop> References: <1296664994.11047.7.camel@den2042-desktop> <1296754240.2014.20.camel@den2042-desktop> Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From mike.schumacher at gmail.com Thu Feb 3 20:41:57 2011 From: mike.schumacher at gmail.com (Mike Schumacher) Date: Thu, 3 Feb 2011 11:41:57 -0800 Subject: [R] R Data Manipulation - Transposing Data by a Given Column, Like User_ID Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From feimingchen at yahoo.com Thu Feb 3 21:03:05 2011 From: feimingchen at yahoo.com (Feiming Chen) Date: Thu, 3 Feb 2011 12:03:05 -0800 (PST) Subject: [R] "hubers" function in R MASS library : problem and solution Message-ID: <997923.69604.qm@web81701.mail.mud.yahoo.com> An embedded and charset-unspecified text was scrubbed... Name: not available URL: From Stephen.Bond at cibc.com Thu Feb 3 21:27:53 2011 From: Stephen.Bond at cibc.com (Bond, Stephen) Date: Thu, 3 Feb 2011 15:27:53 -0500 Subject: [R] coxph fails to survfit In-Reply-To: <80FBBF23-BCEA-462C-8793-B8E5645AC4AC@comcast.net> References: <80FBBF23-BCEA-462C-8793-B8E5645AC4AC@comcast.net> Message-ID: Responding to the suggestion by D Winsemius : > s1 <- survfit(mod1,newdata=inc[50050:50100,c("strt","stp","incpost", "amt","rate", "termfac")], + se.fit=F,individual=T,type="aa") Error in Surv(time = strt, time2 = stp, event = (resp == 1)) : object 'resp' not found it appears it wants to fit a survival curve instead of predicting a survival curve for the subject using the explanatory vars. I think I probably need predict.coxph(...,type="expected") or write code for matching time dependent risk to the proper time index of the survival curve. Thanks David. Stephen -----Original Message----- From: David Winsemius [mailto:dwinsemius at comcast.net] Sent: Thursday, February 03, 2011 3:10 PM To: Bond, Stephen Cc: r-help at r-project.org Subject: Re: [R] coxph fails to survfit On Feb 3, 2011, at 2:14 PM, Bond, Stephen wrote: > I have a model with quant vars only and the error message does not > make sense: > > (mod1 <- coxph(Surv(time=strt,time2=stp,event=(resp==1))~ +incpost > +I(amt/1e5)+rate+strata(termfac), > subset=dt<"2010-08-30", data=inc,method="efron")) > Call: > coxph(formula = Surv(time = strt, time2 = stp, event = (resp == > 1)) ~ +incpost + I(amt/1e+05) + rate + strata(termfac), data = inc, > subset = dt < "2010-08-30", method = "efron") > > > coef exp(coef) se(coef) z p > incpost 0.2563 1.292 0.02479 10.34 0.0e+00 > I(amt/1e+05) -0.0532 0.948 0.00487 -10.92 0.0e+00 > rate -0.0507 0.951 0.00945 -5.36 8.2e-08 > > Likelihood ratio test=295 on 3 df, p=0 n= 1192634 > >> length(mod1$xlevels) > [1] 0 > > # now calling survfit with just a few rows from the data >> s1 <- >> survfit >> (mod1,newdata=inc[50050:50100,],se.fit=F,individual=T,type="aa") > Error in `contrasts<-`(`*tmp*`, value = "contr.treatment") : > contrasts can be applied only to factors with 2 or more levels I obviously cannot test my theory, but would have thought the call would be: s1 <- survfit(mod1, newdata=inc[50050:50100,], c("incpost", "amt, "rate", "termfac") ], se.fit=F,individual=T,type="aa") I.e., a data.frame for newdata that matched the variables used in the RHS of the formula. > >> inc[50050:50100,] > dt inc incpost strt stp resp rate amt p1 matfac > termfac vol > 50050 2009-02-05 0.00000 0.00 0 1 0 5.35 266833 C > 5 3 14229571 > 50051 2009-02-06 -0.09575 0.00 1 2 0 5.35 266833 C > 5 3 14229571 > 50052 2009-02-09 -0.03875 0.00 4 5 0 5.35 266833 C > 5 3 14229571 > 50053 2009-02-10 0.00850 0.00 5 6 0 5.35 266833 C > 5 3 14229571 > 50054 2009-02-11 0.00250 0.00 6 7 0 5.35 266833 C > 5 3 14229571 > 50055 2009-02-12 -0.04725 0.00 7 8 0 5.35 266833 C > 5 3 14229571 > 50056 2009-02-13 -0.00075 0.00 8 9 0 5.35 266833 C > 5 3 14229571 > 50057 2009-02-16 -0.10425 0.00 11 12 0 5.35 266833 C > 5 3 14229571 > 50058 2009-02-17 -0.10425 0.00 12 13 0 5.35 266833 C > 5 3 14229571 > 50059 2009-02-18 -0.02925 0.00 13 14 0 5.35 266833 C > 5 3 14229571 > 50060 2009-02-19 -0.01300 0.00 14 15 0 5.35 266833 C > 5 3 14229571 > 50061 2009-02-20 -0.04075 0.00 15 16 0 5.35 266833 C > 5 3 14229571 > 50062 2009-02-23 -0.03100 0.00 18 19 0 5.35 266833 C > 5 3 14229571 > 50063 2009-02-24 0.01975 0.00 19 20 0 5.35 266833 C > 5 3 14229571 > 50064 2009-02-25 0.13050 0.00 20 21 0 5.35 266833 C > 5 3 14229571 > 50065 2009-02-26 0.12725 0.00 21 22 0 5.35 266833 C > 5 3 14229571 > > ... further output truncated > > Please, comment if you see what's the issue. > Thank you. > Stephen > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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, reproducible code. David Winsemius, MD West Hartford, CT From mailinglist.honeypot at gmail.com Thu Feb 3 21:52:40 2011 From: mailinglist.honeypot at gmail.com (Steve Lianoglou) Date: Thu, 3 Feb 2011 15:52:40 -0500 Subject: [R] R Data Manipulation - Transposing Data by a Given Column, Like User_ID In-Reply-To: References: Message-ID: Hi, On Thu, Feb 3, 2011 at 2:41 PM, Mike Schumacher wrote: > Hello, > > I'd like to transpose data to create an analysis-friendly dataframe. ?See > below for an example, I was unable to use t(x) and I couldn't find a > function with options like PROC TRANSPOSE in SAS. > > The ideal solution handles variable quantities of SITE - but beggars can't > be choosers. ?:-) > > Thank you in advance, > > Mike > > ## INPUT DATA > USER_ID<-c(1,1,1,2,2,2,3,3,4) > SITE > <-c("SITE1","SITE2","SITE3","SITE1","SITE2","SITE3","SITE1","SITE2","SITE3") > COUNTS <-c(10,13,22,10,12,12,13,44,99) > > RAW<-data.frame(USER_ID,SITE,COUNTS) > RAW > > #ANSWER SHOULD LOOK LIKE > a<-c(1,2,3,4) > b<-c(10,10,13,0) > c<-c(13,12,44,0) > d<-c(22,12,0,99) > > RESULT<-data.frame(a,b,c,d) > names(RESULT)<-c("USER_ID","SITE1","SITE2","SITE3") > RESULT Your desired RESULT looks like: R> RESULT USER_ID SITE1 SITE2 SITE3 1 1 10 13 22 2 2 10 12 12 3 3 13 44 0 4 4 0 0 99 You can get this with the reshape (or reshape2) package -- an I'm guessing xtabs() can do this too, but: R> library(reshape2) R> dcast(RAW, USER_ID ~ SITE) Using COUNTS as value column: use value_var to override. USER_ID SITE1 SITE2 SITE3 1 1 10 13 22 2 2 10 12 12 3 3 13 44 NA 4 4 NA NA 99 Learning how to use formulas (the `X ~ Y` stuff) is your friend. I have to admit though, I'm not as good at it as I'd like to be, myself. Hope that helps, -steve -- Steve Lianoglou Graduate Student: Computational Systems Biology ?| Memorial Sloan-Kettering Cancer Center ?| Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org/~lianos/contact From E.Vettorazzi at uke.uni-hamburg.de Thu Feb 3 21:52:44 2011 From: E.Vettorazzi at uke.uni-hamburg.de (Eik Vettorazzi) Date: Thu, 03 Feb 2011 21:52:44 +0100 Subject: [R] R Data Manipulation - Transposing Data by a Given Column, Like User_ID In-Reply-To: References: Message-ID: <4D4B159C.9080800@uke.uni-hamburg.de> Hi Mike reshape will be your friend. reshape(RAW,direction="wide",timevar="SITE",idvar="USER_ID") there is also the 'reshape'-package, which can do some more sophisticated transformations. hth. Am 03.02.2011 20:41, schrieb Mike Schumacher: > Hello, > > I'd like to transpose data to create an analysis-friendly dataframe. See > below for an example, I was unable to use t(x) and I couldn't find a > function with options like PROC TRANSPOSE in SAS. > > The ideal solution handles variable quantities of SITE - but beggars can't > be choosers. :-) > > Thank you in advance, > > Mike > > ## INPUT DATA > USER_ID<-c(1,1,1,2,2,2,3,3,4) > SITE > <-c("SITE1","SITE2","SITE3","SITE1","SITE2","SITE3","SITE1","SITE2","SITE3") > COUNTS <-c(10,13,22,10,12,12,13,44,99) > > RAW<-data.frame(USER_ID,SITE,COUNTS) > RAW > > #ANSWER SHOULD LOOK LIKE > a<-c(1,2,3,4) > b<-c(10,10,13,0) > c<-c(13,12,44,0) > d<-c(22,12,0,99) > > RESULT<-data.frame(a,b,c,d) > names(RESULT)<-c("USER_ID","SITE1","SITE2","SITE3") > RESULT > > > > -- Eik Vettorazzi Institut f?r Medizinische Biometrie und Epidemiologie Universit?tsklinikum Hamburg-Eppendorf Martinistr. 52 20246 Hamburg T ++49/40/7410-58243 F ++49/40/7410-57790 From dimitri.liakhovitski at gmail.com Thu Feb 3 21:57:40 2011 From: dimitri.liakhovitski at gmail.com (Dimitri Liakhovitski) Date: Thu, 3 Feb 2011 15:57:40 -0500 Subject: [R] rgenoud for multiple chips: does a more recent special version of "snow" exist? Message-ID: Dear everyone, I am trying to run rgenoud on several chips simultaneusly. I used the instructions provided on Jasjeet Sekhon's Homepage (http://sekhon.berkeley.edu/rgenoud/multiple_cpus.html). However, I have the newer version of R (R 2.12) installed - for a 64-bit machine. So, when I tried to install the special version of "snow" from a zip file provided by Jasjeet on his page, R did not allow me to install it (from a zip file) because it was created before R 2.10. Does anyone know if a more updated special version of "snow" exists - that could be used on R 2.12? Or maybe there is another way of running rgenoud on several chips simultaneously? Thanks a lot! -- Dimitri Liakhovitski Ninah Consulting www.ninah.com From dimitri.liakhovitski at gmail.com Thu Feb 3 22:06:41 2011 From: dimitri.liakhovitski at gmail.com (Dimitri Liakhovitski) Date: Thu, 3 Feb 2011 16:06:41 -0500 Subject: [R] rgenoud for multiple chips: does a more recent special version of "snow" exist? In-Reply-To: References: Message-ID: Just a small correction: the package "snow" does install. But once I try to load it: library(snow), I get an error: Error: package 'snow' was built before R 2.10.0: please re-install it Dimitri On Thu, Feb 3, 2011 at 3:57 PM, Dimitri Liakhovitski wrote: > Dear everyone, > > I am trying to run rgenoud on several chips simultaneusly. I used the > instructions provided on Jasjeet Sekhon's Homepage > (http://sekhon.berkeley.edu/rgenoud/multiple_cpus.html). > > However, I have the newer version of R (R 2.12) installed - for a > 64-bit machine. So, when I tried to install the special version of > "snow" from a zip file provided by Jasjeet on his page, R did not > allow me to install it (from a zip file) because it was created before > R 2.10. > > Does anyone know if a more updated special version of "snow" exists - > that could be used on R 2.12? > Or maybe there is another way of running rgenoud on several chips > simultaneously? > > Thanks a lot! > > -- > Dimitri Liakhovitski > Ninah Consulting > www.ninah.com > -- Dimitri Liakhovitski Ninah Consulting www.ninah.com From jre at neurnis.neuro.hfh.edu Thu Feb 3 22:17:47 2011 From: jre at neurnis.neuro.hfh.edu (James Ewing) Date: Thu, 3 Feb 2011 16:17:47 -0500 Subject: [R] =?windows-1252?q?Generalized_Estimating_Equations_and_a_Revie?= =?windows-1252?q?wer_Question_I_can=92t_answer?= Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From djmuser at gmail.com Thu Feb 3 23:09:53 2011 From: djmuser at gmail.com (Dennis Murphy) Date: Thu, 3 Feb 2011 14:09:53 -0800 Subject: [R] R Data Manipulation - Transposing Data by a Given Column, Like User_ID In-Reply-To: References: Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From chener at ohsu.edu Fri Feb 4 00:28:48 2011 From: chener at ohsu.edu (Zunqiu Chen) Date: Thu, 3 Feb 2011 15:28:48 -0800 Subject: [R] any similiar R fuction for matlab function 'fprintf'? In-Reply-To: <39CC55B3C66A934E8A97B8CD0F84F999320BB5FD96@AUSP01VMBX02.collaborationhost.net> References: <39CC55B3C66A934E8A97B8CD0F84F999320BB5FD96@AUSP01VMBX02.collaborationhost.net> Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From Peter.Brecknock at bp.com Fri Feb 4 02:54:26 2011 From: Peter.Brecknock at bp.com (Pete Brecknock) Date: Thu, 3 Feb 2011 17:54:26 -0800 (PST) Subject: [R] problem subsetting a data frame In-Reply-To: <1296766630598-3258981.post@n4.nabble.com> References: <1296766630598-3258981.post@n4.nabble.com> Message-ID: <1296784466808-3259360.post@n4.nabble.com> try subset(D, D$x < 5|D$y < 5) HTH Pete -- View this message in context: http://r.789695.n4.nabble.com/problem-subsetting-a-data-frame-tp3258981p3259360.html Sent from the R help mailing list archive at Nabble.com. From ggramig at gmail.com Fri Feb 4 01:12:23 2011 From: ggramig at gmail.com (gigi1234) Date: Thu, 3 Feb 2011 16:12:23 -0800 (PST) Subject: [R] Easy help with plots, font size Message-ID: <1296778343811-3259270.post@n4.nabble.com> I am trying to make some plots for a poster. Each one needs to be 6 inches by inches. Right now the fonts are too small and the plots don't read well on my poster. I am pretty much an R newbie and I can't figure out how to change the fonts. It would also be nice to know how to specify the size of the plot and maybe how to save the plots as jpeg files. Any help would be much appreciated! I am not too picky about the details like font type, I just want the size of the fonts (especially the axes and axes labels) to be bigger! Thanks so much! Here is my code: # Poster figure 1 stationmean=c(19.4833,10.8000) fieldmean=c(14.6852, 15.5981) plot(c(0,1),fieldmean,xaxt='n',type="b",pch=20,col="green3", main="Foxtail Seeds Remaining vs.Field Type", ylab="Mean Number Foxtail Seeds Remaining", xlab="Field Type",ylim=c(10,20),xlim=c(-.25,1.25)) axis(1,at=c(0,1),labels=c("Cover Crop","Wheat Stubble")) # Poster figure 2 stationmean=c(19.4833,10.8000) fieldmean=c(14.6852, 15.5981) plot(c(0,1),stationmean,xaxt='n',type="b",pch=20,col="green3", main="Foxtail Seeds Remaining vs. Station Type", ylab="Mean Number Foxtail Seeds Remaining", xlab="Station Type",ylim=c(10,20),xlim=c(-.25,1.25)) axis(1,at=c(0,1),labels=c("Invertebrate Only","Open Access")) # Poster figure 3 meantime=22.1 meancumrainfall=.4837 meanavelowt=35.4920071 meanavehight=55.3242738 meanvegcover=81.1729167 pred.veg = 33.3160 + -.2439*meantime - .8409*(.5) + 8.6833*(.5) + .5427*(meancumrainfall)-.3087*(meanavehight) + .01087*(seq(0,164.5,by=5)) pred.veg plot(seq(0,164.5,by=5),pred.veg,type='l',col='blue',lwd=2, main='Foxtail Seeds Remaining vs. Vegetative Cover Biomass', xlab='Vegetative Cover Biomass (g / 0.25 m^2', ylab='Mean Number Foxtail Seeds Remaining',ylim=c(10,22)) # Poster figure 4 meantime=22.1 meancumrainfall=.4837 meanavelowt=35.4920071 meanavehight=55.3242738 meanvegcover=81.1729167 pred.rain = 33.3160 + -0.2439*meantime - .8409*(.5) + 8.6833*(.5) - 1.0571*(seq(0,1.569,by=.1))-.3087*(meanavehight) + .01087*(meanvegcover) pred.rain plot(seq(0,1.569,by=.1),pred.rain,type='l',col='blue',lwd=2, main='Foxtail Seeds Remaining vs. Cumulative Rainfall', xlab='Cumulative Rainfall (in)', ylab='Mean Number Foxtail Seeds Remaining',ylim=c(10,22)) # Poster figure 5 meantime=22.1 meancumrainfall=.4837 meanavelowt=35.4920071 meanavehight=55.3242738 meanvegcover=81.1729167 pred.high = 33.3160 + -.2439*meantime - .8409*(.5) + 8.6833*(.5) + 1.0571*(meancumrainfall)-.3087*(seq(37.733,74.38228571,by=1)) + .01087*(meanvegcover) pred.high plot(seq(37.733,74.38228571,by=1),pred.high,type='l',col='blue',lwd=2, main='Foxtail Seeds Remaining vs. Average Daily High Temp', xlab='Average Daily High Temperature (degrees F)', ylab='Mean Number Foxtail Seeds Remaining',ylim=c(10,22)) # Poster figure 6 meantime=25.3333333 meancumrainfall=.4015 meanavelowt=37.9325 meanavehight=62.2579683 meanvegcover=77.6145833 meannumtotseedwt=.8708333 pred.seed = 24.4096 + -.1930*meantime - 3.5233*(.5) + 11.8611*(.5) - 2.7335*(meancumrainfall)-.1510*(meanavehight) + .01286*(meanvegcover) - 3.2848*(seq(.2,1.6,by=.05)) pred.seed plot(seq(.2,1.6,by=.05),pred.seed,type='l',col='blue',lwd=2, main='Foxtail Seeds Remaining vs. Ambient Seed Load', xlab='Ambient Seed Load (g / 0.25 m^2', ylab='Mean Number Foxtail Seeds Remaining',ylim=c(8,16)) -- View this message in context: http://r.789695.n4.nabble.com/Easy-help-with-plots-font-size-tp3259270p3259270.html Sent from the R help mailing list archive at Nabble.com. From jryan at marketshare.com Fri Feb 4 00:27:33 2011 From: jryan at marketshare.com (Jude Ryan) Date: Thu, 3 Feb 2011 17:27:33 -0600 Subject: [R] any similiar R fuction for matlab function 'fprintf'? Message-ID: <39CC55B3C66A934E8A97B8CD0F84F999320BB5FD96@AUSP01VMBX02.collaborationhost.net> An embedded and charset-unspecified text was scrubbed... Name: not available URL: From longeliver at gmail.com Fri Feb 4 01:42:42 2011 From: longeliver at gmail.com (Longe) Date: Thu, 03 Feb 2011 18:42:42 -0600 Subject: [R] Changing the direction of axis labels on a plot In-Reply-To: <3CD374BF2C285940A54C0A71225AF7DB3B836C50@AKLEXM01.PFR.CO.NZ> References: <4D4AF0EC.9040701@gmail.com> <3CD374BF2C285940A54C0A71225AF7DB3B836C50@AKLEXM01.PFR.CO.NZ> Message-ID: <4D4B4B82.7010304@gmail.com> On 02/03/2011 01:57 PM, Peter Alspach wrote: > Tena koe > > ?par > > and check the las argument. > > HTH .... > > Peter Alspach Thank you, Peter, and also David and William. The las argument indeed helps in setting the tick labels horizontally. Beautiful! But how do I rotate also the axis label, which is not altered by the las argument? Regards L. From sudhir.cr at gmail.com Fri Feb 4 01:50:29 2011 From: sudhir.cr at gmail.com (sudhir cr) Date: Thu, 3 Feb 2011 19:50:29 -0500 Subject: [R] R-help In-Reply-To: References: Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From dwinsemius at comcast.net Fri Feb 4 03:23:07 2011 From: dwinsemius at comcast.net (David Winsemius) Date: Thu, 3 Feb 2011 21:23:07 -0500 Subject: [R] Easy help with plots, font size In-Reply-To: <1296778343811-3259270.post@n4.nabble.com> References: <1296778343811-3259270.post@n4.nabble.com> Message-ID: On Feb 3, 2011, at 7:12 PM, gigi1234 wrote: > > I am trying to make some plots for a poster. Each one needs to be 6 > inches by > inches. Right now the fonts are too small and the plots don't read > well on > my poster. I am pretty much an R newbie and I can't figure out how > to change > the fonts. It would also be nice to know how to specify the size of > the plot > and maybe how to save the plots as jpeg files. Any help would be much > appreciated! I am not too picky about the details like font type, I > just > want the size of the fonts (especially the axes and axes labels) to be > bigger! ?par cex, cex.main, cex.lab, and cex.axis are arguments that should be helpful to control various font sizes. ?Devices ?jpeg The device settings are where you can change the plot size. There are examples on the help pages. > > Thanks so much! > > Here is my code: > > # Poster figure 1 > > stationmean=c(19.4833,10.8000) > fieldmean=c(14.6852, 15.5981) > > plot(c(0,1),fieldmean,xaxt='n',type="b",pch=20,col="green3", > main="Foxtail Seeds Remaining vs.Field Type", ylab="Mean Number > Foxtail > Seeds Remaining", > xlab="Field Type",ylim=c(10,20),xlim=c(-.25,1.25)) > axis(1,at=c(0,1),labels=c("Cover Crop","Wheat Stubble")) > > # Poster figure 2 > > stationmean=c(19.4833,10.8000) > fieldmean=c(14.6852, 15.5981) > > plot(c(0,1),stationmean,xaxt='n',type="b",pch=20,col="green3", > main="Foxtail Seeds Remaining vs. Station Type", ylab="Mean Number > Foxtail > Seeds Remaining", > xlab="Station Type",ylim=c(10,20),xlim=c(-.25,1.25)) > axis(1,at=c(0,1),labels=c("Invertebrate Only","Open Access")) > > # Poster figure 3 > > meantime=22.1 > meancumrainfall=.4837 > meanavelowt=35.4920071 > meanavehight=55.3242738 > meanvegcover=81.1729167 > > pred.veg = 33.3160 + -.2439*meantime - .8409*(.5) + 8.6833*(.5) + > .5427*(meancumrainfall)-.3087*(meanavehight) + > .01087*(seq(0,164.5,by=5)) > pred.veg > > plot(seq(0,164.5,by=5),pred.veg,type='l',col='blue',lwd=2, > main='Foxtail Seeds Remaining vs. Vegetative Cover Biomass', > xlab='Vegetative Cover Biomass (g / 0.25 m^2', > ylab='Mean Number Foxtail Seeds Remaining',ylim=c(10,22)) > > # Poster figure 4 > > meantime=22.1 > meancumrainfall=.4837 > meanavelowt=35.4920071 > meanavehight=55.3242738 > meanvegcover=81.1729167 > > pred.rain = 33.3160 + -0.2439*meantime - .8409*(.5) + 8.6833*(.5) - > 1.0571*(seq(0,1.569,by=.1))-.3087*(meanavehight) + > .01087*(meanvegcover) > pred.rain > > plot(seq(0,1.569,by=.1),pred.rain,type='l',col='blue',lwd=2, > main='Foxtail Seeds Remaining vs. Cumulative Rainfall', > xlab='Cumulative > Rainfall (in)', > ylab='Mean Number Foxtail Seeds Remaining',ylim=c(10,22)) > > # Poster figure 5 > > meantime=22.1 > meancumrainfall=.4837 > meanavelowt=35.4920071 > meanavehight=55.3242738 > meanvegcover=81.1729167 > > pred.high = 33.3160 + -.2439*meantime - .8409*(.5) + 8.6833*(.5) + > 1.0571*(meancumrainfall)-.3087*(seq(37.733,74.38228571,by=1)) + > .01087*(meanvegcover) > pred.high > > plot(seq(37.733,74.38228571,by=1),pred.high,type='l',col='blue',lwd=2, > main='Foxtail Seeds Remaining vs. Average Daily High Temp', > xlab='Average > Daily High Temperature (degrees F)', > ylab='Mean Number Foxtail Seeds Remaining',ylim=c(10,22)) > > # Poster figure 6 > > meantime=25.3333333 > meancumrainfall=.4015 > meanavelowt=37.9325 > meanavehight=62.2579683 > meanvegcover=77.6145833 > meannumtotseedwt=.8708333 > > pred.seed = 24.4096 + -.1930*meantime - 3.5233*(.5) + 11.8611*(.5) - > 2.7335*(meancumrainfall)-.1510*(meanavehight) + > .01286*(meanvegcover) - 3.2848*(seq(.2,1.6,by=.05)) > pred.seed > > plot(seq(.2,1.6,by=.05),pred.seed,type='l',col='blue',lwd=2, > main='Foxtail Seeds Remaining vs. Ambient Seed Load', xlab='Ambient > Seed > Load (g / 0.25 m^2', > ylab='Mean Number Foxtail Seeds Remaining',ylim=c(8,16)) > > -- > View this message in context: http://r.789695.n4.nabble.com/Easy-help-with-plots-font-size-tp3259270p3259270.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at 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, reproducible code. David Winsemius, MD West Hartford, CT From ggramig at gmail.com Fri Feb 4 03:31:15 2011 From: ggramig at gmail.com (gigi1234) Date: Thu, 3 Feb 2011 18:31:15 -0800 (PST) Subject: [R] Easy help with plots, font size In-Reply-To: References: <1296778343811-3259270.post@n4.nabble.com> Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From thomas.levine at gmail.com Fri Feb 4 04:01:15 2011 From: thomas.levine at gmail.com (Thomas Levine) Date: Thu, 3 Feb 2011 22:01:15 -0500 Subject: [R] Easy help with plots, font size In-Reply-To: References: <1296778343811-3259270.post@n4.nabble.com> Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From ehlers at ucalgary.ca Fri Feb 4 04:05:04 2011 From: ehlers at ucalgary.ca (Peter Ehlers) Date: Thu, 03 Feb 2011 19:05:04 -0800 Subject: [R] R Data Manipulation - Transposing Data by a Given Column, Like User_ID In-Reply-To: References: Message-ID: <4D4B6CE0.8040402@ucalgary.ca> On 2011-02-03 14:09, Dennis Murphy wrote: > Hi: > > This also works, except that the result is of class 'table': > > xtabs(COUNTS ~ USER_ID + SITE, data = RAW) > SITE > USER_ID SITE1 SITE2 SITE3 > 1 10 13 22 > 2 10 12 12 > 3 13 44 0 > 4 0 0 99 > > If you need a data frame, then the earlier responses apply. Agreed. But just for fun, since this is R: z <- xtabs(COUNTS ~ USER_ID + SITE, data = RAW) d <- as.data.frame(unclass(z)) That'll lose the USER_ID variable; if that's needed: d <- as.data.frame(cbind(USER_ID=row.names(z), unclass(z))) Peter Ehlers > > HTH, > Dennis > > On Thu, Feb 3, 2011 at 11:41 AM, Mike Schumacher > wrote: > >> Hello, >> >> I'd like to transpose data to create an analysis-friendly dataframe. See >> below for an example, I was unable to use t(x) and I couldn't find a >> function with options like PROC TRANSPOSE in SAS. >> >> The ideal solution handles variable quantities of SITE - but beggars can't >> be choosers. :-) >> >> Thank you in advance, >> >> Mike >> >> ## INPUT DATA >> USER_ID<-c(1,1,1,2,2,2,3,3,4) >> SITE >> >> <-c("SITE1","SITE2","SITE3","SITE1","SITE2","SITE3","SITE1","SITE2","SITE3") >> COUNTS<-c(10,13,22,10,12,12,13,44,99) >> >> RAW<-data.frame(USER_ID,SITE,COUNTS) >> RAW >> >> #ANSWER SHOULD LOOK LIKE >> a<-c(1,2,3,4) >> b<-c(10,10,13,0) >> c<-c(13,12,44,0) >> d<-c(22,12,0,99) >> >> RESULT<-data.frame(a,b,c,d) >> names(RESULT)<-c("USER_ID","SITE1","SITE2","SITE3") >> RESULT >> >> >> >> >> -- >> Michael Schumacher >> mike.schumacher at gmail.com >> >> [[alternative HTML version deleted]] >> >> ______________________________________________ >> R-help at 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, reproducible code. >> > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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, reproducible code. From mailinglist.honeypot at gmail.com Fri Feb 4 03:35:01 2011 From: mailinglist.honeypot at gmail.com (Steve Lianoglou) Date: Thu, 3 Feb 2011 21:35:01 -0500 Subject: [R] problem subsetting a data frame In-Reply-To: <1296784466808-3259360.post@n4.nabble.com> References: <1296766630598-3258981.post@n4.nabble.com> <1296784466808-3259360.post@n4.nabble.com> Message-ID: Hi, On Thu, Feb 3, 2011 at 8:54 PM, Pete Brecknock wrote: > > try > > subset(D, D$x < 5|D$y < 5) Or even better: R> subset(D, x < 5 | y < 5) (The column names of D are "in scope" as variables within the call to subset(D, ...) -steve -- Steve Lianoglou Graduate Student: Computational Systems Biology ?| Memorial Sloan-Kettering Cancer Center ?| Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org/~lianos/contact From dwinsemius at comcast.net Fri Feb 4 05:13:31 2011 From: dwinsemius at comcast.net (David Winsemius) Date: Thu, 3 Feb 2011 23:13:31 -0500 Subject: [R] coxph fails to survfit In-Reply-To: References: <80FBBF23-BCEA-462C-8793-B8E5645AC4AC@comcast.net> Message-ID: <7F0D648D-BA7C-4375-8887-E544DAFA1060@comcast.net> On Feb 3, 2011, at 3:27 PM, Bond, Stephen wrote: > Responding to the suggestion by D Winsemius : > >> s1 <- >> survfit(mod1,newdata=inc[50050:50100,c("strt","stp","incpost", >> "amt","rate", "termfac")], > + se.fit=F,individual=T,type="aa") > Error in Surv(time = strt, time2 = stp, event = (resp == 1)) : > object 'resp' not found > > it appears it wants to fit a survival curve instead of predicting a > survival curve for the subject using the explanatory vars. I think I > probably need > predict.coxph(...,type="expected") > or write code for matching time dependent risk to the proper time > index of the survival curve. I would have interpreted that error message as saying the function also needed some of the information on the LHS of the formula. Keep feeding it data that it complains is missing. > > Thanks David. > > Stephen > > -----Original Message----- > From: David Winsemius [mailto:dwinsemius at comcast.net] > Sent: Thursday, February 03, 2011 3:10 PM > To: Bond, Stephen > Cc: r-help at r-project.org > Subject: Re: [R] coxph fails to survfit > > > On Feb 3, 2011, at 2:14 PM, Bond, Stephen wrote: > >> I have a model with quant vars only and the error message does not >> make sense: >> >> (mod1 <- coxph(Surv(time=strt,time2=stp,event=(resp==1))~ +incpost >> +I(amt/1e5)+rate+strata(termfac), >> subset=dt<"2010-08-30", data=inc,method="efron")) >> Call: >> coxph(formula = Surv(time = strt, time2 = stp, event = (resp == >> 1)) ~ +incpost + I(amt/1e+05) + rate + strata(termfac), data = inc, >> subset = dt < "2010-08-30", method = "efron") >> >> >> coef exp(coef) se(coef) z p >> incpost 0.2563 1.292 0.02479 10.34 0.0e+00 >> I(amt/1e+05) -0.0532 0.948 0.00487 -10.92 0.0e+00 >> rate -0.0507 0.951 0.00945 -5.36 8.2e-08 >> >> Likelihood ratio test=295 on 3 df, p=0 n= 1192634 >> >>> length(mod1$xlevels) >> [1] 0 >> >> # now calling survfit with just a few rows from the data >>> s1 <- >>> survfit >>> (mod1,newdata=inc[50050:50100,],se.fit=F,individual=T,type="aa") >> Error in `contrasts<-`(`*tmp*`, value = "contr.treatment") : >> contrasts can be applied only to factors with 2 or more levels > > I obviously cannot test my theory, but would have thought the call > would be: > > s1 <- survfit(mod1, newdata=inc[50050:50100,], c("incpost", "amt, > "rate", "termfac") ], > se.fit=F,individual=T,type="aa") > > I.e., a data.frame for newdata that matched the variables used in the > RHS of the formula. > >> >>> inc[50050:50100,] >> dt inc incpost strt stp resp rate amt p1 matfac >> termfac vol >> 50050 2009-02-05 0.00000 0.00 0 1 0 5.35 266833 C >> 5 3 14229571 >> 50051 2009-02-06 -0.09575 0.00 1 2 0 5.35 266833 C >> 5 3 14229571 >> 50052 2009-02-09 -0.03875 0.00 4 5 0 5.35 266833 C >> 5 3 14229571 >> 50053 2009-02-10 0.00850 0.00 5 6 0 5.35 266833 C >> 5 3 14229571 >> 50054 2009-02-11 0.00250 0.00 6 7 0 5.35 266833 C >> 5 3 14229571 >> 50055 2009-02-12 -0.04725 0.00 7 8 0 5.35 266833 C >> 5 3 14229571 >> 50056 2009-02-13 -0.00075 0.00 8 9 0 5.35 266833 C >> 5 3 14229571 >> 50057 2009-02-16 -0.10425 0.00 11 12 0 5.35 266833 C >> 5 3 14229571 >> 50058 2009-02-17 -0.10425 0.00 12 13 0 5.35 266833 C >> 5 3 14229571 >> 50059 2009-02-18 -0.02925 0.00 13 14 0 5.35 266833 C >> 5 3 14229571 >> 50060 2009-02-19 -0.01300 0.00 14 15 0 5.35 266833 C >> 5 3 14229571 >> 50061 2009-02-20 -0.04075 0.00 15 16 0 5.35 266833 C >> 5 3 14229571 >> 50062 2009-02-23 -0.03100 0.00 18 19 0 5.35 266833 C >> 5 3 14229571 >> 50063 2009-02-24 0.01975 0.00 19 20 0 5.35 266833 C >> 5 3 14229571 >> 50064 2009-02-25 0.13050 0.00 20 21 0 5.35 266833 C >> 5 3 14229571 >> 50065 2009-02-26 0.12725 0.00 21 22 0 5.35 266833 C >> 5 3 14229571 >> >> ... further output truncated >> >> Please, comment if you see what's the issue. >> Thank you. >> Stephen >> >> >> [[alternative HTML version deleted]] >> >> ______________________________________________ >> R-help at 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, reproducible code. > > David Winsemius, MD > West Hartford, CT > David Winsemius, MD West Hartford, CT From ggrothendieck at gmail.com Fri Feb 4 05:18:37 2011 From: ggrothendieck at gmail.com (Gabor Grothendieck) Date: Thu, 3 Feb 2011 23:18:37 -0500 Subject: [R] R Data Manipulation - Transposing Data by a Given Column, Like User_ID In-Reply-To: <4D4B6CE0.8040402@ucalgary.ca> References: <4D4B6CE0.8040402@ucalgary.ca> Message-ID: On Thu, Feb 3, 2011 at 10:05 PM, Peter Ehlers wrote: > On 2011-02-03 14:09, Dennis Murphy wrote: >> >> Hi: >> >> This also works, except that the result is of class 'table': >> >> xtabs(COUNTS ~ USER_ID + SITE, data = RAW) >> ? ? ? ?SITE >> USER_ID SITE1 SITE2 SITE3 >> ? ? ? 1 ? ?10 ? ?13 ? ?22 >> ? ? ? 2 ? ?10 ? ?12 ? ?12 >> ? ? ? 3 ? ?13 ? ?44 ? ? 0 >> ? ? ? 4 ? ? 0 ? ? 0 ? ?99 >> >> If you need a data frame, then the earlier responses apply. > > Agreed. But just for fun, since this is R: > > ?z <- xtabs(COUNTS ~ USER_ID + SITE, data = RAW) > ?d <- as.data.frame(unclass(z)) > > That'll lose the USER_ID variable; if that's needed: > > ?d <- as.data.frame(cbind(USER_ID=row.names(z), unclass(z))) > Try this: cbind( dimnames( z )[ 1 ], as.data.frame( z[ ] ) ) -- Statistics & Software Consulting GKX Group, GKX Associates Inc. tel: 1-877-GKX-GROUP email: ggrothendieck at gmail.com From cahyo_kristiono at yahoo.com Fri Feb 4 06:06:46 2011 From: cahyo_kristiono at yahoo.com (cahyo kristiono) Date: Fri, 4 Feb 2011 13:06:46 +0800 (SGT) Subject: [R] Please stop all e-mail Message-ID: <894560.65285.qm@web76311.mail.sg1.yahoo.com> An embedded and charset-unspecified text was scrubbed... Name: not available URL: From nairbp at hotmail.com Fri Feb 4 04:29:17 2011 From: nairbp at hotmail.com (bpn) Date: Thu, 3 Feb 2011 19:29:17 -0800 (PST) Subject: [R] TM Package - installation In-Reply-To: References: Message-ID: <1296790157679-3259421.post@n4.nabble.com> Hi Sujatha, if you haven't still resolved this issue, here is a tip: Update your Java with the latest version. I faced with similar problem and resolved it with new java version. Hope this would help. -- View this message in context: http://r.789695.n4.nabble.com/TM-Package-installation-tp2318373p3259421.html Sent from the R help mailing list archive at Nabble.com. From dannybolg at gmail.com Fri Feb 4 04:52:27 2011 From: dannybolg at gmail.com (DB1984) Date: Thu, 3 Feb 2011 19:52:27 -0800 (PST) Subject: [R] Finding non-normal distributions per row of data frame? Message-ID: <1296791547602-3259439.post@n4.nabble.com> This is my first attempt at this, so hopefully a few kind pointers can get me going in the right direction... I have a large data frame of 20+ columns and 20,000 rows. I'd like to evaluate the distribution of values in each row, to determine whether they meet the criteria of a normal distribution. I'd loop this over all the rows in the data frame, and output the summary results to a new data frame. I have a loop that should run a Shapiro-Wilk test over each row, y= data frame for (j in 1:nr) { y.temp<-list(y[j,]) testsw <- lapply(y.temp, shapiro.test) testtable <- t(sapply(testsw, function(x) c(x$statistic, x$p.value))) colnames(testtable) <- c("W", "p.value") } but it is currently throwing out an error: "Error in `rownames<-`(`*tmp*`, value = "1") : attempt to set rownames on object with no dimensions" ...which I guess is unrelated to the evaluation of normality, and more likely a faulty loop? Any suggestions either for this test, or a better way to evaluate the normal distribution (e.g. qq-plot residuals for each row) would be greatly received. Thanks. -- View this message in context: http://r.789695.n4.nabble.com/Finding-non-normal-distributions-per-row-of-data-frame-tp3259439p3259439.html Sent from the R help mailing list archive at Nabble.com. From david.luckett at industry.nsw.gov.au Fri Feb 4 05:47:09 2011 From: david.luckett at industry.nsw.gov.au (david.luckett at industry.nsw.gov.au) Date: Fri, 4 Feb 2011 15:47:09 +1100 Subject: [R] Can an xyplot() plus legend be saved as an Enhanced Windows Metafile (EMF)? Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From totangjie at gmail.com Fri Feb 4 07:42:45 2011 From: totangjie at gmail.com (Jie TANG) Date: Fri, 4 Feb 2011 14:42:45 +0800 Subject: [R] how to learn more from R Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From metasaurus at gmail.com Fri Feb 4 07:33:25 2011 From: metasaurus at gmail.com (conor1725) Date: Thu, 3 Feb 2011 22:33:25 -0800 (PST) Subject: [R] Where does R look for library packages - there is no package called 'BRugs' In-Reply-To: <48213257-3253-40F7-B842-004C03F8282C@comcast.net> References: <1296427342809-3247748.post@n4.nabble.com> <48213257-3253-40F7-B842-004C03F8282C@comcast.net> Message-ID: <1296801205496-3259520.post@n4.nabble.com> David Winsemius wrote: > > > On Jan 30, 2011, at 5:42 PM, conor1725 wrote: > >> >> I am have installed R on Windows 7 machine. R got installed in the >> directory >> C:\Program Files\R\R-2.12.0. Then I installed the package BRugs >> using the >> install.packages command. I did not get an option during the >> installation as >> to what directory I wanted BRugs installed in. It ended up in >> C:\myusername\Documents as C:\myusername\Documents\R\win-library >> \2.12\BRugs. >> When I open and R and run the command library(BRugs) it works fine. >> >> However, I would like to move the BRugs stuff out of my Documents >> folder, >> either to a subdirectory under Documents of my choosing or to >> somewhere in >> C:\Program Files\R\R-2.12.0. I tried just moving the whole folder and >> subfolders R\win-library\2.12\... from Documents to a subfolder. I >> don't >> think this matters, but just to complete, there is also a folder >> called Coda >> with the BRugs folder in the 2.12 folder and of course there are >> subfolders >> and files under each of the folders Coda and BRugs. Then when I try >> library(BRugs) I get the error message "Error in library(BRugs) : >> there is >> no package called 'BRugs'". So it seems R only knows to look for the >> BRugs >> package in it's original installation location. >> >> How can I get it to work having BRugs in one of my desired locations? > > Then you need to understand where R will be able to find your > packages, and how one might change that: > > ?libPaths > > -- > David Winsemius, MD > West Hartford, CT > > I'm posting a specific answer to my own question for the record since The help for libPaths (actually should be ?.libPaths) doesn't explain this fully. I created the file Renviron.site in the folder C:\Program Files\R\R-2.12.0\etc and put the text R_LIBS = C:/Users/myusername/Documents/.../R/win-library/2.12 in that file. The ... represents the path for the subdirectory that I moved R\win-library\2.12\... to. -- View this message in context: http://r.789695.n4.nabble.com/Where-does-R-look-for-library-packages-there-is-no-package-called-BRugs-tp3247748p3259520.html Sent from the R help mailing list archive at Nabble.com. From ripley at stats.ox.ac.uk Fri Feb 4 08:26:12 2011 From: ripley at stats.ox.ac.uk (Prof Brian Ripley) Date: Fri, 4 Feb 2011 07:26:12 +0000 (GMT) Subject: [R] Where does R look for library packages - there is no package called 'BRugs' In-Reply-To: <1296801205496-3259520.post@n4.nabble.com> References: <1296427342809-3247748.post@n4.nabble.com> <48213257-3253-40F7-B842-004C03F8282C@comcast.net> <1296801205496-3259520.post@n4.nabble.com> Message-ID: For the record, this is not a good answer to the question (and the real answer is 'explained fully' on the help page for .libPaths, and also in the rw-FAQ, Q4.2). If you move your personal library directory, you need to set the environment variable R_LIBS_USER . And personal (not site) environment variables should be set in ~/.Renviron, not in Renviron.site. If you want a site library, that is explained fully in the references in my first paragraph. On Thu, 3 Feb 2011, conor1725 wrote: > > > David Winsemius wrote: >> >> >> On Jan 30, 2011, at 5:42 PM, conor1725 wrote: >> >>> >>> I am have installed R on Windows 7 machine. R got installed in the >>> directory >>> C:\Program Files\R\R-2.12.0. Then I installed the package BRugs >>> using the >>> install.packages command. I did not get an option during the >>> installation as >>> to what directory I wanted BRugs installed in. It ended up in >>> C:\myusername\Documents as C:\myusername\Documents\R\win-library >>> \2.12\BRugs. >>> When I open and R and run the command library(BRugs) it works fine. >>> >>> However, I would like to move the BRugs stuff out of my Documents >>> folder, >>> either to a subdirectory under Documents of my choosing or to >>> somewhere in >>> C:\Program Files\R\R-2.12.0. I tried just moving the whole folder and >>> subfolders R\win-library\2.12\... from Documents to a subfolder. I >>> don't >>> think this matters, but just to complete, there is also a folder >>> called Coda >>> with the BRugs folder in the 2.12 folder and of course there are >>> subfolders >>> and files under each of the folders Coda and BRugs. Then when I try >>> library(BRugs) I get the error message "Error in library(BRugs) : >>> there is >>> no package called 'BRugs'". So it seems R only knows to look for the >>> BRugs >>> package in it's original installation location. >>> >>> How can I get it to work having BRugs in one of my desired locations? >> >> Then you need to understand where R will be able to find your >> packages, and how one might change that: >> >> ?libPaths >> >> -- >> David Winsemius, MD >> West Hartford, CT >> >> > > I'm posting a specific answer to my own question for the record since The > help for libPaths (actually should be ?.libPaths) doesn't explain this > fully. I created the file Renviron.site in the folder C:\Program > Files\R\R-2.12.0\etc and put the text R_LIBS = > C:/Users/myusername/Documents/.../R/win-library/2.12 in that file. The ... > represents the path for the subdirectory that I moved R\win-library\2.12\... > to. > -- > View this message in context: http://r.789695.n4.nabble.com/Where-does-R-look-for-library-packages-there-is-no-package-called-BRugs-tp3247748p3259520.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at 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, reproducible code. > -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 From alaios at yahoo.com Fri Feb 4 08:45:02 2011 From: alaios at yahoo.com (Alaios) Date: Thu, 3 Feb 2011 23:45:02 -0800 (PST) Subject: [R] "Matrix' with Functions In-Reply-To: Message-ID: <660591.57867.qm@web120118.mail.ne1.yahoo.com> An embedded and charset-unspecified text was scrubbed... Name: not available URL: From Marie-Line.Glaesener at uni.lu Fri Feb 4 08:37:52 2011 From: Marie-Line.Glaesener at uni.lu (Marie-Line Glaesener) Date: Fri, 4 Feb 2011 07:37:52 +0000 Subject: [R] Error in solve.default(inf, tol = tol.solve) : Message-ID: <99D322B6F7951F468D4788B2CB077C7B0BCD9861@trip.uni.lux> An embedded and charset-unspecified text was scrubbed... Name: not available URL: From karl at huftis.org Fri Feb 4 09:40:06 2011 From: karl at huftis.org (Karl Ove Hufthammer) Date: Fri, 4 Feb 2011 09:40:06 +0100 Subject: [R] Applying multiple functions to one object References: <4D4967EB.4090808@uke.uni-hamburg.de> Message-ID: Eik Vettorazzi wrote: > ... and so the following is from scratch, not from memory. > > fun<-function(x,...){ > mthd<-list(...) > lapply(mthd,function(m) do.call(m,list(x))) > } > fun(3.14, mode, typeof, class) > > there is no error-catching for non-existing functions, no naming of > results and so on, but it may be a start. Thanks for the suggestion. I took the liberty of adding function names and support for multiple objects. Here?s the resulting function (?msum? is short for ?multiple summaries?, or something like that ?): msum = function(x,...){ fun.names = sapply(lapply(substitute(list(...)), deparse)[-1], paste, collapse="") mthd<-list(...) if(!is.list(x)) x = list(x) res = t(sapply(x, function(y) sapply(mthd, function(m) do.call(m, list(y)) ))) colnames(res) = fun.names rownames(res) = names(x) res } It works for simple objects: $ msum( rnorm(100, 2, 3), mean, median, sd, mad) mean median sd mad [1,] 2.380686 2.410399 3.073316 3.034474 For multiple objects: $ x = list(3, 3L, 3.14, factor(3), "3") $ msum(x, mode, typeof, class) mode typeof class [1,] "numeric" "double" "numeric" [2,] "numeric" "integer" "integer" [3,] "numeric" "double" "numeric" [4,] "numeric" "integer" "factor" [5,] "character" "character" "character" And it adds row names if they are specified: $ x = list(norm=rnorm(100), exp=rexp(100), gamma=rgamma(100, 3, 5)) $ msum(x, mean, median ) mean median norm -0.1539711 -0.1048998 exp 0.9726821 0.7661752 gamma 0.5556737 0.4678005 Hope someone else will find it useful too. -- Karl Ove Hufthammer From ligges at statistik.tu-dortmund.de Fri Feb 4 09:57:07 2011 From: ligges at statistik.tu-dortmund.de (Uwe Ligges) Date: Fri, 04 Feb 2011 09:57:07 +0100 Subject: [R] rgenoud for multiple chips: does a more recent special version of "snow" exist? In-Reply-To: References: Message-ID: <4D4BBF63.3080503@statistik.tu-dortmund.de> On 03.02.2011 22:06, Dimitri Liakhovitski wrote: > Just a small correction: the package "snow" does install. But once I > try to load it: > library(snow), > I get an error: > Error: package 'snow' was built before R 2.10.0: please re-install it > Dimitri > > On Thu, Feb 3, 2011 at 3:57 PM, Dimitri Liakhovitski > wrote: >> Dear everyone, >> >> I am trying to run rgenoud on several chips simultaneusly. I used the >> instructions provided on Jasjeet Sekhon's Homepage >> (http://sekhon.berkeley.edu/rgenoud/multiple_cpus.html). >> >> However, I have the newer version of R (R 2.12) installed - for a >> 64-bit machine. So, when I tried to install the special version of >> "snow" from a zip file provided by Jasjeet on his page, R did not >> allow me to install it (from a zip file) because it was created before >> R 2.10. >> >> Does anyone know if a more updated special version of "snow" exists - >> that could be used on R 2.12? Yes, type update.packages(checkBuilt=TRUE) and it will update to your R version from your favourite CRAN mirror. Best, Uwe Ligges >> Or maybe there is another way of running rgenoud on several chips >> simultaneously? >> >> Thanks a lot! >> >> -- >> Dimitri Liakhovitski >> Ninah Consulting >> www.ninah.com >> > > > From djmuser at gmail.com Fri Feb 4 09:59:23 2011 From: djmuser at gmail.com (Dennis Murphy) Date: Fri, 4 Feb 2011 00:59:23 -0800 Subject: [R] Can an xyplot() plus legend be saved as an Enhanced Windows Metafile (EMF)? In-Reply-To: References: Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From maechler at stat.math.ethz.ch Fri Feb 4 10:05:22 2011 From: maechler at stat.math.ethz.ch (Martin Maechler) Date: Fri, 4 Feb 2011 10:05:22 +0100 Subject: [R] "hubers" function in R MASS library : problem and solution In-Reply-To: <997923.69604.qm@web81701.mail.mud.yahoo.com> References: <997923.69604.qm@web81701.mail.mud.yahoo.com> Message-ID: <19787.49490.51970.107661@stat.math.ethz.ch> >>>>> Feiming Chen >>>>> on Thu, 3 Feb 2011 12:03:05 -0800 (PST) writes: > Hello: > I found the "hubers" function in MASS library is NOT working on the following > data: >> a <- >> c(7.19,7.19,7.19,9.41,6.79,9.41,7.19,9.41,1.64,7.19,7.19,7.19,7.19,1.422,7.19,6.79,7.19,6.79,7.19,7.19,4.44,6.55,6.79,7.19,9.41,9.41,7.19,7.19,7.19,7.19,1.64,1.597,1.64,7.19,1.422,7.19,6.79,9.38,7.19,1.64,7.19,7.19,7.19,7.19,7.19,1.64,7.19,6.79,6.79,1.649,1.64,7.19,1.597,1.64,6.55,7.19,7.19,1.64,7.19,7.19,1.407,1.672,1.672,7.19,6.55,7.19,7.19,9.41,1.407,7.19,7.19,9.41,7.19,9.41,7.19,7.19,7.19,7.19,7.19,7.19,7.19,7.19,7.19,9.41,7.19,6.79,7.19,6.79,1.64,1.422,7.19,7.19,1.67,1.64,1.64,1.64,1.64,1.787,7.19,7.19,7.19,6.79,7.19,7.19,7.19,7.19,7.19,7.19,7.19,7.19,7.19,1.64,1.64,1.64,1.422,9.41,1.64,7.19,7.19,7.19,7.19,7.19,7.19,7.19,6.79,6.79,7.19,6.79,7.19,7.19,1.407,7.19,4.42,9,1.64,1.64,6.79,1.664,1.664) >> >> library(MASS) >> hubers(a) > ## NO response! > I think it is due to the infinite loop caused by the following line in the code > of "hubers" (around Line 30): > if ((abs(mu0 - mu1) < tol * s0) && > abs(s0 - s1) < tol * s0) break > where "s0" evaluates to ZERO initially (due to more than 50% of the number > 7.19). yes. Not only for this reason, the robustbase package has had the 'huberM()' function with some other slight advantages over MASS::huber. > I propose to change the "<" sign to "<=": > if ((abs(mu0 - mu1) <= tol * s0) && > abs(s0 - s1) <= tol * s0) break > which will break the infinite loop. However, the new result is: >> hubers(a) > $mu > [1] 7.19 > $s > [1] 0 > which gives 0 standard deviation. Actually the data does vary and it is not > true all values other than 7.19 are outliers. Sure. Nontheless, the way Peter Huber had defined the "proposal 2" Huber estimator, s = 0, is the correct result. With the robustbase huberM() function, you (can) get > huberM(a, warn0scale =TRUE) $mu [1] 7.19 $s [1] 0 $it [1] 0 Warning message: In huberM(a, warn0scale = TRUE) : scale 's' is zero -- returning initial 'mu' >> plot(a) > I think this is because we allow initial SD to equal to zero instead of a > POSITIVE value. See Line 15 of the "hubers" function: > if (missing(s)) > s0 <- mad(y) > I propose setting "s0" to "mad(y)" or a small positive number, whichever is > larger. For example: > if (missing(s)) > s0 <- max(mad(y), tol) > where tol=1e-6. but 'tol' is completely arbitrary and, the way you propose it makes the resulting estimate no-longer-scale-equivariant. huberM() *has* an s argument for specifying the scale estimate, so you could use it as huberM(a, s = max(mad(a), 1e-6)) if you want. Note that your sample 'a' is constructed in a way that all scale-equivariant 50%-breakpoint robust estimates of scale will return s = 0, as more than half of your observations are identical, and scale equivariance "ensures" that in this limiting case, indeed all other observations are "outliers". This last point is a somewhat interesting topic for "robustniks", and hence I'm CC'ing the dedicated "R + Robustness" mailing list, R-SIG-robust. Martin Maechler, ETH Zurich > With this change, the result is more sensible: >> hubers(a) > $mu > [1] 5.88 > $s > [1] 2.937 > Could anyone take a look at this and decide if the above modifications to the > "hubers" function are warranted?Thanks a lot! > Sincerely, > Feiming Chen > Read more >> Options >> > [[alternative HTML version deleted]] > ______________________________________________ > R-help at 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, reproducible code. From asanramzan at yahoo.com Fri Feb 4 09:14:46 2011 From: asanramzan at yahoo.com (Asan Ramzan) Date: Fri, 4 Feb 2011 00:14:46 -0800 (PST) Subject: [R] least significant difference error bars Message-ID: <450371.25792.qm@web44708.mail.sp1.yahoo.com> An embedded and charset-unspecified text was scrubbed... Name: not available URL: From toby.marthews at ouce.ox.ac.uk Fri Feb 4 09:53:17 2011 From: toby.marthews at ouce.ox.ac.uk (Toby Marthews) Date: Fri, 4 Feb 2011 08:53:17 +0000 Subject: [R] how to learn more from R In-Reply-To: References: Message-ID: Hi Jie Tang, You could try my "Friendly Beginners' R Course". Online resource at: http://www.R-project.org/ ? Documentation/Other (left-hand panel) ? Contributed Documentation (middle of screen) ? (scroll down a little) which is a quick intro to what R can do in 14 pages with lots of links for further information. Toby Marthews ________________________________________ From: r-help-bounces at r-project.org [r-help-bounces at r-project.org] On Behalf Of Jie TANG [totangjie at gmail.com] Sent: 04 February 2011 06:42 To: r-help at r-project.org Subject: [R] how to learn more from R hi ,R USERS: I am a new R user. I have study some basic R syntax and get some interesting results. Now I want to know how much R can do .where can i get some examples or demo resource to study advanced function of R ? -- thank your TANG Jie Email: totangjie at gmail.com Shanghai Typhoon Institute,China [[alternative HTML version deleted]] ______________________________________________ R-help at 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, reproducible code. From jim at bitwrit.com.au Fri Feb 4 10:41:55 2011 From: jim at bitwrit.com.au (Jim Lemon) Date: Fri, 04 Feb 2011 20:41:55 +1100 Subject: [R] least significant difference error bars In-Reply-To: <450371.25792.qm@web44708.mail.sp1.yahoo.com> References: <450371.25792.qm@web44708.mail.sp1.yahoo.com> Message-ID: <4D4BC9E3.4070204@bitwrit.com.au> On 02/04/2011 07:14 PM, Asan Ramzan wrote: > Hello R > > Currently I am using the sciplot function to draw error bars on my bar charts, > but this uses standard error of a mean SEM, is there an alternative variant that > will allow me to draw error bars using least significant difference. > Hi Asan, The dispersion function (plotrix) will draw any sort of error bar you like. See FAQ 7.38 for more functions that will display error bars. Jim From karl at huftis.org Fri Feb 4 11:09:09 2011 From: karl at huftis.org (Karl Ove Hufthammer) Date: Fri, 4 Feb 2011 11:09:09 +0100 Subject: [R] how to learn more from R References: Message-ID: Jie TANG wrote: > Now I want to know how much R can do .where can i get some examples or > demo resource to study advanced function of R ? Not really what you were thinking of, I guess, but don?t overlook the ?demo? function. For example, try ?demo(graphics)?. Type ?demo()? for a list of demos, but note that more become available when you load new packages (try the ?rgl?, ?lattice? and ?animation? packages for some nice graphical demos). -- Karl Ove Hufthammer From ogbos.okike at gmail.com Fri Feb 4 11:14:07 2011 From: ogbos.okike at gmail.com (ogbos okike) Date: Fri, 4 Feb 2011 12:14:07 +0200 Subject: [R] Adding axes label to image Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From james.foadi at diamond.ac.uk Fri Feb 4 11:42:10 2011 From: james.foadi at diamond.ac.uk (james.foadi at diamond.ac.uk) Date: Fri, 4 Feb 2011 10:42:10 +0000 Subject: [R] cancel "hclust" at bottom of dendrogram plot Message-ID: <4854F2500EA8C4478A508D2D92973E520AE52F4A@EXCHANGE25.fed.cclrc.ac.uk> Dear R community, I can't find the way to eliminate the "hclust()" print at the bottom of the dendrogram plot (plclust). Can this be done? J Dr James Foadi PhD Membrane Protein Laboratory (MPL) Diamond Light Source Ltd Diamond House Harewell Science and Innovation Campus Chilton, Didcot Oxfordshire OX11 0DE Email : james.foadi at diamond.ac.uk Alt Email: j.foadi at imperial.ac.uk -- This e-mail and any attachments may contain confidential...{{dropped:8}} From frederic.patrizio at gmail.com Fri Feb 4 12:40:36 2011 From: frederic.patrizio at gmail.com (Patrizio Frederic) Date: Fri, 4 Feb 2011 12:40:36 +0100 Subject: [R] Finding non-normal distributions per row of data frame? In-Reply-To: <1296791547602-3259439.post@n4.nabble.com> References: <1296791547602-3259439.post@n4.nabble.com> Message-ID: Hi Danny, it sounds to much easer than that. Try y <- data.frame(matrix(rnorm(100),10)) nr <- ncol(y) test <- lapply(y, shapiro.test) sapply(test,function(x)c(x$statistic, x$p.value)) it should perform the required task. Cheers, P On Fri, Feb 4, 2011 at 4:52 AM, DB1984 wrote: > > This is my first attempt at this, so hopefully a few kind pointers can get me > going in the right direction... > > I have a large data frame of 20+ columns and 20,000 rows. I'd like to > evaluate the distribution of values in each row, to determine whether they > meet the criteria of a normal distribution. I'd loop this over all the rows > in the data frame, and output the summary results to a new data frame. > > I have a loop that should run a Shapiro-Wilk test over each row, > > y= data frame > > for (j in 1:nr) { > y.temp<-list(y[j,]) > testsw <- lapply(y.temp, shapiro.test) > testtable <- t(sapply(testsw, function(x) c(x$statistic, x$p.value))) > ?colnames(testtable) <- c("W", "p.value") > } > > > but it is currently throwing out an error: > ?"Error in `rownames<-`(`*tmp*`, value = "1") : > ?attempt to set rownames on object with no dimensions" > > ...which I guess is unrelated to the evaluation of normality, and more > likely a faulty loop? > > Any suggestions either for this test, or a better way to evaluate the normal > distribution (e.g. qq-plot residuals for each row) would be greatly > received. Thanks. > -- > View this message in context: http://r.789695.n4.nabble.com/Finding-non-normal-distributions-per-row-of-data-frame-tp3259439p3259439.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at 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, reproducible code. > From jim at bitwrit.com.au Fri Feb 4 12:47:02 2011 From: jim at bitwrit.com.au (Jim Lemon) Date: Fri, 04 Feb 2011 22:47:02 +1100 Subject: [R] Adding axes label to image In-Reply-To: References: Message-ID: <4D4BE736.8050003@bitwrit.com.au> On 02/04/2011 09:14 PM, ogbos okike wrote: > Dear all, > Using the code I got from the link ( > http://www.phaget4.org/R/image_matrix.html), I obtained a nice plot that > suits me. However, adding axes labels proved difficult for me . I have > succeeded in adding a few things to the plot function so as to get what a > better plot. Other things work but ylab="days" did not reflect. > It will be great if somebody can advice on how to add axes labels to the > plot. Hi Ogbos, Try this after the plot has been displayed: title(ylab="days",line=1) Jim From sarah.goslee at gmail.com Fri Feb 4 13:12:52 2011 From: sarah.goslee at gmail.com (Sarah Goslee) Date: Fri, 4 Feb 2011 07:12:52 -0500 Subject: [R] cancel "hclust" at bottom of dendrogram plot In-Reply-To: <4854F2500EA8C4478A508D2D92973E520AE52F4A@EXCHANGE25.fed.cclrc.ac.uk> References: <4854F2500EA8C4478A508D2D92973E520AE52F4A@EXCHANGE25.fed.cclrc.ac.uk> Message-ID: It isn't immediately obvious. but that's the subtitle. You can use plclust(myclusters, sub="Something else") to change it, including plclust(myclusters, sub="") to get rid of it. Sarah On Fri, Feb 4, 2011 at 5:42 AM, wrote: > Dear R community, > I can't find the way to eliminate the "hclust()" print at the bottom of the dendrogram plot (plclust). > Can this be done? > > J -- Sarah Goslee http://www.functionaldiversity.org From kmoore at tcd.ie Fri Feb 4 13:31:37 2011 From: kmoore at tcd.ie (Karen Moore) Date: Fri, 4 Feb 2011 12:31:37 +0000 Subject: [R] GAM quasipoisson in MuMIn Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From dialvac-r at yahoo.de Fri Feb 4 13:32:37 2011 From: dialvac-r at yahoo.de (D. Alain) Date: Fri, 4 Feb 2011 12:32:37 +0000 (GMT) Subject: [R] recode according to specific sequence of characters within a string variable Message-ID: <300989.18792.qm@web26004.mail.ukl.yahoo.com> An embedded and charset-unspecified text was scrubbed... Name: not available URL: From gavin.simpson at ucl.ac.uk Fri Feb 4 13:47:20 2011 From: gavin.simpson at ucl.ac.uk (Gavin Simpson) Date: Fri, 04 Feb 2011 12:47:20 +0000 Subject: [R] GAM quasipoisson in MuMIn In-Reply-To: References: Message-ID: <1296823640.2445.6.camel@desktop.localdomain> On Fri, 2011-02-04 at 12:31 +0000, Karen Moore wrote: > Hi, > > My formula is > > GAM<-gam(Species richness (count) ~ Categorical + Continous + Continous + * > s*(Continous ) + Continous : Continous + Continous : Continous, > family=quasipoisson, data =) Ok, I'm reasonably certain that that is *not* your gam() call. Why not post the *actual* code you would enter for your GAM model? dd <- dredge(GAM) should evaluate all possible models from the global model you specified. The example you quote is for a global model with both smooth and linear terms for the same variables, hence in dredge() they need to select models that include only the smooth for a particular variable or the linear term for that variable, but not both. By the looks of it, you don't have this problem. G > > Thanks for any advice on script > > > Karen > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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, reproducible code. -- %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% Dr. Gavin Simpson [t] +44 (0)20 7679 0522 ECRC, UCL Geography, [f] +44 (0)20 7679 0565 Pearson Building, [e] gavin.simpsonATNOSPAMucl.ac.uk Gower Street, London [w] http://www.ucl.ac.uk/~ucfagls/ UK. WC1E 6BT. [w] http://www.freshwaters.org.uk %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% From davidbickel.com+rhelp at gmail.com Fri Feb 4 13:55:58 2011 From: davidbickel.com+rhelp at gmail.com (David Bickel) Date: Fri, 4 Feb 2011 07:55:58 -0500 Subject: [R] shade between two curves Message-ID: Is there a function that can shade the region between two arbitrary curves? For example, how can I fill in the area between these two plotted curves? > x <- 1:10 > y <- x + rnorm(10) > z <- x + 10 + rnorm(10) > plot(x, y, type = "l", ylim = c(0,20)) > lines(x, z) I would appreciate any help. David From davidbickel.com+rhelp at gmail.com Fri Feb 4 13:58:04 2011 From: davidbickel.com+rhelp at gmail.com (David Bickel) Date: Fri, 4 Feb 2011 07:58:04 -0500 Subject: [R] shade between two curves Message-ID: Is there a function that can shade the region between two arbitrary curves? For example, how can I fill in the area between these two plotted curves? > x <- 1:10 > y <- x + rnorm(10) > z <- x + 10 + rnorm(10) > plot(x, y, type = "l", ylim = c(0,20)) > lines(x, z) I would appreciate any help. David From davidbickel.com+rhelp at gmail.com Fri Feb 4 14:03:33 2011 From: davidbickel.com+rhelp at gmail.com (David Bickel) Date: Fri, 4 Feb 2011 08:03:33 -0500 Subject: [R] shade between two curves Message-ID: Is there a function that can shade the region between two arbitrary curves? For example, how can I fill in the area between these two plotted lines? > x <- 1:10 > y <- x + rnorm(10) > z <- x + 10 + rnorm(10) > plot(x, y, type = "l", ylim = c(0,20)) > lines(x, z) I would appreciate any help. David From clayton.coffman at gmail.com Fri Feb 4 11:36:41 2011 From: clayton.coffman at gmail.com (Clayton Coffman) Date: Fri, 4 Feb 2011 04:36:41 -0600 Subject: [R] Rexcel for mac Message-ID: Is there anything out there which replicates the functionality of RExcel on a mac? I have Excel for mac, and would just like something which makes its easy to put sheets into R as a dataframe etc. From d.pender.1 at research.gla.ac.uk Fri Feb 4 13:35:00 2011 From: d.pender.1 at research.gla.ac.uk (dpender) Date: Fri, 4 Feb 2011 04:35:00 -0800 (PST) Subject: [R] uniroot Message-ID: <1296822900582-3260090.post@n4.nabble.com> Hi, I am using the uniroot function in order to carry out a bivariate Monte Carlo simulation using the logistics model. I have defined the function as: BV.FV <- function(x,y,a,A) (((x^(-a^-1)+y^(-a^-1))^(a-1))*(y^(a-1/a))*(exp(-((1^(-a^-1)+y^(-a^-1))^a)+y^-1)))-A and the procedure is as follows: Randomly generate values of A~(0,1), y0 = -(lnA)^-1 Where: A=Pr{X An embedded and charset-unspecified text was scrubbed... Name: not available URL: From jonathanbyrn at gmail.com Fri Feb 4 12:04:46 2011 From: jonathanbyrn at gmail.com (jonathan byrne) Date: Fri, 4 Feb 2011 11:04:46 +0000 Subject: [R] Multiple line-plots from one data file using factor Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From v_coudrain at voila.fr Fri Feb 4 12:21:54 2011 From: v_coudrain at voila.fr (swertie) Date: Fri, 4 Feb 2011 03:21:54 -0800 (PST) Subject: [R] customizing names in an ordination biplot Message-ID: <1296818514173-3260004.post@n4.nabble.com> Hello, I would like to change the names of the sites in an ordination biplot (resulting from the function "rda" in vegan). Can somebody give me some trick? Thank you very much -- View this message in context: http://r.789695.n4.nabble.com/customizing-names-in-an-ordination-biplot-tp3260004p3260004.html Sent from the R help mailing list archive at Nabble.com. From marc_schwartz at me.com Fri Feb 4 14:09:46 2011 From: marc_schwartz at me.com (Marc Schwartz) Date: Fri, 04 Feb 2011 07:09:46 -0600 Subject: [R] recode according to specific sequence of characters within a string variable In-Reply-To: <300989.18792.qm@web26004.mail.ukl.yahoo.com> References: <300989.18792.qm@web26004.mail.ukl.yahoo.com> Message-ID: <9145D453-0181-4529-9D97-24B39DEF9397@me.com> On Feb 4, 2011, at 6:32 AM, D. Alain wrote: > Dear R-List, > > I have a dataframe with one column "name.of.report" containing character values, e.g. > > >> df$name.of.report > > "jeff_2001_teamx" > "teamy_jeff_2002" > "robert_2002_teamz" > "mary_2002_teamz" > "2003_mary_teamy" > ... > (i.e. the bit of interest is not always at same position) > > Now I want to recode the column "name.of.report" into the variables "person", "year","team", like this > >> new.df > > "person" "year" "team" > jeff 2001 x > jeff 2002 y > robert 2002 z > mary 2002 z > > I tried with grep() > > df$person<-grep("jeff",df$name.of.report) > > but of course it didn't exactly result in what I wanted to do. Could not find any solution via RSeek. Excuse me if it is a very silly question, but can anyone help me find a way out of this? > > Thanks a lot > > Alain There will be several approaches, all largely involving the use of ?regex. Here is one: DF <- data.frame(name.of.report = c("jeff_2001_teamx", "teamy_jeff_2002", "robert_2002_teamz", "mary_2002_teamz", "2003_mary_teamy")) > DF name.of.report 1 jeff_2001_teamx 2 teamy_jeff_2002 3 robert_2002_teamz 4 mary_2002_teamz 5 2003_mary_teamy DF.new <- data.frame(person = gsub("[_0-9]|team.", "", DF$name.of.report), year = gsub(".*([0-9]{4}).*","\\1", DF$name.of.report), team = gsub(".*team(.).*","\\1", DF$name.of.report)) > DF.new person year team 1 jeff 2001 x 2 jeff 2002 y 3 robert 2002 z 4 mary 2002 z 5 mary 2003 y HTH, Marc Schwartz From sarah.goslee at gmail.com Fri Feb 4 14:10:07 2011 From: sarah.goslee at gmail.com (Sarah Goslee) Date: Fri, 4 Feb 2011 08:10:07 -0500 Subject: [R] shade between two curves In-Reply-To: References: Message-ID: polygon() will do it. That's a frequently-discussed topic on this list, so there are plenty of examples in the archives, and also some on the R Graph Gallery. Sarah On Fri, Feb 4, 2011 at 8:03 AM, David Bickel wrote: > Is there a function that can shade the region between two arbitrary > curves? For example, how can I fill in the area between these two > plotted lines? > >> x <- 1:10 >> y <- x + rnorm(10) >> z <- x + 10 + rnorm(10) >> plot(x, y, type = "l", ylim = c(0,20)) >> lines(x, z) > > I would appreciate any help. > > David > > _____________ -- Sarah Goslee http://www.functionaldiversity.org From edd at debian.org Fri Feb 4 14:15:22 2011 From: edd at debian.org (Dirk Eddelbuettel) Date: Fri, 4 Feb 2011 07:15:22 -0600 Subject: [R] shade between two curves In-Reply-To: References: Message-ID: <19787.64490.536290.603764@max.nulle.part> On 4 February 2011 at 07:55, David Bickel wrote: | Is there a function that can shade the region between two arbitrary | curves? For example, how can I fill in the area between these two | plotted curves? | | > x <- 1:10 | > y <- x + rnorm(10) | > z <- x + 10 + rnorm(10) | > plot(x, y, type = "l", ylim = c(0,20)) | > lines(x, z) Yes, this can be done using polygon(). For a worked example please see http://dirk.eddelbuettel.com/blog/2011/01/16#overbought_oversold_plot which contains a complete example (for shading plus/minus one and day rolling standard deviations around a rolling mean for financial times series): | I would appreciate any help. Hope this helps. No need to post three times, by the way. Dirk -- Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com From baptiste.auguie at googlemail.com Fri Feb 4 14:17:26 2011 From: baptiste.auguie at googlemail.com (baptiste auguie) Date: Fri, 4 Feb 2011 14:17:26 +0100 Subject: [R] Multiple line-plots from one data file using factor In-Reply-To: References: Message-ID: Hi, It's a piece of cake with ggplot, d <- read.table(textConnection("id x y 1 10 500 1 15 300 1 23 215 1 34 200 2 5 400 2 13 340 2 15 210 3 10 200 3 12 150 3 16 30"), head=TRUE) str(d) library(ggplot2) p <- ggplot(d) + geom_path(aes(x,y, group=id)) p ## grouping withouth legend ## colour based on id p + aes(colour=factor(id)) ## linetype based on id p + aes(linetype=factor(id)) HTH, baptiste On 4 February 2011 12:04, jonathan byrne wrote: > Hi, > I'm processing a data file with the following structure: > #index ?time distance > 1 ?10 ?500 > 1 ?15 ?300 > 1 ?23 ?215 > 1 ?34 ?200 > 2 ?5 ? ?400 > 2 ?13 ?340 > 2 ?15 ?210 > 3 ?10 ?200 > 3 ?12 ?150 > 3 ?16 ?30 > etc > > My intention was to generate line plots for the datapoints using their index > to group the elements. I managed to get something to work using a for loop > and some conditionals but I was wondering if there is a better way using > factor or some other R method? Any help improving my R coding would be > greatly appreciated! > Thanks > Jonathan > > ? ? ? ?[[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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, reproducible code. > From gavin.simpson at ucl.ac.uk Fri Feb 4 14:18:50 2011 From: gavin.simpson at ucl.ac.uk (Gavin Simpson) Date: Fri, 04 Feb 2011 13:18:50 +0000 Subject: [R] Please stop all e-mail In-Reply-To: <894560.65285.qm@web76311.mail.sg1.yahoo.com> References: <894560.65285.qm@web76311.mail.sg1.yahoo.com> Message-ID: <1296825530.2445.17.camel@desktop.localdomain> On Fri, 2011-02-04 at 13:06 +0800, cahyo kristiono wrote: > Dear "r-help" > > I don't want to receive againevery e-mail about [R] in my address e-mail > (cahyo_kristiono at yahoo.com), because it is cause my inbox so full quickly. So I > need your help to stop every e-mail about [R] in my address. Remove yourself or change your subscription options using the web interface: https://stat.ethz.ch/mailman/listinfo/r-help G > Thank you so much > > Regards > CK > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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, reproducible code. -- %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% Dr. Gavin Simpson [t] +44 (0)20 7679 0522 ECRC, UCL Geography, [f] +44 (0)20 7679 0565 Pearson Building, [e] gavin.simpsonATNOSPAMucl.ac.uk Gower Street, London [w] http://www.ucl.ac.uk/~ucfagls/ UK. WC1E 6BT. [w] http://www.freshwaters.org.uk %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% From jsorkin at grecc.umaryland.edu Fri Feb 4 14:23:39 2011 From: jsorkin at grecc.umaryland.edu (John Sorkin) Date: Fri, 04 Feb 2011 08:23:39 -0500 Subject: [R] multivariate regression In-Reply-To: <4D4BB78B020000CB0007FA16@medicine.umaryland.edu> References: <4D4BB78A020000CB0007FA13@medicine.umaryland.edu> <4D4BB78B020000CB0007FA16@medicine.umaryland.edu> Message-ID: <4D4BB78B020000CB0007FA16@medicine.umaryland.edu> Please help us help you. Follow the posting rules and send us a copy of your code and output. John John Sorkin Chief Biostatistics and Informatics Univ. of Maryland School of Medicine Division of Gerontology and Geriatric Medicine JSorkin at grecc.umaryland.edu -----Original Message----- From: Deniz SIGIRLI To: Sent: 2/4/2011 7:54:56 AM Subject: [R] multivariate regression How can I run multivariate linear regression in R (I have got 3 dependent variables and only 1 independent variable)? I tried lm function, but it gave different R2 and p values for every dependent variable. I need one R2 and p value for the model. [[alternative HTML version deleted]] ______________________________________________ R-help at 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, reproducible code. Confidentiality Statement: This email message, including any attachments, is for th...{{dropped:6}} From marc_schwartz at me.com Fri Feb 4 14:24:57 2011 From: marc_schwartz at me.com (Marc Schwartz) Date: Fri, 04 Feb 2011 07:24:57 -0600 Subject: [R] Rexcel for mac In-Reply-To: References: Message-ID: <9D266920-BF96-4267-8640-B4629545663C@me.com> On Feb 4, 2011, at 4:36 AM, Clayton Coffman wrote: > Is there anything out there which replicates the functionality of > RExcel on a mac? I have Excel for mac, and would just like something > which makes its easy to put sheets into R as a dataframe etc. On OSX, I believe that the two primary options will be: 1. The read.xls() function in the gdata package from CRAN. This requires Perl, which is installed by default on OSX. 2. Using RODBC from CRAN along with an ODBC driver from Actual Tech (http://www.actualtech.com/product_access.php). I believe that both will handle at least up through Office 2008 based files. I am not sure about Office 2011 however, if you have the latest version of Office for OSX. Also, as an FYI, there are two relevant R SIG lists: https://stat.ethz.ch/mailman/listinfo/r-sig-mac and https://stat.ethz.ch/mailman/listinfo/r-sig-db HTH, Marc Schwartz From kmoore at tcd.ie Fri Feb 4 14:32:38 2011 From: kmoore at tcd.ie (Karen Moore) Date: Fri, 4 Feb 2011 13:32:38 +0000 Subject: [R] GAM quasipoisson in MuMIn In-Reply-To: <1296823640.2445.6.camel@desktop.localdomain> References: <1296823640.2445.6.camel@desktop.localdomain> Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From ggrothendieck at gmail.com Fri Feb 4 14:29:59 2011 From: ggrothendieck at gmail.com (Gabor Grothendieck) Date: Fri, 4 Feb 2011 08:29:59 -0500 Subject: [R] Rexcel for mac In-Reply-To: References: Message-ID: On Fri, Feb 4, 2011 at 5:36 AM, Clayton Coffman wrote: > Is there anything out there which replicates the functionality of > RExcel on a mac? ?I have Excel for mac, and would just like something > which makes its easy to put sheets into R as a dataframe etc. > See: http://rwiki.sciviews.org/doku.php?id=tips:data-io:ms_windows -- Statistics & Software Consulting GKX Group, GKX Associates Inc. tel: 1-877-GKX-GROUP email: ggrothendieck at gmail.com From marc_schwartz at me.com Fri Feb 4 14:42:54 2011 From: marc_schwartz at me.com (Marc Schwartz) Date: Fri, 04 Feb 2011 07:42:54 -0600 Subject: [R] recode according to specific sequence of characters within a string variable In-Reply-To: <1296825977.2876.6.camel@denian> References: <300989.18792.qm@web26004.mail.ukl.yahoo.com> <9145D453-0181-4529-9D97-24B39DEF9397@me.com> <1296825977.2876.6.camel@denian> Message-ID: <36CB59FC-CD07-4D15-B7BE-7C8A6C34564C@me.com> Do you mean something like: > with(DF.new, paste(person, year, paste("team", team, sep = ""), sep = "_")) [1] "jeff_2001_teamx" "jeff_2002_teamy" "robert_2002_teamz" [4] "mary_2002_teamz" "mary_2003_teamy" ? See ?paste and ?with for more information, if so. HTH, Marc On Feb 4, 2011, at 7:26 AM, Denis Kazakiewicz wrote: > Dear R people > Could you please help > I have similar but opposite question > How to reshape data from DF.new to DF from example, Mark kindly > provided? > > Thank you > Denis > > On ???, 2011-02-04 at 07:09 -0600, Marc Schwartz wrote: >> On Feb 4, 2011, at 6:32 AM, D. Alain wrote: >> >>> Dear R-List, >>> >>> I have a dataframe with one column "name.of.report" containing character values, e.g. >>> >>> >>>> df$name.of.report >>> >>> "jeff_2001_teamx" >>> "teamy_jeff_2002" >>> "robert_2002_teamz" >>> "mary_2002_teamz" >>> "2003_mary_teamy" >>> ... >>> (i.e. the bit of interest is not always at same position) >>> >>> Now I want to recode the column "name.of.report" into the variables "person", "year","team", like this >>> >>>> new.df >>> >>> "person" "year" "team" >>> jeff 2001 x >>> jeff 2002 y >>> robert 2002 z >>> mary 2002 z >>> >>> I tried with grep() >>> >>> df$person<-grep("jeff",df$name.of.report) >>> >>> but of course it didn't exactly result in what I wanted to do. Could not find any solution via RSeek. Excuse me if it is a very silly question, but can anyone help me find a way out of this? >>> >>> Thanks a lot >>> >>> Alain >> >> >> There will be several approaches, all largely involving the use of ?regex. Here is one: >> >> >> DF <- data.frame(name.of.report = c("jeff_2001_teamx", "teamy_jeff_2002", >> "robert_2002_teamz", "mary_2002_teamz", >> "2003_mary_teamy")) >> >>> DF >> name.of.report >> 1 jeff_2001_teamx >> 2 teamy_jeff_2002 >> 3 robert_2002_teamz >> 4 mary_2002_teamz >> 5 2003_mary_teamy >> >> >> DF.new <- data.frame(person = gsub("[_0-9]|team.", "", DF$name.of.report), >> year = gsub(".*([0-9]{4}).*","\\1", DF$name.of.report), >> team = gsub(".*team(.).*","\\1", DF$name.of.report)) >> >> >>> DF.new >> person year team >> 1 jeff 2001 x >> 2 jeff 2002 y >> 3 robert 2002 z >> 4 mary 2002 z >> 5 mary 2003 y >> >> >> >> HTH, >> >> Marc Schwartz From therneau at mayo.edu Fri Feb 4 14:53:56 2011 From: therneau at mayo.edu (Terry Therneau) Date: Fri, 04 Feb 2011 07:53:56 -0600 Subject: [R] coxph fails to survfit Message-ID: <1296827636.12776.6.camel@punchbuggy> > I have a model with quant vars only and the error message does not make sense: Could you tell us what version of S and of the survival package you are using? You can get this with sessionInfo(), see the posting guide for details. This would help me identify the issue. I was planning to post an update to CRAN this weekend that has changes to survfit.coxph, addressing a different issue than yours -- models with a strata by covariate interaction --- but this would be a very good time to address your issue too if it is a code bug. Terry Therneau (author of survival). From murdoch.duncan at gmail.com Fri Feb 4 15:02:49 2011 From: murdoch.duncan at gmail.com (Duncan Murdoch) Date: Fri, 4 Feb 2011 09:02:49 -0500 Subject: [R] get caller's name In-Reply-To: <20110203152733.GA26859@doriath.local> References: <20110203152733.GA26859@doriath.local> Message-ID: <4D4C0709.4040107@gmail.com> On 03/02/2011 10:27 AM, Ernest Adrogu? wrote: > Hi, > Suppose a function that checks an object: > > stop.if.dims<- function(x) { > if (! is.null(dim(x))) { > stop("cannot handle dimensional data") > } > } > > This would be used by other functions that can only work with > dimensionless objects. The problem is the error message would need to > include the name of the function that called stop.if.dims, so that the > user knows which function got an argument that was incorrect. > > How do I do this? Or maybe there is another way... I see you have the answer you wanted, but I'd suggest you don't need this: the user should just use traceback() after the error to see the full call stack. Perhaps it's not the caller that's the problem, but the caller of the caller... Duncan Murdoch From olga at herenstraat.nl Fri Feb 4 15:03:48 2011 From: olga at herenstraat.nl (Olga Lyashevska) Date: Fri, 4 Feb 2011 14:03:48 +0000 Subject: [R] vegan and sweave using xtable Message-ID: <06B18C93-E21F-4408-BF5A-1C2854ECBFAE@herenstraat.nl> Dear all, Using: library(vegan) data(BCI) mod <- radfit(BCI[1,]) mod RAD models, family poisson No. of species 93, total abundance 448 par1 par2 par3 Deviance AIC BIC Null 39.5261 315.4362 315.4362 Preemption 0.042797 21.8939 299.8041 302.3367 Lognormal 1.0687 1.0186 25.1528 305.0629 310.1281 Zipf 0.11033 -0.74705 61.0465 340.9567 346.0219 Mandelbrot 100.52 -2.312 24.084 4.2271 286.1372 293.7350 I want to include the table shown above into the latex document (using xtable). library(xtable) xtable(mod) Error in UseMethod("xtable") : no applicable method for 'xtable' applied to an object of class "radfit" Also is there is a way to customize the table - I want to exclude first two rows of the output and make a table of: par1 par2 par3 Deviance AIC BIC Null 39.5261 315.4362 315.4362 Preemption 0.042797 21.8939 299.8041 302.3367 Lognormal 1.0687 1.0186 25.1528 305.0629 310.1281 Zipf 0.11033 -0.74705 61.0465 340.9567 346.0219 Mandelbrot 100.52 -2.312 24.084 4.2271 286.1372 293.7350 Many thanks, Olga From d.kazakiewicz at gmail.com Fri Feb 4 14:26:17 2011 From: d.kazakiewicz at gmail.com (Denis Kazakiewicz) Date: Fri, 04 Feb 2011 15:26:17 +0200 Subject: [R] recode according to specific sequence of characters within a string variable In-Reply-To: <9145D453-0181-4529-9D97-24B39DEF9397@me.com> References: <300989.18792.qm@web26004.mail.ukl.yahoo.com> <9145D453-0181-4529-9D97-24B39DEF9397@me.com> Message-ID: <1296825977.2876.6.camel@denian> Dear R people Could you please help I have similar but opposite question How to reshape data from DF.new to DF from example, Mark kindly provided? Thank you Denis On ???, 2011-02-04 at 07:09 -0600, Marc Schwartz wrote: > On Feb 4, 2011, at 6:32 AM, D. Alain wrote: > > > Dear R-List, > > > > I have a dataframe with one column "name.of.report" containing character values, e.g. > > > > > >> df$name.of.report > > > > "jeff_2001_teamx" > > "teamy_jeff_2002" > > "robert_2002_teamz" > > "mary_2002_teamz" > > "2003_mary_teamy" > > ... > > (i.e. the bit of interest is not always at same position) > > > > Now I want to recode the column "name.of.report" into the variables "person", "year","team", like this > > > >> new.df > > > > "person" "year" "team" > > jeff 2001 x > > jeff 2002 y > > robert 2002 z > > mary 2002 z > > > > I tried with grep() > > > > df$person<-grep("jeff",df$name.of.report) > > > > but of course it didn't exactly result in what I wanted to do. Could not find any solution via RSeek. Excuse me if it is a very silly question, but can anyone help me find a way out of this? > > > > Thanks a lot > > > > Alain > > > There will be several approaches, all largely involving the use of ?regex. Here is one: > > > DF <- data.frame(name.of.report = c("jeff_2001_teamx", "teamy_jeff_2002", > "robert_2002_teamz", "mary_2002_teamz", > "2003_mary_teamy")) > > > DF > name.of.report > 1 jeff_2001_teamx > 2 teamy_jeff_2002 > 3 robert_2002_teamz > 4 mary_2002_teamz > 5 2003_mary_teamy > > > DF.new <- data.frame(person = gsub("[_0-9]|team.", "", DF$name.of.report), > year = gsub(".*([0-9]{4}).*","\\1", DF$name.of.report), > team = gsub(".*team(.).*","\\1", DF$name.of.report)) > > > > DF.new > person year team > 1 jeff 2001 x > 2 jeff 2002 y > 3 robert 2002 z > 4 mary 2002 z > 5 mary 2003 y > > > > HTH, > > Marc Schwartz > > ______________________________________________ > R-help at 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, reproducible code. From r.m.krug at gmail.com Fri Feb 4 15:13:25 2011 From: r.m.krug at gmail.com (Rainer M Krug) Date: Fri, 04 Feb 2011 15:13:25 +0100 Subject: [R] sensitivity analysis with external simulation model - decoupling in package "sensitivity" or alternative? Message-ID: <4D4C0985.7040505@gmail.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi I hava a simulation model, of which I want to do a sensitivity analysis. I have identified a number of input variables and my response variable. What I hava done so far: 1) I created a Latin Hypercube with the lhs package (10.000 simulations) 2) simulated these and now I have a data frame with the input parameter and the response variable. I looked around and found the package "sensitivity" which seems to be the most suitable for my case. As the model is not in R, I have to use the decoupling approach. But now I am stuck: How can I do this? An example highlighting how to do the decoupling to do a sensitivity analysis, would be very much appreciated. Alternatively, ids there a different approach I could take? Thanks, Rainer - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel: +33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: Rainer at krugs.de Skype: RMkrug -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk1MCYQACgkQoYgNqgF2egof/gCfR3GuJChsPf34N4wFpFSzAdx2 zc4AmwUkIM83rffU+6dV8ZwNTfd23pcg =tv8r -----END PGP SIGNATURE----- From ogbos.okike at gmail.com Fri Feb 4 15:13:57 2011 From: ogbos.okike at gmail.com (ogbos okike) Date: Fri, 4 Feb 2011 16:13:57 +0200 Subject: [R] Adding axes label to image:Fixed Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From jctoll at gmail.com Fri Feb 4 15:37:14 2011 From: jctoll at gmail.com (jctoll) Date: Fri, 4 Feb 2011 08:37:14 -0600 Subject: [R] Applying multiple functions to one object In-Reply-To: References: Message-ID: On Wed, Feb 2, 2011 at 7:59 AM, Karl Ove Hufthammer wrote: > Dear list members, > > I recall seeing a convenience function for applying multiple functions to > one object (i.e., almost the opposite of 'mapply?) somewhere. > Example: If the function was named ?fun? the output of > > ?fun(3.14, mode, typeof, class) > > would be identical to the output of > > ?c(mode(3.14), typeof(3.14), class(3.14)) > > Is my memory failing me, or does such a function already exists in a > package? Of course, it?s not difficult to define a summary function and > apply this to the object, but writing, for example, > > fun(x, mean, median, sd, mad) > > to quickly show the relevant information is much more *convient*. > > > It would be even nicer with a function that could also handle vectors and > lists of values, and output the result as data frames or matrices. Example: > > x = c("foo", "bar", "foobar") > fun(x, nchar, function(st) substr(st, 1 ,2) ) > > y = list(3, 3L, 3.14, factor(3)) > fun(x, mode, typeof, class) > > -- > Karl Ove Hufthammer > > ______________________________________________ > R-help at 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, reproducible code. > Karl, Perhaps you're thinking of the Reduce function? There's an example from the help page that you might be able to adapt to your purpose. ## Iterative function application: Funcall <- function(f, ...) f(...) ## Compute log(exp(acos(cos(0)) Reduce(Funcall, list(log, exp, acos, cos), 0, right = TRUE) HTH, James From ross.dunne at tcd.ie Fri Feb 4 15:47:22 2011 From: ross.dunne at tcd.ie (dunner) Date: Fri, 4 Feb 2011 06:47:22 -0800 (PST) Subject: [R] Importing dates from SPSS file Message-ID: <1296830842361-3260293.post@n4.nabble.com> Hello all, kind regards, I have imported a data.frame from SPSS using "foreign":read.spss but unfortunately it is reading dates in a way neither R nor myself can understand. > book$DATE [1] 13502246400 13443321600 13477795200 13472956800 13501728000 13445395200 13501382400 13502851200 13444185600 13461465600 13457232000 [12] 13458096000 13432435200 13431484800 13495334400 13491964800 13451184000 13490755200 13505616000 13505616000 13502851200 13436928000 [23] 13497408000 13465094400 13484707200 13447555200 13438483200 13464489600 13494816000 13432435200 13455676800 13463884800 13455417600 [34] 13478400000 13504665600 13490150400 13504060800 13471401600 13492915200 13465958400 13445136000 I have looked around the documentation but can find nothing similar there or in Spector's chapter on Dates How do I coerce these to %d%m%Y form? Thank you for your time and patience Ross Dunne ross.dunne at tcd.ie -- View this message in context: http://r.789695.n4.nabble.com/Importing-dates-from-SPSS-file-tp3260293p3260293.html Sent from the R help mailing list archive at Nabble.com. From jholtman at gmail.com Fri Feb 4 15:53:45 2011 From: jholtman at gmail.com (jim holtman) Date: Fri, 4 Feb 2011 09:53:45 -0500 Subject: [R] Importing dates from SPSS file In-Reply-To: <1296830842361-3260293.post@n4.nabble.com> References: <1296830842361-3260293.post@n4.nabble.com> Message-ID: What do the dates look like in the original file? On Fri, Feb 4, 2011 at 9:47 AM, dunner wrote: > > Hello all, kind regards, > > I have imported a data.frame from SPSS using "foreign":read.spss but > unfortunately it is reading dates in a way neither R nor myself can > understand. > >> book$DATE > ?[1] 13502246400 13443321600 13477795200 13472956800 13501728000 13445395200 > 13501382400 13502851200 13444185600 13461465600 13457232000 > [12] 13458096000 13432435200 13431484800 13495334400 13491964800 13451184000 > 13490755200 13505616000 13505616000 13502851200 13436928000 > [23] 13497408000 13465094400 13484707200 13447555200 13438483200 13464489600 > 13494816000 13432435200 13455676800 13463884800 13455417600 > [34] 13478400000 13504665600 13490150400 13504060800 13471401600 13492915200 > 13465958400 13445136000 > > I have looked around the documentation but can find nothing similar there or > in Spector's chapter on Dates > > How do I coerce these to %d%m%Y form? > > Thank you for your time and patience > > Ross Dunne > ross.dunne at tcd.ie > > > -- > View this message in context: http://r.789695.n4.nabble.com/Importing-dates-from-SPSS-file-tp3260293p3260293.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at 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, reproducible code. > -- Jim Holtman Data Munger Guru What is the problem that you are trying to solve? From Stephen.Bond at cibc.com Fri Feb 4 15:54:27 2011 From: Stephen.Bond at cibc.com (Bond, Stephen) Date: Fri, 4 Feb 2011 09:54:27 -0500 Subject: [R] coxph fails to survfit In-Reply-To: <1296827636.12776.6.camel@punchbuggy> References: <1296827636.12776.6.camel@punchbuggy> Message-ID: Responding to T. Therneau: > sessionInfo() R version 2.10.1 (2009-12-14) i386-pc-mingw32 locale: [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252 [4] LC_NUMERIC=C LC_TIME=English_United States.1252 attached base packages: [1] splines stats graphics grDevices utils datasets methods base other attached packages: [1] survival_2.35-8 Also: > s1 <- predict(mod1,newdata=inc[50050:50100,], + type="expected") Error in predict.coxph(mod1, newdata = inc[50050:50100, ], type = "expected") : Method not yet finished Stephen -----Original Message----- From: Terry Therneau [mailto:therneau at mayo.edu] Sent: Friday, February 04, 2011 8:54 AM To: Bond, Stephen Cc: r-help at r-project.org Subject: Re: coxph fails to survfit > I have a model with quant vars only and the error message does not make sense: Could you tell us what version of S and of the survival package you are using? You can get this with sessionInfo(), see the posting guide for details. This would help me identify the issue. I was planning to post an update to CRAN this weekend that has changes to survfit.coxph, addressing a different issue than yours -- models with a strata by covariate interaction --- but this would be a very good time to address your issue too if it is a code bug. Terry Therneau (author of survival). From ggrothendieck at gmail.com Fri Feb 4 15:56:53 2011 From: ggrothendieck at gmail.com (Gabor Grothendieck) Date: Fri, 4 Feb 2011 09:56:53 -0500 Subject: [R] Importing dates from SPSS file In-Reply-To: <1296830842361-3260293.post@n4.nabble.com> References: <1296830842361-3260293.post@n4.nabble.com> Message-ID: On Fri, Feb 4, 2011 at 9:47 AM, dunner wrote: > > Hello all, kind regards, > > I have imported a data.frame from SPSS using "foreign":read.spss but > unfortunately it is reading dates in a way neither R nor myself can > understand. > >> book$DATE > ?[1] 13502246400 13443321600 13477795200 13472956800 13501728000 13445395200 > 13501382400 13502851200 13444185600 13461465600 13457232000 > [12] 13458096000 13432435200 13431484800 13495334400 13491964800 13451184000 > 13490755200 13505616000 13505616000 13502851200 13436928000 > [23] 13497408000 13465094400 13484707200 13447555200 13438483200 13464489600 > 13494816000 13432435200 13455676800 13463884800 13455417600 > [34] 13478400000 13504665600 13490150400 13504060800 13471401600 13492915200 > 13465958400 13445136000 > > I have looked around the documentation but can find nothing similar there or > in Spector's chapter on Dates > > How do I coerce these to %d%m%Y form? > > Thank you for your time and patience SPSS uses seconds since the beginning of the Gregorian calendar. See the help desk article in R News 4/1 for details: http://cran.r-project.org/doc/Rnews/Rnews_2004-1.pdf -- Statistics & Software Consulting GKX Group, GKX Associates Inc. tel: 1-877-GKX-GROUP email: ggrothendieck at gmail.com From ross.dunne at tcd.ie Fri Feb 4 16:08:35 2011 From: ross.dunne at tcd.ie (dunner) Date: Fri, 4 Feb 2011 07:08:35 -0800 (PST) Subject: [R] Importing dates from SPSS file In-Reply-To: <1296830842361-3260293.post@n4.nabble.com> References: <1296830842361-3260293.post@n4.nabble.com> Message-ID: <1296832115035-3260329.post@n4.nabble.com> as.POSIXlt(book$DATE, origin="1582/10/14") works. The Gregorian calendar was the kicker, thanks to ggrothendieck at gmail.com Ross -- View this message in context: http://r.789695.n4.nabble.com/Importing-dates-from-SPSS-file-tp3260293p3260329.html Sent from the R help mailing list archive at Nabble.com. From izahn at psych.rochester.edu Fri Feb 4 16:10:37 2011 From: izahn at psych.rochester.edu (Ista Zahn) Date: Fri, 4 Feb 2011 10:10:37 -0500 Subject: [R] vegan and sweave using xtable In-Reply-To: <06B18C93-E21F-4408-BF5A-1C2854ECBFAE@herenstraat.nl> References: <06B18C93-E21F-4408-BF5A-1C2854ECBFAE@herenstraat.nl> Message-ID: Hi Olga, Here is how I would approach this problem. I hope it is instructive. library(vegan) data(BCI) mod <- radfit(BCI[1,]) class(mod) #find out what mod is methods(class="radfit") #find out what methods are available for objects of this class. Nothing looks promising, so define a summary method for it, based on the print method print.radfit #look to see how the print method is defined. Copy this function and modify it, as shown below. summary.radfit <- function (x, digits = max(3, getOption("digits") - 2), ...) { # modify the funciton to eliminate the header info # cat("\nRAD models, family", x$family$family, "\n") # cat("No. of species ", length(x$y), ", total abundance ", # sum(x$y), "\n\n", sep = "") p <- coef(x) if (any(!is.na(p))) p <- formatC(p, format = "g", flag = " ", digits = digits) p <- apply(p, 2, function(x) gsub("NA", " ", x)) aic <- sapply(x$models, AIC) bic <- sapply(x$models, AIC, k = log(length(x$y))) dev <- sapply(x$models, deviance) stats <- format(cbind(Deviance = dev, AIC = aic, BIC = bic), digits = digits, ...) out <- cbind(p, stats) #modify the funciton so it doesn't print the result #print(out, quote = FALSE) return(out) #modify the function to return the summary matrix. } library(xtable) xtable(summary(mod))# enjoy the fruits of our labor! On Fri, Feb 4, 2011 at 9:03 AM, Olga Lyashevska wrote: > Dear all, > > Using: > > library(vegan) > data(BCI) > mod <- radfit(BCI[1,]) > mod > > RAD models, family poisson > No. of species 93, total abundance 448 > > ? ? ? ? ? par1 ? ? ?par2 ? ? par3 ? ?Deviance AIC ? ? ?BIC > Null ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 39.5261 315.4362 315.4362 > Preemption ?0.042797 ? ? ? ? ? ? ? ? ? 21.8939 299.8041 302.3367 > Lognormal ? 1.0687 ? ?1.0186 ? ? ? ? ? 25.1528 305.0629 310.1281 > Zipf ? ? ? ?0.11033 ?-0.74705 ? ? ? ? ?61.0465 340.9567 346.0219 > Mandelbrot ?100.52 ? -2.312 ? ?24.084 ? 4.2271 286.1372 293.7350 > > > I want to include the table shown above into the latex document ?(using > xtable). > > library(xtable) > xtable(mod) > Error in UseMethod("xtable") : > ?no applicable method for 'xtable' applied to an object of class "radfit" > > Also is there is a way to customize the table - I want to exclude first two > rows ?of the output and make a table of: > > ? ? ? ? ? par1 ? ? ?par2 ? ? par3 ? ?Deviance AIC ? ? ?BIC > Null ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 39.5261 315.4362 315.4362 > Preemption ?0.042797 ? ? ? ? ? ? ? ? ? 21.8939 299.8041 302.3367 > Lognormal ? 1.0687 ? ?1.0186 ? ? ? ? ? 25.1528 305.0629 310.1281 > Zipf ? ? ? ?0.11033 ?-0.74705 ? ? ? ? ?61.0465 340.9567 346.0219 > Mandelbrot ?100.52 ? -2.312 ? ?24.084 ? 4.2271 286.1372 293.7350 > > > Many thanks, > Olga > > ______________________________________________ > R-help at 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, reproducible code. > -- Ista Zahn Graduate student University of Rochester Department of Clinical and Social Psychology http://yourpsyche.org From olga at herenstraat.nl Fri Feb 4 16:22:47 2011 From: olga at herenstraat.nl (Olga Lyashevska) Date: Fri, 4 Feb 2011 15:22:47 +0000 Subject: [R] vegan and sweave using xtable In-Reply-To: References: <06B18C93-E21F-4408-BF5A-1C2854ECBFAE@herenstraat.nl> Message-ID: <59135DFB-F851-4F05-8C8C-253A1A705CF1@herenstraat.nl> Thanks Ista, Very instructive and works like a charm! Cheers! Olga From kmoore at tcd.ie Fri Feb 4 16:25:53 2011 From: kmoore at tcd.ie (Karen Moore) Date: Fri, 4 Feb 2011 15:25:53 +0000 Subject: [R] GAM quasipoisson in MuMIn - SOLVED Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From fahim.md at gmail.com Fri Feb 4 16:27:05 2011 From: fahim.md at gmail.com (Fahim M) Date: Fri, 4 Feb 2011 10:27:05 -0500 Subject: [R] Layout control from RCytoscape In-Reply-To: <3dbd3f75-8e93-4003-8d33-94966bcf0b0d@z20g2000yqe.googlegroups.com> References: <3dbd3f75-8e93-4003-8d33-94966bcf0b0d@z20g2000yqe.googlegroups.com> Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From gpetris at uark.edu Fri Feb 4 16:27:42 2011 From: gpetris at uark.edu (Giovanni Petris) Date: Fri, 04 Feb 2011 09:27:42 -0600 Subject: [R] Estimation and Forecast of Seasonal Component In-Reply-To: References: Message-ID: <1296833262.1675.1346.camel@definetti> I would probably use a Dynamic Linear Model, combining seasonal component and regression. See package dlm and its vignette for examples. HTH, Giovanni On Tue, 2011-02-01 at 11:01 +0000, Paolo Rossi wrote: > Hi list, > > > I would like to estimate and forecast the seasonal component of a series. My > model which uses daily data would be something y t = alpha + beta x SeasComp > t + gamma x OtherRegressors t. > > One approach to this would be use quarterly dummies, another to use a sine > function. The first would cause a step change when we move from a season to > another; the latter impose too much regularity in my data, i.e. symmetry > around y-axis and x-axis. > > I have looked at decompose and stl but could not find a way to forecast > the seasonal component. They dont allow for they presence of other > regressors either. Can someone let me know the best way for me to proceed > with this? > Thanks in advance > Paolo > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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, reproducible code. From therneau at mayo.edu Fri Feb 4 16:29:17 2011 From: therneau at mayo.edu (Terry Therneau) Date: Fri, 04 Feb 2011 09:29:17 -0600 Subject: [R] My own distribution in survreg function Message-ID: <1296833357.12776.16.camel@punchbuggy> ------- begin included message -------- I'm trying to do some analysis using survreg function. I need to implement there my own distribution with density: lambda*exp(-lambda*y), where y = a1/(1+exp(-a2*x)). a1, a2 are unknown parameters and x >0. --- end inclusion ------ The survreg function can fit location/scale families where the location parameter is Xb, X a matrix of predictors and b the parameters. I don't think that your distribution can be written in that form. An alternative is to take the apporach of the t-distribution for survreg, which has the right for for fixed df. Then wrap the survreg function inside optim, using the latter to get an estimate of df. No, I don't have time to give deeper programming help, due to other projects due. Terry Therneau From tomdharray at gmail.com Fri Feb 4 16:37:28 2011 From: tomdharray at gmail.com (Dick Harray) Date: Fri, 4 Feb 2011 10:37:28 -0500 Subject: [R] lapply, strsplit, and list elements Message-ID: Hi there, I have a problem about lapply, strsplit, and accessing list elements, which I don't understand or cannot solve: I have e.g. a character vector with three elements: x = c("349/077,349/074,349/100,349/117", "340/384.2,340/513,367/139,455/128,D13/168", "600/437,128/903,128/904") The task I want to perform, is to generate a list, comprising the portion in front of the "/" of each element of x: neededResult = list(c("349","349", "349", "349"), c("340", "340", "367", "455", "D13"), c("600", "128", "128") ) I figured out that for a single element of x the following works unlist( lapply( strsplit( unlist( strsplit(x[1], "\\,") ), "/"), "[", 1) ) but due to "unlist" it doesn't provide the required result if extended to all elements of x unlist(lapply(strsplit( unlist( lapply(x, strsplit, "\\,")), "/"), "[",)) Someone can help me to get the needed result? Thanks and regards, Dirk From dwinsemius at comcast.net Fri Feb 4 16:41:21 2011 From: dwinsemius at comcast.net (David Winsemius) Date: Fri, 4 Feb 2011 10:41:21 -0500 Subject: [R] recode according to specific sequence of characters within a string variable In-Reply-To: <1296825977.2876.6.camel@denian> References: <300989.18792.qm@web26004.mail.ukl.yahoo.com> <9145D453-0181-4529-9D97-24B39DEF9397@me.com> <1296825977.2876.6.camel@denian> Message-ID: On Feb 4, 2011, at 8:26 AM, Denis Kazakiewicz wrote: > Dear R people > Could you please help > I have similar but opposite question > How to reshape data from DF.new to DF from example, Mark kindly > provided? Well, I don't think you want a random order, right? If what you are asking is for a single character element per line of dataframe then try this: apply(df.new, 1, paste, collapse="_") -- David. > > Thank you > Denis > > On ???, 2011-02-04 at 07:09 -0600, Marc Schwartz wrote: >> On Feb 4, 2011, at 6:32 AM, D. Alain wrote: >> >>> Dear R-List, >>> >>> I have a dataframe with one column "name.of.report" containing >>> character values, e.g. >>> >>> >>>> df$name.of.report >>> >>> "jeff_2001_teamx" >>> "teamy_jeff_2002" >>> "robert_2002_teamz" >>> "mary_2002_teamz" >>> "2003_mary_teamy" >>> ... >>> (i.e. the bit of interest is not always at same position) >>> >>> Now I want to recode the column "name.of.report" into the >>> variables "person", "year","team", like this >>> >>>> new.df >>> >>> "person" "year" "team" >>> jeff 2001 x >>> jeff 2002 y >>> robert 2002 z >>> mary 2002 z >>> >>> I tried with grep() >>> >>> df$person<-grep("jeff",df$name.of.report) >>> >>> but of course it didn't exactly result in what I wanted to do. >>> Could not find any solution via RSeek. Excuse me if it is a very >>> silly question, but can anyone help me find a way out of this? >>> >>> Thanks a lot >>> >>> Alain >> >> >> There will be several approaches, all largely involving the use of ? >> regex. Here is one: >> >> >> DF <- data.frame(name.of.report = c("jeff_2001_teamx", >> "teamy_jeff_2002", >> "robert_2002_teamz", >> "mary_2002_teamz", >> "2003_mary_teamy")) >> >>> DF >> name.of.report >> 1 jeff_2001_teamx >> 2 teamy_jeff_2002 >> 3 robert_2002_teamz >> 4 mary_2002_teamz >> 5 2003_mary_teamy >> >> >> DF.new <- data.frame(person = gsub("[_0-9]|team.", "", DF >> $name.of.report), >> year = gsub(".*([0-9]{4}).*","\\1", DF >> $name.of.report), >> team = gsub(".*team(.).*","\\1", DF >> $name.of.report)) >> >> >>> DF.new >> person year team >> 1 jeff 2001 x >> 2 jeff 2002 y >> 3 robert 2002 z >> 4 mary 2002 z >> 5 mary 2003 y >> >> >> >> HTH, >> >> Marc Schwartz >> >> ______________________________________________ >> R-help at 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, reproducible code. > > ______________________________________________ > R-help at 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, reproducible code. David Winsemius, MD West Hartford, CT From aviad.klein at gmail.com Fri Feb 4 16:46:08 2011 From: aviad.klein at gmail.com (Aviad Klein) Date: Fri, 4 Feb 2011 17:46:08 +0200 Subject: [R] in object of class formula Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From wdunlap at tibco.com Fri Feb 4 16:49:19 2011 From: wdunlap at tibco.com (William Dunlap) Date: Fri, 4 Feb 2011 07:49:19 -0800 Subject: [R] lapply, strsplit, and list elements In-Reply-To: References: Message-ID: <77EB52C6DD32BA4D87471DCD70C8D70003DE1C5E@NA-PA-VBE03.na.tibco.com> > -----Original Message----- > From: r-help-bounces at r-project.org > [mailto:r-help-bounces at r-project.org] On Behalf Of Dick Harray > Sent: Friday, February 04, 2011 7:37 AM > To: r-help at r-project.org > Subject: [R] lapply, strsplit, and list elements > > Hi there, > > I have a problem about lapply, strsplit, and accessing list elements, > which I don't understand or cannot solve: > > I have e.g. a character vector with three elements: > > x = c("349/077,349/074,349/100,349/117", > "340/384.2,340/513,367/139,455/128,D13/168", > "600/437,128/903,128/904") > > > The task I want to perform, is to generate a list, comprising the > portion in front of the "/" of each element of x: > > neededResult = list(c("349","349", "349", "349"), > c("340", "340", "367", "455", "D13"), > c("600", "128", "128") ) Try the following, which first splits each string by commas (returning a list), then removes the first slash and everything after it (using lapply to maintain the list structure). > gotResult <- lapply(strsplit(x, ","), function(xi)gsub("/.*", "", xi)) > identical(getResult, neededResult) [1] TRUE Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com > > > I figured out that for a single element of x the following works > > unlist( lapply( strsplit( unlist( strsplit(x[1], "\\,") ), > "/"), "[", 1) ) > > but due to "unlist" it doesn't provide the required result if extended > to all elements of x > > unlist(lapply(strsplit( unlist( lapply(x, strsplit, "\\,")), > "/"), "[",)) > > > Someone can help me to get the needed result? > > Thanks and regards, > > Dirk > > ______________________________________________ > R-help at 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, reproducible code. > From bhh at xs4all.nl Fri Feb 4 17:01:46 2011 From: bhh at xs4all.nl (Berend Hasselman) Date: Fri, 4 Feb 2011 08:01:46 -0800 (PST) Subject: [R] uniroot In-Reply-To: <1296822900582-3260090.post@n4.nabble.com> References: <1296822900582-3260090.post@n4.nabble.com> Message-ID: <1296835306090-3260438.post@n4.nabble.com> dpender wrote: > > Hi, > > I am using the uniroot function in order to carry out a bivariate Monte > Carlo simulation using the logistics model. > > I have defined the function as: > > BV.FV <- function(x,y,a,A) > (((x^(-a^-1)+y^(-a^-1))^(a-1))*(y^(a-1/a))*(exp(-((1^(-a^-1)+y^(-a^-1))^a)+y^-1)))-A > > and the procedure is as follows: > > Randomly generate values of A~(0,1), y0 = -(lnA)^-1 > > Where: A=Pr{X > Use y0 to determine x where x = x(i) and y = y0(i-1) in the above > equation. > > Unfortunately when the randomly defined A gets to approximately 0.46 the > intervals I provide no longer have the opposite signs (both -ve). > Try curve(BV.FV(x,y=y0,a=.703,A=.7),from=1,to=10) for different values of a, A and y0. I have a feeling that your function or something else is not quite correct. Berend -- View this message in context: http://r.789695.n4.nabble.com/uniroot-tp3260090p3260438.html Sent from the R help mailing list archive at Nabble.com. From wdunlap at tibco.com Fri Feb 4 17:09:25 2011 From: wdunlap at tibco.com (William Dunlap) Date: Fri, 4 Feb 2011 08:09:25 -0800 Subject: [R] get caller's name In-Reply-To: <4D4C0709.4040107@gmail.com> References: <20110203152733.GA26859@doriath.local> <4D4C0709.4040107@gmail.com> Message-ID: <77EB52C6DD32BA4D87471DCD70C8D70003DE1C6B@NA-PA-VBE03.na.tibco.com> > -----Original Message----- > From: r-help-bounces at r-project.org > [mailto:r-help-bounces at r-project.org] On Behalf Of Duncan Murdoch > Sent: Friday, February 04, 2011 6:03 AM > To: Ernest Adrogu? > Cc: r-help at stat.math.ethz.ch > Subject: Re: [R] get caller's name > > On 03/02/2011 10:27 AM, Ernest Adrogu? wrote: > > Hi, > > Suppose a function that checks an object: > > > > stop.if.dims<- function(x) { > > if (! is.null(dim(x))) { > > stop("cannot handle dimensional data") > > } > > } > > > > This would be used by other functions that can only work with > > dimensionless objects. The problem is the error message > would need to > > include the name of the function that called stop.if.dims, > so that the > > user knows which function got an argument that was incorrect. > > > > How do I do this? Or maybe there is another way... > > I see you have the answer you wanted, but I'd suggest you don't need > this: the user should just use traceback() after the error > to see the > full call stack. Perhaps it's not the caller that's the problem, but > the caller of the caller... > > Duncan Murdoch stopifnot() deals with the problem by arranging for the error reporting mechanism not to say what function the error comes from. If you are in the know, not seeing "Error in someFunction(arg):" in the error might motivate you to call traceback(). If you are not in the know, it just frustrates you. R> myFunc <- function(x) stopifnot(all(x>0)) R> myFunc(-pi) Error: all(x > 0) is not TRUE R> traceback() 3: stop(paste(ch, " is not ", if (length(r) > 1L) "all ", "TRUE", sep = ""), call. = FALSE) 2: stopifnot(all(x > 0)) 1: myFunc(-pi) In S+ stopifnot() uses eval(call("stop", message), sys.parent()) to make the error message appear to come from the caller of stopifnot(). The initial message is clearer but the traceback more confusing: > myFunc <- function(x) stopifnot(all(x>0)) > myFunc(-pi) Problem in myFunc( - pi): all(x > 0) is not TRUE Use traceback() to see the call stack > traceback() 8: eval(action, sys.parent()) 7: doErrorAction("Problem in myFunc( - pi): all(x > 0) is not TRUE", 1000) 6: stop("all(x > 0) is not TRUE") 5: eval(call, sys.parent()) 4: stopifnot(all(x > 0)) 3: myFunc( - pi) 2: eval(expression(myFunc( - pi))) 1: Message: Problem in myFunc( - pi): all(x > 0) is not TRUE If I try the eval(call("stop",message), sys.parent()) trick in R the error is reported as being from eval(): > myFunc(-pi) Error in eval(expr, envir, enclos) : all(x > 0) is not TRUE S+'s error handler has some logic so that a stop() called from eval() is reported as being from the frame that eval is evaluating in. It might be nice to be able to tell stop(), warning(), and message() to pretend they were called from somewhere other than where they were actually called from. Falling back on traceback() doesn't help with warnings and messages. Being able to put standard messages like 'x not a matrix' into utility functions is handy, but it makes it hard to track down the problem. Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com > > ______________________________________________ > R-help at 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, reproducible code. > From ripley at stats.ox.ac.uk Fri Feb 4 17:18:19 2011 From: ripley at stats.ox.ac.uk (Prof Brian Ripley) Date: Fri, 4 Feb 2011 16:18:19 +0000 (GMT) Subject: [R] in object of class formula In-Reply-To: References: Message-ID: Did you look at the help? ?formula has a whole section about why formulas have environments and what they do. On Fri, 4 Feb 2011, Aviad Klein wrote: > # Hi all, > > # I've made a function to make a formula out of a data.frame without columns > which contain a constant value. > > # The function "which.constant" returns the indices of colums with constant > values: > > which.constant <- function(data.frame) { # counts the number of columns in a > data.frame which are constant > h <- sapply(sapply(data.frame,unique),length) # count unique values > return(as.numeric(which(h==1)))} > > # The function "make.formula" returns the desired formula but with an > unwanted addition : > > make.formula <- function(data.frame) { > h <- which.constant(data.frame) > hh <- names(data.frame)[-h] > hh <- paste("~",paste(hh,collapse="+"),sep="") > return(as.formula(hh))} > > # The following structure should give an example of how it works: > > Data <- structure(list(cs_jail_2 = c(2L, 1L, 1L, 0L, 0L, 1L), cs_jail_3 = > c(0L, > 0L, 0L, 0L, 0L, 0L), cs_jail_4 = c(1L, 2L, 2L, 2L, 0L, 0L)), .Names = > c("cs_jail_2", > "cs_jail_3", "cs_jail_4"), row.names = c(NA, 6L), class = "data.frame") > > make.formula(Data) > > # ~cs_jail_2 + cs_jail_4 > # > > # what does this mean? > > # does it effect computation in any way? how to get read of it? See also ?environment for how to remove (sic) it. > > # thank you, > > # Aviad > # aviadklein.wordpress.com/ > > [[alternative HTML version deleted]] Please don't send HTML when expressly asked not to in the posting guide. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 From y.jiao at ucl.ac.uk Fri Feb 4 17:30:17 2011 From: y.jiao at ucl.ac.uk (Yan Jiao) Date: Fri, 4 Feb 2011 16:30:17 -0000 Subject: [R] (no subject) Message-ID: <595C4E81822E244DB8853767F6A47A970383E000@pc6-13.pogb.cancer.ucl.ac.uk> An embedded and charset-unspecified text was scrubbed... Name: not available URL: From Greg.Snow at imail.org Fri Feb 4 17:54:00 2011 From: Greg.Snow at imail.org (Greg Snow) Date: Fri, 4 Feb 2011 09:54:00 -0700 Subject: [R] Finding non-normal distributions per row of data frame? In-Reply-To: <1296791547602-3259439.post@n4.nabble.com> References: <1296791547602-3259439.post@n4.nabble.com> Message-ID: I get a different set of errors than you do (what version of R are you using?). Patrizio showed one way to do what you want. But, what is it that you are really trying to accomplish? What do you think the result of 20,000 normality tests (each of which may not be answering the real question on its own) will tell you? Your code below seems to be mixing concepts that it would benefit you to learn more about and when to use each one. If y is fully numeric, then it is more efficient to use a matrix than a data frame. In your loop you assign y.temp to be a list containing 1 row from y, this results in a list with 1 element which is a 1 row data frame. Why make it a list? Do you really want it to stay a data frame or be a vector? You then run lapply on a list with only one element, that works, but is a bit wasteful and does not accomplish anything more than running the function on the single element. Then the shapiro.test function is passed a data frame when it is expecting a vector (this gives an error on my install, you may have something different going on). Then testtable is being overwritten each time through the loop, so you are throwing away most of your work without ever doing anything with it. Why the loop and the apply's? Why not just try something like apply(y, 1, shapiro.test) ? And overall what are you trying to accomplish? Because what this is likely to accomplish is probably less useful than just generating random numbers. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.snow at imail.org 801.408.8111 > -----Original Message----- > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r- > project.org] On Behalf Of DB1984 > Sent: Thursday, February 03, 2011 8:52 PM > To: r-help at r-project.org > Subject: [R] Finding non-normal distributions per row of data frame? > > > This is my first attempt at this, so hopefully a few kind pointers can > get me > going in the right direction... > > I have a large data frame of 20+ columns and 20,000 rows. I'd like to > evaluate the distribution of values in each row, to determine whether > they > meet the criteria of a normal distribution. I'd loop this over all the > rows > in the data frame, and output the summary results to a new data frame. > > I have a loop that should run a Shapiro-Wilk test over each row, > > y= data frame > > for (j in 1:nr) { > y.temp<-list(y[j,]) > testsw <- lapply(y.temp, shapiro.test) > testtable <- t(sapply(testsw, function(x) c(x$statistic, x$p.value))) > colnames(testtable) <- c("W", "p.value") > } > > > but it is currently throwing out an error: > "Error in `rownames<-`(`*tmp*`, value = "1") : > attempt to set rownames on object with no dimensions" > > ...which I guess is unrelated to the evaluation of normality, and more > likely a faulty loop? > > Any suggestions either for this test, or a better way to evaluate the > normal > distribution (e.g. qq-plot residuals for each row) would be greatly > received. Thanks. > -- > View this message in context: http://r.789695.n4.nabble.com/Finding- > non-normal-distributions-per-row-of-data-frame-tp3259439p3259439.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at 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, reproducible code. From yunni0731 at gmail.com Fri Feb 4 17:56:09 2011 From: yunni0731 at gmail.com (Soyeon Kim) Date: Fri, 4 Feb 2011 10:56:09 -0600 Subject: [R] How to get the variables used in stepwise logistic regression? Message-ID: Dear All, I used glm and then used step function for stepwise regression. Now, I want to store the variables used in the stepwise regression. The code is the following. m_logistic <- glm(y ~ . + M1:T + M2:T + M3:T+ M4:T +M5:T, family=binomial("logit"), data = data) step_glm <- step(m_logistic) > step_glm$terms y ~ M1 + T + M1:T attr(,"variables") list(y, M1, T) attr(,"factors") M1 T M1:T y 0 0 0 M1 1 0 1 T 0 1 1 attr(,"term.labels") [1] "M1" "T" "M1:T" attr(,"order") [1] 1 1 2 attr(,"intercept") [1] 1 attr(,"response") [1] 1 attr(,".Environment") attr(,"predvars") list(y, M1, T) attr(,"dataClasses") y M1 T "numeric" "numeric" "numeric" How can I extract only "term.labels" ? Thank you, Soyeon From dwinsemius at comcast.net Fri Feb 4 18:07:03 2011 From: dwinsemius at comcast.net (David Winsemius) Date: Fri, 4 Feb 2011 12:07:03 -0500 Subject: [R] How to get the variables used in stepwise logistic regression? In-Reply-To: References: Message-ID: On Feb 4, 2011, at 11:56 AM, Soyeon Kim wrote: > Dear All, > > I used glm and then used step function for stepwise regression. > Now, I want to store the variables used in the stepwise regression. I am not sure that what you ask here is actually what you eventually ask and will limit my answer to only what you ask below. > > The code is the following. > > m_logistic <- glm(y ~ . + M1:T + M2:T + M3:T+ M4:T +M5:T, > family=binomial("logit"), data = data) > step_glm <- step(m_logistic) > >> step_glm$terms > y ~ M1 + T + M1:T > attr(,"variables") > list(y, M1, T) > attr(,"factors") > M1 T M1:T > y 0 0 0 > M1 1 0 1 > T 0 1 1 > attr(,"term.labels") > [1] "M1" "T" "M1:T" > attr(,"order") > [1] 1 1 2 > attr(,"intercept") > [1] 1 > attr(,"response") > [1] 1 > attr(,".Environment") > > attr(,"predvars") > list(y, M1, T) > attr(,"dataClasses") > y M1 T > "numeric" "numeric" "numeric" > > How can I extract only "term.labels" ? > Have you tried what would seem to be the obvious answer (assuming that is a faithful console output): attr(step_glm$terms, "term.labels") ?attr ?attributes (And the usual caveats: stepwise methods are often invalid.) -- David Winsemius, MD West Hartford, CT From yunni0731 at gmail.com Fri Feb 4 18:14:14 2011 From: yunni0731 at gmail.com (Soyeon Kim) Date: Fri, 4 Feb 2011 11:14:14 -0600 Subject: [R] How to get the variables used in stepwise logistic regression? In-Reply-To: References: Message-ID: Thank you. This is what I want. I need to study about attr :). Soyeon On Fri, Feb 4, 2011 at 11:07 AM, David Winsemius wrote: > > On Feb 4, 2011, at 11:56 AM, Soyeon Kim wrote: > >> Dear All, >> >> I used glm and then used step function for stepwise regression. >> Now, I want to store the variables used in the stepwise regression. > > I am not sure that what you ask here is actually what you eventually ask and > will limit my answer to only what you ask below. > >> >> The code is the following. >> >> m_logistic <- glm(y ~ . + M1:T + M2:T + M3:T+ M4:T +M5:T, >> family=binomial("logit"), data = data) >> ?step_glm <- step(m_logistic) >> >>> step_glm$terms >> >> y ~ M1 + T + M1:T >> attr(,"variables") >> list(y, M1, T) >> attr(,"factors") >> ?M1 T M1:T >> y ? 0 0 ? ?0 >> M1 ?1 0 ? ?1 >> T ? 0 1 ? ?1 >> attr(,"term.labels") >> [1] "M1" ? "T" ? ?"M1:T" >> attr(,"order") >> [1] 1 1 2 >> attr(,"intercept") >> [1] 1 >> attr(,"response") >> [1] 1 >> attr(,".Environment") >> >> attr(,"predvars") >> list(y, M1, T) >> attr(,"dataClasses") >> ? ? ? y ? ? ? ?M1 ? ? ? ? T >> "numeric" "numeric" "numeric" >> >> How can I extract only "term.labels" ? >> > > Have you tried what would seem to be the obvious answer (assuming that is a > faithful console output): > > attr(step_glm$terms, ?"term.labels") > > ?attr > ?attributes > > (And the usual caveats: stepwise methods are often invalid.) > > -- > David Winsemius, MD > West Hartford, CT > > From Greg.Snow at imail.org Fri Feb 4 18:47:45 2011 From: Greg.Snow at imail.org (Greg Snow) Date: Fri, 4 Feb 2011 10:47:45 -0700 Subject: [R] recode according to specific sequence of characters within a string variable In-Reply-To: <1296825977.2876.6.camel@denian> References: <300989.18792.qm@web26004.mail.ukl.yahoo.com> <9145D453-0181-4529-9D97-24B39DEF9397@me.com> <1296825977.2876.6.camel@denian> Message-ID: So you want to combine multiple columns back into a single column with the strings pasted together? If that is correct then look at the paste and sprintf functions (use one or the other, not both). -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.snow at imail.org 801.408.8111 > -----Original Message----- > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r- > project.org] On Behalf Of Denis Kazakiewicz > Sent: Friday, February 04, 2011 6:26 AM > To: Marc Schwartz > Cc: R-help > Subject: Re: [R] recode according to specific sequence of characters > within a string variable > > Dear R people > Could you please help > I have similar but opposite question > How to reshape data from DF.new to DF from example, Mark kindly > provided? > > Thank you > Denis > > On ???, 2011-02-04 at 07:09 -0600, Marc Schwartz wrote: > > On Feb 4, 2011, at 6:32 AM, D. Alain wrote: > > > > > Dear R-List, > > > > > > I have a dataframe with one column "name.of.report" containing > character values, e.g. > > > > > > > > >> df$name.of.report > > > > > > "jeff_2001_teamx" > > > "teamy_jeff_2002" > > > "robert_2002_teamz" > > > "mary_2002_teamz" > > > "2003_mary_teamy" > > > ... > > > (i.e. the bit of interest is not always at same position) > > > > > > Now I want to recode the column "name.of.report" into the variables > "person", "year","team", like this > > > > > >> new.df > > > > > > "person" "year" "team" > > > jeff 2001 x > > > jeff 2002 y > > > robert 2002 z > > > mary 2002 z > > > > > > I tried with grep() > > > > > > df$person<-grep("jeff",df$name.of.report) > > > > > > but of course it didn't exactly result in what I wanted to do. > Could not find any solution via RSeek. Excuse me if it is a very silly > question, but can anyone help me find a way out of this? > > > > > > Thanks a lot > > > > > > Alain > > > > > > There will be several approaches, all largely involving the use of > ?regex. Here is one: > > > > > > DF <- data.frame(name.of.report = c("jeff_2001_teamx", > "teamy_jeff_2002", > > "robert_2002_teamz", > "mary_2002_teamz", > > "2003_mary_teamy")) > > > > > DF > > name.of.report > > 1 jeff_2001_teamx > > 2 teamy_jeff_2002 > > 3 robert_2002_teamz > > 4 mary_2002_teamz > > 5 2003_mary_teamy > > > > > > DF.new <- data.frame(person = gsub("[_0-9]|team.", "", > DF$name.of.report), > > year = gsub(".*([0-9]{4}).*","\\1", > DF$name.of.report), > > team = gsub(".*team(.).*","\\1", > DF$name.of.report)) > > > > > > > DF.new > > person year team > > 1 jeff 2001 x > > 2 jeff 2002 y > > 3 robert 2002 z > > 4 mary 2002 z > > 5 mary 2003 y > > > > > > > > HTH, > > > > Marc Schwartz > > > > ______________________________________________ > > R-help at 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, reproducible code. > > ______________________________________________ > R-help at 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, reproducible code. From Greg.Snow at imail.org Fri Feb 4 18:52:41 2011 From: Greg.Snow at imail.org (Greg Snow) Date: Fri, 4 Feb 2011 10:52:41 -0700 Subject: [R] recode according to specific sequence of characters within a string variable In-Reply-To: <300989.18792.qm@web26004.mail.ukl.yahoo.com> References: <300989.18792.qm@web26004.mail.ukl.yahoo.com> Message-ID: You can do this with regular expressions, since you want to extract specific values from the string I would suggest learning about the gsubfn package, it is a bit easier with gsubfn than with the other matching tools. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.snow at imail.org 801.408.8111 > -----Original Message----- > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r- > project.org] On Behalf Of D. Alain > Sent: Friday, February 04, 2011 5:33 AM > To: r-help at r-project.org > Subject: [R] recode according to specific sequence of characters within > a string variable > > Dear R-List, > > I have a dataframe with one column "name.of.report" containing > character values, e.g. > > > >df$name.of.report > > "jeff_2001_teamx" > "teamy_jeff_2002" > "robert_2002_teamz" > "mary_2002_teamz" > "2003_mary_teamy" > ... > (i.e. the bit of interest is not always at same position) > > Now I want to recode the column "name.of.report" into the variables > "person", "year","team", like this > > >new.df > > "person"? "year"? "team" > jeff?????????? 2001????? x > jeff?????????? 2002????? y > robert?????? 2002????? z > mary??????? 2002????? z > > I tried with grep() > > df$person<-grep("jeff",df$name.of.report) > > but of course it didn't exactly result in what I wanted to do. Could > not find any solution via RSeek. Excuse me if it is a very silly > question, but can anyone help me find a way out of this? > > Thanks a lot > > Alain > > > > > [[alternative HTML version deleted]] From bop07crb at sheffield.ac.uk Fri Feb 4 18:21:40 2011 From: bop07crb at sheffield.ac.uk (chris20) Date: Fri, 4 Feb 2011 09:21:40 -0800 (PST) Subject: [R] dataframes from a function Message-ID: <1296840100505-3260581.post@n4.nabble.com> Hi, I'm trying to create a function to return three dataframes for later use in a graphic so I want the return from the function to give me dataframes and with unique names relating to the variable they are based on. For example..... sub<-c("6-1a","6-1a","6-1a","9-2b","9-2b","9-2b","7c","7c","7c") yar<-rep(1991:1993,3) x1n<-c(4,6,3,6,4,7,9,4,2) y1m<-c(3,7,5,8,4,3,6,7,8) prac<-data.frame(sub,yar,x1n,y1m) plot.restrut<-function(org.plot,ex.plot) { new.pl<-org.plot[org.plot$sub %in% ex.plot,] new.pl.st<-new.pl[new.pl$yar %in% "1991",] new.pl.fin<-new.pl[new.pl$yar %in% "1993",] print(new.pl) print(new.pl.st) print(new.pl.fin) } plot.restrut(prac,"9-2b") ###### I would like the output to be one dataframe with the name "9.2b.new" which is new.pl in the example Another data frame to be "9.2bnew1991" and another dataframe "9.2bnew1993" I want the dataframe names to relate to the variables they have come from because I want to use the same function to extract lots of subsets of my data. Thanks Chris -- View this message in context: http://r.789695.n4.nabble.com/dataframes-from-a-function-tp3260581p3260581.html Sent from the R help mailing list archive at Nabble.com. From d.kazakiewicz at gmail.com Fri Feb 4 15:39:17 2011 From: d.kazakiewicz at gmail.com (Denis Kazakiewicz) Date: Fri, 04 Feb 2011 16:39:17 +0200 Subject: [R] exact logistic regression Message-ID: <1296830357.3453.13.camel@denian> Dear ?ukasz Thank you very much for information Dear R people could you please help please with following questions Sorry for my silly questions, because I am not a mathematician. 1. Is elrm() works similar as exact regression in SAS or Stata? After double check in Stata and R some results from my data vary greatly. 2. How to obtain p-value from MCMClogit() from MCMCpack? Thank you Denis From d.kazakiewicz at gmail.com Fri Feb 4 16:44:32 2011 From: d.kazakiewicz at gmail.com (Den) Date: Fri, 04 Feb 2011 17:44:32 +0200 Subject: [R] Applying multiple functions to one object In-Reply-To: References: Message-ID: <1296834272.1924.7.camel@den2042-desktop> 'Aggregate multiple functions into a single function. Combine multiple functions to a single function returning a named vector of outputs' This is a short description of each() function from plyr package Here is an example from help each(min, max)(1:10) Hope this helps Regards Denis ? ???, 04/02/2011 ? 08:37 -0600, jctoll ????: > On Wed, Feb 2, 2011 at 7:59 AM, Karl Ove Hufthammer wrote: > > Dear list members, > > > > I recall seeing a convenience function for applying multiple functions to > > one object (i.e., almost the opposite of 'mapply?) somewhere. > > Example: If the function was named ?fun? the output of > > > > fun(3.14, mode, typeof, class) > > > > would be identical to the output of > > > > c(mode(3.14), typeof(3.14), class(3.14)) > > > > Is my memory failing me, or does such a function already exists in a > > package? Of course, it?s not difficult to define a summary function and > > apply this to the object, but writing, for example, > > > > fun(x, mean, median, sd, mad) > > > > to quickly show the relevant information is much more *convient*. > > > > > > It would be even nicer with a function that could also handle vectors and > > lists of values, and output the result as data frames or matrices. Example: > > > > x = c("foo", "bar", "foobar") > > fun(x, nchar, function(st) substr(st, 1 ,2) ) > > > > y = list(3, 3L, 3.14, factor(3)) > > fun(x, mode, typeof, class) > > > > -- > > Karl Ove Hufthammer > > > > ______________________________________________ > > R-help at 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, reproducible code. > > > > Karl, > > Perhaps you're thinking of the Reduce function? There's an example > from the help page that you might be able to adapt to your purpose. > > ## Iterative function application: > Funcall <- function(f, ...) f(...) > ## Compute log(exp(acos(cos(0)) > Reduce(Funcall, list(log, exp, acos, cos), 0, right = TRUE) > > HTH, > > James > > ______________________________________________ > R-help at 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, reproducible code. From d.kazakiewicz at gmail.com Fri Feb 4 17:44:04 2011 From: d.kazakiewicz at gmail.com (Den) Date: Fri, 04 Feb 2011 18:44:04 +0200 Subject: [R] exact logistic regression Message-ID: <1296837844.2456.7.camel@den2042-desktop> Hate to say that, but it looks like Stata is way above R, considering exact logistic regression. To use elrm() I have to aggregate my data,which is really time consuming when I look for the way out through many variables. But the worst thing is that I am not not sure if I can trust to p-values in output. I would be happy,however, if someone could contradict me on this issue. With best regards Denis From dannybolg at gmail.com Fri Feb 4 16:48:14 2011 From: dannybolg at gmail.com (DB1984) Date: Fri, 4 Feb 2011 07:48:14 -0800 (PST) Subject: [R] Finding non-normal distributions per row of data frame? In-Reply-To: References: <1296791547602-3259439.post@n4.nabble.com> Message-ID: <1296834494624-3260412.post@n4.nabble.com> Thanks for the feedback Patrizio - but your function is performing the shapiro.test on columns instead of rows... I tried: nt<-data.frame(#a dataframe with 6 columns and 9 rows) nr <- nrow(nt) test <- apply(nt, nt[1:nr,], shapiro.test) Error in ds[-MARGIN] : invalid subscript type 'list' fred<-data.frame(sapply(test,function(x)c(x$statistic, x$p.value))) But picked up the error above. Do I still require a loop to apply this over rows? -- View this message in context: http://r.789695.n4.nabble.com/Finding-non-normal-distributions-per-row-of-data-frame-tp3259439p3260412.html Sent from the R help mailing list archive at Nabble.com. From davidaostrowski at gmail.com Fri Feb 4 17:46:39 2011 From: davidaostrowski at gmail.com (david ostrowski) Date: Fri, 4 Feb 2011 11:46:39 -0500 Subject: [R] MSBVAR and hc.forecast Message-ID: attempting to do multivariate modelling in R with known future conditions (in this case variable 'b') using MSBVAR and hc.forecast. The sample code (a paired down representation) does not give anywhere near the expected results - I am assuming that a forecast 8 steps out would approximate 'a' as the sequence 1.1,2.1,3.1,100.1 corresponding to the input set. I have varied the input length to be longer as well as using longer simulation times. If any one has very small example code such as this or knows how to obtain my expected behavior it is much appreciated! include("MSBVAR") a = c(1.1,2.1,3.1,100.1,1.1,2.1,3.1,100.1,1.1,2.1,3.1,100.1,1.1,2.1,3.1,100.1,1.1,2.1,3.1,100.1,1.1,2.1,3.1,100.1) b = c(1.1,1.1,1.1,100.1,1.1,1.1,1.1,100.1,1.1,1.1,1.,100.1,1.1,1.1,1.1,100.1,1.1,1.1,1.1,100.1,1.1,1.1,1.,100.1) K <-ts(cbind(a,b),start=c(1.1,1.1), names=c("a","b")) fit.bvar <- szbvar(K, p = 1, lambda0=0.6, lambda=0.1, lambda3=2, lambda4=0.25,lambda5=0,mu5=0, mu6=0, prior=0) y <- matrix(c(rep(0,8),c(1.10,1.10,1.10,100.1,1.10,1.10,1.0,100.10)),ncol=2) h <- hc.forecast(fit.bvar,y,nsteps=8,burnin=300, gibbs=500,exog=NULL) From florian.burkart at whu.edu Fri Feb 4 15:35:52 2011 From: florian.burkart at whu.edu (Florian Burkart) Date: Fri, 04 Feb 2011 14:35:52 +0000 Subject: [R] Apply parameters to a function from a list Message-ID: <4D4C0EC8.6010608@whu.edu> Hey, this may be a simple question, but I am struggling to apply a list of parameters to a function. Say I have the following function: test<-function(a=1,b=2,c=3,d=4){a+b+c+d} And the following list: point<-list(a=3,d=2) Is there a way I can evaluate function test at point? (Apart from changing function test to take in a list, and take values out of the list, but I'd rather not touch test). Thanks vm From mbmiller at umn.edu Fri Feb 4 18:51:23 2011 From: mbmiller at umn.edu (Mike Miller) Date: Fri, 4 Feb 2011 11:51:23 -0600 (CST) Subject: [R] always about positive definite matrix In-Reply-To: <4D4C3417.4030604@structuremonitoring.com> References: <631F8C7792124941838E6850D3A7802B030341A53E7A@ERMES.regionemarche.intra> <4D4C3417.4030604@structuremonitoring.com> Message-ID: I'm also not an expert on this topic. I just wanted to list a couple of ways that non-PD matrices might arise. I'll just add now a couple of pointers: First, I believe the term "semipositive definite" is considered ambiguous because in some literature it means that the matrix the smallest eigenvalue is zero and in other literature it means that no eigenvalue is negative (but there might be no zero eigenvalues). I think I might have read about this ambiguity in Searle's excellent "Matrix Algebra Useful for Statistics": http://www.amazon.com/Matrix-Algebra-Useful-Statistics-Probability/dp/0471866814 Second, people in certain stat areas often recommend this chapter by Werner Worthke, formerly of SAS Institute, Inc.: Wothke, Werner (1995), "Nonpositive Definite Matrices in Structural Equation Modeling", in "Testing Structural Equation Models", by Kenneth A. Bollen and J. Scott Long (eds.), Sage Publications, Newbury Park pp. 256-293. http://www.amazon.com/Testing-Structural-Equation-Models-Editions/dp/0803945078 I think you'll find basic definitions and explanations there along with a lot of information about how non-positive definite matrices may arise in real-world applications. Best, Mike On Fri, 4 Feb 2011, Spencer Graves wrote: > 1. Martin Maechler's comments should be taken as replacements for > anything I wrote where appropriate. Any apparent conflict is a result of his > superior knowledge. > > > 2. 'eigen' returns the eigenvalue decomposition assuming the matrix is > symmetric, ignoring anything in m[upper.tri(m)]. > > > 3. The basic idea behind both posdefify and nearPD is to compute the > eigenenvalues and vectors, then replace any eigenvalues that are small or > negative with some suitable small positive number and reconstruct the matrix > from this modified eigenvalue decomposition. posdefify and nearPD implement > modifications of this basic idea. > > > 4. I recommend in the summary you mention nearPD but not posdefify, > because nearPD was written more recently using the results of research not > available to the authors when posdefify was written. > > > MARTIN: There is a typo in the first line of the documentation for > "symmpart". It currently reads, "symmpart(x) computes the symmetric part (x > + t(x))/2 and the skew symmetric part (x - t(x))/2 of a square matrix x.". > It should read, "symmpart(x) computes the symmetric part (x + t(x))/2 and > skewpart the skew symmetric part (x - t(x))/2 of a square matrix x." > > > Hope this helps. > Spencer > > > On 2/4/2011 6:26 AM, Stefano Sofia wrote: >> Dear R-users, >> I followed with high interest the thread about positive definite matrix. >> I tracked all the messages of the discussion and I am trying to make a >> summary of all the correlated problems that arose from the discussion and >> the best solutions to overcome them. >> As far as I understood, the main problems are two: assessing the symmetry >> of the given matrix and dealing with eigenvalues very close to zero. >> Do I miss some important points? >> >> The functions that have been mentioned are eigen (I think in particualr the >> isSymmetric.matrix function), the function posdefify of the sfmisc package >> and the function nearPD of the Matrix package. I believe that some >> conversations have not been shared with the mailing list and therefore I >> find difficult to trace everything. >> >> I understood very well the summary in four points given by Dr.Spencer >> Graves (message 53 of ISSUE 30, VOL 95), and parts of the comments added by >> Dr.Martin Maechler (message 71 of the same issue). >> I am not able to understand the improvement given by posdefify with respect >> to eigen and why nearPD is even better. >> >> Any final help? >> thank you for your attention >> >> Stefano Sofia PhD >> Weather Department of Civil Protection Marche Region >> >> AVVISO IMPORTANTE: Questo messaggio di posta elettronica pu? contenere >> informazioni confidenziali, pertanto ? destinato solo a persone autorizzate >> alla ricezione. I messaggi di posta elettronica per i client di Regione >> Marche possono contenere informazioni confidenziali e con privilegi legali. >> Se non si ? il destinatario specificato, non leggere, copiare, inoltrare o >> archiviare questo messaggio. Se si ? ricevuto questo messaggio per errore, >> inoltrarlo al mittente ed eliminarlo completamente dal sistema del proprio >> computer. Ai sensi dell?art. 6 della DGR n. 1394/2008 si segnala che, in >> caso di necessit? ed urgenza, la risposta al presente messaggio di posta >> elettronica pu? essere visionata da persone estranee al destinatario. >> IMPORTANT NOTICE: This e-mail message is intended to be received only by >> persons entitled to receive the confidential information it may contain. >> E-mail messages to clients of Regione Marche may contain information that >> is confidential and legally privileged. Please do not read, copy, forward, >> or store this message unless you are an intended recipient of it. If you >> have received this message in error, please forward it to the sender and >> delete it completely from your computer system. > > > -- > Spencer Graves, PE, PhD > President and Chief Operating Officer > Structure Inspection and Monitoring, Inc. > 751 Emerson Ct. > San Jos?, CA 95126 > ph: 408-655-4567 > From ptit_bleu at yahoo.fr Fri Feb 4 15:22:17 2011 From: ptit_bleu at yahoo.fr (PtitBleu) Date: Fri, 4 Feb 2011 06:22:17 -0800 (PST) Subject: [R] RODBC : how to avoid truncatig big integer when using sqlsave Message-ID: <1296829337637-3260251.post@n4.nabble.com> Hello, I'm still trying to modify my script in order to use RODBC instead of RMySQL (no more ready-to-use package for windows). My new problem is the following one (not seen with RMySQL): I'd like to copy a data.frame to a mysql table. One column is a numeric one with big integer like : 2005000206110 (13 figures) If I type this number in R, I get: 2.005e+12 and when I use sqlSave to save the data, in the MySQL table I get (the type of the column is bigint(13)): 2005000000000 instead of 2005000206110 I tried with varType = bigint unsigned for this column but it doesn't work. Is there a way to save the number with all the figures? Thanks in advance. Have a nice week-end, Ptit Bleu. -- View this message in context: http://r.789695.n4.nabble.com/RODBC-how-to-avoid-truncatig-big-integer-when-using-sqlsave-tp3260251p3260251.html Sent from the R help mailing list archive at Nabble.com. From rex.dwyer at syngenta.com Fri Feb 4 18:06:19 2011 From: rex.dwyer at syngenta.com (rex.dwyer at syngenta.com) Date: Fri, 4 Feb 2011 12:06:19 -0500 Subject: [R] pass nrow(x) to dots in function(x){plot(x,...)} In-Reply-To: References: Message-ID: <36180405F8418449918AD20618D110FC094E8CEE18@USETCMSXMB02.NAFTA.SYNGENTA.ORG> Hi Marianne, The quick-and-dirty solution is to add one character and make ns global: ns <<- nrow(x) Poor practice, but OK temporarily if you're just debugging. This is an issue of "scope". You are assuming dynamic scope, whereas R uses static scope. 'ns' was not defined when you said paste("n=",ns); it doesn't matter what its value is later. Even though R delays evaluation of the argument until it is first needed, if it ends up being evaluated, the result is the same as if you evaluated it in the environment where it appeared in the text. You can do something like this: myfun <- function(x, title.fun, ...) { ns <- nrow(x) title = title.fun(ns) barplot(x , main=title, ... ) } myfun(m1, title.fun=function(n) paste("n = ",n) ) Then the paste isn't evaluated until title.fun is *called*. If you don't want to always supply title.fun, you give a default: myfun <- function(x, title.fun=paste, ...) { ... or myfun <- function(x, title.fun=function(...){""}, ...) { ... or myfun <- function(x, title.fun=function(...){main}, main="", ...) { ... # (I think) Rex ----------------------- Message: 4 Date: Wed, 2 Feb 2011 11:51:50 +0000 From: Marianne Promberger To: "r-help at r-project.org" Subject: [R] pass nrow(x) to dots in function(x){plot(x,...)} Message-ID: <20110202115150.GD8598 at lauren> Content-Type: text/plain; charset=us-ascii Dear Rers, I have a function to barplot() a matrix, eg myfun <- function(x, ...) { barplot(x , ... )} (The real function is more complicated, it does things to the matrix first.) So I can do: m1 <- matrix(1:20,4) myfun(m1) myfun(m1, main="My title") I'd like to be able to add the number of rows of the matrix passed to the function to the "..." argument, eg myfun(m1, main=paste("n=",ns)) where 'ns' would be nrow(m1) I've tried this but it doesn't work: myfun <- function(x, ...) { ns <- nrow(x) barplot(x , ... ) } myfun(m1, main=paste("n = ",ns) ) ns is not found So, basically, how do I assign an object inside a function that I can then access in the dots when executing the function? Many thanks Marianne -- Marianne Promberger PhD, King's College London http://promberger.info R version 2.12.0 (2010-10-15) Ubuntu 9.04 ------------------------------ message may contain confidential information. If you are not the designated recipient, please notify the sender immediately, and delete the original and any copies. Any use of the message by you is prohibited. From spencer.graves at prodsyse.com Fri Feb 4 18:48:07 2011 From: spencer.graves at prodsyse.com (spencerg) Date: Fri, 04 Feb 2011 09:48:07 -0800 Subject: [R] always about positive definite matrix In-Reply-To: <631F8C7792124941838E6850D3A7802B030341A53E7A@ERMES.regionemarche.intra> References: <631F8C7792124941838E6850D3A7802B030341A53E7A@ERMES.regionemarche.intra> Message-ID: <4D4C3BD7.70309@prodsyse.com> 1. Martin Maechler's comments should be taken as replacements for anything I wrote where appropriate. Any apparent conflict is a result of his superior knowledge. 2. 'eigen' returns the eigenvalue decomposition assuming the matrix is symmetric, ignoring anything in m[upper.tri(m)]. 3. The basic idea behind both posdefify and nearPD is to compute the eigenenvalues and vectors, then replace any eigenvalues that are small or negative with some suitable small positive number and reconstruct the matrix from this modified eigenvalue decomposition. posdefify and nearPD implement modifications of this basic idea. 4. I recommend in the summary you mention nearPD but not posdefify, because nearPD was written more recently using the results of research not available to the authors when posdefify was written. MARTIN: There is a typo in the first line of the documentation for "symmpart". It currently reads, "symmpart(x) computes the symmetric part (x + t(x))/2 and the skew symmetric part (x - t(x))/2 of a square matrix x.". It should read, "symmpart(x) computes the symmetric part (x + t(x))/2 and skewpart the skew symmetric part (x - t(x))/2 of a square matrix x." Hope this helps. Spencer On 2/4/2011 6:26 AM, Stefano Sofia wrote: > Dear R-users, > I followed with high interest the thread about positive definite matrix. > I tracked all the messages of the discussion and I am trying to make a summary of all the correlated problems that arose from the discussion and the best solutions to overcome them. > As far as I understood, the main problems are two: assessing the symmetry of the given matrix and dealing with eigenvalues very close to zero. > Do I miss some important points? > > The functions that have been mentioned are eigen (I think in particualr the isSymmetric.matrix function), the function posdefify of the sfmisc package and the function nearPD of the Matrix package. I believe that some conversations have not been shared with the mailing list and therefore I find difficult to trace everything. > > I understood very well the summary in four points given by Dr.Spencer Graves (message 53 of ISSUE 30, VOL 95), and parts of the comments added by Dr.Martin Maechler (message 71 of the same issue). > I am not able to understand the improvement given by posdefify with respect to eigen and why nearPD is even better. > > Any final help? > thank you for your attention > > Stefano Sofia PhD > Weather Department of Civil Protection Marche Region > > AVVISO IMPORTANTE: Questo messaggio di posta elettronica pu? contenere informazioni confidenziali, pertanto ? destinato solo a persone autorizzate alla ricezione. I messaggi di posta elettronica per i client di Regione Marche possono contenere informazioni confidenziali e con privilegi legali. Se non si ? il destinatario specificato, non leggere, copiare, inoltrare o archiviare questo messaggio. Se si ? ricevuto questo messaggio per errore, inoltrarlo al mittente ed eliminarlo completamente dal sistema del proprio computer. Ai sensi dell?art. 6 della DGR n. 1394/2008 si segnala che, in caso di necessit? ed urgenza, la risposta al presente messaggio di posta elettronica pu? essere visionata da persone estranee al destinatario. > IMPORTANT NOTICE: This e-mail message is intended to be received only by persons entitled to receive the confidential information it may contain. E-mail messages to clients of Regione Marche may contain information that is confidential and legally privileged. Please do not read, copy, forward, or store this message unless you are an intended recipient of it. If you have received this message in error, please forward it to the sender and delete it completely from your computer system. -- Spencer Graves, PE, PhD President and Chief Operating Officer Structure Inspection and Monitoring, Inc. 751 Emerson Ct. San Jos?, CA 95126 ph: 408-655-4567 From luke-tierney at uiowa.edu Fri Feb 4 19:02:55 2011 From: luke-tierney at uiowa.edu (Luke Tierney) Date: Fri, 4 Feb 2011 12:02:55 -0600 Subject: [R] get caller's name In-Reply-To: <77EB52C6DD32BA4D87471DCD70C8D70003DE1C6B@NA-PA-VBE03.na.tibco.com> References: <20110203152733.GA26859@doriath.local> <4D4C0709.4040107@gmail.com> <77EB52C6DD32BA4D87471DCD70C8D70003DE1C6B@NA-PA-VBE03.na.tibco.com> Message-ID: <4D4C3F4F.1010002@uiowa.edu> The options showWarnCalls and showErrorCalls may also help -- they can be use do enable automatic printing of a call stack summary. From ?options: ?showWarnCalls?, ?showErrorCalls?: a logical. Should warning and error messages show a summary of the call stack? By default error calls are shown in non-interactive sessions. Best, luke On 02/04/2011 10:09 AM, William Dunlap wrote: >> -----Original Message----- >> From: r-help-bounces at r-project.org >> [mailto:r-help-bounces at r-project.org] On Behalf Of Duncan Murdoch >> Sent: Friday, February 04, 2011 6:03 AM >> To: Ernest Adrogu? >> Cc: r-help at stat.math.ethz.ch >> Subject: Re: [R] get caller's name >> >> On 03/02/2011 10:27 AM, Ernest Adrogu? wrote: >>> Hi, >>> Suppose a function that checks an object: >>> >>> stop.if.dims<- function(x) { >>> if (! is.null(dim(x))) { >>> stop("cannot handle dimensional data") >>> } >>> } >>> >>> This would be used by other functions that can only work with >>> dimensionless objects. The problem is the error message >> would need to >>> include the name of the function that called stop.if.dims, >> so that the >>> user knows which function got an argument that was incorrect. >>> >>> How do I do this? Or maybe there is another way... >> >> I see you have the answer you wanted, but I'd suggest you don't need >> this: the user should just use traceback() after the error >> to see the >> full call stack. Perhaps it's not the caller that's the problem, but >> the caller of the caller... >> >> Duncan Murdoch > > stopifnot() deals with the problem by arranging for the > error reporting mechanism not to say what function the > error comes from. If you are in the know, not seeing > "Error in someFunction(arg):" in the error might motivate > you to call traceback(). If you are not in the know, it > just frustrates you. > > R> myFunc<- function(x) stopifnot(all(x>0)) > R> myFunc(-pi) > Error: all(x> 0) is not TRUE > R> traceback() > 3: stop(paste(ch, " is not ", if (length(r)> 1L) "all ", "TRUE", > sep = ""), call. = FALSE) > 2: stopifnot(all(x> 0)) > 1: myFunc(-pi) > > In S+ stopifnot() uses eval(call("stop", message), sys.parent()) > to make the error message appear to come from the caller of > stopifnot(). The initial message is clearer but the traceback > more confusing: > > > myFunc<- function(x) stopifnot(all(x>0)) > > myFunc(-pi) > Problem in myFunc( - pi): all(x> 0) is not TRUE > Use traceback() to see the call stack > > traceback() > 8: eval(action, sys.parent()) > 7: doErrorAction("Problem in myFunc( - pi): all(x> 0) is not TRUE", 1000) > 6: stop("all(x> 0) is not TRUE") > 5: eval(call, sys.parent()) > 4: stopifnot(all(x> 0)) > 3: myFunc( - pi) > 2: eval(expression(myFunc( - pi))) > 1: > Message: Problem in myFunc( - pi): all(x> 0) is not TRUE > > If I try the eval(call("stop",message), sys.parent()) trick > in R the error is reported as being from eval(): > > myFunc(-pi) > Error in eval(expr, envir, enclos) : all(x> 0) is not TRUE > > S+'s error handler has some logic so that a stop() called from > eval() is reported as being from the frame that eval is evaluating > in. > > It might be nice to be able to tell stop(), warning(), and message() > to pretend they were called from somewhere other than where they > were actually called from. Falling back on traceback() doesn't > help with warnings and messages. Being able to put standard messages > like 'x not a matrix' into utility functions is handy, but it makes > it hard to track down the problem. > > Bill Dunlap > Spotfire, TIBCO Software > wdunlap tibco.com > > >> >> ______________________________________________ >> R-help at 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, reproducible code. >> > > ______________________________________________ > R-help at 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, reproducible code. -- Luke Tierney Statistics and Actuarial Science Ralph E. Wareham Professor of Mathematical Sciences University of Iowa Phone: 319-335-3386 Department of Statistics and Fax: 319-335-3017 Actuarial Science 241 Schaeffer Hall email: luke at stat.uiowa.edu Iowa City, IA 52242 WWW: http://www.stat.uiowa.edu From dwinsemius at comcast.net Fri Feb 4 19:07:46 2011 From: dwinsemius at comcast.net (David Winsemius) Date: Fri, 4 Feb 2011 13:07:46 -0500 Subject: [R] Finding non-normal distributions per row of data frame? In-Reply-To: <1296834494624-3260412.post@n4.nabble.com> References: <1296791547602-3259439.post@n4.nabble.com> <1296834494624-3260412.post@n4.nabble.com> Message-ID: <0D2DDEAF-7460-4078-9FA6-584592996389@comcast.net> On Feb 4, 2011, at 10:48 AM, DB1984 wrote: > > Thanks for the feedback Patrizio - but your function is performing the > shapiro.test on columns instead of rows... > > I tried: > nt<-data.frame(#a dataframe with 6 columns and 9 rows) > > nr <- nrow(nt) > > > test <- apply(nt, nt[1:nr,], shapiro.test) > > Error in ds[-MARGIN] : invalid subscript type 'list' The second argument to apply needs to be a (short) numeric vector. Your request suggest you simply want the number 1, since that would tell apply to use the function on rows. > > fred<-data.frame(sapply(test,function(x)c(x$statistic, x$p.value))) > > > But picked up the error above. Do I still require a loop to apply > this over > rows? > > > -- > View this message in context: http://r.789695.n4.nabble.com/Finding-non-normal-distributions-per-row-of-data-frame-tp3259439p3260412.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at 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, reproducible code. David Winsemius, MD West Hartford, CT From spencer.graves at structuremonitoring.com Fri Feb 4 18:15:03 2011 From: spencer.graves at structuremonitoring.com (Spencer Graves) Date: Fri, 04 Feb 2011 09:15:03 -0800 Subject: [R] always about positive definite matrix In-Reply-To: <631F8C7792124941838E6850D3A7802B030341A53E7A@ERMES.regionemarche.intra> References: <631F8C7792124941838E6850D3A7802B030341A53E7A@ERMES.regionemarche.intra> Message-ID: <4D4C3417.4030604@structuremonitoring.com> 1. Martin Maechler's comments should be taken as replacements for anything I wrote where appropriate. Any apparent conflict is a result of his superior knowledge. 2. 'eigen' returns the eigenvalue decomposition assuming the matrix is symmetric, ignoring anything in m[upper.tri(m)]. 3. The basic idea behind both posdefify and nearPD is to compute the eigenenvalues and vectors, then replace any eigenvalues that are small or negative with some suitable small positive number and reconstruct the matrix from this modified eigenvalue decomposition. posdefify and nearPD implement modifications of this basic idea. 4. I recommend in the summary you mention nearPD but not posdefify, because nearPD was written more recently using the results of research not available to the authors when posdefify was written. MARTIN: There is a typo in the first line of the documentation for "symmpart". It currently reads, "symmpart(x) computes the symmetric part (x + t(x))/2 and the skew symmetric part (x - t(x))/2 of a square matrix x.". It should read, "symmpart(x) computes the symmetric part (x + t(x))/2 and skewpart the skew symmetric part (x - t(x))/2 of a square matrix x." Hope this helps. Spencer On 2/4/2011 6:26 AM, Stefano Sofia wrote: > Dear R-users, > I followed with high interest the thread about positive definite matrix. > I tracked all the messages of the discussion and I am trying to make a summary of all the correlated problems that arose from the discussion and the best solutions to overcome them. > As far as I understood, the main problems are two: assessing the symmetry of the given matrix and dealing with eigenvalues very close to zero. > Do I miss some important points? > > The functions that have been mentioned are eigen (I think in particualr the isSymmetric.matrix function), the function posdefify of the sfmisc package and the function nearPD of the Matrix package. I believe that some conversations have not been shared with the mailing list and therefore I find difficult to trace everything. > > I understood very well the summary in four points given by Dr.Spencer Graves (message 53 of ISSUE 30, VOL 95), and parts of the comments added by Dr.Martin Maechler (message 71 of the same issue). > I am not able to understand the improvement given by posdefify with respect to eigen and why nearPD is even better. > > Any final help? > thank you for your attention > > Stefano Sofia PhD > Weather Department of Civil Protection Marche Region > > AVVISO IMPORTANTE: Questo messaggio di posta elettronica pu? contenere informazioni confidenziali, pertanto ? destinato solo a persone autorizzate alla ricezione. I messaggi di posta elettronica per i client di Regione Marche possono contenere informazioni confidenziali e con privilegi legali. Se non si ? il destinatario specificato, non leggere, copiare, inoltrare o archiviare questo messaggio. Se si ? ricevuto questo messaggio per errore, inoltrarlo al mittente ed eliminarlo completamente dal sistema del proprio computer. Ai sensi dell?art. 6 della DGR n. 1394/2008 si segnala che, in caso di necessit? ed urgenza, la risposta al presente messaggio di posta elettronica pu? essere visionata da persone estranee al destinatario. > IMPORTANT NOTICE: This e-mail message is intended to be received only by persons entitled to receive the confidential information it may contain. E-mail messages to clients of Regione Marche may contain information that is confidential and legally privileged. Please do not read, copy, forward, or store this message unless you are an intended recipient of it. If you have received this message in error, please forward it to the sender and delete it completely from your computer system. -- Spencer Graves, PE, PhD President and Chief Operating Officer Structure Inspection and Monitoring, Inc. 751 Emerson Ct. San Jos?, CA 95126 ph: 408-655-4567 From mbmiller+l at gmail.com Fri Feb 4 18:58:56 2011 From: mbmiller+l at gmail.com (Mike Miller) Date: Fri, 4 Feb 2011 11:58:56 -0600 (CST) Subject: [R] always about positive definite matrix In-Reply-To: References: <631F8C7792124941838E6850D3A7802B030341A53E7A@ERMES.regionemarche.intra> <4D4C3417.4030604@structuremonitoring.com> Message-ID: (Apologies to the cc-list: I'm resending from a different address because I didn't realize it was going to r-help.) I'm also not an expert on this topic. I just wanted to list a couple of ways that non-PD matrices might arise. I'll just add now a couple of pointers: First, I believe the term "semipositive definite" is considered ambiguous because in some literature it means that the matrix the smallest eigenvalue is zero and in other literature it means that no eigenvalue is negative (but there might be no zero eigenvalues). I think I might have read about this ambiguity in Searle's excellent "Matrix Algebra Useful for Statistics": http://www.amazon.com/Matrix-Algebra-Useful-Statistics-Probability/dp/0471866814 Second, people in certain stat areas often recommend this chapter by Werner Worthke, formerly of SAS Institute, Inc.: Wothke, Werner (1995), "Nonpositive Definite Matrices in Structural Equation Modeling", in "Testing Structural Equation Models", by Kenneth A. Bollen and J. Scott Long (eds.), Sage Publications, Newbury Park pp. 256-293. http://www.amazon.com/Testing-Structural-Equation-Models-Editions/dp/0803945078 I think you'll find basic definitions and explanations there along with a lot of information about how non-positive definite matrices may arise in real-world applications. Best, Mike On Fri, 4 Feb 2011, Spencer Graves wrote: > 1. Martin Maechler's comments should be taken as replacements for > anything I wrote where appropriate. Any apparent conflict is a result of his > superior knowledge. > > > 2. 'eigen' returns the eigenvalue decomposition assuming the matrix is > symmetric, ignoring anything in m[upper.tri(m)]. > > > 3. The basic idea behind both posdefify and nearPD is to compute the > eigenenvalues and vectors, then replace any eigenvalues that are small or > negative with some suitable small positive number and reconstruct the matrix > from this modified eigenvalue decomposition. posdefify and nearPD implement > modifications of this basic idea. > > > 4. I recommend in the summary you mention nearPD but not posdefify, > because nearPD was written more recently using the results of research not > available to the authors when posdefify was written. > > > MARTIN: There is a typo in the first line of the documentation for > "symmpart". It currently reads, "symmpart(x) computes the symmetric part (x > + t(x))/2 and the skew symmetric part (x - t(x))/2 of a square matrix x.". > It should read, "symmpart(x) computes the symmetric part (x + t(x))/2 and > skewpart the skew symmetric part (x - t(x))/2 of a square matrix x." > > > Hope this helps. > Spencer > > > On 2/4/2011 6:26 AM, Stefano Sofia wrote: >> Dear R-users, >> I followed with high interest the thread about positive definite matrix. >> I tracked all the messages of the discussion and I am trying to make a >> summary of all the correlated problems that arose from the discussion and >> the best solutions to overcome them. >> As far as I understood, the main problems are two: assessing the symmetry >> of the given matrix and dealing with eigenvalues very close to zero. >> Do I miss some important points? >> >> The functions that have been mentioned are eigen (I think in particualr the >> isSymmetric.matrix function), the function posdefify of the sfmisc package >> and the function nearPD of the Matrix package. I believe that some >> conversations have not been shared with the mailing list and therefore I >> find difficult to trace everything. >> >> I understood very well the summary in four points given by Dr.Spencer >> Graves (message 53 of ISSUE 30, VOL 95), and parts of the comments added by >> Dr.Martin Maechler (message 71 of the same issue). >> I am not able to understand the improvement given by posdefify with respect >> to eigen and why nearPD is even better. >> >> Any final help? >> thank you for your attention >> >> Stefano Sofia PhD >> Weather Department of Civil Protection Marche Region >> >> AVVISO IMPORTANTE: Questo messaggio di posta elettronica pu? contenere >> informazioni confidenziali, pertanto ? destinato solo a persone autorizzate >> alla ricezione. I messaggi di posta elettronica per i client di Regione >> Marche possono contenere informazioni confidenziali e con privilegi legali. >> Se non si ? il destinatario specificato, non leggere, copiare, inoltrare o >> archiviare questo messaggio. Se si ? ricevuto questo messaggio per errore, >> inoltrarlo al mittente ed eliminarlo completamente dal sistema del proprio >> computer. Ai sensi dell?art. 6 della DGR n. 1394/2008 si segnala che, in >> caso di necessit? ed urgenza, la risposta al presente messaggio di posta >> elettronica pu? essere visionata da persone estranee al destinatario. >> IMPORTANT NOTICE: This e-mail message is intended to be received only by >> persons entitled to receive the confidential information it may contain. >> E-mail messages to clients of Regione Marche may contain information that >> is confidential and legally privileged. Please do not read, copy, forward, >> or store this message unless you are an intended recipient of it. If you >> have received this message in error, please forward it to the sender and >> delete it completely from your computer system. > > > -- > Spencer Graves, PE, PhD > President and Chief Operating Officer > Structure Inspection and Monitoring, Inc. > 751 Emerson Ct. > San Jos?, CA 95126 > ph: 408-655-4567 > From Vasna.Gagic at agr.uni-goettingen.de Fri Feb 4 17:11:19 2011 From: Vasna.Gagic at agr.uni-goettingen.de (Gagic, Vasna) Date: Fri, 4 Feb 2011 17:11:19 +0100 Subject: [R] spatial autocorrelation for data that are temporally pseudoreplicated Message-ID: Dear all, I collected my data from the different agricultural fields every week over a period of a month. how can I test for spatial autocorrelation in R with data that are temporally pseudoreplicated? I used lme with correlation=corCompSymm(form=~Date) to model temporal pseudoreplication. Regards, VG From walte2ma at ufl.edu Fri Feb 4 16:51:42 2011 From: walte2ma at ufl.edu (Matthew A. H. Walters) Date: Fri, 4 Feb 2011 10:51:42 -0500 Subject: [R] Suppress only Z axis tick marks and numbers in wireframe statement Message-ID: <000601cbc483$6bc98580$435c9080$@edu> An embedded and charset-unspecified text was scrubbed... Name: not available URL: From wwwhsd at gmail.com Fri Feb 4 19:11:06 2011 From: wwwhsd at gmail.com (Henrique Dallazuanna) Date: Fri, 4 Feb 2011 16:11:06 -0200 Subject: [R] Apply parameters to a function from a list In-Reply-To: <4D4C0EC8.6010608@whu.edu> References: <4D4C0EC8.6010608@whu.edu> Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From Greg.Snow at imail.org Fri Feb 4 19:27:13 2011 From: Greg.Snow at imail.org (Greg Snow) Date: Fri, 4 Feb 2011 11:27:13 -0700 Subject: [R] lapply, strsplit, and list elements In-Reply-To: References: Message-ID: Try this: > x <- c("349/077,349/074,349/100,349/117", + "340/384.2,340/513,367/139,455/128,D13/168", + "600/437,128/903,128/904") > > library(gsubfn) > out <- strapply(x, '([0-9]+)(?=/)') > out [[1]] [1] "349" "349" "349" "349" [[2]] [1] "340" "340" "367" "455" "13" [[3]] [1] "600" "128" "128" The strapply looks for the pattern then returns every time it finds the pattern. The pattern in this case is 1 or more digits that are followed by a /, but the slash is not included in the matched portion (a positive look ahead). If you need more than digits you can modify the pattern to whatever matches before the /. Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.snow at imail.org 801.408.8111 > -----Original Message----- > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r- > project.org] On Behalf Of Dick Harray > Sent: Friday, February 04, 2011 8:37 AM > To: r-help at r-project.org > Subject: [R] lapply, strsplit, and list elements > > Hi there, > > I have a problem about lapply, strsplit, and accessing list elements, > which I don't understand or cannot solve: > > I have e.g. a character vector with three elements: > > x = c("349/077,349/074,349/100,349/117", > "340/384.2,340/513,367/139,455/128,D13/168", > "600/437,128/903,128/904") > > > The task I want to perform, is to generate a list, comprising the > portion in front of the "/" of each element of x: > > neededResult = list(c("349","349", "349", "349"), > c("340", "340", "367", "455", "D13"), > c("600", "128", "128") ) > > > I figured out that for a single element of x the following works > > unlist( lapply( strsplit( unlist( strsplit(x[1], "\\,") ), "/"), "[", > 1) ) > > but due to "unlist" it doesn't provide the required result if extended > to all elements of x > > unlist(lapply(strsplit( unlist( lapply(x, strsplit, "\\,")), "/"), > "[",)) > > > Someone can help me to get the needed result? > > Thanks and regards, > > Dirk > > ______________________________________________ > R-help at 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, reproducible code. From spector at stat.berkeley.edu Fri Feb 4 19:29:43 2011 From: spector at stat.berkeley.edu (Phil Spector) Date: Fri, 4 Feb 2011 10:29:43 -0800 (PST) Subject: [R] dataframes from a function In-Reply-To: <1296840100505-3260581.post@n4.nabble.com> References: <1296840100505-3260581.post@n4.nabble.com> Message-ID: Chris - You can solve your problem by removing the print statements and replacing them with answer = list(org.plot[org.plot$sub %in% ex.plot,], new.pl[new.pl$yar %in% "1991",], new.pl[new.pl$yar %in% "1993",]) prefix = sub('-','.',ex.plot) names(answer) = paste(prefix,c('.new','new1991','new1993'),sep='') return(answer) That will return a list with three dataframes having the names that you specified. If you actually want to create separate objects in your workspace, you could look at the help page for the assign function. - Phil Spector Statistical Computing Facility Department of Statistics UC Berkeley spector at stat.berkeley.edu On Fri, 4 Feb 2011, chris20 wrote: > > Hi, > I'm trying to create a function to return three dataframes for later use in > a graphic so I want the return from the function to give me dataframes and > with unique names relating to the variable they are based on. > For example..... > > sub<-c("6-1a","6-1a","6-1a","9-2b","9-2b","9-2b","7c","7c","7c") > yar<-rep(1991:1993,3) > x1n<-c(4,6,3,6,4,7,9,4,2) > y1m<-c(3,7,5,8,4,3,6,7,8) > prac<-data.frame(sub,yar,x1n,y1m) > > plot.restrut<-function(org.plot,ex.plot) { > new.pl<-org.plot[org.plot$sub %in% ex.plot,] > new.pl.st<-new.pl[new.pl$yar %in% "1991",] > new.pl.fin<-new.pl[new.pl$yar %in% "1993",] > print(new.pl) > print(new.pl.st) > print(new.pl.fin) > } > > plot.restrut(prac,"9-2b") > > ###### > I would like the output to be one dataframe with the name "9.2b.new" which > is new.pl in the example > Another data frame to be "9.2bnew1991" and another dataframe "9.2bnew1993" > > I want the dataframe names to relate to the variables they have come from > because I want to use the same function to extract lots of subsets of my > data. > > Thanks > Chris > > > -- > View this message in context: http://r.789695.n4.nabble.com/dataframes-from-a-function-tp3260581p3260581.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at 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, reproducible code. > From Greg.Snow at imail.org Fri Feb 4 19:32:30 2011 From: Greg.Snow at imail.org (Greg Snow) Date: Fri, 4 Feb 2011 11:32:30 -0700 Subject: [R] Apply parameters to a function from a list In-Reply-To: <4D4C0EC8.6010608@whu.edu> References: <4D4C0EC8.6010608@whu.edu> Message-ID: Try: > do.call(test,point) -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.snow at imail.org 801.408.8111 > -----Original Message----- > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r- > project.org] On Behalf Of Florian Burkart > Sent: Friday, February 04, 2011 7:36 AM > To: r-help at r-project.org > Subject: [R] Apply parameters to a function from a list > > Hey, > > this may be a simple question, but I am struggling to apply a list of > parameters to a function. > > > Say I have the following function: > > test<-function(a=1,b=2,c=3,d=4){a+b+c+d} > > And the following list: > > point<-list(a=3,d=2) > > Is there a way I can evaluate function test at point? > > > > (Apart from changing function test to take in a list, and take values > out of the list, but I'd rather not touch test). > > Thanks vm > > ______________________________________________ > R-help at 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, reproducible code. From chris.anderson at paradigmcorp.com Fri Feb 4 19:29:01 2011 From: chris.anderson at paradigmcorp.com (Anderson, Chris) Date: Fri, 4 Feb 2011 10:29:01 -0800 Subject: [R] switching y-axis to x-axis for qqmath Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From florian.burkart at whu.edu Fri Feb 4 19:34:52 2011 From: florian.burkart at whu.edu (Florian Burkart) Date: Fri, 04 Feb 2011 18:34:52 +0000 Subject: [R] Apply parameters to a function from a list In-Reply-To: References: <4D4C0EC8.6010608@whu.edu> Message-ID: <4D4C46CC.6000000@whu.edu> Of course. Thanks. On 04/02/2011 18:32, Greg Snow wrote: > Try: > >> do.call(test,point) From dannybolg at gmail.com Fri Feb 4 19:41:55 2011 From: dannybolg at gmail.com (DB1984) Date: Fri, 4 Feb 2011 10:41:55 -0800 (PST) Subject: [R] Finding non-normal distributions per row of data frame? In-Reply-To: <0D2DDEAF-7460-4078-9FA6-584592996389@comcast.net> References: <1296791547602-3259439.post@n4.nabble.com> <1296834494624-3260412.post@n4.nabble.com> <0D2DDEAF-7460-4078-9FA6-584592996389@comcast.net> Message-ID: <1296844915507-3260769.post@n4.nabble.com> Thanks David - but '1' (if I understood correctly) returns the same value for each row, which I took to be an error. nt V1 V2 V3 V4 V5 V6 1 24.71 23.56 24.71 23.56 24.71 23.56 2 25.64 25.06 25.64 25.06 25.64 25.06 3 21.29 20.87 21.29 20.87 21.29 20.87 4 25.92 26.92 25.92 26.92 25.92 26.92 5 24.36 23.60 24.36 23.60 24.36 23.60 6 24.91 24.32 24.91 24.32 24.91 24.32 7 23.56 23.14 23.56 23.14 23.56 23.14 8 23.94 23.99 23.94 23.99 23.94 23.99 9 26.65 26.07 26.65 26.07 26.65 26.07 test <- apply(nt, 1, shapiro.test) > fred<-data.frame(sapply(test,function(x)c(x$statistic, x$p.value))) > fred X1 X2 X3 X4 X5 X6 X7 X8 X9 W 0.682676792 0.682676792 0.682676792 0.682676792 0.682676882 0.682676792 0.682676792 0.682676792 0.682676792 0.004039347 0.004039347 0.004039347 0.004039347 0.004039358 0.004039347 0.004039347 0.004039347 0.004039347 Version details are below: R.Version() $platform [1] "x86_64-apple-darwin9.8.0" $arch [1] "x86_64" $os [1] "darwin9.8.0" $system [1] "x86_64, darwin9.8.0" $status [1] "" $major [1] "2" $minor [1] "12.0" $year [1] "2010" $month [1] "10" $day [1] "15" $`svn rev` [1] "53317" $language [1] "R" $version.string [1] "R version 2.12.0 (2010-10-15)" -- View this message in context: http://r.789695.n4.nabble.com/Finding-non-normal-distributions-per-row-of-data-frame-tp3259439p3260769.html Sent from the R help mailing list archive at Nabble.com. From wwwhsd at gmail.com Fri Feb 4 19:48:07 2011 From: wwwhsd at gmail.com (Henrique Dallazuanna) Date: Fri, 4 Feb 2011 16:48:07 -0200 Subject: [R] lapply, strsplit, and list elements In-Reply-To: References: Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From dwinsemius at comcast.net Fri Feb 4 20:01:45 2011 From: dwinsemius at comcast.net (David Winsemius) Date: Fri, 4 Feb 2011 14:01:45 -0500 Subject: [R] Finding non-normal distributions per row of data frame? In-Reply-To: <1296844915507-3260769.post@n4.nabble.com> References: <1296791547602-3259439.post@n4.nabble.com> <1296834494624-3260412.post@n4.nabble.com> <0D2DDEAF-7460-4078-9FA6-584592996389@comcast.net> <1296844915507-3260769.post@n4.nabble.com> Message-ID: <832218E8-A6AC-4FA4-BAC1-3638D5DD6069@comcast.net> On Feb 4, 2011, at 1:41 PM, DB1984 wrote: > > Thanks David - but '1' (if I understood correctly) returns the same > value for > each row, which I took to be an error. And exactly what were you expecting with that data? > > nt > V1 V2 V3 V4 V5 V6 > 1 24.71 23.56 24.71 23.56 24.71 23.56 > 2 25.64 25.06 25.64 25.06 25.64 25.06 > 3 21.29 20.87 21.29 20.87 21.29 20.87 > 4 25.92 26.92 25.92 26.92 25.92 26.92 > 5 24.36 23.60 24.36 23.60 24.36 23.60 > 6 24.91 24.32 24.91 24.32 24.91 24.32 > 7 23.56 23.14 23.56 23.14 23.56 23.14 > 8 23.94 23.99 23.94 23.99 23.94 23.99 > 9 26.65 26.07 26.65 26.07 26.65 26.07 > > test <- apply(nt, 1, shapiro.test) Run this and ponder the results a bit: apply(nt, 1, diff ) -- David. >> fred<-data.frame(sapply(test,function(x)c(x$statistic, x$p.value))) >> fred > X1 X2 X3 X4 > X5 X6 > X7 X8 X9 > W 0.682676792 0.682676792 0.682676792 0.682676792 0.682676882 > 0.682676792 > 0.682676792 0.682676792 0.682676792 > 0.004039347 0.004039347 0.004039347 0.004039347 0.004039358 > 0.004039347 > 0.004039347 0.004039347 0.004039347 > > > Version details are below: > R.Version() > $platform > [1] "x86_64-apple-darwin9.8.0" > > $arch > [1] "x86_64" > > $os > [1] "darwin9.8.0" > > $system > [1] "x86_64, darwin9.8.0" > > $status > [1] "" > > $major > [1] "2" > > $minor > [1] "12.0" > > $year > [1] "2010" > > $month > [1] "10" > > $day > [1] "15" > > $`svn rev` > [1] "53317" > > $language > [1] "R" > > $version.string > [1] "R version 2.12.0 (2010-10-15)" > -- > View this message in context: http://r.789695.n4.nabble.com/Finding-non-normal-distributions-per-row-of-data-frame-tp3259439p3260769.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at 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, reproducible code. David Winsemius, MD West Hartford, CT From dannybolg at gmail.com Fri Feb 4 20:00:25 2011 From: dannybolg at gmail.com (DB1984) Date: Fri, 4 Feb 2011 11:00:25 -0800 (PST) Subject: [R] Finding non-normal distributions per row of data frame? In-Reply-To: References: <1296791547602-3259439.post@n4.nabble.com> Message-ID: <1296846025940-3260812.post@n4.nabble.com> Hi Greg, In addition to the reply above, to address your questions - I fully appreciate that my understanding of the code is basic - this is my first attempt at putting this together... My starting point is a data frame with numeric and text columns, but I can cut columns to make a fully numeric matrix if that is easier to handle. "apply(y, 1, shapiro.test)" works for a second dataframe, yes. I guess that I chose a bad example dataset for 'nt'! The overall aim is to test the normality of the distribution of the values in each row. I would then subset out the non-normal distributions to interrogate further. The shapiro.test seems a simple first pass at this. I'd like to move on to plotting residuals of a QQplot next, to see if that is more or less sensitive at detecting non-normal distributions in the dataset. If you would recommend an alternative approach, I'd appreciate the input, thanks.. -- View this message in context: http://r.789695.n4.nabble.com/Finding-non-normal-distributions-per-row-of-data-frame-tp3259439p3260812.html Sent from the R help mailing list archive at Nabble.com. From mhosack at state.pa.us Fri Feb 4 19:45:02 2011 From: mhosack at state.pa.us (Hosack, Michael) Date: Fri, 4 Feb 2011 13:45:02 -0500 Subject: [R] read.table error Message-ID: R experts, I am working with a fairly large data set comprised of 563 rows by 116 columns including several different modes. I have been unable to read in the data set completely using the read.table function and the RGui (i.e. nearly half the total number of rows are missing from the data set along with the column names). The data does read in fully using Tinn-R's Rterm; however, at several points in the data frame a single line of code is split into two incomplete rows, again for no apparent reason. Since Rterm outputs data frames slowly line by line I would prefer to use Tinn-R's R Console for viewing them. Any help would be greatly appreciated. I apologize for the long code sample. Thank you, Mike BTINT <- read.table("c:\\Documents and Settings\\mh\\My Documents\\Programming_Statistical\\R Programming and Statistics\\LEBAS coding\\BTINT10a.txt", header=T, stringsAsFactors = FALSE) > dump("BTINT", file=stdout()) BTINT <- structure(list(MM = c(6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, NA, 7L, 7L, 5L, 5L, 5L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 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8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L), DD = c(11L, 11L, 11L, 11L, 11L, 11L, 11L, 12L, 12L, 12L, 12L, 12L, 2L, 2L, 3L, 3L, 5L, 5L, 10L, 16L, 16L, 16L, 16L, 20L, 20L, 20L, 20L, 20L, 23L, 23L, 23L, 23L, 23L, 23L, 23L, 23L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 2L, 23L, 23L, 23L, 23L, 24L, 24L, 24L, 24L, 24L, 27L, 27L, 27L, 27L, 27L, 27L, 30L, 30L, 30L, 30L, 30L, 30L, 30L, 30L, 30L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, NA, 16L, 16L, 30L, 30L, 30L, 2L, 5L, 5L, 5L, 5L, 8L, 8L, 8L, 25L, 25L, 25L, 25L, 25L, 25L, 25L, 25L, 25L, 25L, 25L, 25L, 25L, 25L, 25L, 25L, 25L, 25L, 25L, 25L, 25L, 25L, 25L, 25L, 25L, 25L, 25L, 25L, 25L, 27L, 27L, 27L, 27L, 27L, 27L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 8L, 8L, 8L, 8L, 6L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 16L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 17L, 12L, 12L, 12L, 15L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 18L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 3L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 25L, 25L, 25L, 25L, 25L, 25L, 25L, 25L, 25L, 25L, 25L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 17L, 17L, 17L, 17L, 17L, 21L, 22L, 22L, 22L, 22L, 22L, 22L, 22L, 22L, 22L, 22L, 22L, 22L, 22L, 22L, 22L, 24L, 24L, 24L, 24L, 24L, 24L, 24L, 24L, 27L, 27L, 27L, 27L, 27L, 27L, 27L, 27L, 27L, 27L, 27L, 27L, 27L, 27L, 27L, 29L, 31L, 31L, 31L, 31L, 31L, 31L, 31L, 31L, 31L, 31L, 30L, 31L, 31L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 11L, 11L, 11L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 14L, 14L, 14L, 17L, 17L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 24L, 24L, 29L, 29L, 29L, 29L, 29L, 29L, 29L, 29L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 13L, 14L, 14L, 14L, 24L, 29L, 29L, 29L, 29L, 29L, 29L), YY = c(2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2010L), WSTRAT = c("WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", NA, "WEEKDAY", "WEEKDAY", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKDAY", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKEND", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY", "WEEKDAY"), PER = c("AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "MORN", "MORN", "MORN", "MORN", "MORN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "MORN", "AFTN", "AFTN", "AFTN", "AFTN", "MORN", "MORN", "MORN", "MORN", "MORN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", NA, "MORN", "MORN", "MORN", "MORN", "MORN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "AFTN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "AFTN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "MORN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN", "AFTN"), SITE = c("WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "LAMPE", "LAMPE", "WALNUT.CREEK", "WALNUT.CREEK", "LAMPE", "EAST.AVE", "NORTH.EAST", "NORTH.EAST", "NORTH.EAST", "NORTH.EAST", "NORTH.EAST", "NORTH.EAST", "NORTH.EAST", "EAST.AVE", "WALNUT.CREEK", "LAMPE", "LAMPE", "EAST.AVE", "WALNUT.CREEK", "LAMPE", "EAST.AVE", "EAST.AVE", "EAST.AVE", "EAST.AVE", "EAST.AVE", "EAST.AVE", "EAST.AVE", "EAST.AVE", "EAST.AVE", "NORTH.EAST", "NORTH.EAST", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "LAMPE", "LAMPE", "EAST.AVE", "EAST.AVE", "NORTH.EAST", "NORTH.EAST", "NORTH.EAST", "NORTH.EAST", "NORTH.EAST", "EAST.AVE", "EAST.AVE", "EAST.AVE", "NORTH.EAST", "NORTH.EAST", "NORTH.EAST", "NORTH.EAST", "WALNUT.CREEK", "WALNUT.CREEK", "NORTH.EAST", "NORTH.EAST", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "EAST.AVE", "EAST.AVE", "NORTH.EAST", "NORTH.EAST", "NORTH.EAST", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "LAMPE", "LAMPE", "LAMPE", "EAST.AVE", "EAST.AVE", "EAST.AVE", "EAST.AVE", "EAST.AVE", "EAST.AVE", "NORTH.EAST", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "NORTH.EAST", "NORTH.EAST", "NORTH.EAST", "WALNUT.CREEK", "WALNUT.CREEK", "LAMPE", "LAMPE", NA, "WALNUT.CREEK", "WALNUT.CREEK", "NORTH.EAST", "NORTH.EAST", "NORTH.EAST", "EAST.AVE", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "LAMPE", "EAST.AVE", "EAST.AVE", "EAST.AVE", "EAST.AVE", "NORTH.EAST", "NORTH.EAST", "NORTH.EAST", "NORTH.EAST", "NORTH.EAST", "NORTH.EAST", "NORTH.EAST", "NORTH.EAST", "NORTH.EAST", "NORTH.EAST", "LAMPE", "LAMPE", "EAST.AVE", "EAST.AVE", "EAST.AVE", "NORTH.EAST", "NORTH.EAST", "WALNUT.CREEK", "LAMPE", "EAST.AVE", "EAST.AVE", "EAST.AVE", "EAST.AVE", "EAST.AVE", "NORTH.EAST", "NORTH.EAST", "NORTH.EAST", "EAST.AVE", "NORTH.EAST", "NORTH.EAST", "NORTH.EAST", "NORTH.EAST", "NORTH.EAST", "NORTH.EAST", "NORTH.EAST", "NORTH.EAST", "NORTH.EAST", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "EAST.AVE", "EAST.AVE", "EAST.AVE", "EAST.AVE", "NORTH.EAST", "EAST.AVE", "EAST.AVE", "EAST.AVE", "EAST.AVE", "NORTH.EAST", "NORTH.EAST", "NORTH.EAST", "NORTH.EAST", "WALNUT.CREEK", "NORTH.EAST", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "LAMPE", "LAMPE", "NORTH.EAST", "NORTH.EAST", "NORTH.EAST", "EAST.AVE", "NORTH.EAST", "NORTH.EAST", "NORTH.EAST", "NORTH.EAST", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "EAST.AVE", "EAST.AVE", "NORTH.EAST", "NORTH.EAST", "NORTH.EAST", "NORTH.EAST", "NORTH.EAST", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "NORTH.EAST", "NORTH.EAST", "NORTH.EAST", "NORTH.EAST", "NORTH.EAST", "NORTH.EAST", "NORTH.EAST", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "LAMPE", "LAMPE", "WALNUT.CREEK", "NORTH.EAST", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "LAMPE", "EAST.AVE", "EAST.AVE", "EAST.AVE", "EAST.AVE", "WALNUT.CREEK", "EAST.AVE", "EAST.AVE", "NORTH.EAST", "NORTH.EAST", "NORTH.EAST", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "LAMPE", "LAMPE", "LAMPE", "NORTH.EAST", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "LAMPE", "LAMPE", "LAMPE", "EAST.AVE", "EAST.AVE", "EAST.AVE", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "LAMPE", "EAST.AVE", "EAST.AVE", "EAST.AVE", "EAST.AVE", "EAST.AVE", "LAMPE", "EAST.AVE", "EAST.AVE", "EAST.AVE", "NORTH.EAST", "NORTH.EAST", "NORTH.EAST", "NORTH.EAST", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "LAMPE", "LAMPE", "LAMPE", "NORTH.EAST", "NORTH.EAST", "NORTH.EAST", "LAMPE", "EAST.AVE", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "LAMPE", "EAST.AVE", "LAMPE", "EAST.AVE", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "LAMPE", "NORTH.EAST", "NORTH.EAST", "NORTH.EAST", "NORTH.EAST", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "NORTH.EAST", "NORTH.EAST", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "EAST.AVE", "EAST.AVE", "EAST.AVE", "EAST.AVE", "EAST.AVE", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "EAST.AVE", "NORTH.EAST", "NORTH.EAST", "NORTH.EAST", "NORTH.EAST", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "LAMPE", "LAMPE", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "NORTH.EAST", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK", "WALNUT.CREEK"), ZIP = c(16415L, 16506L, 16415L, 15044L, 16426L, 16319L, 16505L, 16412L, 16417L, 16505L, 16505L, 16510L, 17032L, 17061L, 15537L, 45784L, 17015L, 16506L, 15108L, 16314L, 15323L, 44012L, 16510L, 16415L, 16504L, 16335L, 16511L, 16511L, 15084L, 16503L, 16134L, 16505L, 16421L, 16504L, 15236L, 16428L, 16506L, 16410L, 16423L, 15317L, 16423L, 15065L, 15236L, 16505L, 15226L, 16430L, 16504L, 25504L, 16428L, 15133L, 16428L, 14757L, 16504L, 16501L, 16503L, 16301L, 16340L, 16428L, 17543L, 15668L, 16316L, 17032L, 15122L, 16417L, 16505L, 16508L, 16441L, 16504L, 16428L, 17960L, 25671L, 15005L, 16406L, 16423L, 15714L, 16041L, 16509L, 16428L, 16507L, 16505L, 16404L, 16510L, 16504L, 16510L, NA, 16127L, 16877L, NA, 16421L, 15825L, 16417L, 16423L, 16407L, 15102L, 15084L, 16505L, 16415L, 16403L, 19341L, 15057L, 16503L, 16428L, 15026L, 16335L, 16415L, 16503L, 16116L, NA, 16417L, 15241L, 15025L, 15221L, 16506L, 16668L, 15610L, 16423L, 16415L, 16502L, 15938L, 16327L, 16502L, 16441L, 15670L, 16313L, 16142L, 16641L, 16415L, 16415L, 16407L, 15122L, 16505L, 16117L, 16509L, 15618L, 15721L, 16441L, 16354L, 16510L, 16510L, 16441L, 16504L, 16704L, 16428L, 16421L, 14775L, 16428L, 16059L, 15025L, 16428L, 16428L, 16504L, 16433L, 15228L, 16335L, 16441L, 16365L, 16428L, 8902L, 16510L, 16508L, 16441L, 16442L, 16503L, 16508L, 16428L, 15815L, 16323L, 15024L, 15656L, 16341L, 16063L, 16428L, 18052L, 16428L, 14701L, 16438L, 44060L, 16410L, 15068L, 11651L, 16053L, 16415L, 16731L, 16346L, 16362L, 44641L, 15005L, 15956L, 16505L, 15001L, 15614L, 15066L, 15237L, 16417L, 16508L, 16423L, 16508L, 16428L, 16509L, 16441L, 16502L, 16441L, 16504L, 15129L, 14767L, 15143L, 15686L, 16402L, 16505L, 16415L, 15205L, 16509L, 15106L, 16509L, 16002L, 15167L, 15767L, 15701L, 14187L, 16057L, 16701L, 16504L, 14775L, 16402L, 42465L, 16506L, 16423L, 16335L, 16423L, 16403L, 16417L, 16401L, 15112L, 16505L, 16505L, 15241L, 16505L, 16117L, 16415L, 16360L, 16510L, 16510L, 16504L, 16002L, 15126L, 15724L, 16335L, 16417L, 16506L, 16412L, 16508L, 16101L, 15650L, 16505L, 16510L, 16428L, 16142L, 16428L, 14775L, 16428L, 16417L, 16509L, 15216L, 16057L, 15650L, 15479L, 16415L, 16002L, 15084L, 16636L, 15239L, 15344L, 15601L, 15106L, 16125L, 15216L, 16701L, 16505L, 16542L, 15066L, 16150L, 16630L, 16511L, 16421L, 16506L, 16749L, 16301L, 16001L, 16442L, 15136L, 15229L, 16428L, 16428L, 16428L, 16428L, 16002L, 16438L, NA, 15825L, 16417L, 15122L, 15864L, 15102L, 16410L, 16365L, 26541L, 16111L, 16438L, 15767L, 15044L, 16417L, 16630L, 15044L, 16509L, 15329L, 16509L, 16056L, 16415L, 15084L, 16505L, 16636L, 16438L, 16053L, 15131L, 16415L, 15063L, 16417L, 16335L, 16510L, 16240L, 15746L, 16423L, 16426L, 16335L, 16433L, 40845L, 45249L, 15236L, 16504L, 16510L, 95037L, 16335L, 16441L, 16410L, 15084L, 16504L, 16421L, 16510L, 16314L, 15656L, 16438L, 16410L, 16508L, 15236L, 15829L, 16150L, 16507L, 15435L, 15301L, 16509L, 15066L, 44483L, 16201L, 16313L, 15229L, 16114L, 16423L, 16504L, 15084L, 16428L, 18826L, 16428L, 40047L, 15904L, 16248L, 16403L, 16505L, 16502L, 16323L, 83274L, 16511L, 16510L, 16063L, 15227L, 16506L, 15238L, 15301L, 16002L, 15239L, 16057L, 16351L, 16426L, 16415L, 15047L, 19541L, 16423L, 15717L, 16415L, 16423L, 16506L, 16510L, 16504L, 16426L, 44333L, 16441L, 16509L, 16351L, 16417L, 16441L, 16417L, 27565L, 16415L, 16438L, 15044L, 16441L, 16508L, 16438L, 16511L, 16506L, 16510L, 16509L, 16441L, 16510L, 15301L, 16407L, 16428L, 16142L, 16410L, 16415L, 15062L, 15666L, 15238L, 16254L, 16510L, 16426L, 15028L, 15656L, 15136L, 15301L, 15642L, 17353L, 15204L, 16317L, 16648L, 15101L, 15229L, 17063L, 15061L, 16053L, 15301L, 15401L, 16907L, 16150L, 16510L, 16506L, 15202L, 16428L, 16428L, 14775L, 16505L, 16503L, 16411L, 16412L, 16373L, 16117L, 16505L, 15212L, 16403L, 16410L, 15642L, 16505L, 16920L, 16417L, 16342L, 15857L, 16441L, 16159L, 16504L, 16506L, 16417L, 16415L, 16423L, 16424L, 15143L, 15601L, 16335L, 15479L, 16506L, 15267L, 16101L, 16428L, 16137L, 15656L, 15236L, 15425L, 15601L, 16428L, 14781L, 16428L, 15102L, 15825L, 16438L, 16002L, 16441L, 15767L, 16428L, 16428L, 15132L, 15009L, 16407L, 16342L, 15227L, 16506L, 16438L, 16438L, 16509L, 16508L, 16508L, 15010L, 16342L, 16686L, 16201L, 16125L, 16508L, 16510L, 16424L, 15042L, 16254L, 16510L, 16428L, 16428L, 16428L, 15690L, 16037L, 16505L, 16056L, 16505L, 15236L, 15227L, 16506L, 16424L, 16335L, 16365L, 15122L, 15044L, 16314L, 15650L, 16323L, 15825L, 16415L, 16373L, 16335L, 16423L, 16506L, 13021L, 15237L, 15906L, 16428L, 16509L, 16514L, 16504L, 55110L, 7336L), CURTIM = c(1932L, 1935L, 1945L, 1957L, 2000L, 2134L, 2135L, 811L, 830L, 931L, 1028L, 1200L, 1755L, 1812L, 1809L, 1811L, 1800L, 1610L, 740L, 1503L, 1651L, 1725L, 1813L, 1043L, 1147L, 1305L, 1328L, 1330L, 1450L, 1455L, 1500L, 1505L, 1515L, 1520L, 1625L, 1630L, 1450L, 1455L, 1520L, 1530L, 1531L, 1533L, 1600L, 1709L, 1725L, 1803L, 1814L, 1933L, 2017L, 2020L, 2040L, 2048L, 1450L, 1457L, 1500L, 1608L, 1615L, 1700L, 1701L, 1907L, 1913L, 1753L, 1715L, 1837L, 1933L, 1939L, 1110L, 1112L, 1218L, 1234L, 1310L, 1112L, 1140L, 1145L, 1148L, 1218L, 1330L, 936L, 1000L, 1021L, 1028L, 1039L, 1041L, 1055L, 1103L, 1155L, 1119L, 1120L, 1121L, 1126L, 1135L, 1137L, 1152L, 1153L, 1200L, 1201L, 1202L, 1230L, 1233L, 1236L, 1616L, 1701L, 1706L, 1930L, 1931L, 2055L, 2117L, NA, 1008L, 1018L, 1235L, 1246L, 1312L, 1432L, 1500L, 1512L, 1530L, 1535L, 1440L, 1441L, 1445L, 1515L, 1517L, 1520L, 1523L, 1525L, 1530L, 1531L, 1537L, 1538L, 1548L, 1550L, 1541L, 1543L, 1558L, 1728L, 1801L, 1811L, 1816L, 1822L, 1928L, 1936L, 1941L, 2000L, 2002L, 2016L, 2024L, 2030L, 2038L, 2045L, 1435L, 1506L, 1540L, 1541L, 1552L, 1810L, 1100L, 1242L, 955L, 1054L, 1056L, 1100L, 1108L, 1111L, 1216L, 1255L, 1316L, 821L, 1000L, 1010L, 1032L, 1039L, 1045L, 1048L, 1056L, 1100L, 1109L, 1220L, 1231L, 1232L, 1235L, 1236L, 1237L, 1238L, 1239L, 1245L, 1246L, 1249L, 1250L, 1253L, 1254L, 1300L, 1301L, 1257L, 1258L, 1305L, 1315L, 1601L, 1025L, 1050L, 1101L, 1105L, 1159L, 1202L, 1215L, 1240L, 1050L, 822L, 925L, 1005L, 1012L, 1014L, 1045L, 1050L, 1057L, 1100L, 1203L, 1208L, 1300L, 1313L, 1325L, 2115L, 1031L, 1050L, 1055L, 1105L, 1227L, 1228L, 1230L, 1237L, 1243L, 1244L, 1246L, 1249L, 1253L, 1300L, 1301L, 1303L, 1307L, 1308L, 1311L, 1315L, 1316L, 1322L, 1327L, 1328L, 1331L, 1333L, 1335L, 1340L, 1341L, 1342L, 1347L, 823L, 824L, 948L, 955L, 1000L, 1026L, 1107L, 1227L, 1230L, 1245L, 1246L, 1250L, 1251L, 1253L, 1302L, 1303L, 1307L, 1308L, 1316L, 1323L, 1323L, 1325L, 1330L, 1335L, 1336L, 1337L, 1255L, 1256L, 1301L, 1312L, 1315L, 1325L, 1326L, 1336L, 1338L, 1339L, 1340L, 1338L, 950L, 1000L, 1011L, 1013L, 1019L, 1030L, 1101L, 1218L, 1219L, 1221L, 1231L, 1232L, 1443L, 1445L, 1450L, 1454L, 1456L, 1457L, 1500L, 1502L, 1509L, 1510L, 1513L, 1234L, 1238L, 1240L, 1245L, 1247L, 1256L, 1300L, 1301L, 1302L, 1305L, 1306L, 1307L, 1308L, 1313L, 1315L, 1320L, 1322L, 1325L, 1330L, 1332L, 1335L, 947L, 1006L, 1013L, 1035L, 1045L, 1046L, 1049L, 1055L, 1057L, 1158L, 1222L, 1255L, 1000L, 1110L, 1117L, 1204L, 1206L, 1207L, 1209L, 1208L, 1215L, 1217L, 1220L, 1221L, 1222L, 1224L, 1225L, 1252L, 1255L, 1259L, 1326L, 1446L, 1501L, 1515L, 1613L, 1635L, 1703L, 1846L, 1848L, 1904L, 1919L, 1930L, 1945L, 1951L, 2105L, 2120L, 2132L, 1009L, 1117L, 1130L, 1135L, 1137L, 1138L, 1200L, 1230L, 942L, 1010L, 1018L, 1020L, 1042L, 1043L, 1645L, 1053L, 1050L, 1051L, 1223L, 1230L, 1232L, 1252L, 1315L, 1330L, 954L, 1017L, 1021L, 1054L, 1056L, 1057L, 1058L, 1213L, 1252L, 1319L, 1323L, 1324L, 1330L, 1005L, 1025L, 1047L, 1100L, 1200L, 1203L, 1232L, 1313L, 1720L, 1724L, 1715L, 1730L, 1735L, 1740L, 1742L, 1745L, 1747L, 1748L, 1752L, 1800L, 1801L, 1803L, 1805L, 1820L, 1821L, 1823L, 934L, 941L, 951L, 1008L, 1031L, 1040L, 1044L, 1049L, 1150L, 1210L, 1234L, 1250L, 1304L, 1306L, 1435L, 1621L, 2000L, 2010L, 2021L, 2022L, 2025L, 2033L, 2038L, 2040L, 2042L, 2045L, 2050L, 2110L, 1822L, 1922L, 2032L, 1441L, 1624L, 1117L, 1120L, 1131L, 1132L, 1135L, 1137L, 1140L, 1142L, 1159L, 1202L, 1204L, 1206L, 1210L, 1213L, 1214L, 1223L, 1342L, 1300L, 1324L, 1012L, 1054L, 1251L, 1253L, 1258L, 1300L, 1301L, 1305L, 1520L, 1537L, 1722L, 1728L, 1739L, 1751L, 1816L, 1820L, 2021L, 2025L, 2026L, 2028L, 2035L, 1432L, 1444L, 1450L, 1455L, 1500L, 1505L, 1515L, 1520L, 1525L, 1545L, 1807L, 1957L, 2012L, 945L, 950L, 1109L, 1110L, 1111L, 1120L, 1130L, 1135L, 1136L, 1140L, 1150L, 1155L, 1200L, 1205L, 1210L, 1215L, 1216L, 1217L, 1220L, 1336L, 1350L, 1006L, 1201L, 1220L, 1228L, 1143L, 1716L, 1853L, 1904L, 1925L, 1926L, 1940L), GRPFSH = c(1L, 2L, 1L, 2L, 2L, 3L, 2L, 1L, 2L, 2L, 2L, 3L, 2L, 2L, 2L, 3L, 2L, 2L, 2L, 1L, 2L, 2L, 1L, 3L, 2L, 2L, 3L, 2L, 2L, 3L, 1L, 3L, 3L, 1L, 1L, 1L, 1L, 3L, 3L, 2L, 2L, 2L, 3L, 2L, 2L, 2L, 1L, 1L, 2L, 2L, 4L, 2L, 2L, 1L, 1L, 2L, 2L, 4L, 2L, 1L, 3L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 3L, 2L, 3L, 2L, 1L, 2L, 1L, 2L, 2L, 4L, 2L, 2L, 3L, 1L, 2L, 2L, 3L, 3L, 1L, 2L, 2L, 3L, 1L, 6L, 3L, 4L, 2L, 2L, 4L, 3L, 4L, 3L, 2L, 2L, 2L, 2L, 2L, 3L, NA, 2L, 3L, 2L, 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SE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE), HRSFSH = c(1L, 2L, 2L, 3L, 3L, 9L, 1L, 5L, 1L, 3L, 2L, 2L, 4L, 4L, 9L, 9L, 10L, 20L, 1L, 6L, 8L, 9L, 12L, 4L, 4L, 3L, 6L, 4L, 6L, 5L, 8L, 1L, 6L, 2L, 1L, 5L, 4L, 4L, 8L, 4L, 5L, 4L, 6L, 4L, 2L, 3L, 4L, 6L, 3L, 9L, 1L, 3L, 4L, 3L, 9L, 0L, 8L, 3L, 8L, 3L, 4L, 5L, 7L, 1L, 2L, 3L, 3L, 5L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 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L), PSOUGHT1 = c(NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "SMB", "SMB", "SMB", NA, NA, NA, NA, NA, NA, NA, "SMB", "SMB", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "SMB", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "WB", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "SMB", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "LMB", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "LMB", NA, NA, "LMB", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "WE", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), PGRID1 = c(NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 521L, 521L, 521L, NA, NA, NA, NA, NA, NA, NA, 521L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 521L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 521L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 521L, NA, NA, 521L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), PSOUGHT2 = c(NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "LMB", "LMB", "LMB", NA, NA, NA, NA, NA, NA, NA, NA, "LMB", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "LMB", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), PGRID2 = c(NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 521L, 521L, 521L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 521L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), PSOUGHT3 = c(NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), PGRID3 = c(NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA ), PSP1 = c(NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "SMB", "SMB", "SMB", NA, NA, NA, NA, NA, NA, NA, "SMB", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "LMB", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "SPH", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "LMB", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "LMB", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "LMB", NA, NA, "LMB", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "SMB", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, N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L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L), PSP2 = c(NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "LMB", "LMB", "LMB", NA, NA, NA, NA, NA, NA, NA, "NP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "WB", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, N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0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L), PSP3 = c(NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", "RB", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,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0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L), PSP4 = c(NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA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 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L), PSP5 = c(NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), PCAU5 = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L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, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), PCAU6 = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0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A, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), PCAU7 = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 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NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), PCAU8 = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,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, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), PCAU9 = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L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, 0L, 0L, 0L, 0L, 0L), EASTPER = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 0L, 12L, 0L, 75L, 0L, 0L, 100L, 100L, 0L, 100L, 100L, 0L, 0L, 100L, 0L, 100L, 100L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 100L, 100L, 100L, 100L, 100L, 0L, 100L, 0L, 100L, 100L, 100L, 100L, 0L, 0L, 100L, 100L, 0L, 0L, 100L, 0L, 0L, 100L, 100L, 100L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 50L, 0L, 0L, 0L, 100L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 100L, 100L, 100L, 0L, 0L, 100L, 0L, 0L, 0L, 0L, 100L, 100L, 100L, 67L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 0L, 100L, 100L, 100L, 100L, 100L, 100L, 0L, 0L, 0L, 70L, 0L, 0L, 0L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 100L, 0L, 0L, 100L, 0L, 0L, 100L, 0L, 100L, 100L, 100L, 100L, 0L, 100L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 100L, 100L, 100L, 100L, 0L, 100L, 100L, 100L, 100L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,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 100L, 100L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 100L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 100L, 100L, 100L, 100L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 100L, 0L, 0L, 0L, 0L, 0L), ESOUGHT1 = c(NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", "SMB", "SMB", "SMB", "SMB", "SMB", "LT", "SMB", NA, NA, NA, "YP", NA, NA, "YP", "YP", NA, "YP", "YP", NA, NA, "YP", NA, "YP", "ANY", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "SMB", "WE", "WE", "WE", "WE", NA, "SMB", NA, "ANY", "WE", "WE", "WE", NA, NA, "SMB", "LT", NA, NA, "WE", NA, NA, "ANY", "SMB", "SMB", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, NA, NA, "WE", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "WE", "YP", "WE", NA, NA, "YP", NA, NA, NA, NA, "WE", "WE", "WE", "SMB", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "SMB", "WE", "SMB", "WE", "WE", "YP", "YP", "YP", "YP", "YP", NA, "YP", "SMB", "SMB", "YP", "SMB", "WE", NA, NA, NA, "YP", NA, NA, NA, "YP", "YP", "ANY", "WE", "YP", "WE", "WE", "WE", "WE", "YP", "WE", "ANY", "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "SMB", NA, NA, "WE", NA, NA, "YP", NA, "SMB", "WE", "WE", "YP", NA, "WE", NA, NA, NA, NA, NA, NA, NA, NA, NA, "WE", "WE", "WE", "WE", NA, "WE", "WE", "WE", "WE", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "WE", "ANY", "WE", "WE", "WE", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "WE", "WE", "WE", "WE", "WE", "ANY", "WE", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "WE", NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "ANY", NA, "WE", NA, "YP", NA, "WE", "WE", "YP", NA, NA, NA, NA, NA, NA, NA, "WE", NA, NA, "WE", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", "SMB", "WE", NA, NA, "WE", NA, NA, NA, NA, NA, NA, NA, "YP", NA, NA, NA, NA, NA, "YP", NA, NA, NA, "WE", "YP", "YP", "WE", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "WE", "YP", NA, "YP", "WE", "WE", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", "WE", "YP", "YP", NA, NA, NA, NA, NA, NA, "YP", "WE", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "WE", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", "WE", "WE", "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, NA, NA, NA, NA), EGRID1 = c(NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 522L, 522L, 522L, 522L, 522L, NA, NA, 521L, NA, NA, NA, NA, NA, NA, 521L, 521L, NA, 521L, 521L, NA, NA, 521L, NA, NA, 522L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 522L, NA, NA, NA, NA, 521L, NA, NA, 522L, 522L, 522L, NA, NA, 522L, 522L, NA, NA, 620L, NA, NA, 522L, 522L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 521L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 522L, 522L, NA, NA, 522L, NA, NA, NA, NA, 522L, 522L, 522L, 521L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 522L, 522L, 522L, 522L, 522L, 522L, 522L, 522L, 522L, 522L, NA, NA, 521L, 521L, 521L, 522L, 522L, NA, NA, NA, 521L, NA, NA, NA, 522L, 522L, 522L, 521L, 522L, 522L, 522L, 522L, 522L, 522L, 522L, 522L, 522L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 522L, NA, NA, 521L, NA, 522L, 522L, 522L, 522L, NA, 522L, NA, NA, NA, NA, NA, NA, NA, NA, NA, 521L, 522L, 522L, 522L, NA, 522L, 522L, 522L, 522L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 522L, 522L, 522L, 522L, 522L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 522L, 522L, 522L, 522L, 522L, NA, 522L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 522L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 521L, NA, 521L, NA, 521L, NA, 522L, NA, 522L, NA, NA, NA, NA, NA, NA, NA, 522L, NA, NA, 522L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 522L, 522L, 522L, NA, NA, 521L, NA, NA, NA, NA, NA, NA, NA, 521L, NA, NA, NA, NA, NA, 521L, NA, NA, NA, 522L, 522L, 522L, 522L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 521L, 521L, NA, 522L, 522L, 522L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 521L, 521L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 522L, 522L, 522L, 522L, NA, NA, NA, NA, NA, NA, 522L, 522L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 521L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 522L, 522L, 522L, 522L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 522L, NA, NA, NA, NA, NA), ESOUGHT2 = c(NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "WE", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "WE", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "WE", NA, "WE", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "WE", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, NA, NA, NA, NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), EGRID2 = c(NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 522L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 522L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 522L, NA, 522L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 522L, NA, NA, NA, NA, NA, 522L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 521L, NA, 521L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 522L, NA, NA, 521L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 522L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 522L, NA, NA, NA, NA, NA, NA, NA, NA, NA, 522L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 522L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), ESOUGHT3 = c(NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), EGRID3 = c(NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), ESP1 = c(NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "SPH", "RG", "SMB", "SMB", "SMB", "SMB", NA, "SMB", NA, NA, NA, "SPH", NA, NA, "YP", "RG", NA, "RG", "RG", NA, NA, "RG", NA, "RG", "SPH", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "SMB", "SPH", "WE", "SMB", "SPH", NA, "SPH", NA, "SMB", "WE", "SPH", "SPH", NA, NA, "SMB", NA, NA, NA, NA, NA, NA, NA, "SMB", "RG", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "RG", NA, NA, NA, "SPH", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "SPH", NA, "SMB", NA, NA, "SPH", NA, NA, NA, NA, "SPH", "SPH", "RG", "SPH", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "SPH", NA, "SMB", "SMB", "SPH", "RG", "RG", "SPH", "SPH", "RG", NA, "SPH", "SPH", NA, "YP", "SPH", "SPH", NA, NA, NA, "WP", NA, NA, NA, "RG", "RG", "SMB", "WB", "RG", "WE", "WB", "WB", "RG", "RG", NA, "RG", "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "SPH", NA, NA, NA, NA, NA, "YP", NA, "SMB", "SMB", "SPH", "SPH", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "RG", "SPH", NA, "WE", NA, "WE", "WE", "WE", "RG", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "RG", "SPH", "WE", "SPH", "WE", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "WE", "WE", NA, "WP", "WE", "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "WE", NA, "RG", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, "RG", NA, "YP", NA, NA, "SPH", "SPH", NA, NA, NA, NA, NA, NA, NA, "SPH", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, "SPH", NA, NA, "SPH", NA, NA, NA, NA, NA, NA, NA, "YP", NA, NA, NA, NA, NA, "SPH", NA, NA, NA, "SPH", NA, NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "SPH", "WP", NA, "YP", "WB", "SPH", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "RB", "SPH", "YP", "YP", NA, NA, NA, NA, NA, NA, "WB", "SPH", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", "SPH", "YP", "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "WP", NA, NA, NA, NA, NA), ECAU1 = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 2L, 10L, 4L, 12L, 11L, 45L, 0L, 3L, 0L, 0L, 0L, 2L, 0L, 0L, 5L, 12L, 0L, 2L, 18L, 0L, 0L, 6L, 0L, 11L, 1L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 20L, 10L, 7L, 1L, 3L, 0L, 8L, 0L, 2L, 5L, 3L, 1L, 0L, 0L, 3L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 41L, 1L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 1L, 0L, 0L, 0L, 1L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 1L, 0L, 2L, 0L, 0L, 1L, 0L, 0L, 0L, 0L, 6L, 1L, 1L, 2L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 1L, 0L, 1L, 2L, 1L, 20L, 3L, 6L, 15L, 13L, 0L, 2L, 2L, 0L, 70L, 1L, 3L, 0L, 0L, 0L, 8L, 0L, 0L, 0L, 8L, 1L, 1L, 3L, 1L, 3L, 1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L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 3L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 84L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 1L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 15L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 19L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 6L, 90L, 0L, 0L, 0L, 0L, 0L, 0L, 4L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 30L, 0L, 7L, 1L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L), ESP2 = c(NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", "SMB", NA, NA, NA, NA, NA, NA, NA, NA, NA, "WP", NA, NA, NA, "YP", NA, "SPH", "SPH", NA, NA, "WP", NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "WB", "WE", "YP", NA, "WE", NA, "RB", NA, NA, "WP", "WP", "WE", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "SMB", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "WE", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "WE", NA, NA, "YP", NA, NA, NA, NA, "WE", "WE", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "SMB", NA, "RB", "WP", "WE", "SPH", "SPH", "WB", "SMB", "SPH", NA, "YP", "SMB", NA, NA, "SMB", "WE", NA, NA, NA, NA, NA, NA, NA, "YP", "SMB", NA, NA, "YP", NA, NA, NA, "SPH", "SPH", NA, "SMB", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "WP", NA, "WE", "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "WE", "WE", NA, "YP", NA, "WB", NA, NA, "SPH", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "WE", "WB", "WB", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, NA, "BNT", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "SMB", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "SPH", NA, NA, NA, NA, "WE", "YP", NA, NA, NA, NA, NA, NA, NA, "WE", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "SMB", NA, NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "WB", NA, NA, NA, "SMB", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "WE", "YP", NA, NA, NA, "WB", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "WP", NA, NA, NA, NA, NA, NA, NA, NA, "YP", "WE", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, "SMB", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, NA, NA, NA, NA), ECAU2 = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 5L, 3L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 3L, 0L, 0L, 0L, 29L, 0L, 2L, 1L, 0L, 0L, 10L, 0L, 8L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 1L, 1L, 2L, 0L, 5L, 0L, 2L, 0L, 0L, 2L, 4L, 1L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 1L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 1L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 1L, 0L, 0L, 60L, 0L, 0L, 0L, 0L, 5L, 1L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L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WP", NA, NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "WP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "RB", NA, NA, NA, "WB", "WP", "WB", "YP", "WB", "WB", NA, NA, "RB", NA, NA, "WE", "WP", NA, NA, NA, NA, NA, NA, NA, NA, "WB", NA, NA, NA, NA, NA, NA, "WE", "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "RB", NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, NA, "RB", NA, NA, NA, NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "WB", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "CC", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "WB", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "WB", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "WP", NA, NA, NA, "WE", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, "WB", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), ECAU3 = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 25L, 0L, 0L, 0L, 2L, 0L, 22L, 5L, 0L, 0L, 36L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 1L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 1L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L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, 0L, 0L), ESP4 = c(NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", "YP", "YP", NA, "YP", "YP", NA, NA, NA, NA, NA, NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "LMB", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "CC", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, NA, NA, "WB", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "WP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), ECAU4 = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 50L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0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L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L), ESP5 = c(NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "RB", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "WP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), ECAU5 = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0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L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L), ESP6 = c(NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "RB", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), ECAU6 = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,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 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L), ESP7 = c(NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), ECAU7 = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L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, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L), ESP8 = c(NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), ECAU8 = c(0L, 0L, 0L, 0L, 0L, 0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L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L), ESP9 = c(NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA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0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L), WESTPER = c(100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 100L, 0L, 0L, 0L, 100L, 100L, 0L, 0L, 100L, 0L, 0L, 37L, 0L, 0L, 100L, 0L, 0L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 0L, 0L, 0L, 0L, 0L, 100L, 0L, 100L, 0L, 0L, 0L, 0L, 100L, 100L, 0L, 0L, 100L, 100L, 0L, 100L, 100L, 0L, 0L, 0L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 50L, 100L, 100L, 100L, 0L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 0L, 0L, 0L, 100L, 100L, 0L, 100L, 0L, 100L, 100L, 0L, 0L, 0L, 0L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 100L, 0L, 0L, 0L, 0L, 0L, 0L, 100L, 100L, 100L, 30L, 100L, 100L, 100L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, NA, 0L, 100L, 100L, 0L, 100L, 100L, 0L, 100L, 0L, 0L, 0L, 0L, 100L, 0L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 0L, 0L, 0L, 0L, 0L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, NA, 100L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 0L, 100L, 0L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 60L, 100L, 0L, 0L, 0L, 100L, 0L, 100L, 0L, 0L, 0L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 0L, 100L, 100L, 0L, 100L, 100L, 100L, 100L, 100L, 100L, NA, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 75L, 0L, 0L, 100L, 100L, 0L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 0L, 100L, 100L, 100L, 100L, 100L, 0L, 100L, 100L, 100L, 0L, 0L, 0L, 0L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 0L, 0L, 100L, 0L, 0L, 0L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 0L, 0L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 0L, 0L, 0L, 0L, 100L, 100L, 100L, 100L, 100L, 100L, 0L, 0L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 0L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 0L, 0L, 0L, 0L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 100L, 0L, 100L, 100L, 100L, 100L, 100L), WSOUGHT1 = c("ANY", "YP", "WE", "WE", "WE", "WE", "WE", "WE", "WE", "YP", "YP", NA, NA, NA, NA, NA, NA, NA, NA, "WE", NA, NA, NA, "WE", "YP", NA, NA, "YP", NA, NA, "SMB", NA, NA, "YP", NA, NA, "WE", "YP", "WE", "YP", "WE", "WE", "WE", "WE", "WE", "YP", "YP", NA, NA, NA, NA, NA, "WE", NA, "WE", NA, NA, NA, NA, "WE", "YP", NA, NA, "SMB", "YP", NA, "YP", "YP", NA, NA, NA, "YP", "YP", "YP", "WE", "SMB", "YP", "YP", "YP", "YP", "YP", "WE", "WE", "WE", "YP", NA, "YP", "WE", "WE", "WE", "YP", "WE", "YP", "YP", "YP", "WE", "WE", "YP", "WE", "YP", NA, NA, NA, "YP", "YP", NA, "YP", NA, "WE", "WE", NA, NA, NA, NA, "WE", "YP", "WE", "WE", "WE", "WE", "YP", "WE", "WE", "YP", "WE", "WE", "YP", "YP", "YP", "YP", "WE", "WE", "WE", "WE", "WE", "WE", "YP", "WE", "YP", "WE", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, NA, NA, NA, NA, NA, "WE", "YP", "YP", "YP", "YP", "YP", "WE", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", "WE", "WE", "WE", "YP", "WE", "YP", "WE", "WE", "WE", "WE", "YP", "WE", "WE", "YP", "WE", NA, NA, "YP", "WE", NA, "YP", "YP", NA, "YP", NA, NA, NA, NA, "WE", NA, "WE", "WE", "WE", "WE", "WE", "WE", "WE", "WE", "WE", NA, NA, NA, NA, NA, NA, NA, NA, NA, "WE", "WE", "YP", "YP", "YP", "YP", "WE", "WE", "YP", "WE", "YP", "WE", "WE", "WE", "WE", "WE", "WE", "WE", "WE", "WE", "WE", "YP", "WE", "ANY", "YP", "WE", "WE", "YP", "YP", NA, NA, NA, NA, NA, "YP", "WE", "WE", "WE", "WE", "WE", "YP", "WE", "WE", "WE", "WE", "WE", "WE", "WE", "WE", "WE", "WE", "YP", "WE", "WE", "YP", "WE", "WE", "YP", "YP", "WE", "WE", "WE", "YP", "WE", "WE", NA, NA, NA, NA, NA, NA, NA, "WE", "WE", "WE", "WE", "WE", "WE", "YP", "YP", "YP", "WE", "WE", "YP", "YP", "WE", "WE", "YP", "YP", "YP", "WE", "YP", "YP", "WE", "WE", "WE", "YP", "YP", "YP", "WE", "WE", "WE", "WE", "YP", "WE", "YP", "YP", "YP", "WE", "YP", "WE", "YP", "YP", "YP", "WE", "YP", "YP", "YP", "YP", NA, "WE", NA, "YP", "WE", "YP", "YP", "WE", "YP", "WE", "YP", "YP", "WE", "WE", "WE", "WE", "ANY", "SMB", NA, NA, NA, "WE", NA, "YP", NA, NA, NA, "WE", "WE", "YP", "WE", "WE", "YP", "YP", NA, "YP", "WE", NA, "WE", "WE", "WE", "WE", "WE", "WE", NA, "YP", "YP", "YP", "WE", "WE", "YP", "WE", "WE", "WE", "YP", "YP", NA, NA, "YP", "YP", NA, "YP", "YP", "YP", "WE", "WE", "YP", "WE", NA, "YP", "YP", "YP", "YP", "WE", NA, "YP", "YP", "YP", NA, NA, NA, NA, "YP", "YP", "WE", "WE", "WE", "WE", "YP", "YP", "WE", "WE", "WE", "WE", "WE", "YP", "WE", "WE", "WE", "YP", "WE", "WE", "WE", "WE", "WE", "WE", "WE", "WE", NA, NA, "WE", NA, NA, NA, "WE", "YP", "YP", "WE", "WE", "YP", "YP", "WE", "WE", "YP", "WE", "YP", "WE", "YP", "WE", "WE", NA, NA, "WE", "WE", "WE", "YP", "YP", "WE", "WE", "YP", "YP", "WE", "YP", "WE", "WE", "WE", "WE", "WE", "WE", "WE", NA, NA, NA, NA, "WE", "WE", "STH", "WE", "WE", "WE", NA, NA, "WE", "ANY", "WE", "WE", "WE", "WE", "YP", "YP", "YP", "YP", NA, "WE", "WE", "WE", "YP", "WE", "YP", "WE", "YP", "WE", "WE", "YP", NA, NA, NA, NA, "WE", "YP", "WE", "WE", "YP", "WE", "WE", "WE", "WE", "WE", "WE", "ANY", "WE", "WE", "YP", "YP", "STH", "YP", "YP", "YP", "WE", "STH", "WE", "STH", NA, "YP", "STH", "STH", "STH", "STH"), WGRID1 = c(620L, 620L, 620L, 620L, 620L, 620L, 521L, 620L, 620L, 521L, 521L, NA, NA, NA, NA, NA, NA, NA, NA, 620L, NA, NA, NA, 620L, 521L, NA, NA, 521L, NA, NA, 521L, NA, NA, NA, NA, NA, 620L, 620L, 620L, 620L, 620L, 620L, 521L, 521L, 521L, 521L, 521L, NA, NA, NA, NA, NA, 521L, NA, NA, NA, NA, NA, NA, NA, 620L, NA, NA, 620L, 620L, NA, 521L, 521L, NA, NA, NA, 620L, 620L, 620L, 619L, 620L, 521L, 521L, NA, 521L, 521L, NA, 521L, 521L, 521L, NA, 620L, 620L, 620L, 620L, 620L, 620L, 620L, 620L, 620L, 620L, 620L, 620L, 620L, 620L, NA, NA, NA, 620L, 620L, NA, 521L, NA, 620L, 620L, NA, NA, NA, NA, 620L, NA, 620L, 620L, 620L, 620L, 620L, 620L, 620L, 620L, 620L, 620L, 620L, 620L, 620L, 620L, 620L, 620L, 620L, 620L, 619L, 521L, 521L, 521L, 521L, 521L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 620L, 521L, 521L, 521L, 521L, 521L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 620L, 620L, 520L, 620L, 620L, 620L, 620L, 620L, 620L, 620L, 620L, 620L, 620L, 620L, 620L, 620L, NA, NA, 521L, 521L, NA, 521L, 521L, NA, 521L, NA, NA, NA, NA, 619L, NA, 620L, 620L, 619L, 620L, 620L, 619L, 620L, 520L, 521L, NA, NA, NA, NA, NA, NA, NA, NA, NA, 620L, 620L, 620L, 620L, 620L, 620L, 620L, 620L, 620L, 620L, 620L, 620L, 620L, NA, 620L, 620L, 620L, 620L, 620L, 620L, NA, 620L, 620L, NA, NA, NA, 620L, 521L, 521L, NA, NA, NA, NA, NA, 620L, 620L, 620L, 620L, 620L, 620L, 620L, 620L, NA, 620L, 620L, 620L, 619L, 620L, 620L, 620L, 620L, 620L, 620L, 620L, 620L, 620L, 620L, 620L, 620L, 620L, 620L, 620L, 620L, 620L, NA, NA, NA, NA, NA, NA, NA, NA, 620L, 620L, 620L, 619L, 619L, 620L, 620L, 620L, 620L, 620L, NA, 620L, 620L, 620L, 619L, 620L, 620L, 620L, 620L, 620L, 620L, 619L, 620L, 620L, 620L, 620L, 620L, 620L, 619L, 620L, 619L, 620L, 620L, 620L, 620L, 620L, 521L, 620L, 620L, 620L, 620L, 620L, NA, 620L, 620L, 620L, 521L, NA, 521L, NA, NA, 620L, 620L, NA, 620L, 620L, 620L, 620L, 620L, 620L, 620L, 620L, 620L, 521L, 521L, NA, NA, NA, 620L, NA, 521L, NA, NA, NA, 620L, 620L, 620L, 620L, 620L, 620L, 620L, NA, 521L, 521L, NA, 520L, 620L, 619L, 620L, NA, 620L, NA, 620L, 620L, 620L, 620L, 520L, 620L, 620L, NA, 620L, 620L, 521L, NA, NA, NA, NA, NA, 620L, 620L, 620L, NA, 619L, 620L, 620L, NA, 521L, 521L, NA, NA, 521L, NA, 521L, 521L, 521L, NA, NA, NA, NA, 620L, 620L, 620L, 520L, 519L, 520L, 620L, 620L, 620L, 519L, 620L, 519L, 519L, 620L, 620L, 620L, 620L, 620L, 620L, 520L, 620L, 520L, 520L, 620L, 620L, 619L, NA, NA, 521L, NA, NA, NA, 521L, 521L, 620L, 620L, 620L, 620L, 620L, 620L, 519L, 620L, 620L, 620L, 521L, 620L, 620L, 520L, NA, NA, 521L, 620L, 620L, 620L, 620L, 620L, 520L, 620L, 620L, 521L, 620L, 520L, 520L, 520L, 620L, 520L, 620L, 620L, NA, NA, NA, NA, 620L, 620L, 620L, 620L, 620L, 620L, NA, NA, 619L, NA, 619L, 620L, 520L, 620L, 521L, 521L, 521L, 521L, NA, 620L, 519L, 620L, 620L, 619L, 620L, 620L, 620L, 620L, 620L, 521L, NA, NA, NA, NA, 520L, 620L, 620L, 620L, 620L, 520L, 619L, 619L, 620L, 620L, 520L, NA, 620L, 620L, 620L, 620L, 620L, 521L, 521L, 620L, 620L, 620L, 620L, 620L, NA, 620L, 620L, 620L, 620L, 620L), WSOUGHT2 = c(NA, NA, NA, NA, NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "WE", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, NA, NA, NA, NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, NA, NA, NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, "YP", NA, NA, NA, NA, NA, NA, "YP", "YP", NA, "YP", "YP", NA, NA, NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, NA, "YP", NA, "YP", NA, NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", "YP", NA, NA, "YP", NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, NA, NA, NA, NA, NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "LMB", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "WE", NA, NA, NA, NA, NA, "YP", NA, NA, NA, NA, "YP", NA, NA, NA, NA, NA, "YP", "YP", NA, NA, "YP", NA, NA, NA, NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, NA, "YP", NA, NA, "YP", NA, "WE", "YP", NA, NA, NA, NA, NA, NA, NA, "YP", NA, NA, NA, NA, NA, NA, "WE", "YP", NA), WGRID2 = c(NA, NA, NA, NA, NA, 521L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 620L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 521L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 620L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 620L, NA, NA, NA, NA, NA, 521L, NA, NA, NA, NA, NA, NA, NA, NA, NA, 620L, NA, NA, NA, NA, 620L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 620L, NA, 620L, NA, NA, NA, NA, NA, NA, 620L, 620L, NA, 620L, 521L, NA, NA, NA, 521L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 620L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 620L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 620L, NA, NA, NA, NA, 620L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 620L, NA, NA, NA, 620L, NA, 620L, NA, NA, NA, NA, NA, NA, NA, NA, 620L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 620L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 620L, NA, NA, NA, NA, NA, NA, 521L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 521L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 620L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 620L, NA, NA, 620L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 620L, NA, NA, NA, NA, NA, 619L, NA, NA, NA, NA, 620L, NA, NA, NA, NA, NA, 620L, 519L, NA, NA, 619L, NA, NA, NA, NA, 620L, NA, NA, NA, NA, NA, NA, NA, NA, 620L, NA, NA, 619L, NA, NA, 620L, NA, 619L, 620L, NA, NA, NA, NA, NA, NA, NA, 620L, NA, NA, NA, NA, NA, NA, 620L, 620L, NA), WSOUGHT3 = c(NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), WGRID3 = c(NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), WSP1 = c(NA, "SPH", "SPH", "SPH", "SPH", "SPH", "WE", "SPH", "SPH", "SPH", "SPH", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, NA, "YP", NA, NA, NA, NA, NA, "SPH", NA, NA, "WE", "SPH", "WE", "YP", "SPH", "SPH", "WE", "SPH", "WE", "SPH", "YP", NA, NA, NA, NA, NA, "SPH", NA, "SPH", NA, NA, NA, NA, "SPH", "RG", NA, NA, NA, "YP", NA, "RG", "SPH", NA, NA, NA, "YP", "SPH", NA, "SPH", "BNT", "WP", NA, "RG", NA, "RG", "RG", NA, "SPH", "YP", NA, "SPH", "SPH", "SPH", "SPH", "YP", "WE", "YP", NA, NA, "WB", NA, "YP", "WE", NA, NA, NA, NA, "YP", NA, NA, "YP", NA, NA, "SPH", NA, NA, NA, NA, "SPH", "SPH", "WE", "YP", "WE", "SPH", "YP", "WE", "WE", "SPH", "SPH", "SPH", "SPH", "YP", "SPH", "SPH", "SPH", "SPH", "WE", "WE", "SPH", "WE", "SPH", NA, "SPH", "RG", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "SPH", NA, NA, NA, NA, NA, NA, "SPH", "SPH", "YP", NA, "WE", "SPH", "SPH", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", "WE", "WE", NA, "YP", "SPH", "YP", "SPH", "WE", "SPH", "SPH", "YP", "SPH", "YP", "YP", NA, NA, NA, NA, NA, NA, "YP", "SPH", NA, "WP", NA, NA, NA, NA, "SPH", NA, "SPH", "SPH", "SPH", "SPH", "WB", "SPH", "WE", "WE", "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, "SPH", "SPH", "YP", "YP", "YP", "SPH", "SPH", "SPH", "YP", "WE", "YP", "SPH", "SPH", "SPH", "SPH", "SPH", "SPH", "SPH", "RG", "SPH", "SPH", "YP", "SPH", "SPH", "YP", NA, "SPH", "SPH", "SPH", NA, NA, NA, NA, NA, "SPH", "SPH", NA, "SPH", "SPH", "SPH", "SPH", "WE", "WE", "SPH", "SPH", "SPH", "WE", "YP", "WE", "WE", "SPH", "YP", "WE", "SPH", "WP", "WE", "SPH", "YP", "SPH", "WE", "SPH", "SPH", "SPH", "SPH", "WE", NA, NA, NA, NA, NA, NA, NA, "SPH", "SPH", "YP", "SPH", "SPH", "SPH", "SPH", "WB", "YP", "SPH", "SPH", "WB", "WB", "SPH", "WE", "SPH", "YP", "YP", "SPH", "YP", "YP", "WE", "WE", NA, "YP", "YP", "YP", "WE", "SPH", "SPH", "WE", "YP", "WE", "YP", "YP", "YP", "SPH", "YP", "SPH", "SPH", NA, "YP", "SPH", "YP", "SPH", "YP", "RG", NA, "SPH", NA, "SPH", "SPH", "YP", "YP", "SPH", "RG", "SPH", "SPH", "WE", "WB", "WE", "SPH", "SPH", "WB", "RG", NA, NA, NA, "SPH", NA, "SPH", NA, NA, NA, "SPH", "WE", "SPH", "SPH", "SPH", "SPH", "SPH", NA, "YP", "SPH", NA, "WE", "SPH", "WE", "WE", "WE", "SPH", NA, "SPH", "SPH", "SPH", "WE", "WB", "SPH", "SPH", "SPH", "SPH", "YP", "YP", NA, NA, "YP", "SPH", NA, "SPH", "YP", "SPH", "WE", "SPH", "SPH", "WE", NA, "SPH", "SPH", "YP", "SPH", "WE", NA, "SPH", "YP", "SPH", NA, NA, NA, NA, "WB", NA, NA, "WE", "WE", "SPH", "SPH", "SPH", "SPH", "WE", "WE", "SPH", "SPH", "SPH", "WE", "WE", "SPH", "SPH", "WE", "STH", "WE", "SPH", "WE", NA, NA, "WE", NA, NA, "SPH", NA, NA, NA, "SPH", "YP", "SPH", "WE", "SPH", "WE", "YP", "WE", "SPH", "YP", "WE", "WB", "SPH", "YP", "SPH", "WE", NA, NA, "YP", "RG", "YP", "WB", "SMB", "SPH", "SPH", "YP", "SPH", NA, "SPH", "WE", "YP", "SPH", "SPH", "SPH", "WE", "WE", NA, NA, NA, NA, "SPH", "SPH", "STH", "SPH", "SPH", "SPH", NA, NA, "YP", "YP", "SPH", "SPH", "SPH", "SPH", "WB", "YP", "YP", "YP", NA, "SPH", "SPH", "SPH", "WB", "SPH", "YP", "SPH", "YP", "SPH", "SPH", "WP", NA, NA, NA, NA, "WE", "YP", NA, "WP", "WP", "SPH", "WE", "SPH", "WP", "SPH", NA, "WE", "YP", "SPH", "WB", "SPH", NA, "YP", "YP", "WP", "WE", "SMB", NA, "STH", NA, NA, NA, NA, "SPH", NA), WCAU1 = c(0L, 1L, 3L, 1L, 1L, 2L, 1L, 2L, 3L, 1L, 1L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 32L, 0L, 0L, 24L, 0L, 0L, 0L, 0L, 0L, 1L, 0L, 0L, 2L, 2L, 14L, 9L, 1L, 3L, 8L, 7L, 2L, 40L, 4L, 0L, 0L, 0L, 0L, 0L, 1L, 0L, 6L, 0L, 0L, 0L, 0L, 1L, 5L, 0L, 0L, 0L, 10L, 0L, 1L, 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0L, 0L, 0L, 0L, 0L, 0L, 0L, 2L, 60L, 0L, 0L, 0L, 0L, 4L, 0L, 0L, 0L, 0L, 1L, 35L, 0L, 0L, 0L, 0L, 90L, 11L, 0L, 1L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L), WSP2 = c(NA, "YP", "WP", "SMB", "WE", "WE", NA, NA, "WE", "YP", "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "WP", NA, NA, NA, NA, NA, "WP", NA, NA, "WP", "WP", "WP", NA, "YP", "WE", "YP", "SMB", "YP", "WP", NA, NA, NA, NA, NA, NA, "WE", NA, "WE", NA, NA, NA, NA, "WE", "SPH", NA, NA, NA, "WP", NA, "YP", "WP", NA, NA, NA, NA, "YP", NA, NA, NA, "YP", NA, "YP", NA, "YP", NA, NA, "WE", NA, NA, "YP", NA, "WE", "WE", NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "WE", NA, NA, NA, NA, "WE", "SMB", NA, NA, "WB", "WE", NA, "WP", "YP", "WE", "WE", "WE", "WB", NA, "YP", "WB", "WE", "WE", "YP", "WB", "WE", "WP", "YP", NA, "YP", "SPH", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, NA, NA, NA, NA, NA, "WE", "WP", NA, NA, "YP", "YP", "WE", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, "WE", NA, "WB", "WE", NA, "WE", NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, "YP", NA, NA, NA, NA, NA, NA, "WE", NA, "WE", "WE", NA, "WE", NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "SMB", "WE", NA, NA, "WP", "YP", "WP", "WE", NA, "YP", NA, "WE", "WE", "SMB", "WE", "WE", "WE", "WE", "SPH", "WE", "WB", NA, "WE", "WE", NA, NA, "WE", "WP", "WP", NA, NA, NA, NA, NA, "YP", "WP", NA, "WE", "WE", "WE", "YP", NA, "YP", NA, "WE", "SMB", NA, NA, NA, "YP", "WE", NA, NA, "WE", "YP", "YP", "WE", NA, "WP", "YP", "WE", "WE", "WP", "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, "WE", NA, "WE", "WE", "WE", "WB", "YP", NA, "SMB", "WE", "YP", "YP", "WE", "WB", "SMB", NA, NA, "SMB", NA, NA, NA, "YP", NA, NA, NA, NA, "YP", "SMB", "WE", "YP", NA, NA, NA, NA, NA, "YP", NA, "WE", "YP", NA, NA, "WE", NA, "YP", NA, "YP", NA, "WE", NA, NA, "WE", NA, NA, "WE", "YP", "WE", "YP", "YP", NA, NA, "WE", "WE", NA, "SPH", NA, NA, NA, "WE", NA, "YP", NA, NA, NA, "WE", NA, "YP", "WB", "WE", "YP", "YP", NA, NA, NA, NA, NA, "WE", "WB", NA, "WB", "WE", NA, "WB", "WB", "WB", NA, NA, "WB", "WE", "WE", "WP", NA, NA, NA, NA, NA, "YP", NA, "WB", "RB", "WP", "YP", "WE", "YP", NA, NA, "WP", "YP", NA, "YP", "WB", NA, "SMB", NA, "YP", NA, NA, NA, NA, "WP", NA, NA, NA, NA, "WE", "YP", "YP", "WE", NA, NA, "WE", "WE", "WP", NA, NA, "WE", "WB", "YP", NA, NA, "WE", NA, NA, NA, NA, NA, NA, "WE", NA, NA, NA, "WE", NA, "WE", "YP", "WE", "WB", NA, "YP", NA, NA, NA, "YP", "WE", NA, "YP", "YP", NA, NA, NA, NA, NA, "YP", "WB", "WE", "WE", NA, "WB", NA, "WP", "WP", NA, "WE", "WE", "WE", "WP", "WP", NA, NA, NA, NA, "WE", "WE", "WE", "WE", "WE", "WE", NA, NA, NA, NA, "WE", "WE", "STH", "WE", "YP", NA, NA, NA, NA, "YP", "WE", "WP", "YP", "WE", "WP", "WE", NA, "WP", "WE", "YP", NA, NA, NA, NA, NA, "WP", NA, "YP", "YP", "WE", "WP", "WE", NA, "WP", N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, 0L, 0L, 4L, 0L, 1L, 0L, 0L, 12L, 0L, 0L, 0L, 0L, 0L, 0L, 6L, 0L, 0L, 0L, 3L, 0L, 1L, 2L, 4L, 0L, 0L, 5L, 0L, 0L, 0L, 15L, 6L, 0L, 0L, 4L, 0L, 0L, 0L, 0L, 0L, 1L, 0L, 1L, 1L, 0L, 0L, 0L, 0L, 0L, 0L, 3L, 1L, 2L, 0L, 0L, 0L, 0L, 0L, 0L, 3L, 2L, 24L, 3L, 5L, 8L, 0L, 0L, 0L, 0L, 2L, 1L, 1L, 1L, 46L, 0L, 0L, 0L, 0L, 60L, 2L, 0L, 60L, 4L, 0L, 1L, 0L, 0L, 9L, 60L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 60L, 60L, 6L, 0L, 3L, 0L, 0L, 0L, 0L, 0L, 1L, 0L, 0L, 0L, 0L, 0L, 90L, 14L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L), WSP3 = c(NA, NA, "RB", "WE", "WB", "WB", NA, NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, NA, NA, "YP", NA, NA, "WBC", "YP", NA, "WE", NA, "YP", NA, NA, NA, NA, NA, NA, "YP", NA, "YP", NA, NA, NA, NA, "YP", "YP", NA, NA, NA, NA, NA, NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "RB", NA, NA, "WP", NA, NA, NA, NA, "WB", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "CC", NA, NA, NA, NA, "WB", "YP", NA, NA, NA, "WB", NA, "YP", NA, "YP", "YP", "YP", "YP", NA, NA, "YP", "YP", "WB", NA, "WP", "YP", "YP", "BNT", NA, NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, NA, NA, NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "WB", NA, NA, "WB", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "WE", "YP", NA, NA, NA, NA, NA, "WP", NA, NA, NA, "WB", NA, "WE", "YP", NA, "WP", "YP", "WE", "WP", "YP", NA, "WB", NA, NA, NA, "YP", "YP", "YP", NA, NA, NA, NA, NA, NA, NA, NA, "WP", "YP", "YP", NA, NA, NA, NA, "YP", "WE", NA, NA, NA, NA, "WB", NA, NA, "WB", NA, NA, "YP", NA, "YP", NA, "WB", NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, "YP", NA, "WB", "YP", NA, NA, "WE", "WB", NA, NA, "YP", "YP", "YP", NA, NA, "WE", NA, NA, NA, NA, NA, NA, NA, NA, NA, "WE", "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, "WB", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "WB", NA, "SMB", NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "STH", "YP", NA, "YP", "WB", NA, "YP", "YP", "YP", NA, NA, "YP", "WB", "YP", NA, NA, NA, NA, NA, NA, NA, NA, "WP", NA, "YP", NA, NA, NA, NA, NA, "YP", NA, NA, NA, "YP", NA, "YP", NA, NA, NA, NA, NA, NA, "YP", NA, NA, NA, NA, "YP", NA, NA, "WB", NA, NA, NA, "STH", "YP", NA, NA, NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "WB", NA, "YP", NA, "WB", "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", "WB", NA, NA, "YP", NA, "YP", NA, NA, NA, "WP", NA, NA, NA, NA, NA, NA, NA, "WB", "WB", "WB", "WB", "WB", "WP", NA, NA, NA, NA, "WB", "WB", "YP", "YP", NA, NA, NA, NA, NA, NA, "WP", NA, NA, "WB", NA, "WP", NA, NA, "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA, NA, "YP", NA, NA, NA, "WE", "YP", "YP", NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "YP", NA), WCAU3 = c(0L, 0L, 1L, 8L, 1L, 2L, 0L, 0L, 1L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 7L, 0L, 0L, 0L, 90L, 0L, 0L, 2L, 1L, 0L, 8L, 0L, 46L, 0L, 0L, 0L, 0L, 0L, 0L, 7L, 0L, 1L, 0L, 0L, 0L, 0L, 1L, 87L, 0L, 0L, 0L, 0L, 0L, 0L, 42L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 2L, 0L, 0L, 2L, 0L, 0L, 0L, 0L, 6L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 1L, 0L, 0L, 0L, 0L, 18L, 45L, 0L, 0L, 0L, 3L, 0L, 2L, 0L, 80L, 85L, 21L, 75L, 0L, 0L, 120L, 6L, 2L, 0L, 6L, 50L, 60L, 1L, 0L, 0L, 61L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 36L, 14L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 2L,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