Re: [R] how to subset unique factor combinations from a data frame.

2011-01-04 Thread SNV Krishna
Hi Dennis, It worked! this is what I am looking for. Many thanks. Rgds, SNVK _ From: Dennis Murphy [mailto:djmu...@gmail.com] Sent: Tuesday, January 04, 2011 9:07 PM To: SNV Krishna Cc: r-help@r-project.org Subject: Re: [R] how to subset unique factor combinations from a data frame

[R] variance inflation factors

2011-01-04 Thread Iasonas Lamprianou
Dear all I run a regression model with three predictors. When I try the Variance Inflation Factors command from Rcmdr menue, I get the message vif(LinearModel.4) ERROR: attempt to set an attribute on NULL and get no results. I know that there is high multicolinearity, but why does it not work

Re: [R] lattice: how to "center" a title?

2011-01-04 Thread Marius Hofert
Very nice, thanks a lot. Cheers, Marius __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, repr

Re: [R] lattice: how to "center" a title?

2011-01-04 Thread Deepayan Sarkar
On Tue, Jan 4, 2011 at 9:32 PM, Dieter Menne wrote: > > > mhofert wrote: >> >> trellis.device("pdf", width = 5, height = 5) >>   print(xyplot(0 ~ 0, main = "This title is not 'centered' for the human's >> eye", scales = list(alternating = c(1,1), tck = c(1,0 >> dev.off() >> >> ... the title do

[R] multipanel plots

2011-01-04 Thread smriti Sebastian
hi, i have attached a doc file..Is this graph can be plotted using R?Plz help regards, smriti __ 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 a

[R] unique limited to 536870912

2011-01-04 Thread Indrajeet Singh
Hi I am using R with igraph to analyze an edgelist that is greater than the said amount. Does anyone know a way around this? Thanks Inder __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

[R] Converting Fortran or C++ etc to R

2011-01-04 Thread Murray Jorgensen
I'm going to try my hand at converting some Fortran programs to R. Does anyone know of any good articles giving hints at such tasks? I will post a selective summary of my gleanings. Cheers, Murray -- Dr Murray Jorgensen http://www.stats.waikato.ac.nz/Staff/maj.html Department of Statistic

[R] Error in M[, 1] : incorrect number of dimensions when trying to plot hexbin

2011-01-04 Thread Jurica Seva
Hello again, I am trying to plot out activity regions the user did on the screen via plotting a hexbin. I have 20 users whose information i want to plot out and it stops in the user 16 with the message Error in M[, 1] : incorrect number of dimensions. Any advice would be appreciated as i dont

[R] t-test or ANOVA...who wins? Help please!

2011-01-04 Thread Frodo Jedi
Dear all, I need an help because I don´t know how to perform the analysis in the right way, as I get different beheaviors using t-test and two ways ANOVA. In what follow I post the table, my goal and the strange results I got. I kindly ask you an help because I really don´t know how to solve

Re: [R] Print plot to pdf, jpg or any other format when using scatter3d error

2011-01-04 Thread Jurica Seva
Thank you, Duncan, it works now with rgl.snapshot (i did have to upgrade to 2.12.1). Is there any way to manipulate the size of the created image? The created plots are a bit small (256*256) Thank you for your help once again :) Best, Jurica On Tue, Jan 4, 2011 at 8:31 AM, Duncan Murdoch wrote:

Re: [R] packagename:::functionname vs. importFrom

2011-01-04 Thread luke-tierney
On Tue, 4 Jan 2011, Frank Harrell wrote: Thanks Luke. By "the namespace from which you import is loaded when your package is" I take it that you are saying that all such referenced packages are loaded up front, which is not what I hoped. That is what happens. You can use conditional imports

Re: [R] error in calling source(): invalid multibyte character in parser

2011-01-04 Thread Luca Meyer
How would I go by doing that? I have tried with: source("file.R", encoding="it_IT.UTF-8") But I get Error in file(file, "r", encoding = encoding) : unsupported conversion from 'it_IT.UTF-8' to '' Thanks, Luca PS: "it_IT.UTF-8" is what I get under locale when I run sessionInfo() Il giorno

Re: [R] Navigating web pages using R

2011-01-04 Thread Mike Marchywka
> Date: Tue, 4 Jan 2011 10:54:19 -0800 > From: egregory2...@yahoo.com > To: r-help@r-project.org > Subject: [R] Navigating web pages using R > > R-Help, > > I'm trying to obtain some data from a webpage which masks the URL from the > user, > so an explicit URL will not work. For example, when o

[R] List to a summary table

2011-01-04 Thread ADias
Hi Suppose you have the code below. The result I get from the cat function is from the avgs object. Now, I have 30 diferent objects like this and I wish to make a summary table, something like: Avgs1 Avgs2 Avgs3 i= 2 ave

[R] update.views("Spatial") does not seem to be able to find RPyGeo package

2011-01-04 Thread Linder, Eric
I have this problem with loading RPyGeo package when using update.views. How can I fix this. I have tried to use other CRAN mirrors with the same result. Below is a copy of my session. -session--- R version 2.12.1 (2010-12-16) Copyright (C) 2010 The R Foun

[R] R not recognized in command line

2011-01-04 Thread Aaditya Nanduri
Hello all, I recently installed rpy2 so that I could use R through Python. However, R was not recognized in the command line. So I decided to add it to the PATH variables. But it just doesnt work And what I mean by it doesnt work is : No matter what I type at the prompt in DOS- be it R, Rcmd

Re: [R] Adding lines in ggplot2

2011-01-04 Thread Bert Gunter
Dennis: Can't speak to ggplot2, but your comments regarding lattice are not quite correct. Many if not all of lattice's basic plot functions are generic, which means that one has essentially complete latitude to define plotting methods for arbitrary data structures. For example, there is an xyplot

Re: [R] Adding lines in ggplot2

2011-01-04 Thread Dennis Murphy
Hi: On Tue, Jan 4, 2011 at 6:56 PM, Eduardo de Oliveira Horta < eduardo.oliveiraho...@gmail.com> wrote: > Hello, > > this is probably a recurrent question, but I couldn't find any answers that > didn't involve the expression "data frame"... so perhaps I'm looking for > something new here. > > I w

Re: [R] Adding lines in ggplot2

2011-01-04 Thread Joshua Wiley
Hi Eduardo, To shamelessly borrow from the Princess Bride: “Why do you use a data frame? Are you touched in the head? "Oh no. It's just they're terribly practical. I think everyone will be using them in the future.” Using data frames is what Hadley intended, and once you get used to it, it is no

[R] Adding lines in ggplot2

2011-01-04 Thread Eduardo de Oliveira Horta
Hello, this is probably a recurrent question, but I couldn't find any answers that didn't involve the expression "data frame"... so perhaps I'm looking for something new here. I wanted to find a code equivalent to > x=sqrt(1:10) > y=log(1:10) > plot(1:10, x, type="lines", col="darkgreen") > line

Re: [R] Cost-benefit/value for money analysis

2011-01-04 Thread David Winsemius
On Jan 4, 2011, at 9:03 PM, Ben Bolker wrote: Graham Smith gmail.com> writes: I assume this has a "proper" name, but I don't know what it is and wondered if anyone knew of a package that might do the following, or something similar. As an example, assume I have borrowed and read 10 book

Re: [R] Cost-benefit/value for money analysis

2011-01-04 Thread Ben Bolker
Graham Smith gmail.com> writes: > > I assume this has a "proper" name, but I don't know what it is and wondered > if anyone knew of a package that might do the following, or something > similar. > > As an example, assume I have borrowed and read 10 books on R , and I have > subjectively given

Re: [R] RData size

2011-01-04 Thread jim holtman
You can confirm it very easy by adding 'compress = FALSE' to the save function. You will see that the .RData files are the same size since you are not compressing them. On Tue, Jan 4, 2011 at 7:19 PM, array chip wrote: > Hi, I noticed a Rdata size issue that's puzzling to me. Attached find 2 >

[R] RData size

2011-01-04 Thread array chip
Hi, I noticed a Rdata size issue that's puzzling to me. Attached find 2 example datasets in text file. Both are 100x5, so the sizes for both text file are the same. However, when I read them into R, the sizes are much different: tt<-as.matrix(read.table("tt.txt",header=T,row.names=1)) save(tt,fi

Re: [R] how to keep keep matching column in output of merge

2011-01-04 Thread Nevil Amos
Apologies, it is there! On 5/01/2011 1:26 AM, Sarah Goslee wrote: Hi Nevil, We really need an example here of what you're doing, since merge() does keep the id column by default. x<- data.frame(id = c("a", "b", "c", NA), x=c(1,2,3,4)) y<- data.frame(id1 = c(NA, "a", "d", "c"), y=c(101, 102,

Re: [R] randomForest speed improvements

2011-01-04 Thread apresley
Andy, Thanks for the reply. I had no idea I could combine them back ... that actually will work pretty well. We can have several "worker threads" load up the RF's on different machines and/or cores, and then re-assemble them. RMPI might be an option down the road, but would be a bit of overhea

[R] [R-pkgs] Package animation update (v2.0-0)

2011-01-04 Thread Yihui Xie
Hi, The animation package 2.0-0 is on CRAN now. This version is a milestone of the animation package. It includes a new function saveHTML() which uses a much more elegant interface and is consistent in syntax with other save*() functions such as saveMovie(), saveSWF() and saveLatex(). Lots of demo

[R] [R-pkgs] ENmisc_1.0

2011-01-04 Thread Erich Neuwirth
ENmisc contains two utility function mtapply is a hybrid of mapply and tapply. It evaluates summary function for each cell of data defined by a fixed set of factor values. The reason I wrote it was to be able to compute weighted means (using wtd.mean from Hmisc) to groups of data defined by factor

Re: [R] R command execution from shell

2011-01-04 Thread Prof Brian Ripley
On Tue, 4 Jan 2011, Duncan Murdoch wrote: On 04/01/2011 3:21 PM, Sebastien Bihorel wrote: Dear R-users, Is there a way I can ask R to execute the "write("hello world",file="hello.txt")" command directly from the UNIX shell, instead of having to save this command to a .R file and execute this f

Re: [R] error in calling source(): invalid multibyte character in parser

2011-01-04 Thread Prof Brian Ripley
On Tue, 4 Jan 2011, Luca Meyer wrote: How would I go by doing that? I have tried with: source("file.R", encoding="it_IT.UTF-8") But I get Error in file(file, "r", encoding = encoding) : unsupported conversion from 'it_IT.UTF-8' to '' Well, that is not the value I suggested -- so what not s

Re: [R] R command execution from shell

2011-01-04 Thread Sebastien Bihorel
Thank you That is exactly what I was looking for. Sebastien Duncan Murdoch wrote: On 04/01/2011 3:21 PM, Sebastien Bihorel wrote: Dear R-users, Is there a way I can ask R to execute the "write("hello world",file="hello.txt")" command directly from the UNIX shell, instead of having to save th

Re: [R] error in calling source(): invalid multibyte character in parser

2011-01-04 Thread Luca Meyer
It works fine, thanks. I was just wondering is there is anyway to include automatically the command you suggest as a default when I open R. Thanks, Luca Il giorno 03/gen/2011, alle ore 08.36, Phil Spector ha scritto: > Luca - > What happens why you type > > Sys.setlocale('LC_ALL','C') > >

Re: [R] Resampling to find Confidence intervals

2011-01-04 Thread Ben Ward
You mentioned the boot package, I've just stumbled across a package called simpleboot, with a function lm.boot. Would this be suitable - it says I can sample cases from the origional dataset, as well as from the residuals of a model. Not all the options I understand but I assume the defaults mi

Re: [R] R command execution from shell

2011-01-04 Thread Duncan Murdoch
On 04/01/2011 3:21 PM, Sebastien Bihorel wrote: Dear R-users, Is there a way I can ask R to execute the "write("hello world",file="hello.txt")" command directly from the UNIX shell, instead of having to save this command to a .R file and execute this file with R CMD BATCH? Yes. Some versions

Re: [R] Page eject and clearing the console

2011-01-04 Thread Greg Snow
Well the things most like cat('\n') for starting a new page would be cat('\013') or cat('\014') (vertical tab and form feed), however on all the terminals I tried they don't do anything since page is not a concept on a terminal. However if you outputted one of those into a file and interpreted

Re: [R] Listing of available functions

2011-01-04 Thread Sébastien Bihorel
Thank you David, Duncan, and Henrique. This is going to be useful. Sebastien On Tue, Jan 4, 2011 at 8:38 AM, David Winsemius wrote: > You can also search for a "cheatsheet". There are several out there > searching on "cheatsheet r" > > This one at Oregon State is presented as a web page" > > ht

[R] R command execution from shell

2011-01-04 Thread Sebastien Bihorel
Dear R-users, Is there a way I can ask R to execute the "write("hello world",file="hello.txt")" command directly from the UNIX shell, instead of having to save this command to a .R file and execute this file with R CMD BATCH? Thank you Sebastien

Re: [R] Non-uniformly distributed plot

2011-01-04 Thread Eric Hu
Hi Dennise, David and Jorge, I hope you all had a great holiday season. Thank you so much for the good comments. I think all your suggestions are sufficient for my current needs. I guess it is safe to say that there is no easy way to plot the data according to the x-axis range. By the way, spot

[R] R implementation of S-distribution

2011-01-04 Thread Seth W Bigelow
I'm working with data that can exhibit either strong right- or left-skew. I understand the S-distribution is useful in such cases (e.g., Voit and Schwacke, 2000. Random Number Generation from Right-Skewed, Symmetric, and Left-Skewed Distributions. Risk Analysis 20 (1): 59-71). Does anyone know o

Re: [R] Page eject and clearing the console

2011-01-04 Thread John Sorkin
I am looking for something which will emulate the following: Back in the old days, when printing to a line printer, the first two characters in a line controlled printing. For example, a line starting with 1h1 starts printing at the top of the next page. 1h+ indicates overprinting 1h0 results in

Re: [R] XTS : merge.xts seems to have problem with character vectors

2011-01-04 Thread Joshua Ulrich
On Tue, Jan 4, 2011 at 12:42 PM, rivercode wrote: > > Hi, > > Please can you tell me what I am doing wrong.  When trying to merge two xts > objects, one of which has multiple character vectors for columns...I am just > getting NAs. > >> str(t) >  POSIXct[1:1], format: "2011-01-04 11:45:37" > >> y2

[R] Navigating web pages using R

2011-01-04 Thread Erik Gregory
R-Help, I'm trying to obtain some data from a webpage which masks the URL from the user, so an explicit URL will not work. For example, when one navigates to the web page the URL looks something like: http://137.113.141.205/rpt34s.php?flags=1 (changed for privacy, but i'm not sure you could

[R] XTS : merge.xts seems to have problem with character vectors

2011-01-04 Thread rivercode
Hi, Please can you tell me what I am doing wrong. When trying to merge two xts objects, one of which has multiple character vectors for columns...I am just getting NAs. > str(t) POSIXct[1:1], format: "2011-01-04 11:45:37" > y2 = xts(matrix(c(letters[1:10]),5), order.by=as.POSIXct(c(t + 1:5)))

Re: [R] Page eject and clearing the console

2011-01-04 Thread Bert Gunter
Perhaps merely rephrasing David's comments, "page" is not a meaningful physical entity -- it depends on font size, line spacing, etc. and the physical "size" of the output surface, which has no meaning for an "infinitely" (or at least up to tyhe screen buffer's limit) scrollable screen viewing are

Re: [R] Page eject and clearing the console

2011-01-04 Thread David Winsemius
On Jan 4, 2011, at 1:27 PM, David Winsemius wrote: On Jan 4, 2011, at 1:19 PM, John Sorkin wrote: I have received help on one of my questions (thank you Henrique Jorge and ), viz. how I can clear the console from an R program. I have not yet received help on how I can skip to the top of the

Re: [R] Page eject and clearing the console

2011-01-04 Thread David Winsemius
On Jan 4, 2011, at 1:19 PM, John Sorkin wrote: I have received help on one of my questions (thank you Henrique Jorge and ), viz. how I can clear the console from an R program. I have not yet received help on how I can skip to the top of the next page, i.e. cat("\n") skips to the next line, is t

Re: [R] Page eject and clearing the console

2011-01-04 Thread John Sorkin
I have received help on one of my questions (thank you Henrique Jorge and ), viz. how I can clear the console from an R program. I have not yet received help on how I can skip to the top of the next page, i.e. cat("\n") skips to the next line, is there an equivalent way to skip to the top of the n

Re: [R] Calendar in R-program

2011-01-04 Thread Spencer Graves
If all you want is a calendar "Date", the simplest may be the Date class in the base package. Try help('as.Date'). Dates and times can be extremely difficult to use for many reasons. For example, some months have 30 days, others have 31, and February usually has 28 days, but eve

Re: [R] Help with "For" instruction

2011-01-04 Thread Sarah Goslee
You need to swap the get and paste commands - paste() creates the string filename that get() acts on. As already explained, using a list is much nicer. Sarah 2011/1/4 André Dias : > Hi > > I was doing > > for (i in 1:length(database)) > assign(paste("distancematrix",i,sep=""), dist(paste(get("da

Re: [R] Help with "For" instruction

2011-01-04 Thread André Dias
Hi I was doing for (i in 1:length(database)) assign(paste("distancematrix",i,sep=""), dist(paste(get("database", i, sep="") but i really did not know what I was doing. I will try your way. But I still don't understnad how the get function works. What woud be more r-ish then get() ? thanks

Re: [R] Help with "For" instruction

2011-01-04 Thread Greg Snow
If you had followed David's advice and put everything into a list or other structure instead of using the assign function (see fortune(236)) then you could just access the list element instead of needing get. In the long run (or even medium and short run) life will be much easier for you if you

Re: [R] Inverse Gaussian Distribution

2011-01-04 Thread Louisa
Dear David, It works! Thank you so much for your help! Louisa -- View this message in context: http://r.789695.n4.nabble.com/Inverse-Gaussian-Distribution-tp3172533p3174015.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-p

Re: [R] Help with "For" instruction

2011-01-04 Thread Sarah Goslee
2011/1/4 André Dias : > hi > > how do I exactly use the get(). I am reading the help for get() but the way > I am using it causes an error/ > So how are you using it? It's so much easier to explain what you're doing wrong if I know what you're doing. Without a reproducible example I can't show yo

Re: [R] Resampling to find Confidence intervals

2011-01-04 Thread Ben Ward
Ok I'll check I understand: So it's using sample, to resample d once, 10 values, because the rnorm has 10 values, with replacement (I assume thats the TRUE part). Then a for loop has this to resample the data - in the loop's case its 1000 times. Then it does a lm to get the coefficients and add

Re: [R] Help with "For" instruction

2011-01-04 Thread André Dias
hi how do I exactly use the get(). I am reading the help for get() but the way I am using it causes an error/ thanks ADias 2011/1/4 Sarah Goslee > With get(). > > On Tue, Jan 4, 2011 at 11:58 AM, ADias wrote: > > > > Hi, > > > > Still with the above problem: > > > > But for instance, i have a

Re: [R] packagename:::functionname vs. importFrom

2011-01-04 Thread Frank Harrell
Thanks Hadley, Luke, Martin, and Bill. Bill captured the essence of my reasons for needing an unexported function. Other reasons include occasional overrides of dispatching rules, and providing parallel versions of some functions that exist in other packages to make them easier to use in some se

Re: [R] packagename:::functionname vs. importFrom

2011-01-04 Thread Frank Harrell
Thanks Luke. By "the namespace from which you import is loaded when your package is" I take it that you are saying that all such referenced packages are loaded up front, which is not what I hoped. And it's too bad you can't import unexported objects, as that rather defeats the purpose of import

Re: [R] Calendar in R-program

2011-01-04 Thread Mark Sharp
Look at the lubridate package from Hadley Wickham for great basic routines for handling date objects. Mark R. Mark Sharp, Ph.D. msh...@sfbr.org On Jan 4, 2011, at 8:02 AM, LOON88 wrote: Hey. I have to do calendar in program R. I was looking for examples on this forum

Re: [R] lattice: how to "center" a title?

2011-01-04 Thread mhofert
Dear Dieter, many thanks, exactly what I was looking for. Cheers, Marius -- View this message in context: http://r.789695.n4.nabble.com/lattice-how-to-center-a-title-tp3173271p3173931.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] plot without points overlap

2011-01-04 Thread Joshua Wiley
Hi, You can set the device region in inches using the "pin" argument (see ?par maybe halfway down or so). You can also set the aspect ratio in plot(), but I am not sure that is really what you want (see ?plot.window for that). Two Examples ### par(pin = c(2, 4)) plot(1:10) dev.off() plot(1:

Re: [R] Page eject and clearing the console

2011-01-04 Thread Gabor Grothendieck
On Tue, Jan 4, 2011 at 9:48 AM, John Sorkin wrote: > (1) I know that \n when used in cat, e.g. cat("\n") produces a line feed > (i.e. skips to the next line). Is there any escape sequence that will go to > the top of the next page? > (2) I know that control L will clear the console. Is there an

Re: [R] Saving objects inside a list

2011-01-04 Thread Eduardo de Oliveira Horta
Hello, I've contacted the guys from RKWard. Below I paste the answer Thomas Friedrichsmeier gave me. --- Hi, the problem appears to be our use of "active bindings" (see ?makeActiveBinding). Internally, RKWard replaces all objects inside .GlobalEnv by active bindings. This allows us to find

Re: [R] Help with "For" instruction

2011-01-04 Thread ADias
Hi, Still with the above problem: But for instance, i have a data base with 30 variables and I created an object each with one varibale missing: DataBase - has 30 variables DataBase1 has 29 variables with the 1st variable gone DataBase2 has 29 variables with the 2nd variable gone for(i in 1:le

Re: [R] Page eject and clearing the console

2011-01-04 Thread Sarah Goslee
Hi John, I don't understand what you mean by "top of the next page", or rather, how that differs from clearing the screen. And for the latter, that is dependent on OS, and on GUI/console usage, and has been discussed several times on the list. The easiest solution is to invoke the system command

Re: [R] Page eject and clearing the console

2011-01-04 Thread Henrique Dallazuanna
Take a look on: http://tolstoy.newcastle.edu.au/R/e11/help/10/09/8463.html On Tue, Jan 4, 2011 at 2:54 PM, John Sorkin wrote: > (1) I know that \n when used in cat, e.g. cat("\n") produces a line feed > (i.e. skips to the next line). Is there any escape sequence that will go to > the top of the n

[R] Page eject and clearing the console

2011-01-04 Thread John Sorkin
(1) I know that \n when used in cat, e.g. cat("\n") produces a line feed (i.e. skips to the next line). Is there any escape sequence that will go to the top of the next page? (2) I know that control L will clear the console. Is there an equivalent function or other means that can be used in R co

Re: [R] lattice: par.settings with standard.theme() + additional arguments?

2011-01-04 Thread Marius Hofert
Dear David, that's funny to read. I guess we did pretty much the same. I also thought I got the list structure wrong and I also tried c()... (since I recently learned from Gabor that a list is only a vector of mode list) and I also searched for posts with exactly the same words [but wasn't

[R] plot without points overlap

2011-01-04 Thread joonR
Hi, I'm trying to plot a grid of points of different dimensions using the simple plot() function. I want to plot the points such that they DO NOT overlap, I guess there should be a way to set a maximum distance between the points, but I cannot find it. Can you help? Thanks a lot! g PS: Is it p

Re: [R] lattice: par.settings with standard.theme() + additional arguments?

2011-01-04 Thread David Winsemius
On Jan 4, 2011, at 11:08 AM, David Winsemius wrote: On Jan 4, 2011, at 8:39 AM, Marius Hofert wrote: Dear David, this I already tried. But as you can see, the plot itself *is* colored. However, I want to have color = FALSE, so, unfortunately, this approach does not work... Quite right

Re: [R] an error about JRI

2011-01-04 Thread Prof Brian Ripley
AFAIK JRI is part of rJava (and you installed rJava), which has its own mailing list: plasea use it. (http://rosuda.org/lists.shtml, I believe). There are tricky things with JRI on multi-architecture platforms, so you do need to be sure you are using the right versions (and rJava 0.8-8 is nee

[R] Cost-benefit/value for money analysis

2011-01-04 Thread Graham Smith
I assume this has a "proper" name, but I don't know what it is and wondered if anyone knew of a package that might do the following, or something similar. As an example, assume I have borrowed and read 10 books on R , and I have subjectively given each of them a "value" score in terms of how usef

Re: [R] randomForest speed improvements

2011-01-04 Thread Liaw, Andy
If you have multiple cores, one "poor man's solution" is to run separate forests in different R sessions, save the RF objects, load them into the same session and combine() them. You can do this less clumsily if you use things like Rmpi or other distributed computing packages. Another considerati

Re: [R] Resampling to find Confidence intervals

2011-01-04 Thread Dieter Menne
Axolotl9250 wrote: > > ... > resampled_ecoli = sample(ecoli, 500, replace=T) > coefs = (coef(lm(MIC. ~ 1 + Challenge + Cleaner + Replicate, > data=resampled_ecoli))) > sd(coefs) > > ... > Below a simplified and self-consistent version of your code, and some changes Dieter # resample d = dat

Re: [R] lattice: par.settings with standard.theme() + additional arguments?

2011-01-04 Thread David Winsemius
On Jan 4, 2011, at 8:39 AM, Marius Hofert wrote: Dear David, this I already tried. But as you can see, the plot itself *is* colored. However, I want to have color = FALSE, so, unfortunately, this approach does not work... Quite right. I didn't see that until you pointed it out. I had man

Re: [R] lattice: how to "center" a title?

2011-01-04 Thread Dieter Menne
mhofert wrote: > > trellis.device("pdf", width = 5, height = 5) > print(xyplot(0 ~ 0, main = "This title is not 'centered' for the human's > eye", scales = list(alternating = c(1,1), tck = c(1,0 > dev.off() > > ... the title does not seem to be "centered" for the human's eye [although > i

[R] an error about JRI

2011-01-04 Thread ying zhang
Hi everyone, I try to run my R script in Java, thus I installed JRI. and run the example, I am using Eclipse on 64 bits windows 7. part of the example code is as follows: public static void main(String[] args) { System.out.println("Creating Rengine (with arguments)");

Re: [R] uroot Package and R 2.12.1

2011-01-04 Thread Uwe Ligges
On 04.01.2011 16:15, CALEF ALEJANDRO RODRIGUEZ CUEVAS wrote: Hello friends. I'm wondering what happened to package uroot. I worked quite well with older versions of R, however with 2.12.1 version it simply doesn't work. The worst thing is that I look for it in the contributed packages and it

[R] uroot Package and R 2.12.1

2011-01-04 Thread CALEF ALEJANDRO RODRIGUEZ CUEVAS
Hello friends. I'm wondering what happened to package uroot. I worked quite well with older versions of R, however with 2.12.1 version it simply doesn't work. The worst thing is that I look for it in the contributed packages and it simply doesn't appear. I want to develop ADF test with seasonal

Re: [R] Inverse Gaussian Distribution

2011-01-04 Thread Louisa
Thank you again David! I did not try it yet, cause neither the dataset nor R is on this computer. I'll try it in a few hours, as soon as possible, when I'm on my personal computer. I'll let you know if it works. I'm really curious! Thank you for your time! Best Wishes, Louisa -- View this

[R] Page eject and clearing the console

2011-01-04 Thread John Sorkin
(1) I know that \n when used in cat, e.g. cat("\n") produces a line feed (i.e. skips to the next line). Is there any escape sequence that will go to the top of the next page? (2) I know that control L will clear the console. Is there an equivalent function or other means that can be used in R co

[R] [R-pkgs] reshape2 1.1

2011-01-04 Thread Hadley Wickham
Reshape2 is a reboot of the reshape package. It's been over five years since the first release of the package, and in that time I've learned a tremendous amount about R programming, and how to work with data in R. Reshape2 uses that knowledge to make a new package for reshaping data that is much mo

[R] [R-pkgs] plyr 1.4

2011-01-04 Thread Hadley Wickham
# plyr plyr is a set of tools for a common set of problems: you need to __split__ up a big data structure into homogeneous pieces, __apply__ a function to each piece and then __combine__ all the results back together. For example, you might want to: * fit the same model each patient subsets of

[R] Calendar in R-program

2011-01-04 Thread LOON88
Hey. I have to do calendar in program R. I was looking for examples on this forum but havent found it. Can someone help me in this thing ? I would be really appreciate for that. Calendar should be the same as we have in Windows but I really dont know how to begin it. Hope u can show me the best wa

[R] How to make a Cluster of Clusters

2011-01-04 Thread Diego Pujoni
Dear R-help, In my Master thesis I measured 10 variables from 18 lakes. These measurements were taken 4 times a year in 3 depths, so I have 12 samples from each lake. I know that 12 samples can not be treated as replications, since they don't correspond to the same environmental characteristics an

Re: [R] Saving objects inside a list

2011-01-04 Thread Eduardo de Oliveira Horta
Hello, (and a happy new year for you too!) Apparently the problem is happening only within my RKWard sessions: > B = 1000 > oblist = as.list(.GlobalEnv) > str(oblist) List of 1 $ B:function (value) > oblist$B function (value) { if (!missing(value)) { assign(k, value, envir = .rk.watch

Re: [R] how to keep keep matching column in output of merge

2011-01-04 Thread Sarah Goslee
Hi Nevil, We really need an example here of what you're doing, since merge() does keep the id column by default. > x <- data.frame(id = c("a", "b", "c", "d"), x=c(1,2,3,4)) > y <- data.frame(id = c("b", "a", "d", "c"), y=c(101, 102, 103, 104)) > merge(x, y) id x y 1 a 1 102 2 b 2 101 3 c

Re: [R] how to keep keep matching column in output of merge

2011-01-04 Thread Ben Bolker
Nevil Amos gmail.com> writes: > How do I keep the linking column[s] in a merge()? > I need to use the values again in a further merge. simple reproducible example please? (e.g. make up a couple of 4-row datasets that show what you want, what you are trying, and what you are getting instead).

Re: [R] lasso/lars error

2011-01-04 Thread F1Tim
I'm having the same error too, but it's very rare though... (especially when using datasets with many variables, say 25). A somewhat odd, but seemingly effective, way to solve this, is by writing try(lars(x,y),silent = T). The try-command in this shape will not generate an error on the console and

Re: [R] Inverse Gaussian Distribution

2011-01-04 Thread David Winsemius
On Jan 4, 2011, at 7:50 AM, Louisa wrote: Thank you! But i'm wondering: if you run area <- factor(area, levels=c("C", "A","B","D","E","F") ) then you are transforming only 'area', aren't you? isn't it possible to transform the whole data like i did for agecat but now for area and area C

Re: [R] lattice: par.settings with standard.theme() + additional arguments?

2011-01-04 Thread Marius Hofert
Dear David, this I already tried. But as you can see, the plot itself *is* colored. However, I want to have color = FALSE, so, unfortunately, this approach does not work... Cheers, Marius On 2011-01-04, at 14:32 , David Winsemius wrote: > > On Jan 4, 2011, at 5:57 AM, Marius Hofert wrote:

Re: [R] Listing of available functions

2011-01-04 Thread David Winsemius
You can also search for a "cheatsheet". There are several out there searching on "cheatsheet r" This one at Oregon State is presented as a web page" http://www.science.oregonstate.edu/~shenr/Rhelp/00cheat.htm Others are available as pdf's. On Jan 4, 2011, at 7:13 AM, Sébastien Bihorel wrote

Re: [R] Listing of available functions

2011-01-04 Thread Duncan Murdoch
On 04/01/2011 7:13 AM, Sébastien Bihorel wrote: Dear R-users, Is there a easy way to access to a complete listing of available functions from a R session? The help.start() and ? functions are great, but I feel like they require the user to know the answer in advance (especially with respect to f

Re: [R] lattice: par.settings with standard.theme() + additional arguments?

2011-01-04 Thread David Winsemius
On Jan 4, 2011, at 5:57 AM, Marius Hofert wrote: Dear expeRts, I usually use par.settings = standard.theme(color = FALSE) to create lattice graphics without colors, so something like library(lattice) x <- runif(10) xyplot(x ~ 1:10, type = "l", par.settings = standard.theme(color = FALSE)

Re: [R] Print plot to pdf, jpg or any other format when using scatter3d error

2011-01-04 Thread Duncan Murdoch
On 03/01/2011 8:17 PM, Jurica Seva wrote: Hi, I have been trying to output my graphs to a file (jpeg, pdf, ps, it doesnt matter) but i cant seem to be able to get it to output. As Uwe said, you are using rgl graphics, not base graphics. So none of the standard devices work, you need to use

[R] how to keep keep matching column in output of merge

2011-01-04 Thread Nevil Amos
How do I keep the linking column[s] in a merge()? I need to use the values again in a further merge. thanks Nevil Amos __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-pro

Re: [R] how to subset unique factor combinations from a data frame.

2011-01-04 Thread Dennis Murphy
Hi: Did you try something like summdf <- as.data.frame(with(df, table(Commodity, Attribute, Unit))) ? The rows of the table should represent the unique combinations of the three variables Here's a simple toy example to illustrate: > x <- sample(LETTERS[1:6], 1000, replace = TRUE) > xx <- sa

Re: [R] ARIMA simulation including a constant

2011-01-04 Thread Prof Brian Ripley
That output is not from arima(), which is the function paired with arima.sim(). Nor is it from arima0(), so I don't believe it is 'ouptut from R' (perhaps from a contributed package you have not mentioned?). With arima(), the intercept is 'm' in the notation on the help page and not 'a' in y

Re: [R] RSQLite to input dataframe

2011-01-04 Thread Amy Milano
Dear sir, When I was going through RSQLite.pdf file, I was just wondering if at all I will understand this. But you have explained it in such a simple and lucid manner, that although I am yet to go thoroughly through the mail, I am filled with confidence that yes now i can do it and I am going

[R] S4 plot function (Package)...

2011-01-04 Thread Daniel Kosztyla
Hello, I have a problem programming 2 plot methods for 2 classes. 1. I have 2 classes. Each class has its own plot method. !!! How the plot,xxx-method.R -files have to look like, so that the plot method for class 1 und plot methods for class 2 can act for each belonging class. Prob My example

Re: [R] Inverse Gaussian Distribution

2011-01-04 Thread Louisa
Thank you! But i'm wondering: if you run area <- factor(area, levels=c("C", "A","B","D","E","F") ) then you are transforming only 'area', aren't you? isn't it possible to transform the whole data like i did for agecat but now for area and area C as baseline, or are you doing so when y

  1   2   >