Prof Brian Ripley stats.ox.ac.uk> writes:
>
> R has an xfig driver, and AFAIK you can do this from xfig.
>
Is there an xfig port for Windows, without cygwin? If so, I will be thankful for
a pointer to the where it can be downloaded from. I have been looking for it for
some time. Anupam.
_
Dear R-helpers,
Apologies in advance for this (probably) simple question. I've searched the
R Archive and can't seem to find a solution to my problem.
I have a data frame of vegetation quadrat data with the following format:
Q S C
1 A 5
1 B 10
1 C 50
1 D 10
2 A 20
2 E 10
2 C 40
3 D 5
3 F 1
3
Dear All,
I wonder if anyone has written a code for power analysis with repeated
measures ANCOVA? I am aware of the following reference:
Frison L and Pocock SJ: Repeated Measures in Clinical Trials: analysis
using mean summary statistics and its implications for design in
Statistics in Medi
Hi
If
string <- "xyz"
f <- function(x){1 + sin(cos(x)) + exp(x^2)}
How do I manipulate "string" and f() to give the string
"1 + sin(cos(xyz)) + exp(xyz^2)"
?
--
Robin Hankin
Uncertainty Analyst
National Oceanography Centre, Southampton
European Way, Southampton SO14 3ZH, UK
tel 023-8059-7
one approach is to use reshape(), e.g.,
# suppose that 'dat' is your data.frame, then
res <- reshape(dat, direction = "wide", idvar = "Q", timevar = "S")
res[is.na(res)] <- 0
res
I hope it helps.
Best,
Dimitris
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Healt
Robin Hankin wrote:
> Hi
>
> If
>
> string <- "xyz"
> f <- function(x){1 + sin(cos(x)) + exp(x^2)}
>
> How do I manipulate "string" and f() to give the string
>
> "1 + sin(cos(xyz)) + exp(xyz^2)"
>
> ?
>
Hi,
Here what i'll do :
f <- function(x){
sprintf("1 + sin(cos(%s)) + exp(%s^2)", x, x)
one approach could be the following
strng <- gsub("x", "xyz", deparse(body(f))[2])
sub('^[[:space:]]+', '', strng)
I hope it helps.
Best,
Dimitris
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven
Address: Kapucijnenvoer 35, Leu
Hi Dmitris
thanks for this but it's not quite right:
> f <- function(x){sin(x)+exp(x)}
> strng <- gsub("x", "xyz", deparse(body(f))[2])
> sub('^[[:space:]]+', '', strng)
[1] "sin(xyz) + exyzp(xyz)"
and I would want "sin(xyz) + exp(xyz)"
On 13 Sep 2006, at 08:45, Dimitris Rizopoulos wro
Dear Deepayan,
sorry for not being clear - but my problem has nothing to do with the aspect.
If I create the eps the following way
library(lattice)
plot.vol<- wireframe(volcano,
aspect = c(1,1.5),
scales=list(arrows=F),zlab=list("Z-axis",rot=90))
postscript("example_plot_3.eps",
yes you're right, maybe this is better
> f <- function(x){sin(x)+exp(x)}
> strng <- gsub("(x)", "(xyz)", deparse(body(f))[2], fixed = TRUE)
> sub('^[[:space:]]+', '', strng)
[1] "sin(xyz) + exp(xyz)"
Best,
Dimitris
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public He
Dear guRus,
I'm having trouble producing a levelplot with relative cuts for each
panel (my data has large differences in scales, so I want to use
quantiles for each panel).
My attempts to change the 'at' argument in panel.levelplot function
have not met with success.
Below is a toy example.
Though not obvious at first the posting you pointed me too is very helpful
indeed. Thanks a lot Gabor.
Juan Pablo
At 08:48 PM 9/12/2006 -0400, Gabor Grothendieck wrote:
>Check out:
>
>http://finzi.psych.upenn.edu/R/Rhelp02a/archive/83547.html
>
>On 9/12/06, Juan Pablo Lewinger <[EMAIL PROTECTED]
Hi Dmitris, Thierry,
I'm getting there but it's still not quite right if f() includes
something like x^2:
f <- function(x){exp(x^2)}
>>
gsub("(x)", "(xyz)", deparse(body(f))[2], fixed = TRUE)
[1] "x^2"
[I don't care about the spaces]
also,
I can't quite see how to implement Thierr
Dear All,
A question a bit outside statistics.
In my group, a lot of people use Matlab for simple simulations of
stochastic processes describing convection/diffusion problems (as
long as the numerics does not get too expensive and one has to resort
to C or Fortran).
Leaving aside the theory, it al
bump.
would like to know the answer too. I am about using nnet--multinom to
estimate a multinomial logit model, but are not sure if this function
handles categorical data input.
Thanks for any help.
- Original Message -
From: "Bob Green" <[EMAIL PROTECTED]>
To:
Sent: Sunday, Septembe
Dear members,
here is my trouble: My data consists of counts of trapped insects in different
attractive traps. I usually use GLMs with a poisson error distribution to find
out the differences between my traitments (and to look at other factor
effects). But for some dataset where one traitment co
Hello everyone
I know it looks like I'm making heavy weather of this, but
I don't think I communicated my problem properly. I really
appreciate you guys' help here.
I am writing a wrapper for a mathematical library to
which I want to send character strings that it can execute,
and then pass the
Gregor Gorjanc a écrit :
> If I summarize the thread there is (currently) no way to test for
> internet presence with a general approach.
what about try(readLines(...)) ?
(at least it works fine on Windows.)
__
R-help@stat.math.ethz.ch mailing list
htt
Hi,
Perhaps try this (based on 'bquote'):
rewrite.expression <- function(expr, to, dep) {
f <- function(expr) {
if ( length(expr) == 1 )
if ( expr == as.name(dep) )
as.name(to)
else
expr
else
as.call(lapply(expr, f))
}
f(expr)
}
rewrite <- function
On 9/12/06, Anupam Tyagi <[EMAIL PROTECTED]> wrote:
> > R has an xfig driver, and AFAIK you can do this from xfig.
>
> Is there an xfig port for Windows, without cygwin? If so, I will be thankful
> for
> a pointer to the where it can be downloaded from. I have been looking for it
> for
> some tim
Hello Colleagues,
I programmed in SAS for 3 years and would like to switch to a not so costly
software product.
Hence I started to evaluate R, and my first test look promising.
However I have some question:
1. Is it possible to query R files by SQL internally on data frames (not on
a database)
I've run into a problem with lazy loading on a Linux system when
trying to install the Matrix package (version 0.995-16) which didn't
happen with version 0.995-2. The problem is not with a x86_64
system: it's a 32 bit machine, the exact description I don't have
right now (R-2.3.1). The message lo
Thorsten Muehge wrote:
>
> Hello Colleagues,
> I programmed in SAS for 3 years and would like to switch to a not so costly
> software product.
>
> Hence I started to evaluate R, and my first test look promising.
>
> However I have some question:
>
> 1. Is it possible to query R files by SQL int
Rich
that is swet
and does exactly what I want.
Thank you very much.
best wishes
rksh
On 13 Sep 2006, at 10:54, Rich FitzJohn wrote:
> Hi,
>
> Perhaps try this (based on 'bquote'):
>
> rewrite.expression <- function(expr, to, dep) {
> f <- function(expr) {
> if ( length(ex
On Wed, 2006-09-13 at 08:04 +1000, Andrew Robinson wrote:
> On Tue, September 12, 2006 7:34 am, Manuel Morales wrote:
> > On Mon, 2006-09-11 at 11:43 -0500, Douglas Bates wrote:
> >> Having made that offer I think I will now withdraw it. Peter's
> >> example has convinced me that this is the wrong
Anupam Tyagi wrote:
> Barry Rowlingson lancaster.ac.uk> writes:
>
>
>>> None of these seem to read non-coniguous variables from columns; or
>>> may be I am missing something. "read.fwf" is not meant for large
>>> files according to a post in the archives. Thanks for the pointers. I
>>> have re
Anupam Tyagi wrote:
> There are 356,112 records, and 326 variables. It has a fixed record length of
> 1283 positions, therefore "cut -b" can not be used.
Okay, thats 'large' enough to be awkward...
> It would be good to have a facility in R which defines the meta-data:
> labelling
> and structu
Barry Rowlingson wrote:
> If I had a spare day...
Or if I'd just read Duncan's message about negative widths in read.fwf.
Anyway, I've learnt about readLines() and seek() and reading zip files
now, so I can read _anything_
Barry
__
R-help
Robin Hankin <[EMAIL PROTECTED]> writes:
> Rich
>
> that is swet
>
> and does exactly what I want.
>
> Thank you very much.
I just wonder whatever substitute() did to get ignored like that?
> substitute(1 + sin(cos(x)) + exp(x^2), list(x=quote(xyz)))
1 + sin(cos(xyz)) + exp(xyz^2
Dear Antonin,
It is a statistical problem: the well-known monotone likelihood.
In this case ML estimate does not exist (or equals infinity) and Wald
approximations (ob which SE are based) does not hold.
However LRT is valid and provides reliable results.
As far as I know, the only software deal
> one approach is to use reshape(), e.g.,
>
> # suppose that 'dat' is your data.frame, then
> res <- reshape(dat, direction = "wide", idvar = "Q", timevar = "S")
> res[is.na(res)] <- 0
> res
You can also use the reshape package:
library(reshape)
datm <- melt(dat, id=1:2)
cast(datm, Q ~ S)
See th
The Wald statistics that are returned as "z value" can be a very
rough approximation. The standard error is radically different, on a
logarithmic scale, between log(mu) = -20.30 [the best glm() managed
in approximating -infinity] and log(mu) + log(a) = -0.29. It is
actually worse than mig
Thorsten Muehge de.ibm.com> writes:
> 1. Is it possible to query R files by SQL internally on data frames (not on
> a database) and how is the syntax (I have the RODBC package installed).
It is possible to do similar things "conceptually" in R as in SQL---at least the
basic SQL queries (I have n
PS. In part, the problem is with the use of the log link, arising
because the limit of log(mu), as mu goes to 0, is minus infinity.
This is not an appropriate scale on which to represent a fitted value
that is zero. The estimated SE for a fitted value of zero should be
0. You will get a
Barry Rowlingson lancaster.ac.uk> writes:
> Or if I'd just read Duncan's message about negative widths in read.fwf.
>
> Anyway, I've learnt about readLines() and seek() and reading zip files
> now, so I can read _anything_
Thanks to everyone who answered my query. I have a lot to think
Klaus Nordhausen:
> The plot is still not in the left bottom corner of the file. There is a lot
> of space below the
> outer box line. If I include this eps in latex it will also include this
> space and if I put for
> example the figure caption below it I have this huge gap between actual graph
Hello useRs,
I would like to install R 2.3.1 on a computer : Sun Blade 2000.
Is there a precompiled version of R for this computer ?
Thank you very much.
--
David
[[alternative HTML version deleted]]
__
R-help@stat.math.ethz.ch mailing list
On 9/13/2006 4:04 AM, Klaus Nordhausen wrote:
> Dear Deepayan,
>
> sorry for not being clear - but my problem has nothing to do with the aspect.
> If I create the eps the following way
There is some ambiguity here. The "aspect" arg to wireframe controls
the 3D aspect ratio. You want to contro
Deepayan Sarkar skreiv:
>> cloud(z~x*y|s,scales=list(arrows=FALSE,relation="free"))
>>
>> However, it does not. Any ideas how I can make it work?
>
> There's no direct support, but you can write a small panel function
> with more or less the desired effect:
Thank you so much. It works perfectly.
Without knowing your OS, it is hard to say. But if this is Solaris (the
most likely OS), not to my knowledge.
On Wed, 13 Sep 2006, David Hajage wrote:
> Hello useRs,
>
> I would like to install R 2.3.1 on a computer : Sun Blade 2000.
>
> Is there a precompiled version of R for this computer ?
>
Daniel Franke gmail.com> writes:
>
>
> [This is a follow-up to the recent discussion on R-help]
>
> Hi all,
>
> I can reproduce both problems on gentoo (2006.0 profile),
> but not on OpenSuSE-10.1.
>
> Installed libraries:
> * Gentoo: R-2.2.1, rgl-0.67.2, OpenSuSE: R-2.3.1, rgl-0.67.2
>
Dear All,
the last expression in the following code snippet crashes R (version
2.3.1 on Windows XP) when run interactively:
make.bad.function <- function(kind)
{
zz <- switch(kind,
"1" = 1,
"2" = 2)
stopifnot( !is.null(zz) )
eval( bquote( function(x)
On 9/13/06, Anupam Tyagi <[EMAIL PROTECTED]> wrote:
> Gabor Grothendieck gmail.com> writes:
>
> > C:\bin>cut -c2-3,6-8 a.dat
> > 23678
> > 23678
> > 23678
>
> Thanks. I think this will work. How do I redirect the output to a file on
> windows?
Same as on UNIX
cut -c2-3,6-8 a.dat > a2.dat
> Is t
Hi,
I 'd like to use multinom to estimate a multinomial logit model of a
conjoint survey with a format like:
individual 1 --choice -- X1-X2-X3
1-A1.2blue12
1-0-1.4red-13
1-B3.1-
Dear HelpeRs,
I have some data:
"ice" <- structure(c(0.386, 0.374, 0.393, 0.425, 0.406, 0.344,
0.327, 0.288, 0.269, 0.256, 0.286, 0.298, 0.329, 0.318, 0.381,
0.381, 0.47, 0.443, 0.386, 0.342, 0.319, 0.307, 0.284, 0.326,
0.309, 0.359, 0.376, 0.416, 0.437, 0.548, 41, 56, 63, 68,
69,
For your 1st question, you can write query against the tables in DB using RODBC.
Being a SAS programmer, I have to say that reporting function of R is
not as good as that of SAS.
On 9/13/06, Thorsten Muehge <[EMAIL PROTECTED]> wrote:
>
>
> Hello Colleagues,
> I programmed in SAS for 3 years and
Dietrich Trenkler said the following on 9/13/2006 9:44 AM:
> Dear HelpeRs,
>
> I have some data:
>
> "ice" <- structure(c(0.386, 0.374, 0.393, 0.425, 0.406, 0.344,
> 0.327, 0.288, 0.269, 0.256, 0.286, 0.298, 0.329, 0.318, 0.381,
> 0.381, 0.47, 0.443, 0.386, 0.342, 0.319, 0.307, 0.284, 0
There is a Java based implementation called jfig at:
http://tams-www.informatik.uni-hamburg.de/applets/jfig/ that works on
windows.
Hope this helps,
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
[EMAIL PROTECTED]
(801) 408-8111
-Original Message-
Fr
Wensui Liu wrote:
> For your 1st question, you can write query against the tables in DB using
> RODBC.
>
> Being a SAS programmer, I have to say that reporting function of R is
> not as good as that of SAS.
I beg to differ. See for example
http://biostat.mc.vanderbilt.edu/StatReport
Frank Har
well, Harrell,
I understand sweave or R2html could be a solution.
but please show me their applications in a large business setting. On
the contrary, I can give you many such cases using SAS.
On 9/13/06, Frank E Harrell Jr <[EMAIL PROTECTED]> wrote:
> Wensui Liu wrote:
> > For your 1st question
Mstislav Elagin <[EMAIL PROTECTED]> writes:
> Dear All,
>
> the last expression in the following code snippet crashes R (version
> 2.3.1 on Windows XP) when run interactively:
>
> make.bad.function <- function(kind)
> {
>zz <- switch(kind,
> "1" = 1,
> "2" =
Wensui Liu wrote:
> well, Harrell,
>
> I understand sweave or R2html could be a solution.
>
> but please show me their applications in a large business setting. On
> the contrary, I can give you many such cases using SAS.
SAS requires much more coding than R/S-Plus to produce reports that are
Greg Snow intermountainmail.org> writes:
>
> There is a Java based implementation called jfig at:
> http://tams-www.informatik.uni-hamburg.de/applets/jfig/ that works on
> windows.
>
> Hope this helps,
>
Thanks. Is there also a port of "xv"? It can be useful for some graphical
output. I tried
[snip]
Douglas Bates wrote:
> Hmm - I'm not sure what confidence interval and what number of levels
> you mean there so I can't comment on that method.
>
> Suppose we go back to Spencer's example and consider if there is a
> signficant effect for the Nozzle factor. That is equivalent to the
> h
Thanks for pointing me out "aggregate", that works fine!
There is one complication though: I have mixed types (numerical and character),
So the matrix is of the form:
A 1.0 200 ID1
A 3.0 800 ID1
A 2.0 200 ID1
B 0.5 20 ID2
B 0.9 50 ID2
C 5.0 70 ID1
One letter always has the same ID but one
I don't believe that doing a direct SQL query on a native R object is currently
possible, others have pointed out ways to do some of the things you would want
SQL for using built-in R commands.
If you really want to use SQL you could transfer the data frames you want to
use to database tables,
Another possibility:
1) Split the original file into smaller chunks of xx,xxx of rows.
2) Process each file using read.fwf saving the requisite variables.
(If necessary, save each intermediate matrix/data.frame to disk
to conserve space)
3) 'rbind' the results.
Not exact
Hi,
I try to calculate Kendall's W coefficient and I have a bizarre error.
little.app.mat<-matrix(c(1,3,4,2,6,5,2,4,3,1,5,6,3,2,5,1,5,4),nrow=3,byrow=TRUE)
print(kendall.w(little.app.mat[-1,]))
>>> Kendall's W for ordinal data
>>> W = 0.7753623Error in if (is.na(x$p.table)) { : argument is of
On 9/13/06, Gabor Grothendieck <[EMAIL PROTECTED]> wrote:
> On 9/13/06, Anupam Tyagi <[EMAIL PROTECTED]> wrote:
> > Gabor Grothendieck gmail.com> writes:
> >
> > > C:\bin>cut -c2-3,6-8 a.dat
> > > 23678
> > > 23678
> > > 23678
> >
> > Thanks. I think this will work. How do I redirect the output to
Thank you Gabor,
I'll need to explore a bit the reshape package to see what benefits I
get compared with the basic "reshape" function, but I'm glad you made
me aware of it.
And your solution for fixing NAs just for the columns I want is just
what I wanted.
Many thanks,
Denis
Le 06-09-13 à
xv has been available for windows for at least 10 years.
http://download.mirror.ac.uk/sites/ftp.cis.upenn.edu/pub/xv/
__
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-pro
I have created a data frame using the read.table command. I want to be able to
access the rows by the row name, or a vector of row names. I know that you can
access columns by using the data.frame.name$col.name. Is there a way to access
row names in a similar manner?
[[alternative HTM
Anyone from Chicago area interested in this course? Please email XLSolutions so
they can schedule it in Chicago.
We ran out of travel budget in my company :(
Date: Wed, 2 Aug 2006 13:20:23 -0700From: [EMAIL PROTECTED]: [S] Course***Dr
Frank Harrell's Regression Modeling Strategies in R/Splus
Try something like this:
# Initial data frame
> DF
V1 V2 V3 V4
1 A 1.0 200 ID1
2 A 3.0 800 ID1
3 A 2.0 200 ID1
4 B 0.5 20 ID2
5 B 0.9 50 ID2
6 C 5.0 70 ID1
# Now do the aggregation to get the means
DF.1 <- aggregate(DF[, 2:3], list(V1 = DF$V1), mean)
> DF.1
V1 V2 V3
1 A 2.0
See below.
On 9/13/06, Emmanuel Levy <[EMAIL PROTECTED]> wrote:
> Thanks for pointing me out "aggregate", that works fine!
>
> There is one complication though: I have mixed types (numerical and
> character),
>
> So the matrix is of the form:
>
> A 1.0 200 ID1
> A 3.0 800 ID1
> A 2.0 200 ID1
> B
I assume you are using the function in the concord package. This seems to
happen because there is a different way of calculating the p-value depending
on whether or not there are more than 7 cases. If there are 7 or less, the
function doesn't work unless there are more than two rows. Here is the
Matrix-style indexing works for both columns and rows of data frames.
E.g.:
> x <- data.frame(a=1:5, b=6:10, d=11:15)
> x
a b d
1 1 6 11
2 2 7 12
3 3 8 13
4 4 9 14
5 5 10 15
> x[2:4,c(1,3)]
a d
2 2 12
3 3 13
4 4 14
>
Time spend reading the help document "An Introduction to R" wil
Hi,
I am a new user of R and am still trying to figure out which statements
do which functions and am looking for a jump start.
I have a dataset where the data were collected as ten minute counts
where the number of new individuals within a species was recorded as
cohorts within 3 separate ti
The answer is yes, you can access rows of a data.frame by rowname in the
same way as columns, which you could have found by merely trying it. Don't
overlook the value of a little experimentation as the fastest way to an
answer.
-- Bert Gunter
Genentech
> -Original Message-
> From: [EMAI
Mr Harrell,
After reading discussion about R output and SAS output , I will like to use
rreport package. I a windows XP user
Sincerly
- Message d'origine
De : Frank E Harrell Jr <[EMAIL PROTECTED]>
À : Wensui Liu <[EMAIL PROTECTED]>
Cc : Thorsten Muehge <[EMAIL PROTECTED]>; r-help
I have a model which is mixed exponential model, with about 40
observations. I am wandering whether i can use the optim to optimized
the parameters? Thank you very much.
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-hel
On Wed, Sep 13, 2006 at 07:04:17AM -0400, Manuel Morales wrote:
> On Wed, 2006-09-13 at 08:04 +1000, Andrew Robinson wrote:
> > On Tue, September 12, 2006 7:34 am, Manuel Morales wrote:
> > > On Mon, 2006-09-11 at 11:43 -0500, Douglas Bates wrote:
> > >> Having made that offer I think I will now wi
Inspired by the responses, I tried to do this analytically.
The idea is that truncated mean and standard deviation could be expressed as
integral forms. So if given truncated mean, sd and truncated point (mut, sdt,
thre), an optim( ) function could be writen to get the parameters. But the
prob
Hello,
I would like to read sets of files within a folder, perhaps using recursive
methods.
Right now, I rename the files before import.
It would be even better to do this without renaming files, without providing
explicit filenames, perhaps by importing files based on chronology,
and translating
Hi list,Could you please help me to explain the following error messages with
't.test' in R Unix 2.1.1? I don't see it in R under Windows (R 2.3.0) or Unix
(R2.3.1). Is it really due to the different R versions?Thanks,...TaoUnix
session: (R.2.1.1)> R.version _
Dear R users:
Is there a built-in and simple way to insert new columns after other columns
in a dataframe?
I.e. currently I have:
V1 V2 V3 V4
[1,]
[2,]
Etc.
But I want
V1 V5 V2 V3 V4
[1,]
[2,]
Etc.
Can this be done in one line?
Jon Minton
Try this:
setwd("d:/perf/windows") # wherever your data is
results <- list()
for (i in list.files(pattern="t.*txt$")){ # need the 'pattern' of the names
results[[i]] <- read.delim(i, quote='', as.is=TRUE)
}
dataALL <- do.call('cbind', results)
write.table(dataALL,"0905p528.txt", quote=FALSE
On Wed, 13 Sep 2006 13:53:45 -0700,
Warren <[EMAIL PROTECTED]> wrote:
> Hello, I would like to read sets of files within a folder, perhaps using
> recursive methods.
Maybe this:
fv <- list.files()
lf <- sapply(fv, read.delim, quote="", as.is=TRUE)
xx <- do.call(cbind, lf)
You can find more in
"Tao Shi" <[EMAIL PROTECTED]> writes:
> Hi list,Could you please help me to explain the following error
messages with 't.test' in R Unix 2.1.1?
This is completely unreadable! However, yes, there was at some point a
bug where the LHS of model formulas was checked more rigorously than
need be, us
> Is there a built-in and simple way to insert new columns in a dataframe?
You do this by collecting the columns in the new order you desire, and
making a new frame.
oldframe <- data.frame(matrix(0:14,ncol=3))
newcol <- data.frame(20:24)
names(newcol) <- "newcol"
newframe
Try this:
n <- 10 # create some sample data
x <- data.frame(date=1:n, t1=sample(0:3, n, TRUE), t2=sample(0:3, n, TRUE),
t3=sample(0:3, n, TRUE))
x # print data
result <- lapply(c('t1','t2','t3'), function(i){
xsub <- x[rep(1:nrow(x), x[[i]]),]
xsub$t1 <- xsub$t2 <- xsub$t3 <- 0
x
Another way is to use attach(dataframe)
x1 <- rep(1,10)
x2 <- rep(2,10)
x3 <- rep(3,10)
x4 <- rep(4,10)
x5 <- rep(5,10)
dat <- data.frame(x1,x2,x3,x4)
rm(x1,x2,x3,x4)
attach(dat)
dat2 <- data.frame(x1,x5,x2,x3,x4)
detach(dat)
On 13/09/06, Timothy Bates <[EMAIL PROTECTED] > wrote:
>
>
> > Is th
On 9/13/06, Duncan Murdoch <[EMAIL PROTECTED]> wrote:
> On 9/13/2006 4:04 AM, Klaus Nordhausen wrote:
> > Dear Deepayan,
> >
> > sorry for not being clear - but my problem has nothing to do with the
> > aspect. If I create the eps the following way
>
> There is some ambiguity here. The "aspect" a
See ?append
-Christos
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jon Minton
Sent: Wednesday, September 13, 2006 5:14 PM
To: r-help@stat.math.ethz.ch
Cc: 'Jon Minton'
Subject: Re: [R] inserting columns in the middle of a dataframe
Dear R users:
Please folks -- use indexing.
myframe<-myframe[,c(1,5,2,3,4)]
Which begs the question: why bother rearranging the columns anyway, since
one can get them used, printed, etc. in any order you wish anytime you want
just by specifying the indices in the order you want them. I suspect the
question was
Hi Peter,
Thank you for the reply!
Really sorry for the formating (forgot to change to plain text). Here is
basically what I'm talking about:
> R.version
_
platform x86_64-unknown-linux-gnu
arch x86_64
os linux-gnu
syst
Thanks, but isn't that only for elements in vectors?
I think I've found the following method to work:
e.g. for
df <- data.frame(v1,v2,v3,v4)
use:
df <- data.frame(df[1:2],v5,df[-c(1:2)])
I *believe* this is the one-line solution I was looking for. Can anyone see
why this wouldn't work?
Jon
How about using python/perl/ruby, designed precisely for this type of
routine data munging, to pipe the processed output into an R dataframe?
msci <- read.table(pipe("python steve/python/msci.py"), header=T, as.is=T)
Iteratively, you could deliver the python output in chunks, something like
On 9/13/06, Mike Townsley <[EMAIL PROTECTED]> wrote:
> Dear guRus,
>
> I'm having trouble producing a levelplot with relative cuts for each
> panel (my data has large differences in scales, so I want to use
> quantiles for each panel).
>
> My attempts to change the 'at' argument in panel.levelplot
Sorry, I guess I did not explain at all how append
could work in a one-liner:
data.frame(df, v5)[append(1:4,5,2)]
Your method is fine as well. The above might be more
flexible if you need a more general solution, e.g. if you wanted
to make it a function.
-Christos
-Original Message-
F
Could anyone give me a simple example how to use lme() for t time
series prediction/modeling ? I understand the concept of longitudinal
data and have read the book by Pinheiro but still have a difficult
time for the (simpler) case of no grouped data. I am dealing with the
case of predicting a s
Hello Mark,
it's quite possible that someone can do this. However, you should try
to help us as much as possible by providing commented, minimal,
self-contained, reproducible code. What are you trying to do? In what
way is it not working? Etc.
Cheers
Andrew
On Wed, Sep 13, 2006 at 10:32:11PM
Sun has modified the standard gcc to provide better support for Sun's
thread. They used it to build OpenSolaris and it is available under the
standard GPL license, ie, it is free.
I could build R-2.2.1 with the standard gcc, but I needed to use the gcc
from Sun to build 2.3.x.
I am not entire
I hope this helps.
> x <- data.frame(a=1:5, b=6:10, d=11:15)
> x
a b d
1 1 6 11
2 2 7 12
3 3 8 13
4 4 9 14
5 5 10 15
> # access row with name "a". This does not work.
> x$a
[1] 1 2 3 4 5
> # access column with name "d"
> x$d
[1] 11 12 13 14 15
> x$row.names
NULL
> attributes(x)
$names
[1]
I think it should be possible to create the column at the end and then use
"order" on the columns names and indexes to only change the order of column
indexes, rather than having to do operations on the data itself (which will be
very time consuming if the dataset is large). Perhaps people with bet
justin bem yahoo.fr> writes:
>
> Mr Harrell,
>
> After reading discussion about R output and SAS output , I will like to use
rreport package. I a windows XP
> user
>
> Sincerly
See:
http://biostat.mc.vanderbilt.edu/twiki/bin/view/Main/Rreport
Anupam.
I am running a regression:
ols.reg1 <- lm(y ~ x1 + x2 + x3 + x4)
on a data.frame
and then generating fitted values:
y.hat <- ols.reg1$fitted.values
Then I would like to add these fitted values to the data.frame as a
new variable. The problem is that when the values are predicted the
resulting
Specify na.action = na.exlude, e.g.
> x <- y <- 1:10; x[5] <- NA
> fitted(lm(y ~ x, na.action = na.exclude))
1 2 3 4 5 6 7 8 9 10
1 2 3 4 NA 6 7 8 9 10
On 9/14/06, Robi Ragan <[EMAIL PROTECTED]> wrote:
> I am running a regression:
>
> ols.reg1 <- lm(y ~ x1 + x2 + x3 + x4)
>
> on
Hi,
Can Someone inform me how to generate RV's using the below CDF, by inverse
technique.
Thanks for your help and time.
My CDF is as follows
\[
F(x)=0 \ \text{if} \ x < 0\]\[
F(x)=\{\frac{x-x_i}{x_{i+1}-x_{i}}*(p_{i+1}-p_{i})\}+p_{i}\
\forall \ x_{i}\leq x < x_{i+1} \]
\[ F(x)=1 \ \text{if} \
?na.exclude should help you: my guess is that you asked (by using the
default) na.action = na.omit) for rows with missing values to be excluded
from the residuals. But since you have not mentioned missing values, we
have to guess what 'for some reason' was: please note the footer of this
messag
100 matches
Mail list logo