[R] error occurring in batch mode, not interactive mode: how to find cause of problem

2013-02-04 Thread Franckx Laurent
Dear all, I use R version 2.15.1 on x86_64-pc-linux-gnu (64-bit). I run a simulation where I have to call a series of R scripts in batch mode. When I run the following two lines, this works well for PERIOD='17' but not for PERIOD='08': R CMD BATCH --no-save --args PERIOD='08' YEAR='203O'

Re: [R] gettext weirdness

2013-02-04 Thread Prof Brian Ripley
The 'wierdness' is that 'R' is a domain of C messages and you are trying to use it from R. How messages are massaged before being sent for translation depends on the language, including how trailing spaces are handled. There is no reason to expect domains intended for C code to work in

Re: [R] RandomForest, Party and Memory Management

2013-02-04 Thread Prof Brian Ripley
On Sun, 3 Feb 2013, Lorenzo Isella wrote: Dear All, For a data mining project, I am relying heavily on the RandomForest and Party packages. Due to the large size of the data set, I have often memory problems (in particular with the Party package; RandomForest seems to use less memory). I

[R] Calculating Weights for Variable Groups

2013-02-04 Thread Anees Muhammad
Hello and Thanks in advance for your suggestions. As a new member, I do not know exactly if such problem has ever been discussed in this forum. I need a small help using FactoMineR and RcmdrPlugin.FactoMineR package to calculate weights for the individual observational units. My data looks

Re: [R] Wide character in print?

2013-02-04 Thread Prof Brian Ripley
Note that this is a Perl message (nothing to do with R), as the message from gdata says pretty clearly. Ask the gdata maintainer (see our posting guide) or on a Perl forum. There are less restricted ways to read .xls files in R: XLConnect can read this file, for example. On Sun, 3 Feb 2013,

Re: [R] ggplot2 plotting errorbars.

2013-02-04 Thread Jeff Newmiller
I have no problem specifying the mapping in both ggplot and various geom_* functions. However, it is important to specify data and mapping parameter names in the geom_* functions, particularly so because the parameter ordering is different there.

[R] Script for conditional sums of vectors

2013-02-04 Thread Benjamin Gillespie
Hi guys, I hope you can help me with this (probably) simple query: I have a data frame: -- a=c(1,1,1,1,1,1,2,2,2,2,2,2) b=c(1,1,1,2,3,4,1,1,2,2,3,4) c=c(400,200,300,100,500,300,200,100,500,400,200,100) data=data.frame(a=a,b=b,c=c) -- And I

Re: [R] Script for conditional sums of vectors

2013-02-04 Thread Andrew Robinson
Hi Ben, let me suggest some background reading - Peter Dalgaard's or Phil Spector's book will set you up with what you need. You can also read one of the many free, contributed sets of notes kept on CRAN. I hope that this helps Andrew On Mon, Feb 4, 2013 at 8:29 PM, Benjamin Gillespie

Re: [R] Script for conditional sums of vectors

2013-02-04 Thread D. Rizopoulos
try this: a - c(1,1,1,1,1,1,2,2,2,2,2,2) b - c(1,1,1,2,3,4,1,1,2,2,3,4) c - c(400,200,300,100,500,300,200,100,500,400,200,100) DF - data.frame(a, b, c) with(DF, tapply(c, list(a, b), sum)) I hope it helps. Best, Dimitris On 2/4/2013 10:29 AM, Benjamin Gillespie wrote: Hi guys, I hope you

Re: [R] reshape help

2013-02-04 Thread Eik Vettorazzi
Hi Robert, how about this? tmp-read.table(text=ID Dx Anausea Adiabetes Akidney_failure Aheart_attack Afever Bfever Bpneumonia Bheart_attack Bnausea Bcough Ckidney_failure Cnausea Cfoot_pain,header=T)

Re: [R] Script for conditional sums of vectors

2013-02-04 Thread andrija djurovic
Here are some examples of data aggregation functions in R: http://www.slideshare.net/djandrija/data-aggregation-in-r http://www.psychwire.co.uk/2011/04/data-aggregation-in-r-plyr-sqldf-and-data-table/ Andrija On Mon, Feb 4, 2013 at 10:29 AM, Benjamin Gillespie gy...@leeds.ac.ukwrote: Hi

[R] Modifying a function programmatically

2013-02-04 Thread Søren Højsgaard
Dear list # I have a function ff - function(a,b=2,c=4){a+b+c} # which I programmatically want to modify to a more specialized function in which a is replaced by 1 ff1 - function(b=2,c=4){1+b+c} # I do as follows: vals - list(a=1) (expr1 - as.expression(body(ff))) expression({ a + b +

Re: [R] Script for conditional sums of vectors

2013-02-04 Thread Pascal Oettli
Hello, First, don't use data for a data frame, as it is a R function. Here is a way to do what you are looking for: a=c(1,1,1,1,1,1,2,2,2,2,2,2) b=c(1,1,1,2,3,4,1,1,2,2,3,4) c=c(400,200,300,100,500,300,200,100,500,400,200,100) dat=data.frame(a=a,b=b,c=c) dat.sum - aggregate(c ~ a+b, dat,

Re: [R] Modifying a function programmatically

2013-02-04 Thread Pascal Oettli
Hi, Is it what you are looking for? ff - function(a,b,c){a+b+c} ff(1,10,12) [1] 23 ff(589,2,4) [1] 595 HTH, Pascal Le 04/02/2013 19:00, Søren Højsgaard a écrit : Dear list # I have a function ff - function(a,b=2,c=4){a+b+c} # which I programmatically want to modify to a more

Re: [R] Script for conditional sums of vectors

2013-02-04 Thread Benjamin Gillespie
Thanks everyone - this seems to be the most efficient answer, I'll do a bit of reading around too as suggested. Thanks again, Ben Gillespie Research Postgraduate School of Geography University of Leeds Leeds LS2 9JT From: D. Rizopoulos

Re: [R] Modifying a function programmatically

2013-02-04 Thread Søren Højsgaard
No, this is not really what I want. But I have (later) realized that what I am looking for can be achieved as shown below. I am just not sure how bullet-proof the solution is. Suggestions are welcome! Regards Søren -- specialize - function(ff, vals){

Re: [R] Script for conditional sums of vectors

2013-02-04 Thread Rui Barradas
Hello, In what follows, I've renamed the data.frame 'dat', 'data' already is an R function. xtabs(c ~ a + b, data = dat) Hope this helps, Rui Barradas Em 04-02-2013 09:29, Benjamin Gillespie escreveu: Hi guys, I hope you can help me with this (probably) simple query: I have a data

[R] ggplot and colors

2013-02-04 Thread Adel ESSAFI
Hello, I have a problem with ggplot and colors I used this function to draw somes lines and I want them to be all black (just to test) however, I dont get any black line in the figure. Do you have any experience with ggplot and manual colors?? ggplot(cmax, aes(cmax[,3],

[R] useR! 2013 Call for Abstracts

2013-02-04 Thread VIRGILIO GOMEZ RUBIO
We are happy to inform you that abstract submission for useR! 2013 is now available online, see http://www.R-project.org/useR-2013 This meeting of the R user community will take place at the University of Castilla-La Mancha, Albacete, Spain, July 10-12, 2013. Pre-conference tutorials

Re: [R] x-axis labelling

2013-02-04 Thread Alfredo Tello
Hi Dave, Thanks for your reply. I can't reproduce the last line of code your code. The ifelse argument throws back an error saying it was not used. A On Fri, Feb 1, 2013 at 10:56 PM, David Winsemius dwinsem...@comcast.netwrote: On Feb 1, 2013, at 9:30 AM, Alfredo Tello wrote: Hi Folks!

Re: [R] rJava works with 32-bit but not 64

2013-02-04 Thread Simon Urbanek
On Feb 4, 2013, at 6:33 AM, Spencer Graves wrote: On 2/3/2013 11:21 PM, Pascal Oettli wrote: Hello, Do you have a 64-bit version of Java? rJava says to you: call: stop(No CurrentVersion entry in ', key, '! Try re-installing Java and make sure R and Java have matching architectures.)

Re: [R] ggplot and colors

2013-02-04 Thread Ista Zahn
Hi, fill is not the same as color. You need scale_color_manual(values=c(black, black , black, black, black, black, black, black, black, black, black, black )) although it is not clear why you are using aesthetic mapping to set everything to black... Best, Ista On Mon, Feb 4, 2013 at 6:17 AM,

[R] Meaning of .noemail extension for CRAN uploads?

2013-02-04 Thread Milan Bouchet-Valat
Hi all! I've uploaded two packages to CRAN via FTP [1] about a week ago, and while one was promptly processed by Brian Ripley (thanks for that!), the second got the .noemail extension added, and nothing else happened. So I wonder whether CRAN maintainers are waiting for some action on my side or

Re: [R] rJava works with 32-bit but not 64

2013-02-04 Thread Milan Bouchet-Valat
Le lundi 04 février 2013 à 08:19 -0400, Simon Urbanek a écrit : On Feb 4, 2013, at 6:33 AM, Spencer Graves wrote: On 2/3/2013 11:21 PM, Pascal Oettli wrote: Hello, Do you have a 64-bit version of Java? rJava says to you: call: stop(No CurrentVersion entry in ', key, '! Try

Re: [R] rJava works with 32-bit but not 64

2013-02-04 Thread Spencer Graves
On 2/3/2013 11:21 PM, Pascal Oettli wrote: Hello, Do you have a 64-bit version of Java? rJava says to you: call: stop(No CurrentVersion entry in ', key, '! Try re-installing Java and make sure R and Java have matching architectures.) I think I probably have a 32-bit version and not a

Re: [R] RandomForest, Party and Memory Management

2013-02-04 Thread Lorenzo Isella
Dear Dennis and dear All, It was probably not my best post. I am running R on a Debian box (amd64 architecture) and that is why I was surprised to see memory issues when dealing with a vector larger than 1Gb. The memory is there, but probably it is not contiguous. I will investigate into the

Re: [R] rJava works with 32-bit but not 64

2013-02-04 Thread Spencer Graves
On 2/4/2013 5:22 AM, Milan Bouchet-Valat wrote: Le lundi 04 février 2013 à 08:19 -0400, Simon Urbanek a écrit : On Feb 4, 2013, at 6:33 AM, Spencer Graves wrote: On 2/3/2013 11:21 PM, Pascal Oettli wrote: Hello, Do you have a 64-bit version of Java? rJava says to you: call: stop(No

Re: [R] Looping through rows of all elements of a list that has variable length

2013-02-04 Thread nalluri pratap
Just modified your code a bit, hope this helps:   a=expand.grid(1:2,1:2) b=expand.grid(1:2,1:2,1:2) c=expand.grid(1:2,1:2,1:2,1:2) l.long-list(a,b,c) mygrid-do.call(expand.grid,lapply(l.long,function(x) 1:nrow(x))) out-vector(list,nrow(mygrid)) for(gridrow in 1:nrow(mygrid)) {   sum_rows=0    

Re: [R] Looping through rows of all elements of a list that has variable length

2013-02-04 Thread Dimitri Liakhovitski
Thanks a lot, Pratap! Dimitri On Mon, Feb 4, 2013 at 9:43 AM, nalluri pratap pratap_s...@yahoo.co.inwrote: Just modified your code a bit, hope this helps: a=expand.grid(1:2,1:2) b=expand.grid(1:2,1:2,1:2) c=expand.grid(1:2,1:2,1:2,1:2) l.long-list(a,b,c)

Re: [R] rJava works with 32-bit but not 64

2013-02-04 Thread Simon Urbanek
On Feb 4, 2013, at 10:27 AM, Spencer Graves wrote: On 2/4/2013 5:22 AM, Milan Bouchet-Valat wrote: Le lundi 04 février 2013 à 08:19 -0400, Simon Urbanek a écrit : On Feb 4, 2013, at 6:33 AM, Spencer Graves wrote: On 2/3/2013 11:21 PM, Pascal Oettli wrote: Hello, Do you have a 64-bit

[R] Problem loading hdf5 file

2013-02-04 Thread Flavio Pons
*Hi everyone, I am a new subscriber, so I hope I'm posting in the right way. I need to load a hdf5 file, so I installed the hdf5 libraries ad the hdf5 R package; in downloaded a small sample file from the hdf5 website and I could correctly load it. But when I try to load my file: * require(hdf5)

[R] What methods you use for choosing attributes for kmeans and other clustering (unsupervised) methods?

2013-02-04 Thread SpaceSeller
What characteristics makes attribute great for kmeans clustering and how do you measure these characteristics? Do you look at the distribution shape, correlation matrix between attributes, pairs graphs, statistical tests...? -- View this message in context:

Re: [R] reshape help

2013-02-04 Thread arun
Hi, Try this: library(reshape2) dat1-read.table(text=ID  Dx A    nausea A    diabetes A    kidney_failure A    heart_attack A    fever B    fever B    pneumonia B    heart_attack B    nausea B    cough C    kidney_failure C    nausea C    foot_pain,header=T,stringsAsFactors=F,sep=)  

Re: [R] Script for conditional sums of vectors

2013-02-04 Thread arun
Hi, library(reshape2) dcast(DF,a~b,value.var=c,sum) #  a   1   2   3   4 #1 1 900 100 500 300 #2 2 300 900 200 100 A.K. - Original Message - From: Benjamin Gillespie gy...@leeds.ac.uk To: r-help@r-project.org r-help@r-project.org Cc: Sent: Monday, February 4, 2013 4:29 AM Subject: [R]

Re: [R] Rprof causing R to crash

2013-02-04 Thread c97sr
Am also having trouble with Rprof. I am using on R 2.15.2 on the Mac (Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)). The example above without profiling takes around a minute to run: z = 1 for (i in 1:1e8) z = z+1/i z [1] 19.9979 With profiling: Rprof() z = 1 for (i in 1:1e8)

[R] Exponentiate very large numbers

2013-02-04 Thread francesca casalino
Dear R experts, I have the logarithms of 2 values: log(a) = 1347 log(b) = 1351 And I am trying to solve this expression: exp( ln(a) ) - exp( ln(0.1) + ln(b) ) But of course every time I try to exponentiate the log(a) or log(b) values I get Inf. Are there any tricks I can use to get a real

Re: [R] Problem loading hdf5 file

2013-02-04 Thread Flavio Pons
*I'm sorry, in some way I didn't see I was in the wrong directory. * *The real error message is the following:* hdf5_global_verbosity=3 load=1 Processing object: DNS .. which is a Group Processing object: BEAM .. its a dataset...Dataset has ID83886084 Dataset has tid 50331968 Dataset

[R] Help on conditional selection of data.frame data...

2013-02-04 Thread skpark
Hello, I have trouble with using data.frame data. 1. I loaded data using the following: ff lt;- read.table(E:/R/VM/matrix.txt, header=T) The data I used is attached. I want to use at least 2 conditions for selecting of data. But I failed. It works. -gt; fff lt;- ff[ff$HG == GUEST,]

Re: [R] Help on conditional selection of data.frame data...

2013-02-04 Thread Ista Zahn
Hi, Look at the help page for ?Logic, and in particular the section that describes and |. Best, Ista On Mon, Feb 4, 2013 at 9:01 AM, skpark birdfir...@naver.com wrote: Hello, I have trouble with using data.frame data. 1. I loaded data using the following: ff lt;-

Re: [R] Finding predicted probabilities and their confidence intervals for a logit model

2013-02-04 Thread Ista Zahn
Hi, I think you are looking for as.data.frame(effect(value, mod)) Best, Ista On Tue, Jan 29, 2013 at 6:08 PM, Abraham Mathew abmathe...@gmail.com wrote: I want to construct a logit model, plot the probability curve with the confidence intervals, and then I want to print out a data frame

[R] [R-pkgs] qdap 0.2.0 released

2013-02-04 Thread Tyler Rinker
qdap (Quantitative Discourse Analysis Package) is an R package designed to assist in quantitative discourse analysis. The package stands as a bridge between qualitative transcripts of dialogue and statistical analysis and visualization. This is the first CRAN release of qdap: 

Re: [R] Modifying a function programmatically

2013-02-04 Thread Gabor Grothendieck
On Mon, Feb 4, 2013 at 5:00 AM, Søren Højsgaard sor...@math.aau.dk wrote: Dear list # I have a function ff - function(a,b=2,c=4){a+b+c} # which I programmatically want to modify to a more specialized function in which a is replaced by 1 ff1 - function(b=2,c=4){1+b+c} This a currying

[R] Wide character in print?

2013-02-04 Thread Spencer Graves
Hello: Googling for Wide characters in print led me to a discussion that pushed me to review the read.table help page. Careful study there suggested I try setting fileEncoding to something; it suggested I look at the Encoding section in the help file for file. This suggested that

Re: [R] Correcting and Adding to Data Frame [RESOLVED]

2013-02-04 Thread Rich Shepard
On Fri, 1 Feb 2013, Rich Shepard wrote: Running on Slackware here with R-2.15.2. There is a data frame I need to edit to correct mis-spellings and to add a row. I used the edit() command with emacs but could not find the mis-spelled strings nor figure out how to add another row. The

Re: [R] Rprof causing R to crash

2013-02-04 Thread jim holtman
Could you be a little more explicit of what the error message is. On my Windows system 32-bit, I get the following: Rprof() z - 1 system.time(for (i in 1:1e8) z - z + 1/i) Error: cannot allocate vector of size 381.5 Mb Which is probably due to trying to allocate 1e8 elements of integers

Re: [R] x-axis labelling

2013-02-04 Thread David Winsemius
On Feb 4, 2013, at 4:00 AM, Alfredo Tello wrote: Hi Dave, Thanks for your reply. I can't reproduce the last line of code your code. The ifelse argument throws back an error saying it was not used. Did you look at your graphics window? On my machine the plot you asked for was created by

Re: [R] Combining data from different saved files with same object names into one data frame

2013-02-04 Thread jim holtman
Try this storing them to a list with the j,k,l,m as an index: result - list() for(j in 1:2){ for(k in 1:6){ for(l in 1:2){ for(m in 1:2){ fsumstatZINB=paste(/Users/chris/Dropbox/phd/analysis/Simulation/zinbmodels/summaries/zinbsumstat-,j,k,l,m,.rdata, sep=) load(fsumstatZINB)

Re: [R] Combining data from different saved files with same object names into one data frame

2013-02-04 Thread Christopher Desjardins
Thanks Jim. That'll work for me! Chris On Mon, Feb 4, 2013 at 11:17 AM, jim holtman jholt...@gmail.com wrote: Try this storing them to a list with the j,k,l,m as an index: result - list() for(j in 1:2){ for(k in 1:6){ for(l in 1:2){ for(m in 1:2){

Re: [R] Wide character in print?

2013-02-04 Thread Marc Schwartz
On Feb 4, 2013, at 10:39 AM, Spencer Graves spencer.gra...@structuremonitoring.com wrote: Hello: Googling for Wide characters in print led me to a discussion that pushed me to review the read.table help page. Careful study there suggested I try setting fileEncoding to

[R] If() values in one dataframe then return values from another

2013-02-04 Thread Steven Ranney
I have a large data frame (data1) that looks like: A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15 A16 A17 A18 A19 A20 [1,] 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 [2,] 0 0 0 0 0 1 0 0 1 0 1 0 0 1 0 0 0 0 0 0 [3,]

Re: [R] Meaning of .noemail extension for CRAN uploads?

2013-02-04 Thread Uwe Ligges
On 04.02.2013 14:17, Milan Bouchet-Valat wrote: Hi all! I've uploaded two packages to CRAN via FTP [1] about a week ago, and while one was promptly processed by Brian Ripley (thanks for that!), the second got the .noemail extension added, and nothing else happened. So I wonder whether CRAN

[R] developing package: dealing with namespaces

2013-02-04 Thread Ross Boylan
I am tweaking an R package for which I have the source; the relevant code is in R not C. I'm making changes to the package code. What is the best workflow for doing this? I recall the advice used to be to remove the NAMESPACE during development, but I don't think this is possible anymore. For

Re: [R] Meaning of .noemail extension for CRAN uploads?

2013-02-04 Thread Milan Bouchet-Valat
Le lundi 04 février 2013 à 18:58 +0100, Uwe Ligges a écrit : On 04.02.2013 14:17, Milan Bouchet-Valat wrote: Hi all! I've uploaded two packages to CRAN via FTP [1] about a week ago, and while one was promptly processed by Brian Ripley (thanks for that!), the second got the .noemail

Re: [R] If() values in one dataframe then return values from another

2013-02-04 Thread David Winsemius
On Feb 4, 2013, at 9:48 AM, Steven Ranney wrote: I have a large data frame (data1) that looks like: A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15 A16 A17 A18 A19 A20 [1,] 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 [2,] 0 0 0 0 0 1 0 0 1

Re: [R] If() values in one dataframe then return values from another

2013-02-04 Thread Jose Iparraguirre
Hi Steven, You are not indexing mA properly within the loop. In order not to change the elements of the object, I'll create a new vector, mA2 -not strictly necessary, though. Let's start with an empty vector: mA2 - rep(0,40) Now, the loop with the correct indexing: for(i in 1:40){ + if(

Re: [R] If() values in one dataframe then return values from another

2013-02-04 Thread Rui Barradas
Hello, Try the following. mA - sapply(seq_len(nrow(data1)), function(i) if(any(data1[i,] == 3)) meter[i, 1] else NA) Hope this helps, Rui Barradas Em 04-02-2013 17:48, Steven Ranney escreveu: I have a large data frame (data1) that looks like: A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11

Re: [R] developing package: dealing with namespaces

2013-02-04 Thread Duncan Murdoch
On 04/02/2013 12:59 PM, Ross Boylan wrote: I am tweaking an R package for which I have the source; the relevant code is in R not C. I'm making changes to the package code. What is the best workflow for doing this? I recall the advice used to be to remove the NAMESPACE during development, but

Re: [R] developing package: dealing with namespaces

2013-02-04 Thread Barry Rowlingson
On Mon, Feb 4, 2013 at 6:23 PM, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 04/02/2013 12:59 PM, Ross Boylan wrote: I am tweaking an R package for which I have the source; the relevant code is in R not C. I'm making changes to the package code. What is the best workflow for doing

Re: [R] Exponentiate very large numbers

2013-02-04 Thread Rui Barradas
Hello, Use a simple transfomation. Divide both t log.a - 1347 log.b - 1351 tmp1 - exp(log.a - log(0.1) - log.b) - 1 result - tmp1 * exp(0.1 + log.b) # -Inf Using base 10, the result would be -4.405386507*10^585 a number too large for R. See the help page ?.Machine Hope this helps, Rui

Re: [R] Exponentiate very large numbers

2013-02-04 Thread Rui Barradas
Sorry, it should be: Divide both terms by exp(log(0.1) + log.b) to give tmp1 - exp(log.a - log(0.1) - log.b) - 1 result - tmp1 * exp(log(0.1) + log.b) Rui Barradas Em 04-02-2013 18:53, Rui Barradas escreveu: Hello, Use a simple transfomation. Divide both t log.a - 1347 log.b - 1351 tmp1 -

Re: [R] developing package: dealing with namespaces

2013-02-04 Thread Duncan Murdoch
On 04/02/2013 1:48 PM, Barry Rowlingson wrote: On Mon, Feb 4, 2013 at 6:23 PM, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 04/02/2013 12:59 PM, Ross Boylan wrote: I am tweaking an R package for which I have the source; the relevant code is in R not C. I'm making changes to the package

[R] Modifying Package Data

2013-02-04 Thread Rich Shepard
The bio.infer package contains a data frame /usr/lib/R/library/bio.infer/data/itis.ttable.rda that needs to be modified. After loading the bio.infer package and attaching the data frame with the data() function, I wrote the data frame to a text file. After adding another row to the data

[R] is it possible to create a trellis object with multiple colorkeys/z-scale axis?

2013-02-04 Thread Ryan Flaherty
Dear R users- Do the lattice/latticeExtra packages support multiple tileplots with unique colorkeys? I am trying to create a visualization of the encounter rate of certain stocks of salmon across two years. The issue I am having is that some stocks are encountered at much higher rates than

Re: [R] is it possible to create a trellis object with multiple colorkeys/z-scale axis?

2013-02-04 Thread Richard M. Heiberger
This will get you started library(lattice) library(latticeExtra) D1 - data.frame(y=1:3, x=4:6) D2 - data.frame(y=7:10, x=11:14) T1 - xyplot(y ~ x, data=D1, key=list(space=right, text=list(LETTERS[1:3], col=c(red,green,blue T2 - xyplot(y ~ x, data=D2,

Re: [R] is it possible to create a trellis object with multiple colorkeys/z-scale axis?

2013-02-04 Thread Richard M. Heiberger
On further thought, this might be better as it keeps the keys distinct library(lattice) library(latticeExtra) D1 - data.frame(y=1:3, x=4:6) D2 - data.frame(y=7:10, x=11:14) T1 - xyplot(y ~ x, data=D1, key=list(space=right, text=list(LETTERS[1:3], col=c(red,green,blue T2 -

Re: [R] rJava works with 32-bit but not 64

2013-02-04 Thread Robert Baer
Is it feasible to have both installed in a way that allows the each version of R to select its own version of Java? A comment on stackoverflow suggests that may not be easy (http://stackoverflow.com/questions/5272216/is-it-possible-to-install-both-32bit-and-64bit-java-on-windows-7).

Re: [R] Modifying a function programmatically

2013-02-04 Thread Søren Højsgaard
Dear Gabor, Thanks for pointing me to this; didn't know the Curry function. For what it is worth, the two approaches perform somewhat differently in terms of computing time (my specialize function is given at the end): library(functional) ## EXAMPLE 1 ff - function(a,b=2,c=4){a+b+c} ff1 -

Re: [R] Loading a list into the environment

2013-02-04 Thread Greg Snow
An often better approach is to use a function like with or within. These allow you to run a command with your list (data frame, environment, etc.) in the first position of the search list so they behave like they are in the global environment (actually better because they temporarily mask rather

[R] Banff Canada: Mixed modelling course

2013-02-04 Thread Highland Statistics Ltd
There are 8 remaining seats on the following course: Introduction to linear mixed effects modelling and GLMM course. Where: Banff, Canada When: 27-31 May, 2013 For details see the flyer at: http://www.highstat.com/Courses/FlyerCanada2013.pdf or: http://www.highstat.com/statscourse.htm Kind

Re: [R] rJava works with 32-bit but not 64

2013-02-04 Thread Spencer Graves
On 2/4/2013 7:03 AM, Simon Urbanek wrote: On Feb 4, 2013, at 10:27 AM, Spencer Graves wrote: On 2/4/2013 5:22 AM, Milan Bouchet-Valat wrote: Le lundi 04 février 2013 à 08:19 -0400, Simon Urbanek a écrit : On Feb 4, 2013, at 6:33 AM, Spencer Graves wrote: On 2/3/2013 11:21 PM, Pascal Oettli

Re: [R] rJava works with 32-bit but not 64

2013-02-04 Thread Simon Urbanek
On Feb 4, 2013, at 7:14 PM, Spencer Graves wrote: On 2/4/2013 7:03 AM, Simon Urbanek wrote: On Feb 4, 2013, at 10:27 AM, Spencer Graves wrote: On 2/4/2013 5:22 AM, Milan Bouchet-Valat wrote: Le lundi 04 février 2013 à 08:19 -0400, Simon Urbanek a écrit : On Feb 4, 2013, at 6:33 AM,

[R] download and save all files from FTP site?

2013-02-04 Thread Anika Masters
What are good ways, within R, to download all files (perhaps including folders/directories?) from an FTP site and then save these files to a local hard drive? Is try(getURL) {RCurl} and save() the best functions to utilize? Any other suggestions? [[alternative HTML version deleted]]

Re: [R] download and save all files from FTP site?

2013-02-04 Thread Ista Zahn
Hi Anika, Depending on your definition of within R, you might try system(wget -r URL) HTH, Ista On Mon, Feb 4, 2013 at 7:49 PM, Anika Masters anika.mast...@gmail.com wrote: What are good ways, within R, to download all files (perhaps including folders/directories?) from an FTP site and then

[R] evaluation clusters

2013-02-04 Thread Pierre Antoine DuBoDeNa
Hello, I was wondering if there is any package with several metrics for cluster estimation (estimating the k=2...10) (or evaluation..). Also if instead of euclidean distance in k-means I use some other kind of distance.. then for those evaluation metrics which takes into consideration the

[R] duplicate data

2013-02-04 Thread Richard Müller
Hello, I have a long list of x-, y- and z-data and try to generate a heatmap. Obviously there are several data with identical x- and y-values. I get the following error message: Error in interp.old(x, y, z, xo = xo, yo = yo, ncp = 0, extrap = extrap, : duplicate data points: need to set

Re: [R] duplicate data

2013-02-04 Thread Pascal Oettli
Hello, From ?interp.old duplicate character string indicating how to handle duplicate data points. Possible values are error produces an error message, strip remove duplicate z values, mean,median,user calculate mean , median or user defined function (dupfun) of