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
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,
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.
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
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
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
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,
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
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
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
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,
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
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:
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 -
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
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
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
--- 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
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
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
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
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
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
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
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
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
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
27 matches
Mail list logo