[R] list of data frame objects

2007-02-18 Thread Tim McDonald
Hi Folks, I need to extract the list of all my data frame objects. With objects() I can list all objects and was hoping to use something like the following: objects()[is.data.frame(objects())] to extracts all my objects that are data frame... What am I doing wrong? Thanks - Tim

Re: [R] list of data frame objects

2007-02-18 Thread Dimitris Rizopoulos
try something like the following (untested): objs - ls() sapply(objs, function(obj) inherits(get(obj), data.frame)) I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35,

[R] Help with pair plot

2007-02-18 Thread Benjamin Dickgiesser
Hi, I'm trying to create a plot using pair. Currently I'm doing the following pairs(~mpg + hp + wt , data=cars, labels = c(Miles per Gallon,Horsepower,Weight),pch = c(24,25)[unclass(cars$tr + 1)], bg = c(red, green3)[unclass(cars$tr + 1)],panel=panel.smooth) for the attached dataset.

Re: [R] Help with pair plot

2007-02-18 Thread Benjamin Dickgiesser
I forgot to add that I figured how to do a single regression line using: panel.fitline-function(x, y, digits=2, prefix=, cex.cor, ...) { points(x, y, ...) reg - coef(lm(y ~ x)) abline(coef=reg,untf=F,col=blue) } and adding: panel=panel.fitline to pairs. But I am not sure how to add two lines

[R] dbi, rodbc, rmysql, charset problem

2007-02-18 Thread janek0
Dear List In my short life as a beginning R-user i've encountered a following problem that i'm unable to solve myself: I have a database in MySQL containing table and field names as well as some data containing Polish accentuated characters (like ąśęć), utf8-encoded. It works just fine with just

[R] Lattice graphics: minor tick marks and panel.axis() question(s)

2007-02-18 Thread Stephen Tucker
Hello, I have been a long-time Traditional graphics user and now moving to try Lattice graphics. At the moment I cannot figure out how to place minor tick marks in a figure made with Lattice's xyplot(). In Traditional graphics, after calling plot() I would make two calls to axis(). From the

[R] 1st International R/Rmetrics Workshop

2007-02-18 Thread Diethelm Wuertz
The 1st International R/Rmetrics User and Developer Workshop ... will take place from July 8-12th, 2007 at Meielisalp, Lake Thune, Switzerland. See www.rmetrics.org The Workshop Focuses on ... using R/Rmetrics as the premier open source solution for financial market analysis,

Re: [R] dbi, rodbc, rmysql, charset problem

2007-02-18 Thread Prof Brian Ripley
You seem never to have told R or us what charset these data are in. I think it is likely that they are being transferred in latin2 (like your email), and you are running R in UTF-8 according to Sys.getlocale. So what you need to do is to either 1) Run R in latin2 or 2) use iconv() to

[R] heatmap row cell size

2007-02-18 Thread Ivan Baxter
Hello all- I am having trouble with the cell sizes that heatmap defaults too. I have a matrix of 160 rows and 5 columns that I am trying to display with heatmap(). When I do this, the cells default to really wide and very short. This makes the labels for the rows very hard to read, in fact the

[R] r-help@stat.math.ethz.ch

2007-02-18 Thread Ivan Baxter
doh-trying again- this time remember text only. Hello all- I am having trouble with the cell sizes that heatmap defaults too. I have a matrix of 160 rows and 5 columns that I am trying to display with heatmap(). When I do this, the cells default to really wide and very short. This makes the

[R] Predict(); Warning rank deficient matrix

2007-02-18 Thread vinod gullu
I am trying to use lm() for resression followed by stepAIC function. Now when i try to use to predict for some input, predict() gives a warning : prediction from a Rank deficient matrix may be misleading. As I am new to R (or to statistics) How alarming this warning may be? Regards,

[R] Suppressing \newcolumntype{} declaration in latex.default() in Hmisc

2007-02-18 Thread Michael Kubovy
Dear r-helpers, When use latex() on a matrix, I set the option dcolumn = T. As a result, in front of each tabular I get \newcolumntype{.}{D{.}{.}{-1}} The LaTeX compiler complains about these multiple redeclarations. _ Professor Michael Kubovy University of Virginia

[R] principal components analysis

2007-02-18 Thread sabat
Hi, just downloaded R. I need to run a simple Principal Components Analysis, with a plot and the variables scores as output. Does anyone have some scripts ready and easy to use...that anyone can understand... Thank you -- View this message in context:

[R] printing intermediate lines while in a function

2007-02-18 Thread Bart Joosen
Hi, I'm trying to make a function which does a lot of computational work and visualization work. This won't be a problem, but as things can get a lot of computational time, I would like to print what is going on, but also instructions about what the user should do. A small example: fctn -

Re: [R] Suppressing \newcolumntype{} declaration in latex.default() in Hmisc

2007-02-18 Thread Michael Kubovy
Dear r-helpers, I didn't include a clear question in my previous posting. Here is a better version: When I use latex() on a matrix, I set the option dcolumn = T. As a result, in the *.tex file before each tabular I get \newcolumntype{.}{D{.}{.}{-1}} The LaTeX compiler complains about these

[R] User defined split function in rpart

2007-02-18 Thread Tobias Guennel
Dear R community, I am trying to write my own user defined split function for rpart. I read the example in the tests directory and I understand the general idea of the how to implement user defined splitting functions. However, I am having troubles with addressing the data frame used in calling

[R] Forecasting Uncertainly

2007-02-18 Thread Ricardo Bessa
Does anyone know a function to calculate non-parametric prediction intervals of an output from a neural network? The probabilistic distribution of the target variable is not normal. I need a way to estimate uncertainly in a forecasting obtained with a neural network. Regards, Ricardo Bessa

Re: [R] principal components analysis

2007-02-18 Thread John Kane
--- sabat [EMAIL PROTECTED] wrote: Hi, just downloaded R. I need to run a simple Principal Components Analysis, with a plot and the variables scores as output. Does anyone have some scripts ready and easy to use...that anyone can understand... Thank you Would ?princomp help? If you

[R] Urgent: How to obtain the Consistent Standard Errors after apply 2SLS through tsls() from sem or systemfit(2SLS) without this error message !!!!!!!!!!!!!

2007-02-18 Thread Guillermo Julián San Martín
Hi, I am trying to obtain the heteroskedasticity consitent standard errors (HCSE) after apply 2SLS. I obtain 2SLS through tsls from package sem or systemfit: tsls library (sem) Reg2SLS -tsls(LnP~Sc+Ag+Ag2+Var+R+D,~I2+Ag+Ag2+Var+R+D) summary (Reg2SLS) systemfit library

[R] help with loop over data frame

2007-02-18 Thread Dr Remo Sammassimo
Dear List, This may be the fifth time Ive tried to send this to the list so apologies if there are multiple emails. I need some help getting started with this problem. I have a data frame containing a year of daily stock prices in the following format: Date Open HighLowClose

Re: [R] help with loop over data frame

2007-02-18 Thread Marc Schwartz
On Mon, 2007-02-19 at 13:38 +1100, Dr Remo Sammassimo wrote: Dear List, This may be the fifth time Ive tried to send this to the list so apologies if there are multiple emails. I need some help getting started with this problem. I have a data frame containing a year of daily stock prices

Re: [R] RSNPper SNPinfo and making it handle a vector

2007-02-18 Thread Farrel Buchinsky
I tried biomaRt library(biomaRt) ensnp = useMart(snp, dataset = hsapiens_snp) snp = getSNP(chromosome = 17, start = 73649033, end = 73679033, mart = ensnp) show(snp) Gave me a nice table but it did not seem to permit starting from the point of knowing the SNP and entering a list of rs##. I

[R] Randomly extract rows from a data frame

2007-02-18 Thread Amy Whitehead
Hi, I am looking for a way to randomly extract a specified number of rows from a data frame. I was planning on binding a column of random numbers to the data frame and then sorting the data frame using this bound column. But I can't figure out how to use this column to sort the entire data

Re: [R] Randomly extract rows from a data frame

2007-02-18 Thread Marc Schwartz
On Mon, 2007-02-19 at 16:10 +1300, Amy Whitehead wrote: Hi, I am looking for a way to randomly extract a specified number of rows from a data frame. I was planning on binding a column of random numbers to the data frame and then sorting the data frame using this bound column. But I can't

Re: [R] Randomly extract rows from a data frame

2007-02-18 Thread David Scott
On Mon, 19 Feb 2007, Amy Whitehead wrote: Hi, I am looking for a way to randomly extract a specified number of rows from a data frame. I was planning on binding a column of random numbers to the data frame and then sorting the data frame using this bound column. But I can't figure out how

Re: [R] Randomly extract rows from a data frame

2007-02-18 Thread Wensui Liu
amy, here is a piece of code copied from my blog, which might answer part of your question. library(MASS); data(Boston); # DIVIDE DATA INTO TESTING AND TRAINING SETS set.seed(2005); test.rows - sample(1:nrow(Boston), 100); test.set - Boston[test.rows, ]; train.set - Boston[-test.rows, ]; On

[R] Google, hard disc drives and R

2007-02-18 Thread Tim Churches
A recent paper from Google Labs, interesting in many respects, not the least the exclusive use of R for data analysis and graphics (alas not cited in the approved manner): http://labs.google.com/papers/disk_failures.pdf Perhaps some of the eminences grises of the R Foundation could prevail upon