jun xu wrote:
> I am new to R and really like to get a handle of basics in short period of
> time. What I am trying to do is get myself a list of must-do's (read in
> data, batch execution, delimiters, basic modeling commands) in R as in Stata
> or SAS. I am just wondering how to execute a R batch
Web User a écrit :
> 1.) Is there a way to convert a table (e.g. represented as a data frame)
> to a function, specifying which columns are input and which column is
> output? It would seem that this would be useful for plotting
> experimental results, since e.g. contour(x, y, f) requires f to
I am new to R and really like to get a handle of basics in short period of
time. What I am trying to do is get myself a list of must-do's (read in
data, batch execution, delimiters, basic modeling commands) in R as in Stata
or SAS. I am just wondering how to execute a R batch file in RGui. Suppose
Dear Hans,
these are interesting points. I guess that I'm approaching it from
the point of view of a decision: I'd be more comfortable using a
fitting routine that has stability under a wide range of identifiable
circumstances. Obtaining the MLE exactly in any instance is a function
of the data a
# Dear R list,
#
# I'm needing help with lattice, regression and respective lines.
# My data is below:
bra = gl(2, 24, label = c('c', 's'))
em = rep(gl(3, 8, label = c('po', 'pov', 'ce')), 2)
tem = rep(c(0, 0, 30, 30, 60, 60, 90, 90), 6)
tem2 = tem^2
r= rep(1:2, 24)
y= c(40.58, 44.85,
?par
?plot.default
In particular you want to set the ylim parameter. However, note that the
axis drawing procedures try to choose "pretty" axis labels. These can be
changed by using low level tools -- see ?axis.
Please also read "An Introduction to R" and other relevant docs before
posting. Base
Hello:
Are there any libraries that will do a subset selection for glm's? I looked
through leaps, but seems like it is specifically for linear regressions.
Thank you.
-Dhiren
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/lis
Hello,
I'm a new R user and I like to ask somethig about boxplots.
Is it possible to manipulate the Y axis scale? for instance if the default
scale was from 1 to 7, is it possible to change it to 1 to 10?
Thanks!
Rodrigo Medel P.
__
R-help@stat.math.e
On 10/14/05, Martin Henry H. Stevens <[EMAIL PROTECTED]> wrote:
> Dear lattice wizards,
>
> I am trying to figure out how to plot predicted values in xyplot,
> where the intercept, but not the slope, varies among conditioning
> factor levels. I am sure it involves the groups, but I have been
> unsu
On 10/14/05, Andy Bunn <[EMAIL PROTECTED]> wrote:
> Given:
>
>
> foo <- data.frame(bar = rnorm(100),
> fac1 = factor(rep(1:2, 50)),
> fac2 =
> factor(c(rep(c("a","b","SomethingReallyReallyReallyLong"), 33),"a")))
> bwplot(bar~fac1|fac2, data = foo)
>
> How do I c
Hi,
I have not been able to find answers to these questions in the FAQs,
manuals, or R-help archives. If answers are available somewhere, please
direct me to them.
1.) Is there a way to convert a table (e.g. represented as a data frame)
to a function, specifying which columns are input and wh
>On 10/14/2005 1:08 PM, Berton Gunter wrote:
>> ?setwd
>> e.g. setwd(file.choose())
>>
>> BTW, you could have found this on your own via help.search('working
>> directory') . Base R has quite good docs -- you should try them first.
>>
>> -- Bert Gunter
>
>That won't work in Windows, where the dia
Arnab mukherji wrote:
> Hi!
>
> I was just reading Uwe Ligges write up on extending R-WinEdt for Sweave from
> 2003; I was wondering if there were updates on it? Are people seriously
> thiking about it?
>
> I really use WinEdt a lot, and for not just R, and hence this kind of
> extension wou
library(tcltk)
setwd(tclvalue(tkchooseDirectory()))
On 10/14/05, Paul Baer <[EMAIL PROTECTED]> wrote:
> Is there anyway to have a function prompt the user for a working
> directory, equivalent to file.choose()?
__
R-help@stat.math.ethz.ch mailing list
h
Oops. Thanks, all. Egg on my face. I forgot about that little detail (on
Windows, anyway).
However, you can still do it via dirname(file.choose()) to get the
directory, on Windows,anyway, right? If that isn't implemented on another
platform, than you could mimic the dirname() code by using gsub()
Hi!
I was just reading Uwe Ligges write up on extending R-WinEdt for Sweave from
2003; I was wondering if there were updates on it? Are people seriously thiking
about it?
I really use WinEdt a lot, and for not just R, and hence this kind of extension
would be really cool for a whole range peo
Anthony. Look at ?predict.rpart, I think this might be the kind of table you
are looking for.
data(iris)
sub <- c(sample(1:50, 25), sample(51:100, 25), sample(101:150, 25))
fit <- rpart(Species ~ ., data=iris, subset=sub)
fit
table(predict(fit, iris[-sub,], type="class"),
Hi,
I think I'm missing something very obvious, but I am missing it, so I
would be very grateful for help. I'm using rpart to analyse data on
skull base morphology, essentially predicting sex from one or several
skull base measurements. The sex of the people whose skulls are being
studied is known
On 10/14/2005 1:08 PM, Berton Gunter wrote:
> ?setwd
> e.g. setwd(file.choose())
>
> BTW, you could have found this on your own via help.search('working
> directory') . Base R has quite good docs -- you should try them first.
>
> -- Bert Gunter
That won't work in Windows, where the dialogs don't
Marc Schwartz <[EMAIL PROTECTED]> 10/13/05 06:07PM >>>
>On Fri, 2005-10-14 at 00:39 +0200, Benedict P. Barszcz wrote:
>> Dnia piatek, 14 pazdziernika 2005 00:13, Sundar Dorai-Raj napisal:
>>
>> > Don't you mean system("ls")? See ?system.
>> >
>> > Arguments:
>> >
>> > command: the system comm
On 10/14/2005 12:55 PM, Paul Baer wrote:
> Is there anyway to have a function prompt the user for a working
> directory, equivalent to file.choose()?
It's relatively easy to get a text prompt, but I don't think we've got a
function that's equivalent to the Windows menu item "File|Change
dir..."
?setwd
e.g. setwd(file.choose())
BTW, you could have found this on your own via help.search('working
directory') . Base R has quite good docs -- you should try them first.
-- Bert Gunter
Genentech Non-Clinical Statistics
South San Francisco, CA
"The business of the statistician is to catalyze t
Chris Buddenhagen schrieb:
>Dear all
>
>
>
>I am using R to produce ordinations library(vegan) and the plot function
>produced looks great on the screen but when I send it to jpg or pdf or eps
>the resolution is not so good. Can you tell me how to get high resolution
>images out of R for public
Is there anyway to have a function prompt the user for a working
directory, equivalent to file.choose()?
--Paul
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project
Thank you Gabor.
I suspected R could do that. But I tried a data frame and it did not work.
Now I test for matrix and it works. So it seems performing many
regressions in one shot works for a matrix, but not a data frame.
Heng
Gabor Grothendieck <[EMAIL PROTECTED]>
10/14/2005 12:05 PM
To
Dear lattice wizards,
I am trying to figure out how to plot predicted values in xyplot,
where the intercept, but not the slope, varies among conditioning
factor levels. I am sure it involves the groups, but I have been
unsuccessful in my search in Pinhiero and Bate, in the help files, or
i
I have always used lsfit() for this, but have been told that lm() is
preferred, and I note the help for lm() states
If 'response' is a matrix a linear model is fitted separately by
least-squares to each column of the matrix.
Reid Huntsinger
-Original Message-
From: [EMAIL PROTEC
Dear all,
I am a beginner with lpSolve package (and not an expert in the others).
I can not understand why I am doing wrong, and I would be very grateful if
anyone could please help me on this.
I am trying to optimize ("min") the sum of columns/variables, constrained to
>=1. Each column/variable
This runs a regression of each column (except the first)
of matrix state.x77 against the first:
lm(state.x77[,-1] ~ state.x77[,1])
On 10/14/05, Heng Sun <[EMAIL PROTECTED]> wrote:
> R function
> lm(response ~ term)
> allows me to run a linear regression on a single response vector. For
> example,
Hi Peter,
Apologies - I ran the script using S-Plus 6.2. I am happy to run it in R, but
my feeling is that there may be something wrong with the code itself. I have
included the dataset and script, in case you can help.
Jindi Singh.
Jatinder Singh
Senior Manager, Analysis and Reporting
PRA I
R function
lm(response ~ term)
allows me to run a linear regression on a single response vector. For
example, I have recent one year historical prices for a stock and S&P
index. I can run regression of the stock prices (as response vector)
against the S&P index prices (as term vector).
Now ass
Given:
foo <- data.frame(bar = rnorm(100),
fac1 = factor(rep(1:2, 50)),
fac2 =
factor(c(rep(c("a","b","SomethingReallyReallyReallyLong"), 33),"a")))
bwplot(bar~fac1|fac2, data = foo)
How do I change the size of the text for fac2? I need to make the
"SomethingR
Le ven 14/10/2005 à 00:39, Benedict P. Barszcz a écrit :
> Dnia piÄ
tek, 14 października 2005 00:13, Sundar Dorai-Raj napisaÅ:
>
> > Don't you mean system("ls")? See ?system.
> >
> > Arguments:
> >
> > command: the system command to be invoked, as a string.
>
> This is the kind of obstacles
the help page says:
'is.list' returns 'TRUE' iff its argument is a 'list' _or_ a
'pairlist' of 'length' > 0, whereas 'is.pairlist' only returns
'TRUE' in the latter case.
does the "latter case" mean a 'pairlist' of 'length' > 0?
but
> is.pairlist(pairlist())
[1] TRUE
> length(pairli
Hi Emmanuel,
We are doing some work along these lines. See www.OpenI.org for
details of our open souce OLAP solution & contact our CTO, Sandeep
Giri (via link on that site), for details. We haven't released any R
integration yet, but we are doing some things internally & it is on
the OpenI develop
But,
> foo <- 'ls'
> system(foo)
is valid.
Is foo a "string" or a "quoted string"?
Without a doubt, it is the former. But I don't see any quote marks in
system(foo)
-Don
At 12:39 AM +0200 10/14/05, Benedict P. Barszcz wrote:
>Dnia piàtek, 14 paêdziernika 2005 00:13, Sundar Dorai-Raj
On Fri, 14 Oct 2005, Ido M. Tamir wrote:
> Hello,
> i am trying to subset a dataframe multiple times:
> something like:
>
> stats <- by(df, list(items), ttestData)
>
> ttestData <- function(df){
>t.test( df[,c(2,3,4), df[,c(5,6,7)]
> }
>
> While this works for small data, it is to slow for my
Hi.
I am a consultant at KAE: Marketing Intelligence (http://www.kae.co.uk) working
on market evaluation and forecasting. Working on large datasets I am looking
for a solution to use R on datasets stored in an OLAP engine (like MIS Alea,
Applix TM1 or Mondrian). Have you ever heard about such
Jonathan Dushoff wrote:
> Recently, I was trying to make an inward-facing label for a vertical
> axis on the right-hand side of a plot. The inward-facing label was
> required by a journal. I searched R-help, but the only solution I found
> was to use text, which requires fiddling with the x-coor
Recently, I was trying to make an inward-facing label for a vertical
axis on the right-hand side of a plot. The inward-facing label was
required by a journal. I searched R-help, but the only solution I found
was to use text, which requires fiddling with the x-coordinate for each
plot. What would
Hello,
i am trying to subset a dataframe multiple times:
something like:
stats <- by(df, list(items), ttestData)
ttestData <- function(df){
t.test( df[,c(2,3,4), df[,c(5,6,7)]
}
While this works for small data, it is to slow for my
actual data: 50 rows dataframe with
about 135000 differ
On 10/14/05, Clark Allan <[EMAIL PROTECTED]> wrote:
> hi all
>
> i have a quick question
>
> i would like to use the source command but i keep on getting an error
>
> eg
>
> source("c:/research file/model.txt")
>
>
>
> the problem seems to be because of the space in the file name but this
> is how
Dear Andrew and R-list,
I guess Fournier is addressing the properties of the numerical routines
underlying the various packages, not the statistical properties of the MLE
itself.
For this purpose using a small tricky dataset makes sense. Clearly,
a true unique MLE exists (except in pathological
On Fri, 14 Oct 2005, Wensui Liu wrote:
> Dear useRs,
>
> I am wondering what is the most fast and stable way to read data (pretty
> large) into R. Right now, the methods I could think of are:
> 1) use read.table to read *.csv or *txt
> 2) use RODBC to read excel or access
>
> But I don't know whic
Dear useRs,
I am wondering what is the most fast and stable way to read data (pretty
large) into R. Right now, the methods I could think of are:
1) use read.table to read *.csv or *txt
2) use RODBC to read excel or access
But I don't know which is better.
Thanks for your sugggestion.
--
WenSui
Uwe Ligges <[EMAIL PROTECTED]> writes:
> Sara Mouro wrote:
>
> > Dear all
> >
> > I can not understand how to install the package lpsolve_1.1.9.zip
> >
> > I have read the FAQ and the help pages carefully, but it still not
> > clear for me.
> >
> > I have tried the following (a
Use file.choose() instead
> source(file.choose())
This will open a dialogue box and might be easier for you to find your
file.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Clark Allan
Sent: Friday, October 14, 2005 7:06 AM
To: r-help@stat.math.ethz.c
Dear Sara,
It looks to me as if there are three problems here: (1) Is the zip file for
the package really at "c:/ProgramFiles/R/rw2011/library/lpSolve_1.1.9"? That
is, isn't there a space in "Program Files"? (2) You have to specify
repos=NULL to install from a local zip file, as ?install.packages
hi all
i have a quick question
i would like to use the source command but i keep on getting an error
eg
source("c:/research file/model.txt")
the problem seems to be because of the space in the file name but this
is how windows references the folder name.
i dont want to change the folder n
Sara Mouro wrote:
> Dear all
>
> I can not understand how to install the package lpsolve_1.1.9.zip
>
> I have read the FAQ and the help pages carefully, but it still not
> clear for me.
>
> I have tried the following (and obtained the respective error
> messages):
>
>
Sara,
Could it be that you have to unzip the package? If you are using a PC you can
probably find a free (or trial version) of one of many versions of unzip (e.g.
WINZIP). If you are familiar with Unix, unzipping is similar to using TAR.
John
John Sorkin M.D., Ph.D.
Chief, Biostatistics and Inf
Many thanks for all your answers. Converting to a matrix didn't help,
I tried with Hmisc but didn't get anywhere (different summary
functions, multiple levels).
2005/10/14, jim holtman <[EMAIL PROTECTED]>:
> Here is the way that I would do it. Using 'lapply' to process the list and
> create a ma
It's a bug: the code has 1:arma[1], i.e. 1:0. Replace by
seq(length=arma[1]).
On Thu, 13 Oct 2005, John Maindonald wrote:
> I am puzzled by the warning message in the output below. It appears
> whether or not I fit the seasonal term (but the precise point of doing
> this was to fit what is eff
Dear all
I can not understand how to install the package lpsolve_1.1.9.zip
I have read the FAQ and the help pages carefully, but it still not
clear for me.
I have tried the following (and obtained the respective error
messages):
>install.packages("c:/Pro
Here is the way that I would do it. Using 'lapply' to process the list and
create a matrix; take less than 1 second:
> dat <- data.frame(D=sample(32000:33000, 33000, T),
+ Fid=sample(1:10,33000,T), A=sample(1:5,33000,T))
> system.time({
+ result <- lapply(split(seq(nrow(dat)), dat$D), function(.d)
where is the problem?
input:
A<-c(2,3,2); B<-c(1,2,1); C<-c(4,4,5); D<-c(3,5,4)
df<-data.frame(A,B,C,D)
c1<-1:2; c2<-3:4
df[,c1]*df[,c2]
output:
A B
1 8 3
2 12 10
3 10 4
Peter Wolf
Christoph Scherber wrote:
>Dear R users,
>
>Suppose I have 2 parts of a dataframe, say
>
>ABCD
>2143
>3245
Dear R users,
Suppose I have 2 parts of a dataframe, say
ABCD
2143
3245
2154
(the real dataframe is 160 columns with each 120 rows)
and I want to multiply every element in [,A:B] with every element in [,C:D];
What is the most elegant way to do this?
I´ve been thinking of converting [,A:B] to a
Hi,
Yesterday, I have analysed data with 16 rows and 10 columns.
Aggregation would be impossible with a data frame format, but when converting
it to a matrix with *numeric* entries (check, if the variables are of class
numeric!) the computation needs only 7 seconds on a Pentium III. I´m sad
"Sam R. Smith" <[EMAIL PROTECTED]> writes:
> In a package, i type a function name and got the following message:
> ...
> tmp <- .Fortran("master", x = as.double(x), y = as.double(y),
> sort = as.logical(sort), rw = as.double(rw), npd =
> as.integer(npd),
> ntot = as.int
On Fri, 14 Oct 2005, Sam R. Smith wrote:
> In a package, i type a function name and got the following message:
> ...
> tmp <- .Fortran("master", x = as.double(x), y = as.double(y),
> sort = as.logical(sort), rw = as.double(rw), npd =
> as.integer(npd),
> ntot = as.integ
In a package, i type a function name and got the following message:
...
tmp <- .Fortran("master", x = as.double(x), y = as.double(y),
sort = as.logical(sort), rw = as.double(rw), npd = as.integer(npd),
ntot = as.integer(ntot), nadj = integer(tadj), madj =
as.integer(madj
61 matches
Mail list logo