[R] simple question about exporting data...

2009-07-22 Thread Rbeginner
I just have a simple question. I'm using the predict function, and I get about 1000 values. Now, how would I make it into a data frame or a list so that I can easily use Excel to graph the data? Right now, it's in horizontal lines, and it would be a pain to copy and paste and make it into a vertic

[R] [R-pkgs] plotrix v2.6-4

2009-07-22 Thread Jim Lemon
Hi all, After a lot of rewriting, I am happy to say that plotrix_2.6-4 is on CRAN. The reason I am announcing this is that the newish hierobarp function has had a complete rewrite. This was the result of my learning that the old version was horrendously slow on large data sets. Let me know if

Re: [R] Re placing null values (#NULL!)

2009-07-22 Thread Michael Knudsen
On Wed, Jul 22, 2009 at 10:18 PM, Josh Roll wrote: > In `[<-.factor`(`*tmp*`, Props_$pct_vacant == "#NULL!", value = 0) : >   invalid factor level, NAs generated > > Thats what made me wonder if the "#NULL!" value was being treated > differently than a typical "NULL" value.  Thoughts? I would lik

[R] Antw: How to extract the upper xlim and ylim of my plot?

2009-07-22 Thread Frank Bloos
You may want to use the function corner.label from the plotrix-package. Frank >>> Mark Na 21.07.2009 23:03 >>> Dear R-helpers, I wish to place some text in a plot, at approx 10% of my upper xlim and approx 90% of my upper ylim, i.e. > plot(log(all$SR,10)~log(all$AREA,10)) > text(.1*max(xlim),

Re: [R] IDE's/Editors for R-- Was: Multi-line comments?

2009-07-22 Thread Romain Francois
On 07/22/2009 06:49 PM, Liviu Andronic wrote: Hello, On Wed, Jul 22, 2009 at 6:25 PM, Bert Gunter wrote: You can find a list of IDE's/R code editors for R here: http://www.sciviews.org/_rgui/projects/Editors.html However, this is somewhat dated, and you may find others not here just by googli

[R] Re ading Image Files

2009-07-22 Thread cotixan
Hello, I'm rather new to R and I want to do some image analysis. Is there a way to read jpeg files into a matrix like matlab's imread? -- View this message in context: http://www.nabble.com/Reading-Image-Files-tp24619129p24619129.html Sent from the R help mailing list archive at Nabble.com. ___

Re: [R] how to predict dynamic model in R

2009-07-22 Thread Gabor Grothendieck
Here is an example closer to yours. > library(dyn) > set.seed(123) > x <- zooreg(rnorm(10)) > y <- zooreg(rnorm(10)) > L <- function(x, k = 1) lag(x, k = -k) > mod <- dyn$lm(y ~ L(y) + L(x, 0:2)) > mod Call: lm(formula = dyn(y ~ L(y) + L(x, 0:2))) Coefficients: (Intercept) L(y) L(x, 0:

Re: [R] how to predict dynamic model in R

2009-07-22 Thread Gabor Grothendieck
Use dyn.predict like this: > library(dyn) > x <- y <- zoo(1:5) > mod <- dyn$lm(y ~ lag(x, -1)) > predict(mod, list(x = zoo(6:10, 6:10))) 7 8 9 10 7 8 9 10 On Thu, Jul 23, 2009 at 12:54 AM, Hongwei Dong wrote: > I have a dynamic time series model like this: > dyn$lm( y ~ lag(y,-1) + x + lag

[R] how to predict dynamic model in R

2009-07-22 Thread Hongwei Dong
I have a dynamic time series model like this: dyn$lm( y ~ lag(y,-1) + x + lag(x,-1)+lag(x,-2) ) I need to do an out of sample forecast with this model. Is there any way I can do this with R? It would be greatly appreciated if some one can give me an example. Thanks. Harry [[alternative

[R] param:qsec in ggplot2

2009-07-22 Thread Mohan S
Hii i have been trying to do a scatter plot with ggplot2, like the plot 6 here (http://had.co.nz/ggplot2/geom_point.html) .. where the points size vary with values > p + geom_point(aes (size = qsec)) but am not sure how to setup the parameter - qsec cou

Re: [R] kmeans.big.matrix

2009-07-22 Thread Jay Emerson
This sort of question is ideal to send directly to the maintainer. We've removed kmeans.big.matrix for the time being and will place it in a new package, bigmemoryAnalytics. bigmemory itself is the core building block and tool, and we don't want to pollute it with lots of extras. Allan's point i

[R] panel.lmline - are m, b, and r^2 accessible somehow?

2009-07-22 Thread Bryan Hanson
Hi R Folks... Are the results of a fit carried out by panel.lmline readily available for use in a lattice plot? I¹d like to put r^2, m, and b on each panel. I can certainly write something that does this manually and then use it with panel.text, but if it¹s already available, that would be prefe

Re: [R] mathematical notation in R

2009-07-22 Thread Steven McKinney
Does this approach what you're looking for? See ?is.finite for more info > LBAuo<- - > LBAuo [1] - > if (LBAuo <= -) LBAuo <- -Inf > LBAuo [1] -Inf > HTH Steven McKinney > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > project.org] On Be

[R] mathematical notation in R

2009-07-22 Thread Mary A. Marion
Hello, I have an R function which includes the statement LBAuo<- -. Rather than printing out - I want it to print out - infinity. As of yet I have not been able to do that. I am not in a graphics window just outputting a set of variables. Can you help? Thanks. Sincerely, Mary A. Ma

Re: [R] How to use macro variable in a text string

2009-07-22 Thread Jorge Ivan Velez
Dear kxk, Here are a couple of options: # Option 1 -- sapply mydata <- sapply(1970:2005, function(i){ mydata <- read.table(file = paste("edge_", i, ".csv", sep=""), header=TRUE) # more code goes here } ) Please note

Re: [R] How to use macro variable in a text string

2009-07-22 Thread David Winsemius
On Jul 22, 2009, at 5:46 PM, kxk wrote: I want to use read.table to input many files, each for a different year. I would like to use the macro variable 't' to refer to the exact file that I would like to input the data using read.table. How could I do this? Thank you! for (t in 1970

Re: [R] Merge vectors

2009-07-22 Thread Mark Knecht
Sort of like this? > A<-c(3,5,7,18,43,85,91,98,100,130,230,487) #data values > B<-c(10,5,5,10,8,11,2,7,3,11,10) #random numbers (sample) > > C = A[B] > C [1] 130 43 43 130 98 230 5 91 7 230 130 On Wed, Jul 22, 2009 at 2:08 PM, Erik Iverson wrote: > A[B] > > -Original Message- >

Re: [R] How to use macro variable in a text string

2009-07-22 Thread Steve Lianoglou
Hi, On Jul 22, 2009, at 5:46 PM, kxk wrote: I want to use read.table to input many files, each for a different year. I would like to use the macro variable 't' to refer to the exact file that I would like to input the data using read.table. How could I do this? Thank you! for (t in 19

[R] Question about the lars package

2009-07-22 Thread lulu9797
Hello, I have a question about lars package, probably basic. The returned values of lars function include R squares along the variable selection path. However, such values are always slightly different from the R squares returned by the regression function lm using the same models. Anyone know

[R] How to use macro variable in a text string

2009-07-22 Thread kxk
I want to use read.table to input many files, each for a different year. I would like to use the macro variable 't' to refer to the exact file that I would like to input the data using read.table. How could I do this? Thank you! for (t in 1970:2005) { edge <- read.table(file="edge_t.csv", head

Re: [R] Question on qplot

2009-07-22 Thread baptiste auguie
try this, library(ggplot2) ggplot() + geom_histogram(aes(x=rnorm(100), fill=..count..))+ xlab(NULL)+ scale_y_continuous("")+ opts(legend.position="none") HTH, baptiste 2009/7/22 RON70 > > I have following code on "qplot" : > > library(ggplot2) > ggplot() + geom_histogram(aes(x=rnorm(100), fi

[R] Question on qplot

2009-07-22 Thread RON70
I have following code on "qplot" : library(ggplot2) ggplot() + geom_histogram(aes(x=rnorm(100), fill=..count..), xlab="", ylab="") However above code doesnot seem to remove the xlab & ylab. What is the correct code? I also want to remove the color-palate in the right side. Is there any way to do

Re: [R] Problem with aov

2009-07-22 Thread Ben Bolker
Oops, I mean hours15t21.data.ztl$Hour <- factor(hours15t21.data.ztl$Hour) Sorry -- View this message in context: http://www.nabble.com/Problem-with-aov-tp24613042p24615059.html Sent from the R help mailing list archive at Nabble.com. __ R-help@

Re: [R] Problem with aov

2009-07-22 Thread Ben Bolker
theliver wrote: > > I'm currently doing simple, one way ANOVA using R. > > I'm analyzing a count based upon an Hour value (0-23) in which it occurs. > The count varies greatly over the entire day (usually with a range of 400 > or so), but certain hour groupings could be useful for later data

Re: [R] A question on operation on list

2009-07-22 Thread David Winsemius
On Jul 22, 2009, at 5:07 PM, megh wrote: Thanks for your suggestions. I need one more thing : x = y = vector("list") for (i in 1:5) x[[i]] = rnorm(2); y[[i]] = rnorm(2) Here I want to get t(x[[i]]) %*% y[[i]] for each i. Can anyone please help me? ?lapply Regards, Jorge Ivan Vel

Re: [R] Merge vectors

2009-07-22 Thread Erik Iverson
A[B] -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of MarcioRibeiro Sent: Wednesday, July 22, 2009 2:31 PM To: r-help@r-project.org Subject: [R] Merge vectors Hi listers, I would like to merge two vectors as follows... A<-c(3,5,7,1

Re: [R] A question on operation on list

2009-07-22 Thread megh
Thanks for your suggestions. I need one more thing : x = y = vector("list") for (i in 1:5) x[[i]] = rnorm(2); y[[i]] = rnorm(2) Here I want to get t(x[[i]]) %*% y[[i]] for each i. Can anyone please help me? Regards, Jorge Ivan Velez wrote: > > Hi megh, > Perhaps? > > # Data > x = vector("

Re: [R] Merge vectors

2009-07-22 Thread Steve Lianoglou
Hi, On Jul 22, 2009, at 3:31 PM, MarcioRibeiro wrote: Hi listers, I would like to merge two vectors as follows... A<-c(3,5,7,18,43,85,91,98,100,130,230,487) #data values B<-c(10,5,5,10,8,11,2,7,3,11,10) #random numbers (sample) I would like to set the vector of random numbers according to the

[R] help in buliding a likelihood function...

2009-07-22 Thread resident76
I am hoping someone may be able to help me out here. I need to build up a likelihood function algorithmically based on the data. The likelihood function is almost impossible to generate analytically due to a large number of summations. I just can't figure out how to get the variables into the f

[R] Merge vectors

2009-07-22 Thread MarcioRibeiro
Hi listers, I would like to merge two vectors as follows... A<-c(3,5,7,18,43,85,91,98,100,130,230,487) #data values B<-c(10,5,5,10,8,11,2,7,3,11,10) #random numbers (sample) I would like to set the vector of random numbers according to the order set of the vector of data values... The result woul

[R] Difficulty Increasing R memory on Windows 32-Bit

2009-07-22 Thread Dan Fleder
I'm having difficulty increasing the memory R can access above 2Gb and wasn't able to resolve this from the R Windows FAQ. For reference, I'm running Windows XP, 32bit, Service Pack 2 on a machine with 4GB RAM. Following the FAQ, I set the --max-mem-size flag to 2800Mb. However, when I start R,

[R] download.file() help! setting the proxy for user /passw0rd

2009-07-22 Thread ByR1
I would like to download climate data files from PCMDI website using R. I tried this line below and I was not able to get the file mainly due to user name and password requirements. I am looking for help for setting up the user and password within R (or somewhere). I have read the FAQ but unfortun

[R] Multcomp, means and mixed models

2009-07-22 Thread Metconnection
Hi all, I wonder if anyone can help. I'm trying to calculate the means from a mixed model analysis using Multcomp My code is glht(lme(response~treatment, random=~1|patient, data=statdata, na.action = (na.omit)), linfct=mcp(treatment="Means")) It appears that the "Means" option is not valid f

Re: [R] Problem with "merge" command duplicating values

2009-07-22 Thread John Kane
What package is 'grand.merge' in? --- On Wed, 7/22/09, Archana Dayalu wrote: > From: Archana Dayalu > Subject: [R] Problem with "merge" command duplicating values > To: r-help@r-project.org > Received: Wednesday, July 22, 2009, 3:44 PM > Hello, > I am attempting to merge 8 different data sets

Re: [R] Find multiple elements in a vector

2009-07-22 Thread Michael Knudsen
On Wed, Jul 22, 2009 at 9:37 PM, Chuck Cleland wrote: >  How about this? > > which(x %in% c(2,3)) Thanks to you all! I had never thought about using %% in this context. -- Michael Knudsen micknud...@gmail.com http://lifeofknudsen.blogspot.com/ __ R-h

Re: [R] Find multiple elements in a vector

2009-07-22 Thread Steve Lianoglou
Hi, On Jul 22, 2009, at 3:39 PM, Jorge Ivan Velez wrote: Dear Michael, Take a look at ?"%in%" This is an example: set.seed(123) x <- sample(0:9,10) y <- c(2,3) which(x %in% y) # [1] 1 3 In addition to the above, you can also use the `match` function: match(c(2,3), x) [1] 1 3 The problem

Re: [R] A question on operation on list

2009-07-22 Thread David Winsemius
On Jul 22, 2009, at 3:18 PM, megh wrote: Hi, I have created a list object like that : x = vector("list") for (i in 1:5) x[[i]] = rnorm(2) x So now you have a list with 5 elements Now I want to do two things : 1. for each i, I want to do following matrix calculation : t(x[[i]]) %*%

[R] Problem with "merge" command duplicating values

2009-07-22 Thread Archana Dayalu
Hello, I am attempting to merge 8 different data sets into a "grand merge" data set; all their variable names are common except for the the gas measured. However, when I did a quick stat summary comparison of merged data with unmerged data, it turned out that R mysteriously duplicated thousands of

Re: [R] A question on operation on list

2009-07-22 Thread Tony Plate
Here's one way: set.seed(1) x1 <- lapply(1:5, function(i) rnorm(2)) x2 <- lapply(x1, function(x) outer(x, x)) Reduce("+", x2, 0) [,1] [,2] [1,] 1.768406 -1.534413 [2,] -1.534413 3.890200 and another way using the abind package: library(abind) dim(abind(along=0, x2)) [1] 5

Re: [R] Find multiple elements in a vector

2009-07-22 Thread Jorge Ivan Velez
Dear Michael, Take a look at ?"%in%" This is an example: set.seed(123) x <- sample(0:9,10) y <- c(2,3) which(x %in% y) # [1] 1 3 HTH, Jorge On Wed, Jul 22, 2009 at 3:32 PM, Michael Knudsen <> wrote: > Hi, > > Given a vector, say > > x=sample(0:9,10) > x > [1] 0 6 3 5 1 9 7 4 8 2 > > I can f

Re: [R] Find multiple elements in a vector

2009-07-22 Thread Chuck Cleland
On 7/22/2009 3:32 PM, Michael Knudsen wrote: > Hi, > > Given a vector, say > > x=sample(0:9,10) > x > [1] 0 6 3 5 1 9 7 4 8 2 > > I can find the location of an element by > > which(x==2) > [1] 10 > > but what if I want to find the location of more than one number? I could do > > c(which(x==2)

Re: [R] A question on operation on list

2009-07-22 Thread Jorge Ivan Velez
Hi megh, Perhaps? # Data x = vector("list") for (i in 1:5) x[[i]] = rnorm(2) # 2x2 matrices res <- lapply(x, function(a) a %*% t(a) ) res # Funcion from ?Reduce add <- function(x) Reduce("+", x) # Summing up! add(res) See ?lapply and ?Reduce for more information. HTH, Jorge On Wed, Jul 22,

[R] Find multiple elements in a vector

2009-07-22 Thread Michael Knudsen
Hi, Given a vector, say x=sample(0:9,10) x [1] 0 6 3 5 1 9 7 4 8 2 I can find the location of an element by which(x==2) [1] 10 but what if I want to find the location of more than one number? I could do c(which(x==2),which(x==3)) but isn't there something more streamlined? My first guess was

[R] A question on operation on list

2009-07-22 Thread megh
Hi, I have created a list object like that : x = vector("list") for (i in 1:5) x[[i]] = rnorm(2) x Now I want to do two things : 1. for each i, I want to do following matrix calculation : t(x[[i]]) %*% x[[i]] i.e. for each i, I want to get a 2x2 matrix 2. Next I want to get x[[1]] + x[[2]] +...

Re: [R] What works on windows

2009-07-22 Thread David Winsemius
On Jul 22, 2009, at 3:02 PM, malcolm Crouch wrote: Hi , How can you tell which packages work on windows ? This is the place to find listing for automated compiler check results: http://cran.stat.ucla.edu/bin/windows/contrib/checkSummaryWin.html Regards Malcolm David Winsemius, MD Heri

[R] What works on windows

2009-07-22 Thread malcolm Crouch
Hi , How can you tell which packages work on windows ? Regards Malcolm [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-projec

Re: [R] contour plot

2009-07-22 Thread David Winsemius
On Jul 22, 2009, at 10:17 AM, axionator wrote: Hi, I want to draw a contour plot of the following function: z = y*x + epsilon, where x ~ N(y, 1) and epsilon ~ N(0, sigma) with sigma fixed (e.g. 1) But didnt manage to feed "contour" with the right input. Thanks for your help. Armin The hel

Re: [R] Memory errors when using QCA package

2009-07-22 Thread David Winsemius
But: > 2^31-1 # is more than the specified problem length [1] 2147483647 > 2130706560 You may be dealing with a system that is not facile at memory allocation. Windows? On Jul 22, 2009, at 9:16 AM, Allan Engelhardt wrote: It is a little stupid, but the length of a vector is limited to

Re: [R] Split plot analysis problems

2009-07-22 Thread Richard M. Heiberger
Jean-Paul Maalouf wrote: Do you have any idea on how can I verify preliminary assumptions in this model (normality of the residuals and variance homogeneity), since R is not able to extract residuals? Of course, R extracts residuals. Use the proj() function. See ?proj for the example to ge

[R] Extreme Value Bivariate Point Process Model

2009-07-22 Thread Ron Burns
Dear All- I am looking at the bivariate point process model for extreme values as described in Section 8.3.2 of Coles book. I am stuck at a very low level in being unable to reproduce the initial step of transforming the data to unit Frechet margins. In particular, I am unable to reprodu

Re: [R] Multi-line comments?

2009-07-22 Thread Paul Hiemstra
Erik Iverson schreef: What editor are you all using to write R code? Many will have ways of doing what you want, e.g., comment-region (bound by default to M-; through comment-dwim) in Emacs. I use Kate, the advanced text editor in KDE. Paul -Original Message- From: r-help-boun...@r

Re: [R] strange behavior of system command

2009-07-22 Thread Steve Lianoglou
Hi Erin, On Jul 22, 2009, at 2:16 PM, Erin Hodgess wrote: Dear R People: I'm running from R to a grid computer and getting some unusual results with the system command: e7 <- system("globus-job-run x /bin/sh -c 'cd $OSG_APP/ engage;chmod 777 oops'",intern=TRUE) chmod: changing permissio

[R] Long character not truncated by str() after adding comment

2009-07-22 Thread Chris Stubben
If I add a comment to a long character string, I can't get the truncated string to display in the str() output. Anyone know how to get str to compactly display a truncated string and the comment? longch <- paste(rep(letters,100), collapse="") str(longch) # truncated comment(longch)<-"100 ABCs"

[R] strange behavior of system command

2009-07-22 Thread Erin Hodgess
Dear R People: I'm running from R to a grid computer and getting some unusual results with the system command: > e7 <- system("globus-job-run x /bin/sh -c 'cd $OSG_APP/engage;chmod 777 > oops'",intern=TRUE) chmod: changing permissions of `oops': Operation not permitted > e7 character(0) >

Re: [R] Collinearity in Linear Multiple Regression

2009-07-22 Thread Stephan Kolassa
Hi Tim, Variance proportions (and condition indices) are exactly the tools described in Belsley, Kuh & Welsch, "Regression Diagnostics" - see my previous post. Good to see I'm not the only one to use them! BKW also describe in detail how to calculate all this using SVD, so you don't need to us

[R] Symmetrically Trimmed Least Squares (STLS) Regression Analysis Help

2009-07-22 Thread Vivek Ayer
Hi all, Just started using R recently. Got OLS and Truncated Regression to work via lm() and truncreg(). But we need to use STLS for our data. Is there a function out there that does this, or can we use a clever workaround using what we already have? Thanks in advance, Vivek Ayer ___

Re: [R] Multi-line comments?

2009-07-22 Thread Mark Knecht
Thanks Gabor and EVERYONE else who answered so quickly. On Wed, Jul 22, 2009 at 7:50 AM, Gabor Grothendieck wrote: > Try > if (FALSE) { ... } > > On Wed, Jul 22, 2009 at 10:30 AM, Mark Knecht wrote: >> Hi, >>   I looked in the language definition and was surprised. Is there >> really no multi-line

Re: [R] IDE's/Editors for R-- Was: Multi-line comments?

2009-07-22 Thread Liviu Andronic
Hello, On Wed, Jul 22, 2009 at 6:25 PM, Bert Gunter wrote: > You can find a list of IDE's/R code editors for R here: > http://www.sciviews.org/_rgui/projects/Editors.html > > However, this is somewhat dated, and you may find others not here just by > googling on "R Editor", "R IDE", etc. > Missing

Re: [R] Rcmdr GUI goes into loop via alt+backspace under Windows OS

2009-07-22 Thread tradenet
Robert, Alt+Backspace is a standard global shortcut key shortcut key for most Windows programs (Word, Excel, Visual Studio, Notepad, Wordpad. It is equivalent to Ctrl+Z It has been around since at least windows 98: http://www.microsoft.com/enable/products/KeyboardSearch_98.aspx I wished alt+ba

[R] IDE's/Editors for R-- Was: Multi-line comments?

2009-07-22 Thread Bert Gunter
You can find a list of IDE's/R code editors for R here: http://www.sciviews.org/_rgui/projects/Editors.html However, this is somewhat dated, and you may find others not here just by googling on "R Editor", "R IDE", etc. Bert Gunter Genentech Nonclinical Biostatistics -Original Message- F

Re: [R] time difference

2009-07-22 Thread Dirk Eddelbuettel
On 22 July 2009 at 09:44, Erin Hodgess wrote: | I am looking at the ctime attribute of two different files. It | contains the year, month, day, time of creation and time zone. [ Well only if you convert it to POSIXlt... ] | Is there a way to determine the difference between the ctimes of two |

Re: [R] How to replace NAs in a vector of factors?

2009-07-22 Thread Gene Leynes
Thank you so much, I'm humbled by the response from such great authors and scholars. I thought I would share the final version that worked perfectly in my illustrative example, as well as the real one. My main confusion was this part: > db1$olditems[db1$olditems==''] [1] Levels: nuts soup I thou

Re: [R] Multi-line comments?

2009-07-22 Thread Michael Knudsen
On Wed, Jul 22, 2009 at 5:27 PM, Erik Iverson wrote: > What editor are you all using to write R code?  Many will have ways of doing > what you want, e.g., comment-region (bound  by default to M-; through > comment-dwim) in Emacs. Cool! I'm using Xcode, and I have just realized that cmd+/ will m

Re: [R] Multi-line comments?

2009-07-22 Thread Erik Iverson
What editor are you all using to write R code? Many will have ways of doing what you want, e.g., comment-region (bound by default to M-; through comment-dwim) in Emacs. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Michael Kn

Re: [R] Multi-line comments?

2009-07-22 Thread Jonathan Baron
On 07/22/09 07:30, Mark Knecht wrote: > Hi, >I looked in the language definition and was surprised. Is there > really no multi-line/block comment defined in R? > >I wanted to comment out 20 lines that I'm moving to a function but > didn't want to delete them. Is there no defined way to get

Re: [R] time difference

2009-07-22 Thread Gabor Grothendieck
Try this: > file.info("abc.R")$ctime - file.info("aa.R")$ctime Time difference of 228.9912 days On Wed, Jul 22, 2009 at 10:44 AM, Erin Hodgess wrote: > Dear R People: > > I am looking at the ctime attribute of two different files.  It > contains the year, month, day, time of creation and time zo

Re: [R] time difference

2009-07-22 Thread David Huffer
On Wednesday, July 22, 2009 10:44 AM, Erin Hodgess wrote: > ...I am looking at the ctime attribute of > two different files. It contains the year, > month, day, time of creation and time zone. > Is there a way to determine the difference > between the ctimes of two files, please... a

Re: [R] Multi-line comments?

2009-07-22 Thread Barry Rowlingson
On Wed, Jul 22, 2009 at 3:30 PM, Mark Knecht wrote: > Hi, >   I looked in the language definition and was surprised. Is there > really no multi-line/block comment defined in R? > >   I wanted to comment out 20 lines that I'm moving to a function but > didn't want to delete them. Is there no defined

[R] adding p-value to a correlogram

2009-07-22 Thread Alon Ben-Ari
Hello, I am trying to plot a correlogram and add the correlation coefficient and p-value. This is the code I am using : pairs(d, gap = 0, lower.panel = panel.smooth, upper.panel = function (x,y) { panel.smooth(x,y) par(usr = c(0, 1, 0, 1)) a <- cor(x,y,u

Re: [R] Multi-line comments?

2009-07-22 Thread Michael Knudsen
On Wed, Jul 22, 2009 at 4:30 PM, Mark Knecht wrote: >   I wanted to comment out 20 lines that I'm moving to a function but > didn't want to delete them. Is there no defined way to get around > using a # on each of the 20 lines? Just like you, I have been longing for that myself. It seems that the

Re: [R] All possible linear models given multiple explaining variables

2009-07-22 Thread Paul Hiemstra
Thomas A. Groen wrote: Hi, I would like to have a script/function (or write one) that can calculate the linear models for all possible combinations of explaining variables. Eventually I would like to end up with a data base (or data frame) giving for each model the R2, R2adj, AIC etc. Currentl

Re: [R] Multi-line comments?

2009-07-22 Thread Paul Hiemstra
Mark Knecht wrote: Hi, I looked in the language definition and was surprised. Is there really no multi-line/block comment defined in R? I wanted to comment out 20 lines that I'm moving to a function but didn't want to delete them. Is there no defined way to get around using a # on each of

Re: [R] Multi-line comments?

2009-07-22 Thread Gabor Grothendieck
Try if (FALSE) { ... } On Wed, Jul 22, 2009 at 10:30 AM, Mark Knecht wrote: > Hi, >   I looked in the language definition and was surprised. Is there > really no multi-line/block comment defined in R? > >   I wanted to comment out 20 lines that I'm moving to a function but > didn't want to delete

Re: [R] How to dynamically generate lm() function arguments?

2009-07-22 Thread Gabor Grothendieck
Using the built in anscombe data frame we can regress y1 on x2 and x4 like this (place the response first): lm(anscombe[c("y1", "x2", "x4")]) On Wed, Jul 22, 2009 at 9:50 AM, Moumita Das wrote: > Hi All, > How do you dynamically generate the arguments for the lm() function when > your items vary

Re: [R] Split plot analysis problems

2009-07-22 Thread Mark Difford
Hi Jean-Paul, >> ... since R is not able to extract residuals? R can extract the residuals, but they are a "hidden" in models with an error structure ## str(aov(PH~Community*Mowing*Water + Error(Block))) residuals(aov(PH~Community*Mowing*Water + Error(Block))$Block) residuals(aov(PH~Community*M

[R] time difference

2009-07-22 Thread Erin Hodgess
Dear R People: I am looking at the ctime attribute of two different files. It contains the year, month, day, time of creation and time zone. Is there a way to determine the difference between the ctimes of two files, please? I looked in the chron package and nothing seemed to work. Thanks in a

Re: [R] how to change the "quantile" method in bwplot

2009-07-22 Thread Jun Shen
Thanks to Deepayan's suggestion, I was able to use boxplot.stats to specify type=6 to calculate quantiles by creating my own stats function as follows, my.boxplot.stats<-function(y,subscripts,...)boxplot.stats(quantile(y,type=6),...) And then call bwplot(Result~Group,data=d2,stats=my.boxplot.sta

[R] Multi-line comments?

2009-07-22 Thread Mark Knecht
Hi, I looked in the language definition and was surprised. Is there really no multi-line/block comment defined in R? I wanted to comment out 20 lines that I'm moving to a function but didn't want to delete them. Is there no defined way to get around using a # on each of the 20 lines? Thanks

[R] contour plot

2009-07-22 Thread axionator
Hi, I want to draw a contour plot of the following function: z = y*x + epsilon, where x ~ N(y, 1) and epsilon ~ N(0, sigma) with sigma fixed (e.g. 1) But didnt manage to feed "contour" with the right input. Thanks for your help. Armin __ R-help@r-pro

Re: [R] Collinearity in Linear Multiple Regression

2009-07-22 Thread Stephan Kolassa
Hi Alex, I personally have had more success with the (more complicated) collinearity diagnostics proposed by Belsley, Kuh & Welsch in their book "Regression Diagnostics" than with Variance Inflation Factors. See also: Belsley, D. A. A Guide to using the collinearity diagnostics. Computationa

[R] How to dynamically generate lm() function arguments?

2009-07-22 Thread Moumita Das
Hi All, How do you dynamically generate the arguments for the lm() function when your items vary for each database. Say in my case for a particular database i have items from i1 to i15 . In the code below there a line like this :-- item_cat_fit<-lm(as.numeric(item_item_table$i1) ~ as.numeric(item

Re: [R] Rcmdr GUI goes into loop via alt+backspace under Windows OS

2009-07-22 Thread Robert W. Baer, Ph.D.
It just produces the "bell" sound on my 32-bit windows XP machine runing R 2.9.1 Is this really a "standard" combination? I know a lot of programs that use ctrl-Z, but I've never come across this shortcut key combination for undo. - Original Message - From: "tradenet" To: Sent:

Re: [R] All possible linear models given multiple explaining variables

2009-07-22 Thread Ben Bolker
hadley wrote: > > Have a look at the meifly package, which also includes tools for > visualising the resulting models. > Hadley > > On Wed, Jul 22, 2009 at 7:28 AM, Thomas A. Groen wrote: >> Hi, >> >> I would like to have a script/function (or write one) that can calculate >> the >> linear mod

Re: [R] Memory errors when using QCA package

2009-07-22 Thread Allan Engelhardt
It is a little stupid, but the length of a vector is limited to 2^31-1 entries on any platform. A matrix is stored as a vector, so the product of all dimensions is also limited to 2^31-1. Allan. Matthew Gwynne wrote: Hi, I have been using the QCA package, in particular the "eqmcc" function

Re: [R] All possible linear models given multiple explaining variables

2009-07-22 Thread hadley wickham
Have a look at the meifly package, which also includes tools for visualising the resulting models. Hadley On Wed, Jul 22, 2009 at 7:28 AM, Thomas A. Groen wrote: > Hi, > > I would like to have a script/function (or write one) that can calculate the > linear models for all possible combinations of

[R] All possible linear models given multiple explaining variables

2009-07-22 Thread Thomas A. Groen
Hi, I would like to have a script/function (or write one) that can calculate the linear models for all possible combinations of explaining variables. Eventually I would like to end up with a data base (or data frame) giving for each model the R2, R2adj, AIC etc. Currently I'm a bit stuck while wr

Re: [R] R extract vertices for polygon

2009-07-22 Thread David Winsemius
On Jul 21, 2009, at 10:18 PM, Angel Marley wrote: Dear R users, I'm trying to extract from a given matrix (GROUP) the coordinates of the vertices of the different groups (i.e. 3, 7, 1 . . .) to plot the polygons to delineate the area in which each group "wins" and colour it diferentially

Re: [R] How to list R object properties & save workspace?

2009-07-22 Thread Duncan Murdoch
On 22/07/2009 7:22 AM, Matej Kovacic wrote: Hi, I am new to R and have a couple of questions. I know how to list all objects (with ls()), but how to list all properties of them? ls.str() gives more info than ls(). str() on a particular one gives more detail. For instance, I found functi

Re: [R] R help - howto suppress chm help and use text/latex help?

2009-07-22 Thread Duncan Murdoch
On 22/07/2009 7:52 AM, Tsunhin John Wong wrote: Dear R Users, I've installed R with the chm option, but eventually I found I am more used to the normal way of latex help. Is there any argument to suppress chm help by default when starting R? So that I don't have to type something like >help(rle,

Re: [R] How to list R object properties & save workspace?

2009-07-22 Thread Liviu Andronic
Hello, On Wed, Jul 22, 2009 at 1:22 PM, Matej Kovacic wrote: > I know how to list all objects (with ls()), but how to list all > properties of them? > > For instance, I found function object.size(), but I would also like to > know whether one object is a dataset or just one vector (variable) or >

Re: [R] animated grid graphics

2009-07-22 Thread Duncan Murdoch
On 22/07/2009 7:49 AM, Jim Lemon wrote: Allan Engelhardt wrote: On 21/07/09 14:00, Paul Hiemstra wrote: Hi, Drawing grid graphics always takes long, I would write the images to png's and make the animation. If you use Linux I can suggest some nice tools to do this. Hi Allan, I often have t

[R] R help - howto suppress chm help and use text/latex help?

2009-07-22 Thread Tsunhin John Wong
Dear R Users, I've installed R with the chm option, but eventually I found I am more used to the normal way of latex help. Is there any argument to suppress chm help by default when starting R? So that I don't have to type something like >help(rle,chmhelp=NULL) I know the last resort would be to

Re: [R] How do I delete a row from a data frame when varA == "TRUE"

2009-07-22 Thread David Winsemius
On Jul 22, 2009, at 4:02 AM, Uwe Ligges wrote: Daniel Malter wrote: XYZ=XYZ[XYZ$A==TRUE , ] install.packages("fortunes") library("fortunes") fortune("==TRUE") I've also made the repeated unnecessary invocation of which() in this situation. But ... the OP asked for removal rather than

Re: [R] animated grid graphics

2009-07-22 Thread Jim Lemon
Allan Engelhardt wrote: On 21/07/09 14:00, Paul Hiemstra wrote: Hi, Drawing grid graphics always takes long, I would write the images to png's and make the animation. If you use Linux I can suggest some nice tools to do this. Hi Allan, I often have to do this for presentations. As above, I

Re: [R] Automatic differentiation in R

2009-07-22 Thread Gabor Grothendieck
R does not currently have AD (except for the Ryacas package which can do true AD for certain simple one line functions, i..e. input the function and output a function representing its derivative); however, for specific problems one can get close using deriv and associated functions or the approach

[R] Memory errors when using QCA package

2009-07-22 Thread Matthew Gwynne
Hi, I have been using the QCA package, in particular the "eqmcc" function and I am having some issues when trying to use this to minimise a particular boolean function. The boolean function in question has 16 variables, and I am providing the full truth table for the function (65536 with 256 tru

[R] How to list R object properties & save workspace?

2009-07-22 Thread Matej Kovacic
Hi, I am new to R and have a couple of questions. I know how to list all objects (with ls()), but how to list all properties of them? For instance, I found function object.size(), but I would also like to know whether one object is a dataset or just one vector (variable) or even only one value,

Re: [R] Split plot analysis problems

2009-07-22 Thread Jean-Paul Maalouf
Thanks a lot for your answer. My blocks are geographically well-separated, and within each block my four treatments are randomized. Therefore I am choosing the first model. Do you have any idea on how can I verify preliminary assumptions in this model (normality of the residuals and varianc

[R] je veux me sésinscrir!!!!!!!!!!!help

2009-07-22 Thread mariam farjallah
[[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-con

[R] Automatic differentiation in R

2009-07-22 Thread Finlay Scott (Cefas)
Hi I recently gave a presentation about Automatic Differentiation (AD) and R at the Eighth Euro AD Workshop in Oxford (17/07/09). The presentation was intended as a general introduction to R and the desire for a generic AD interface for R. During the presentation I emphasised the need and the

  1   2   >