Re: [R] outputing text colors

2010-03-19 Thread Jim Lemon
On 03/19/2010 12:37 PM, rtist wrote: Hi all, I was wondering if there is a way to output text tables with the color of the text corresponding to a condition. More specifically, Im outputting an time series table and want the console colors to be green0 and red0. This is very easy to do in

Re: [R] Odp: language!!!

2010-03-19 Thread Petr PIKAL
Hi I am not definitely expert in locales. It is a relict from time I worked with W95/98 where were some problems with locale setting and/or graphing. I would try just before reading in a file to change locale setting by ?Sys.setlocale Sys.getlocale() [1] LC_COLLATE=Czech_Czech

Re: [R] Please Post Planned Contrasts Example in lme {nlme}

2010-03-19 Thread Dieter Menne
Tobias Verbeke-2 wrote: I would have a look at the multcomp package which allows for defining contrasts in a very convenient way and can deal a.o. with lme (from nlme) and mer (from lme4) objects. It's correct, but there is no example in the docs of glht for lmer, but there is one in

Re: [R] Odp: language!!!

2010-03-19 Thread Tal Galili
It worked ! Thank you very much Petr! Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English)

Re: [R] Creating Rcpp RcppDatetime from string with millisecond

2010-03-19 Thread Romain Francois
Hello, Rcpp has a dedicated mailing list where such questions are appropriate. https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel Please augment your email with some code examples of what you tried and repost on Rcpp-devel. Romain Le 19/03/10 00:45, R_help Help a écrit

Re: [R] Odp: language!!!

2010-03-19 Thread Petr PIKAL
Hi Thanks, I am surprised, as I tried it after Bill's post and it did not work on my machine W2000, So probably the success or failure is system specific. Regards Petr Tal Galili tal.gal...@gmail.com napsal dne 19.03.2010 08:43:11: It worked ! Thank you very much Petr! Tal

Re: [R] Odp: language!!!

2010-03-19 Thread Tal Galili
Hi Petr, Please try: Sys.setlocale(LC_ALL, Hebrew) # And a- read.table(http://www.talgalili.com/files/aa.txt,encoding=UTF-8; ,check.names=FALSE, header = T, sep = \t) # Notice the use of encoding a And let me know if that works... The only question I have left is how can you set

Re: [R] How to read.table with “Hebrew” column names (in R)?

2010-03-19 Thread Tal Galili
Hello William, Ista and other R-help members, The code you suggested: read.table(http://www.talgalili.com/files/aa.txt,encoding=UTF-8; ,check.names=FALSE, header = T, sep = \t) Works for me the same way it does for you: I can read the data in (finally!), but some of the ways for using it fails

Re: [R] How to read.table with “Hebrew” column names (in R)?

2010-03-19 Thread Tal Galili
Hi William. (Thanks to Petr Pikal) Please try: Sys.setlocale(LC_ALL, Hebrew) # And a- read.table(http://www.talgalili.com/files/aa.txt,encoding=UTF-8; ,check.names=FALSE, header = T, sep = \t) # Notice the use of encoding a And let me know if that works... The only question I have left is

Re: [R] outputing text colors

2010-03-19 Thread rtist
Hi Everyone, And thanks for the replies. I was more specifically referring to the console table output itself. I have a time series that has columns of months and rows of years, and each row,col is a value. I wanted the actual text output value to the console table r,c to have a color

Re: [R] Odp: language!!!

2010-03-19 Thread Petr PIKAL
Hi Tal Yes this was what I tried but it did not reveal hebrew signs, therefore I assume it has something to do with OS. put this line Sys.setlocale(LC_ALL, Hebrew) in your Rprofile.site file in etc folder of your R instalatiion Regards Petr Tal Galili tal.gal...@gmail.com napsal dne

Re: [R] How to read.table with “Hebrew” c olumn names (in R)?

2010-03-19 Thread Petr PIKAL
Hi sessionInfo() R version 2.11.0 Under development (unstable) (2010-03-09 r51229) i386-pc-mingw32 locale: [1] LC_COLLATE=Hebrew_Israel.1255 LC_CTYPE=Hebrew_Israel.1255 [3] LC_MONETARY=Hebrew_Israel.1255 LC_NUMERIC=C [5] LC_TIME=Hebrew_Israel.1255 attached base packages: [1] stats

Re: [R] Odp: language!!!

2010-03-19 Thread Tal Galili
Thanks Petr, Could you please share what is your sessionInfo() ? Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |

Re: [R] How to read.table with “Hebrew” column names (in R)?

2010-03-19 Thread Tal Galili
Thanks Petr. This is my sessionInfo() R version 2.10.1 (2009-12-14) i386-pc-mingw32 locale: [1] LC_COLLATE=Hebrew_Israel.1255 LC_CTYPE=Hebrew_Israel.1255 [3] LC_MONETARY=Hebrew_Israel.1255 LC_NUMERIC=C [5] LC_TIME=Hebrew_Israel.1255 attached base packages: [1] stats graphics grDevices

[R] Odp: Dataframe manipulation

2010-03-19 Thread Petr PIKAL
Hi maybe you shall be a little bit more clear what you really want. It is hard to copy your data o R without some extensive fiddling, so we need to rely on complicated text description. It seems that ?ave could help you but it is hard to check. Basically I would recode ARRIVE and DEPART as

Re: [R] using RKWard for a function plot

2010-03-19 Thread Matthieu Stigler
Not that I know, you should write the function yourself: g-1 f-2 beta-1 curve((-2*g*x*exp(-(x^ 2)/beta)/f)) But yes the idea to add such functionality within rkward is good :-) Hope this helps Mat Is it possible to use the RKWard GUI to just plot a function? I will have some exponential

Re: [R] chron package install fail in intel I7 - fedora 12

2010-03-19 Thread Uwe Ligges
On 19.03.2010 04:20, Juan Santiago Ramseyer wrote: install packages chron fail in Fedora 12, cpu I7/860 See down. Regard, Juan S. Ramseyer. install.packages() Loading Tcl/Tk interface ... done --- Please select a CRAN mirror for use in this session --- Warning in install.packages() :

Re: [R] Please Post Planned Contrasts Example in lme {nlme}

2010-03-19 Thread Liviu Andronic
On 3/18/10, Martin Turcotte mart.turco...@gmail.com wrote: Hi I am running some linear and non-linear mixed effect models and would like to do some planned contrasts (a priori contrasts) I have looked in the help and in many forums and it seems possible to do so but don't understand how to

Re: [R] One main title and One legend for multiple lattice plots

2010-03-19 Thread Deepayan Sarkar
On Fri, Mar 19, 2010 at 8:37 AM, Kim Jung Hwa kimhwamaill...@gmail.com wrote: Hi David, Thank you for your reply. I'm sorry if I've misconveyed my question: here it goes again: *** I want a common main title and a common legend after I output/print four different lattice plots on a single

[R] Howto get unnormalized eigenvectors?

2010-03-19 Thread Lucek, Kay
Hi, I try to calculate the angle between two first eigenvectors of different covariance matrices of biological phenotypic traits for different populations. My issue here is, that all possibilities to do so seem to normalize the eigenvectors to length 1. Although the helpfile of eigen() states,

[R] Sequence of ordered variable to add as column

2010-03-19 Thread Duarte Viana
Hello all, As an example, consider the following dataframe df-data.frame(id=c(b,b,a,a,a),ord=c(2,1,1,3,2)) dates-as.Date(c(02/27/92, 02/27/92, 01/14/92, 02/28/92, 02/01/92),%m/%d/%y) df$dates-dates which was ordered with df-df[order(df$id,df$dates),] Now I would like to add a column

Re: [R] Howto get unnormalized eigenvectors?

2010-03-19 Thread Duncan Murdoch
Lucek, Kay wrote: Hi, I try to calculate the angle between two first eigenvectors of different covariance matrices of biological phenotypic traits for different populations. My issue here is, that all possibilities to do so seem to normalize the eigenvectors to length 1. Although the helpfile

[R] Odp: Sequence of ordered variable to add as column

2010-03-19 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 19.03.2010 11:25:12: Hello all, As an example, consider the following dataframe df-data.frame(id=c(b,b,a,a,a),ord=c(2,1,1,3,2)) dates-as.Date(c(02/27/92, 02/27/92, 01/14/92, 02/28/92, 02/01/ 92),%m/%d/%y) df$dates-dates which was

[R] lattice grob

2010-03-19 Thread baptiste auguie
Dear list, I'm trying to arrange various grid objects on a page using a frameGrob. It works fine with basic grobs (textGrob, gTree, etc.), and also with ggplot2 objects using the ggplotGrob() function. I am however stuck with lattice. As far as I understand, lattice produces a list of class

Re: [R] One main title and One legend for multiple lattice plots

2010-03-19 Thread Kim Jung Hwa
Ohh I got your point Deepayan, thats a stupid question from me. I can easilty rbind my four datasets, distuingusing them by a new variable, say type, and then instead of plotting a 2D image, I can use a conditioning variable to plot a 3D image and achieve what I what. I'm sorry about this, thanks

[R] Arima forecasting

2010-03-19 Thread Matteo Bertini
Hello everyone, I'm doing some benchmark comparing Arima [1] and SVR on time series data. I'm using an out-of-sample one-step-ahead prediction from Arima using the fitted method [2]. Do someone know how to have a two-steps-ahead forecast timeseries from Arima? Thanks, Matteo Bertini [1]

Re: [R] mboost: Interpreting coefficients from glmboost if center=TRUE

2010-03-19 Thread Benjamin Hofner
Sorry for the tardy reply but I just found your posting incidentally today. To make long things short: You are right about the centering. We forgot to correct the intercept if center = TRUE. We lately found the problem ourself and fixed it in the current version (mboost 2.0-3). However the

Re: [R] merge.zoo produces non unique chron time series

2010-03-19 Thread Gabor Grothendieck
Also, fyi, MATCH.times has been added to the development version of zoo so in the future these workarounds will not be necessary. That is, in the next version of zoo one can simply write merge(zoo.ts.pot, zoo.ts) here. On Thu, Mar 18, 2010 at 6:37 PM, Gabor Grothendieck ggrothendi...@gmail.com

Re: [R] Sequence of ordered variable to add as column

2010-03-19 Thread jim holtman
Here is one way of doing it: df-data.frame(id=c(b,b,a,a,a),ord=c(2,1,1,3,2)) dates-as.Date(c(02/27/92, 02/27/92, 01/14/92, 02/28/92, + 02/01/92),%m/%d/%y) df$dates-dates df$seq - ave(as.numeric(df$dates), df$id, FUN=order) df id ord dates seq 1 b 2 1992-02-27 1 2 b 1

[R] Playwith with Linux Mint

2010-03-19 Thread Research
Hi, I am having problems installing playwith on a Linux Mint ver. 8 (Helena) computer running R-2.10.1. src/base/R-2/R-2.10.1.tar.gz Anybody facing similar problems? Is it a GTK issue? I can not install the cairo related packages/libraries as well. Any pointers very welcome. Thanks +

Re: [R] Playwith with Linux Mint

2010-03-19 Thread Liviu Andronic
Hello On 3/19/10, Research risk2...@ath.forthnet.gr wrote: I am having problems installing playwith on a Linux Mint ver. 8 (Helena) computer running R-2.10.1. src/base/R-2/R-2.10.1.tar.gz Linux Mint is Ubuntu-based, so a better venue would be r-sig-debian. Anybody facing similar

[R] Dataframe calculations

2010-03-19 Thread Hosack, Michael
Hi everyone, My question will probably seem simple to most of you, but I have spent many hours trying to solve it. I need to perform a series of sequential calculations on my dataframe that move across rows and down columns, and then repeat themselves at each unique 'MM' by 'DD' grouping.

Re: [R] How to plot two cumulative frequency graph together

2010-03-19 Thread David Winsemius
On Mar 18, 2010, at 11:00 PM, Gundala Viswanath wrote: Dear masters, I have data that looks like this: #val Freq1 Freq2 Get rid of the # at the beginning of the file. It wiil be interpreted as a comment rather than a header. 0.000 178 202 0.001 4611 5300 0.002 99 112 0.003 26 30 0.004

[R] How to handle missing value as first item in yearmon (zoo package)

2010-03-19 Thread Marshall Feldman
Hi, Some time series have missing values in the time index. For example historical data on business cycles will typically date them from peak to trough, but some information may be missing. In most cases, this does not cause trouble, but if the first date is missing (e.g., we know the date of

[R] How To Specify An Improper Uniform Prior (Bayesian Analysis)

2010-03-19 Thread Ryan
Hi, In Winbugs, one can assign a distribution called dflat(), which corresponds to an improper uniform prior on the whole real line. What would be the equivalent in R? I ask because I'm trying to run Winbugs through R, and the model I've constructed in Winbugs includes a dflat() distribution. For

[R] lpSolve

2010-03-19 Thread torgrims
Hey, Anyone who knows what the following error report when calling lp() in package lpSolve means? Error: status 3 JT -- View this message in context: http://n4.nabble.com/lpSolve-tp1599380p1599380.html Sent from the R help mailing list archive at Nabble.com.

[R] (no subject)

2010-03-19 Thread Terry Therneau
The change has also been made to coxme. I'm in the midst of another fix (should be done by tomorrow) and will get posted to Rforge as soon as that's done. Terry On Thu, Mar 18, 2010 at 6:26 AM, Dieter Menne dieter.me...@menne-biomed.de wrote: I am trying to use nlme and coxme in one Sweave

[R] Gamma parametrization

2010-03-19 Thread Randall Wrong
Dear R users, ?rgamma gives me : rgamma(n, shape, rate = 1, scale = 1/rate) rate: an alternative way to specify the scale. The Gamma distribution with parameters ‘shape’ = a and ‘scale’ = s has density f(x)= 1/(s^a

Re: [R] Please Post Planned Contrasts Example in lme {nlme}

2010-03-19 Thread Max Kuhn
If these are contrasts of the fixed effects, the contrast package might do. Max On Mar 19, 2010, at 5:33 AM, Liviu Andronic landronim...@gmail.com wrote: On 3/18/10, Martin Turcotte mart.turco...@gmail.com wrote: Hi I am running some linear and non-linear mixed effect models and

Re: [R] How to read.table with “Hebrew” c olumn names (in R)?

2010-03-19 Thread William Dunlap
Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com From: Tal Galili [mailto:tal.gal...@gmail.com] Sent: Friday, March 19, 2010 12:36 AM To: William Dunlap; istaz...@gmail.com Cc: r-help@r-project.org Subject:

Re: [R] How to handle missing value as first item in yearmon (zoo package)

2010-03-19 Thread Gabor Grothendieck
There is a bug in as.Date.yearmon and as.Date.yearqtr which is triggered by certain NAs. Its now fixed in the development version of zoo on R-forge. Note that in your code it only affecting printing of the yearmon variable. The yearmon variable itself is correct. Try this:

Re: [R] Dataframe calculations

2010-03-19 Thread Erich Neuwirth
with the following code newvars()$ARRIVALS and newvars()$DEPARTURES will give you the new variables you need. -=-=-= addDelays - function(arriveTime,waitVec,travelVec){ start-as.POSIXct(arriveTime,format=%H:%M:%S) delays-as.vector(t(cbind(waitVec,travelVec)))

Re: [R] Pedigree / Identifying Immediate Family of Index Animal

2010-03-19 Thread Terry Therneau
On Thu, 18 Mar 2010, Ben Bimber wrote: I have a data frame containing the Id, Mother, Father and Sex from about 10,000 animals in our colony. I am interested in graphing simple family trees for a given subject or small number of subjects. The basic idea is: start with data frame from entire

[R] Breaking from For loop question

2010-03-19 Thread dc896148
Hello, I have a simple question about breaking out of a For loop. When I use the 'break' statement within a For loop, say on the first of several iterations, does control return to the top of the loop for the next iteration, or does the For loop stop completely and no further iterations are

[R] Different results from survreg with version 2.6.1 and 2.10.1

2010-03-19 Thread nathalcs
Original Message Subject: Different results from survreg with version 2.6.1 and 2.10.1 From:natha...@ulrik.uio.no Date:Fri, March 19, 2010 16:00 To: r-help@r-project.org

[R] execute functions in .dll

2010-03-19 Thread Tord Snäll
Dear all, We have a data base with huge amounts of data that we want analysts/scientists to be able to use. These data can be accessed through the internet thanks to a SOAP based web service that we have set up. We have also developed a web service client using Dot.NET framework, which is built

Re: [R] Gamma parametrization

2010-03-19 Thread G. Jay Kerns
Dear Randall, On Fri, Mar 19, 2010 at 10:24 AM, Randall Wrong randall.wr...@gmail.com wrote: Dear R users, ?rgamma gives me :               rgamma(n, shape, rate = 1, scale = 1/rate)               rate: an alternative way to specify the scale.               The Gamma distribution with

Re: [R] Dataframe calculations

2010-03-19 Thread Hosack, Michael
Erich, Thank you so much for the effort you put into writing this code. I ran it and then assigned the two variables you created to the 'ARRIVE' and 'DEPART' variables of my dataframe as you directed and the resultant calculations were incorrect. I am not sure why it did not work, I do not yet

[R] execute functions in .dll

2010-03-19 Thread Tord Snäll
Dear all, We have a data base with huge amounts of data that we want analysts/scientists to be able to use. These data can be accessed through the internet thanks to a SOAP based web service that we have set up. We have also developed a web service client using Dot.NET framework, which is built

[R] Encrypt/decrypt in R

2010-03-19 Thread Hadley Wickham
Hi all, Does any one know of any encryption/decryption algorithms in R? I'm not looking for anything robust - I want some way of printing output to the screen that the user can't read immediately, but can decrypt a little later. The main thing I don't want to the user to see is a number, so

Re: [R] Encrypt/decrypt in R

2010-03-19 Thread Barry Rowlingson
On Fri, Mar 19, 2010 at 5:00 PM, Hadley Wickham had...@rice.edu wrote: Hi all, Does any one know of any encryption/decryption algorithms in R?  I'm not looking for anything robust - I want some way of printing output to the screen that the user can't read immediately, but can decrypt a

Re: [R] Encrypt/decrypt in R

2010-03-19 Thread Gabor Grothendieck
chartr? On Fri, Mar 19, 2010 at 1:00 PM, Hadley Wickham had...@rice.edu wrote: Hi all, Does any one know of any encryption/decryption algorithms in R?  I'm not looking for anything robust - I want some way of printing output to the screen that the user can't read immediately, but can decrypt

[R] FW: New public-use Education Longitudinal Study of 2002 Base Year to 2006 Second Follow-up data set released

2010-03-19 Thread Art Burke
Colleagues ... The site identified below makes survey data available for public use. Data may be downloaded in R format; the site also provides R syntax files to accompany the downloaded data. Registration is required. On another matter, in anticipation of future projects, I would like to hear

Re: [R] Encrypt/decrypt in R

2010-03-19 Thread Marc Schwartz
On Mar 19, 2010, at 12:00 PM, Hadley Wickham wrote: Hi all, Does any one know of any encryption/decryption algorithms in R? I'm not looking for anything robust - I want some way of printing output to the screen that the user can't read immediately, but can decrypt a little later. The

Re: [R] Encrypt/decrypt in R

2010-03-19 Thread Henrique Dallazuanna
Perhaps, If is there a connection with mysql: library(RMySQL) #conn - dbConnect(...) encStr - dbGetQuery(conn, SELECT AES_ENCRYPT('teste', 'password')) dbGetQuery(conn, sprintf(SELECT AES_DECRYPT('%s', 'password'), encStr)) On Fri, Mar 19, 2010 at 2:00 PM, Hadley Wickham had...@rice.edu wrote:

Re: [R] Dataframe calculations

2010-03-19 Thread Erich Neuwirth
Sorry, Oddly I got the use of odds and evens the wrong way round. addDelays - function(arriveTime,waitVec,travelVec){ start-as.POSIXct(arriveTime,format=%H:%M:%S) delays-as.vector(t(cbind(waitVec,travelVec))) newtimes-format(start+cumsum(delays)*60,format=%H:%M:%S)

Re: [R] Encrypt/decrypt in R

2010-03-19 Thread Barry Rowlingson
On Fri, Mar 19, 2010 at 5:10 PM, Barry Rowlingson b.rowling...@lancaster.ac.uk wrote: On Fri, Mar 19, 2010 at 5:00 PM, Hadley Wickham had...@rice.edu wrote: Hi all, Does any one know of any encryption/decryption algorithms in R?  I'm not looking for anything robust - I want some way of

Re: [R] Breaking from For loop question

2010-03-19 Thread Duncan Murdoch
On 19/03/2010 11:32 AM, dc896148 wrote: Hello, I have a simple question about breaking out of a For loop. When I use the 'break' statement within a For loop, say on the first of several iterations, does control return to the top of the loop for the next iteration, or does the For loop stop

Re: [R] execute functions in .dll

2010-03-19 Thread Duncan Murdoch
On 19/03/2010 12:47 PM, Tord Snäll wrote: Dear all, We have a data base with huge amounts of data that we want analysts/scientists to be able to use. These data can be accessed through the internet thanks to a SOAP based web service that we have set up. We have also developed a web service

Re: [R] Dataframe calculations

2010-03-19 Thread Hosack, Michael
Unfortunately, that did not correct the problem. Times for 'ARRIVE' need to be either 07:00:00 or 14:30:00 for the first case of each unique 'MM' by 'DD' subgroup (the others will be calculated), and the code produces calculations that I can't interpret from the fixed numbers. Also, 'ARRIVE'

Re: [R] Encrypt/decrypt in R

2010-03-19 Thread Hadley Wickham
On Fri, Mar 19, 2010 at 12:35 PM, Barry Rowlingson b.rowling...@lancaster.ac.uk wrote: On Fri, Mar 19, 2010 at 5:10 PM, Barry Rowlingson b.rowling...@lancaster.ac.uk wrote: On Fri, Mar 19, 2010 at 5:00 PM, Hadley Wickham had...@rice.edu wrote: Hi all, Does any one know of any

[R] relaimpo - dummy variable

2010-03-19 Thread Gabriela Bucini
Hi, I have a question related to the function boot.relimp (package relaimpo). I have a model with numerical predictors and one dummy (class) variable. I would like to calculate the relative importance of the predictors but I have some problems with the dummy variable. The name of the linear

Re: [R] Put square brackets as column name in a data frame

2010-03-19 Thread Paul-
names(nouvTable) = c(ID,X[m],Y[m],Z[m]) -- View this message in context: http://n4.nabble.com/Put-square-brackets-as-column-name-in-a-data-frame-tp1599725p1601142.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org

[R] how to drop fields by name when reading in data?

2010-03-19 Thread Peter Keller
I have a number of space separated files of weather data, with some equivalent column names, and differing number of fields in each file. Some of the files have 40 or more vars, but I only want a subset of the fields. I can use colClasses with read.table to drop some of the fields, but only if

Re: [R] odfWeave Error

2010-03-19 Thread Max Kuhn
Brock, Open up a dos prompt (use the Run menu item and type cmd without the quotes). Navigate to the odt file, then try using 7z x -tzip file.odt (where file is the name of you file). Also, below is a message that someone sent to RHelp that might be of use to you. Thanks, Max Dear all, I'm

[R] Put square brackets as column name in a data frame

2010-03-19 Thread Mathieu V
Hi everyone, this is a pretty simple question, but I have not found any answer about this in this forum. I'm trying to make a data frame like this : ID,X[m],Y[m],Z[m] 0,-4.32902,-3.5437,12.4441 1,-4.31887,-3.54278,12.4441 2,-4.33672,-3.54401,12.4615 3,-4.67554,-2.78566,13.4151

[R] Can't setup rJava under ubuntu

2010-03-19 Thread fgrazi
When I try to install rJava, I get the following error: install.packages('rJava') ... checking whether siglongjmp is declared... yes checking Java support in R... present: interpreter : '/usr/bin/java' archiver: '/usr/bin/jar' compiler: '/usr/bin/javac' header prep.:

Re: [R] Put square brackets as column name in a data frame

2010-03-19 Thread Ben Bolker
Paul- paul at aurynia.com writes: names(nouvTable) = c(ID,X[m],Y[m],Z[m]) Or read the table with check.names=FALSE . Note that this can lead to later hassles with referencing the columns; for example you would need nouvTable$`X[m]` rather than nouvTable$X[m]

[R] strange behavior, adds new field by non-existent field

2010-03-19 Thread Peter Keller
data: tmp1 Date HrMn Temp Q.4 1 19450101 0900 -37.0 1 2 19450101 1000 -35.9 2 3 19450101 1100 -35.9 3 4 19450101 1200 -36.4 4 5 19450101 1300 -36.4 5 6 19450101 1400 -36.4 6 7 19450101 1500 -36.4 7 8 19450101 1600 -37.5 9 Accidentally, I did this (I meant to write Q.4

Re: [R] Can't setup rJava under ubuntu

2010-03-19 Thread Romain Francois
Hi, did you try to install rJava as an ubuntu package: http://packages.ubuntu.com/lucid/math/r-cran-rjava Romain Le 19/03/10 17:38, fgrazi a écrit : When I try to install rJava, I get the following error: install.packages('rJava') ... checking whether siglongjmp is declared... yes

[R] Factor variables with GAM models

2010-03-19 Thread Noah Silverman
I'm just starting to learn about GAM models. When using the lm function in R, any factors I have in my data set are automatically converted into a series of binomial variables. For example, if I have a data.frame with a column named color and values red, green, blue. The lm function

[R] DESIGN OF EXPERIMENTS

2010-03-19 Thread ATANU
CAN ANYONE SUGGEST ME HOW TO DO A ANALYSIS OF ANY GIVEN DESIGN (OF EXPRIMENTS )SAY BLOCK OR FACTORIAL OR PBIBD USING R? -- View this message in context: http://n4.nabble.com/DESIGN-OF-EXPERIMENTS-tp1602530p1602530.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Survreg function for loglogistic hazard estimation

2010-03-19 Thread akeras
I a trying to use survreg to fit a Weibull distribution. From the last few messages I understand how to interpret the parameters. However, how do I get the covariance of lambda and alpha? Is there a predict command for that? Thanks -- View this message in context:

[R] Using substitute in a print method

2010-03-19 Thread Chris Stubben
I've defined a new class for some really large tables, and I'd like to use substitute() in the print function. For example, if I define a new class below and create a print method for it, I can't figure out how to return the object name by just typing d. d-diag(2) class(d)-c(diag)

Re: [R] how to drop fields by name when reading in data?

2010-03-19 Thread David Winsemius
On Mar 19, 2010, at 3:03 PM, Peter Keller wrote: I have a number of space separated files of weather data, with some equivalent column names, and differing number of fields in each file. Some of the files have 40 or more vars, but I only want a subset of the fields. I can use colClasses

[R] Does S inherit the enhancements in R language?

2010-03-19 Thread Paul Johnson
I don't know anybody who has S-plus these days, but I expect some of you might, and perhaps you won't mind telling me something. I'm working on my presentation about R for the general audience. As I survey the suggestions from this list about that project, I find myself wondering whether S-plus

Re: [R] Arima forecasting

2010-03-19 Thread Stephan Kolassa
Hi Matteo, just use forecast.Arima() with h=2 to get forecasts up to 2 steps ahead. R will automatically use forecast.Arima() if you call forecast() with an Arima object. library(forecast) model - auto.arima(AirPassengers) forecast(model,h=2) HTH, Stephan Matteo Bertini schrieb: Hello

Re: [R] DESIGN OF EXPERIMENTS

2010-03-19 Thread Ben Bolker
ATANU ata.sonu at gmail.com writes: CAN ANYONE SUGGEST ME HOW TO DO A ANALYSIS OF ANY GIVEN DESIGN (OF EXPRIMENTS )SAY BLOCK OR FACTORIAL OR PBIBD USING R? ?aov ?lme Google r aov anova block or r aov anova factorial etc. http://cran.r-project.org/doc/contrib/Faraway-PRA.pdf

Re: [R] Does S inherit the enhancements in R language?

2010-03-19 Thread Thomas Lumley
On Fri, 19 Mar 2010, Paul Johnson wrote: I don't know anybody who has S-plus these days, but I expect some of you might, and perhaps you won't mind telling me something. I'm working on my presentation about R for the general audience. As I survey the suggestions from this list about that

[R] Sweave and object of type 'closure' is not subsettable error

2010-03-19 Thread jose romero
Hello folks: I have a data frame which includes two numeric vectors: Pa1 and Ingr (which represents income).  I run the following code on the R console: ingreso - factor(ifelse(Ingr=3000,bajo,alto)) tapply(Pa1,ingreso,summary) boxplot(Pa1~ingreso) and it works fine.  However, when I Sweave

[R] sapply, lattice functions

2010-03-19 Thread Santosh
Dear R-gurus aa - data.frame(a1=rnorm(20),b1=rnorm(20,0.8),c1=rnorm(20,0.5)) sapply(aa,function(x) histogram(x,breaks=NULL)) or px - sapply(aa,function(x) histogram(x,breaks=NULL)) print(px,split=c(1,1,1,1),more=F) The above code does not seem to work. am I missing something? Thanks, Santosh

Re: [R] Sweave and object of type 'closure' is not subsettable error

2010-03-19 Thread Ista Zahn
Hi Jose, If you give us a reproducible example we can test it out and try to help you find the problem. -Ista On Fri, Mar 19, 2010 at 5:38 PM, jose romero jlauren...@yahoo.com wrote: Hello folks: I have a data frame which includes two numeric vectors: Pa1 and Ingr (which represents income). 

Re: [R] sapply, lattice functions

2010-03-19 Thread Gabor Grothendieck
Try this: junk - sapply(aa,function(x) print(histogram(x,breaks=NULL))) or, shorter: for(a in aa) print(histogram(a, breaks = NULL) On Fri, Mar 19, 2010 at 5:44 PM, Santosh santosh2...@gmail.com wrote: Dear R-gurus aa - data.frame(a1=rnorm(20),b1=rnorm(20,0.8),c1=rnorm(20,0.5))

Re: [R] Does S inherit the enhancements in R language?

2010-03-19 Thread William Dunlap
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Paul Johnson Sent: Friday, March 19, 2010 1:44 PM To: R-help Subject: [R] Does S inherit the enhancements in R language? I don't know anybody who has S-plus these days, but I

Re: [R] sapply, lattice functions

2010-03-19 Thread Santosh
Thanks for your response. how do I print them in an ordered manner, akin to using print(px,split=c(2,2,1,1),more=T)) or par(mfrow=c(x,y))? -Santosh On Fri, Mar 19, 2010 at 2:58 PM, Gabor Grothendieck ggrothendi...@gmail.com wrote: Try this: junk - sapply(aa,function(x)

Re: [R] sapply, lattice functions

2010-03-19 Thread Gabor Grothendieck
Try this: histogram(~ values | ind, stack(aa)) On Fri, Mar 19, 2010 at 5:44 PM, Santosh santosh2...@gmail.com wrote: Dear R-gurus aa - data.frame(a1=rnorm(20),b1=rnorm(20,0.8),c1=rnorm(20,0.5)) sapply(aa,function(x) histogram(x,breaks=NULL)) or px - sapply(aa,function(x)

Re: [R] sapply, lattice functions

2010-03-19 Thread Sundar Dorai-Raj
Or perhaps more clearly, histogram(~a1 + b1 + c1, data = aa, outer = TRUE) --sundar On Fri, Mar 19, 2010 at 3:50 PM, Gabor Grothendieck ggrothendi...@gmail.com wrote: Try this: histogram(~ values | ind, stack(aa)) On Fri, Mar 19, 2010 at 5:44 PM, Santosh santosh2...@gmail.com wrote:

[R] Merging Matrices

2010-03-19 Thread duncandonutz
I have two symmetric matrices, but of different dimensions. The entries are identified by specific labels some of which are shared by both matrices. I would like to sum the two matrices, but retain the union of the two. In other words, I want the result to be the same size as the larger of the

Re: [R] Can't setup rJava under ubuntu

2010-03-19 Thread fgrazi
Thank you very much, it worked! Seems that the problem is that open-sdk and not sun-jdk is expected. -- View this message in context: http://n4.nabble.com/Can-t-setup-rJava-under-ubuntu-tp1599640p1606137.html Sent from the R help mailing list archive at Nabble.com.

[R] spatclus package:

2010-03-19 Thread Zhenqiang (James) Lu
Dear R users, I am using package spatclus for cluster detection for case event spatial data. Is there any way to get he case identical numbers within cluster after you run the main function of clus? Thank you. James [[alternative HTML version deleted]]

Re: [R] strange behavior, adds new field by non-existent field

2010-03-19 Thread jim holtman
?'[' and the look for partial matching On Fri, Mar 19, 2010 at 3:38 PM, Peter Keller keller...@gmail.com wrote: data: tmp1 Date HrMn Temp Q.4 1 19450101 0900 -37.0 1 2 19450101 1000 -35.9 2 3 19450101 1100 -35.9 3 4 19450101 1200 -36.4 4 5 19450101 1300 -36.4 5 6

Re: [R] Dataframe calculations

2010-03-19 Thread jim holtman
try this: # add 'date' to separate the data SCHEDULE2 - within(SCHEDULE2, { date - paste(YEAR, '-', MM, '-', DD, sep='') ARRIVE - as.POSIXct(paste(date, ARRIVE)) DEPART - as.POSIXct(paste(date, DEPART)) }) # process each day result - lapply(split(SCHEDULE2, SCHEDULE2$date),

Re: [R] outputing text colors

2010-03-19 Thread Jakson A. Aquino
On Thu, Mar 18, 2010 at 11:27:40PM -0800, rtist wrote: Hi Everyone, And thanks for the replies. I was more specifically referring to the console table output itself. I have a time series that has columns of months and rows of years, and each row,col is a value. I wanted the actual text

Re: [R] strange behavior, adds new field by non-existent field

2010-03-19 Thread Jorge Ivan Velez
Hi Peter, I think you want tmp1$Q.4[tmp1$Q.4 != 1 tmp1$Q.4 != 5] - NA tmp1 #Date HrMn Temp Q.4 # 1 19450101 900 -37.0 1 # 2 19450101 1000 -35.9 NA # 3 19450101 1100 -35.9 NA # 4 19450101 1200 -36.4 NA # 5 19450101 1300 -36.4 5 # 6 19450101 1400 -36.4 NA # 7 19450101 1500 -36.4 NA # 8

Re: [R] Merging Matrices

2010-03-19 Thread David Winsemius
On Mar 19, 2010, at 4:11 PM, duncandonutz wrote: I have two symmetric matrices, but of different dimensions. The entries are identified by specific labels some of which are shared by both matrices. I would like to sum the two matrices, but retain the union of the two. In other words,

Re: [R] Define column names to a series of data.frames

2010-03-19 Thread Nikos Alexandris
Nikos Alexandris wrote: ... I have 6 data frames consisting of 6 rows x 7 columns put together from other data.frames. ... I want to give the following column names to each data.frame: (SDev, PC1, PC2, PC3, PC4, PC5, PC6) ... How is it to be done at once for all data.frames that the

Re: [R] Merging Matrices

2010-03-19 Thread Steven McKinney
From: r-help-boun...@r-project.org [r-help-boun...@r-project.org] On Behalf Of duncandonutz [dwads...@unm.edu] Sent: March 19, 2010 1:11 PM To: r-help@r-project.org Subject: [R] Merging Matrices I have two symmetric matrices, but of different

Re: [R] strange behavior, adds new field by non-existent field

2010-03-19 Thread Bill.Venables
This is a property of lists. With the $ form of extraction names may be abbreviated to the minimum number of characters required to specify the component uniquely. This with your tmp1 tmp1$Q [1] 1 2 3 4 5 6 7 9 Levels: 1 2 3 4 5 6 7 9 tmp1$Q. [1] 1 2 3 4 5 6 7 9 Levels: 1 2 3 4 5 6 7 9

Re: [R] Factor variables with GAM models

2010-03-19 Thread Steven McKinney
Hi Noah GAM models were developed to assess the functional form of the relationship of continuous predictor variables to the response, so weren't really meant to handle factor variables as predictor variables. GAMs are of the form E(Y | X1, X2, ...) = So + S(X1) + S(X2) + ... where S(X) is a

Re: [R] Factor variables with GAM models

2010-03-19 Thread Noah Silverman
Steve, I get that. What you wrote make sense. My challenge is the data I'm attempting to model. Some of the variables are continuous, some are factors. both linear and poisson models work. (Poisson doing a much more accurate job.) However, some of the numerical variables are clearly

  1   2   >