Hi Ivo,
On Friday 13 June 2008 12:23:06 am ivo welch wrote:
> Dear Statisticians--- This is not even an R question, so please
> forgive me. I have so much ignorance in this matter that I do not
> know where to begin. I hope someone can point me to documentation
> and/or a sample.
You will sure
?stop explains why this happens and how to change it.
You can also set options(error=expression(NULL)) to ignore all errors, and
use tryCatch() (or its wrapper try()) skip particular expressions if tjhey
fail.
But surely in your example your script should check for existence of the
file by fi
On Thu, 12 Jun 2008, Henrik Bengtsson wrote:
A regular set is given by "[]". The complementary set is given
by "[^]" where is a set of symbols. I don't think you have
to escape symbols in (but I might be wrong).
This covered in ?regexp. The metacharacters in character classes (the
offici
Rprintf is the right function, but this is the wrong list (please see the
posting guide). The issue is related to your 'C++ program', not to R
itself and we have no details. Non-R programming questions should go to
R-devel, as the posting guide says.
On Thu, 12 Jun 2008, Youyi Fong wrote:
A regular set is given by "[]". The complementary set is given
by "[^]" where is a set of symbols. I don't think you have
to escape symbols in (but I might be wrong). In any case, this
does what you want:
> lines <- c("abc", "!abc", "#abc", "^abc", " #abc")
> pattern <- "^[^!#^]";
> grep(patt
Dear John,
thanks for Your quick reply.
John Fox wrote:
Dear Kimmo,
MCA is a rather old name (introduced, I think, in the 1960s by
Songuist and Morgan in the OSIRIS package) for a linear model
consisting entirely of factors and with only additive effects --
i.e., an ANOVA model will no interac
Dear Statisticians--- This is not even an R question, so please
forgive me. I have so much ignorance in this matter that I do not
know where to begin. I hope someone can point me to documentation
and/or a sample.
I want to compute a covariance as quickly as non-humanly possible on
an Intel core
on 06/12/2008 08:42 PM Gundala Viswanath wrote:
Hi all,
I am trying to capture lines of a file that DO NOT
start with the following header: !, #, ^
But somehow my regex used under grep doesn't
work.
Please advice what's wrong with my code below.
__BEGIN__
in_fname <- paste("mydata.txt,".soft"
Hi all,
I am trying to capture lines of a file that DO NOT
start with the following header: !, #, ^
But somehow my regex used under grep doesn't
work.
Please advice what's wrong with my code below.
__BEGIN__
in_fname <- paste("mydata.txt,".soft",sep="")
data_for_R <- paste("data_for_R/", args[3
It would be nice if you at least included the code that you are using
and a subset of the data. Have you run Rprof to determine which of
the functions is consuming the time?
On Thu, Jun 12, 2008 at 3:25 PM, Lana Schaffer <[EMAIL PROTECTED]> wrote:
>
> Greetings,
> I am doing matching/merge for a
Sorry no previous message text or addresses, but I just cleaned my mailbox
and then found something relevant. Regarding the Piper diagram. I just
noticed the 'hydrogeo' package on CRAN, courtesy of one Myles English. That
should be what you need or close to it.
Best regards,
Michael Grant
Hi
Sébastien wrote:
> Dear R-users,
>
> This is a follow-up on a quite old post of mine which dealt with margins
> in the pairs function. I thought my problem was solved, but it doesn't
> seem so (see the code below).
>
> I use the pairs function to produce matrix plots, where distinct groups
ss wrote:
Thanks, Erik. I will try your code soon.
I did this first:
> data <-
read.table('E-TABM-1-processed-data-1342561271_log2_with_symbols.txt',
row.names = NULL ,header=TRUE, fill=TRUE)
> class(data[[3]])
[1] "factor"
> is.numeric(data[[3]])
[1] FALSE
>
So it is not numeric but
Dear Erik and Wacek,
I would request that you stop working on my problem. I had the second column
deleted
and the problem is gone. I don't know why but apparently the second column
somehow
interfered with the third column such that the third column is regarded as
'factor' not
'numeric'.
I can rec
Thanks, Erik. I will try your code soon.
I did this first:
> data <-
read.table('E-TABM-1-processed-data-1342561271_log2_with_symbols.txt',
row.names = NULL ,header=TRUE, fill=TRUE)
> class(data[[3]])
[1] "factor"
> is.numeric(data[[3]])
[1] FALSE
>
So it is not numeric but 'factor' instead.
Can
There is a "try" function that you can wrap around functions.
Hope this helps!
Sincerely,
Erin
On 6/12/08, Josh <[EMAIL PROTECTED]> wrote:
> I'm invoking R in batch mode from a bash script as follows:
>
> R --no-restore --no-save --vanilla
> <$TARGET/$directory/o2sat-$VERSION.R>
> $TARGET/$dire
ss wrote:
It is:
> data <-
read.table('E-TABM-1-processed-data-1342561271_log2_with_symbols.txt',
row.names = NULL ,header=TRUE, fill=TRUE)
> class(data[3])
[1] "data.frame"
>
Oops, should have said class(data[[3]]) and
is.numeric(data[[3]])
See ?Extract
And if I try to use as.ma
It is:
> data <-
read.table('E-TABM-1-processed-data-1342561271_log2_with_symbols.txt',
row.names = NULL ,header=TRUE, fill=TRUE)
> class(data[3])
[1] "data.frame"
>
And if I try to use as.matrix(read.table()), I got:
>data
<-as.matrix(read.table('E-TABM-1-processed-data-1342561271_log2_with_sy
ss wrote:
Hi Wacek,
Yes, data is data frame not a matrix.
is.numeric(data[3])
[1] FALSE
what is class(data[3])
But I looked at the column 3 and it looks okay though. There are few NAs and
I did find
anything strange.
Any suggestions?
Thanks,
Allen
On Thu, Jun 12, 2008 at 7:0
To answer your specific question, you can use mvrnorm (from MASS, i.e.
library(MASS)) to generate each component.
To generate a mixture with three components (Prob(1 st component) = p1,
Prob(2nd component) = p2, Prob(3rd component) = p3, p1+p2+p3=1), you can
generate a uniformly distributed varia
Hi Wacek,
Yes, data is data frame not a matrix.
> is.numeric(data[3])
[1] FALSE
But I looked at the column 3 and it looks okay though. There are few NAs and
I did find
anything strange.
Any suggestions?
Thanks,
Allen
On Thu, Jun 12, 2008 at 7:01 PM, Wacek Kusnierczyk <
[EMAIL PROTECTE
ss wrote:
> Thank you very much, Wacek! It works very well.
> But there is a minor problem. I did the following:
>
> >data <-
> read.table('E-TABM-1-processed-data-1342561271_log2_with_symbols.txt',
> +row.names = NULL ,header=TRUE, fill=TRUE)
looks like you have a data frame, not a matrix
> > d
On Jun 12, 2008, at 6:34 PM, Hua Li wrote:
Thanks, Marc and Haris!
I didn't know the values of the numbers beforehand, so the scan
method won't work, but "[^+-\\d.]+" will do!
And Haris, I didn't intend to keep the information of which number
is B, which is C etc when asking the question,
I'm invoking R in batch mode from a bash script as follows:
R --no-restore --no-save --vanilla
<$TARGET/$directory/o2sat-$VERSION.R>
$TARGET/$directory/o2sat-$VERSION.Routput
When R comes across some error in the script however it seems to halt
instead of running subsequent lines in the script:
Oh, Sorry, Marc. The scan method does work!
Hua
--- On Thu, 6/12/08, Charilaos Skiadas <[EMAIL PROTECTED]> wrote:
> From: Charilaos Skiadas <[EMAIL PROTECTED]>
> Subject: Re: [R] numbers as part of long character
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED], r-help@r-project.org
> Date: Thu
Thanks, Marc and Haris!
I didn't know the values of the numbers beforehand, so the scan method won't
work, but "[^+-\\d.]+" will do!
And Haris, I didn't intend to keep the information of which number is B, which
is C etc when asking the question, as I had a tedious way to do it (use
strspilt
I'm having some issues with getting my own jars to work properly with
rJava.
Bear with me as I explain my scenario:
I have a java package called rjbridge, with the following classes:
RJBridge.class
ObjectInfo.class
Each of the classes has the following line on top: package com.rjbridge
On Jun 12, 2008, at 5:06 PM, Marc Schwartz wrote:
on 06/12/2008 03:46 PM Hua Li wrote:
Hi,
I'm looking for some way to pick up the numbers which are
contained and buried in a long character. For example,
outtree.new="(((B:1204.25,E:1204.25):7581.11,F:8785.36):8353.85,C:
17139.21);"
num.char
Hi,
I'm trying to use mars function in R to interpolate nonlinear
multivariate functions.
However, it seems that mars gives me a fit which uses only very few
basis function and
it underfits very badly.
For example, I have tried the following code to test mars:
require("mda")
f <- function(x
ss wrote:
Dear Erik,
Thanks! The 'data' is matrix but all(apply(data[,3:85], 2, class) ==
"numeric")
is false.
> class(data)
[1] "matrix"
> a<- rowMeans(data[,3:85],na.rm = TRUE)
Error in rowMeans(data[, 3:85], na.rm = TRUE) : 'x' must be numeric
> all(apply(data[,3:85], 2, class) == "nu
on 06/12/2008 03:46 PM Hua Li wrote:
Hi,
I'm looking for some way to pick up the numbers which are contained and buried in a long character.
For example,
outtree.new="(((B:1204.25,E:1204.25):7581.11,F:8785.36):8353.85,C:17139.21);"
num.char =
unlist(strsplit(unlist(strsplit(unlist(strsplit
ss wrote:
> Hi all,
>
> I have a matrix called 'data', which looks like:
>
>
>> data[1:4,1:4]
>>
> Probe_ID Gene_Symbol M1601 M1602
> 1 A_23_P10586213CDNA73-1.60.16
> 2 A_23_P76435 15E1.20.180.59
> 3 A_24_P402
Dear Erik,
Thanks! The 'data' is matrix but all(apply(data[,3:85], 2, class) ==
"numeric")
is false.
> class(data)
[1] "matrix"
> a<- rowMeans(data[,3:85],na.rm = TRUE)
Error in rowMeans(data[, 3:85], na.rm = TRUE) : 'x' must be numeric
> all(apply(data[,3:85], 2, class) == "numeric")
[1] FALSE
>
Hello -
ss wrote:
Hi all,
I have a matrix called 'data', which looks like:
data[1:4,1:4]
Probe_ID Gene_Symbol M1601 M1602
1 A_23_P10586213CDNA73-1.60.16
2 A_23_P76435 15E1.20.180.59
3 A_24_P402115 15E1.2
Hi,
I'm looking for some way to pick up the numbers which are contained and buried
in a long character.
For example,
outtree.new="(((B:1204.25,E:1204.25):7581.11,F:8785.36):8353.85,C:17139.21);"
num.char =
unlist(strsplit(unlist(strsplit(unlist(strsplit(unlist(strsplit(unlist(strsplit(outtre
Hi all,
I have a matrix called 'data', which looks like:
> data[1:4,1:4]
Probe_ID Gene_Symbol M1601 M1602
1 A_23_P10586213CDNA73-1.60.16
2 A_23_P76435 15E1.20.180.59
3 A_24_P402115 15E1.21.63
Hi,
I would appreciate if someone could comment on this problem I am
experiencing. I am writing a C++ program to be called from R. In this
program, there is a verbose switch that decides whether to print some
debugging info using Rprintf. On windows, things work ok. On linux, things
are fine in no
Check out this previous post from years ago.
http://tolstoy.newcastle.edu.au/R/help/00a/2237.html
Bill> Date: Thu, 12 Jun 2008 10:38:03 -0500> From: [EMAIL PROTECTED]> To:
r-help@r-project.org> Subject: [R] overall title> > I have a 2x2 plot set up
using: par(mfrow=c(2,2))> I'd like to put a
On Thu, Jun 12, 2008 at 2:27 PM, Agustin Lobo <[EMAIL PROTECTED]> wrote:
> Hi!
>
> How can I subset several variables in cast?
>
> For example, I can do it for one, (ie, ph):
> cast(am, organismo +arriba ~ variable,subset=variable=="ph",mean,na.rm=T)
>
> For selecting ph, temperature and Ba I'm usi
Hi All,
I am using em() function to estimate a poisson-gaussian process from a
univariate one dimension time series, but not sure how to do. In the help
manual, it specify that in "pro" of the argument "parameter", if the model
includes a Poisson term for noise, there should be one more mixing
pro
Hi!
How can I subset several variables in cast?
For example, I can do it for one, (ie, ph):
cast(am, organismo +arriba ~ variable,subset=variable=="ph",mean,na.rm=T)
For selecting ph, temperature and Ba I'm using:
cast(am, organismo +arriba ~ variable,subset=variable=="ph"
variable=="temperatu
Greetings,
I am doing matching/merge for a table (40919x3) to data
which is in the form of a list of 1268 data.frames. Using
lapply this is taking ~5 minutes. I know that the match/merge
functions are time consuming, so is there an alternative to
this accomplish this goal? is lapply not efficie
Hi Manisha,
How about you incluse something like this on your script.R:
setwd("/your/full/working/directory") # ?setwd
save.image()# or save.image("your_workspace.RDA").
By the way, I don´t know if you added the line below to run in background:
R --save < calculate.R >& script.out
May be
Hello,
I have a question about running R in a cluster environment. The shell script
I am running looks like this:
#!/bin/bash
cd /nfs/apollo/2/c2b2/users/mb0001/Data
/nfs/apollo/1/shares/software/core_facility/local/x86_64_rocks/R/current/bin/
R --save < calculate.R >& script.out
I ha
The first thing to do is to run Rprof and determine where time is
being spent. It may be that it is one of the functions that you are
calling inside the loop that is taking the majority of time and if
that is the case, there may not be any improvement other than coming
up with a different algorith
Please read about panel functions in ?xyplot and ?panel.abline
In particular, you do this sort of thing in panel functions where you must
use grid graphics functions or various lattice forms (wrappers) thereof. The
standard graphics constructions will not work (as you found out).Suggested
refere
I would like to add two horizontal lines representing acceptible drug levels to
a trellis plot.
I tried using abline and I get an error that "plot.new has not been called."
See below.
xyplot(FK~WEEK|Event1/MRN, data=FKdat.o1)
abline(h=5)
abline(h=10)
Error in int_abline(a = a, b = b, h = h,
I believe this might do what you want a bit faster. I replaced the
while loop with something that is likely to be faster. I saw no
reason for the rounding you were doing, better to use as.integer at
the end.
test <- function(t){
x <- rexp(t,0.1)
while(sum(x) <= t) {
x <- c(x, rexp(
We would certainly need more information about your function to offer
any specific advice, therefore I'll fall back on the general. First
there is no command that will increase a for loop speed, it is not as if
they are artificially slowed down.
In general, you may be able to do whatever it i
?title, see 'outer' (and you will need to make room for an outer margin).
This is described in 'An Introduction to R' (and in all good books on R).
On Thu, 12 Jun 2008, [EMAIL PROTECTED] wrote:
I have a 2x2 plot set up using: par(mfrow=c(2,2))
I'd like to put an overall title on the page, but
My routine is on Financial Econometrics (Yield Curve Modeling). It is very
intensive. And I have heard that the for() loop speed could be increased
with a command. I want to know if there a way to do it.
Best regards.
Rafael Barros de Rezende
-- Original Message
Dukka k.c. wrote:
Dear all
I am trying to compare the performances of several methods using the AUC0.1
and
not the whole AUC. (meaning I wanted to compare to AUC's whose x axis only
goes to
0.1 not 1)
I came to know about the Mcneil Hanley test from Bernardo Rangel Tura
and I referred to the o
Please try this:
> z1 <- rexp(100)
> z2 <- rexp(100)
> z3 <- rexp(100)
> z4 <- rexp(100)
> par(mfrow=c(2,2),oma = c(0, 0, 3, 0))
> curve(dexp,from=0,to=5)
> hist(z1,main="first")
> hist(z2,main="second")
> hist(z3,main="third")
> mtext("Densities", outer = TRUE, cex = 1.5)
>
Hope this helps.
Sin
See mtext:
mtext("Title", outer = T, side = 3, line = -2)
On Thu, Jun 12, 2008 at 12:38 PM, <[EMAIL PROTECTED]> wrote:
> I have a 2x2 plot set up using: par(mfrow=c(2,2))
> I'd like to put an overall title on the page, but I cannot figure out how.
> Any ideas?
>
>
>[[alternative HTML
13 minutes is a long time for a loop to simply send an email, what other
calculations are going on?
Rafael Barros de Rezende wrote:
Dear R users,
I would like to know if there is a way to increase the for() loop speed
because in my routine the calculations are too slow.
Best regar
Hi Ajay --
"ajay ohri" <[EMAIL PROTECTED]> writes:
> Dear List,
>
> Do you know any way I can convert XML parameters into column headers. My
In R, the XML package will help you...
> data is in a csv file with each row containing a xml form of data , and
> multiple parameters (
>
> data_val1 ,
samitj wrote:
Hi,
Can we execute a unix shell command from within R shell?
thanks,
Sam
?system
hth,
Paul
--
Drs. Paul Hiemstra
Department of Physical Geography
Faculty of Geosciences
University of Utrecht
Heidelberglaan 2
P.O. Box 80.115
3508 TC Utrecht
Phone: +31302535773
Fax:+31302
Yes, see ?system
samitj wrote:
Hi,
Can we execute a unix shell command from within R shell?
thanks,
Sam
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/post
I have a 2x2 plot set up using: par(mfrow=c(2,2))
I'd like to put an overall title on the page, but I cannot figure out how. Any
ideas?
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/li
Hi I believe this should provide an example of the confusing behavior.
Run this with t=100 for example:
test=function(t){
x=c()
while(sum(x)<=t){
###I simply generate some numbers from an
exponential until the sum of these numbers gets
to 100(without loss of generality)
x=c(x,round(rexp(1,0.1)
Hi,
Can we execute a unix shell command from within R shell?
thanks,
Sam
--
View this message in context:
http://www.nabble.com/shell-command-tp17803089p17803089.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org ma
Dear R users,
I would like to know if there is a way to increase the for() loop speed
because in my routine the calculations are too slow.
Best regards.
Rafael Barros de Rezende
Cedeplar - Center for Development and Regional Planning
Face, UFMG ([1]http://www.cedeplar.ufmg.
Dear list,
I have a problem with freq from prettyR.
Please have a look at my syntax with a litte example:
library(prettyR)
#Version 1
test.df<-data.frame(q1=sample(1:4,8,TRUE), gender=sample(c("f","m"),8,TRUE))
test.df
freq(test.df) #No error message
#Version 2
test.df<-data.frame(gender=sampl
Berwin appears to be correct here. After you do x <- x / 0.0001,
I inserted a call to round(x) - x, and received
round(x) - x
[1] 7.275958e-12 0.00e+00 0.00e+00
This is basically a case of FAQ 7.31.
Julien Hunt wrote:
Hi I believe this should provide an example of the confusing behav
Dear R users,
I would like to know if there is a way to increase the for() loop speed
because in my routine the calculations are too slow.
Best regards.
Rafael Barros de Rezende
Cedeplar - Center for Development and Regional Planning
Face, UFMG ([1]http://www.cedeplar.ufmg.
Jin Wang had an error. My original note specified a variable that was 1 for
subjects NOT in the subcohort, so the correct coxph call is
coxph(Surv(edrel, rel) ~ stage + histol + age +
offset(-100*(subcohort==0)) + cluster(seqno), data =ccoh.data)
This gives the same coeffici
Hi,
I am a newbie to R and I am working with a Mac.
Is there any package that I can use to generate random samples from a
user defined distribution ? That is , I define a distribution
function ( maybe multi dimension ) and I want some random samples
generated from my this distribution.
same subject id has to be multiple in mutiple times like following format,
Multiple records per id not allowed in cch()
so it's difficult to use cch() for time dependent covariate. Maybe coxph()
is alternative, but seems difficult because coxph() and cch() return
different estimate for same data "n
on 06/12/2008 09:48 AM Julien Hunt wrote:
To whom it may concern,
I am currently writing a program where I need to use function rep.
The results I get are quite confusing. Given two
vectors A and B, I want to replicate a[1] b[1]
times, a[2] b[2] times and so on.
All the entries of vector B ar
G'day Julien,
On Thu, 12 Jun 2008 16:48:43 +0200
Julien Hunt <[EMAIL PROTECTED]> wrote:
> I am currently writing a program where I need to use function rep.
> The results I get are quite confusing. Given two
> vectors A and B, I want to replicate a[1] b[1]
> times, a[2] b[2] times and so on.
>
Thanks for the reply. I think I've figured it out, you can set this with
the mgp parameter.
So I'd use the following statement instead:
axis(1, at=foo$plot.x, labels=foo$plot.x, mgp=c(3,0.5,1)) #this brings the
axis labels closer to the axis line
Andrew
On Thu, Jun 12, 2008 at 9:53 AM, Toby Ma
We need a reproducible example of this to tell you what is going on.
Find a small example that exhibits the confusing behavior, and share it
with the list.
Julien Hunt wrote:
To whom it may concern,
I am currently writing a program where I need to use function rep.
The results I get are quite
On Jun 12, 2008, at 10:48 AM, Julien Hunt wrote:
Do you
need more information on my specific program.
Thanks for your time and help,
Yes, as the posting guide says, we would probably need a reproducible
self-contained example. Emphasis on "reproducible" and "self-contained.
Best regards,
To whom it may concern,
I am currently writing a program where I need to use function rep.
The results I get are quite confusing. Given two
vectors A and B, I want to replicate a[1] b[1]
times, a[2] b[2] times and so on.
All the entries of vector B are positive integers.
My problem comes from th
on 06/12/2008 09:37 AM Peter Dalgaard wrote:
Simon Blomberg wrote:
Good points Ben. For now I'd recommend simply that the allergic
reaction to insignificant statistical tests be treated with an
antihistamine :-)
A vote for Frank's comment to be added to the 'fortunes' package.
S
Simon Blomberg wrote:
>>> Good points Ben. For now I'd recommend simply that the allergic
>>> reaction to insignificant statistical tests be treated with an
>>> antihistamine :-)
>>>
>> A vote for Frank's comment to be added to the 'fortunes' package.
>>
>>
> Seconded! :-)
>
>
Tha
I tried your alternative method on the example in cch() description manual.
The example data "nwtco" has not time-dependent covariates yet. I test cch()
and coxph() on the same data. But the estimation result is different. I
don't know if I did anything wrong.
subcoh <- nwtco$in.subcohort
selccoh
Our July *** New York City *** R/S Fundamentals and Programming
Techniques is scheduled for:
New York City / July 28-29, 2008 ***
Please direct enquiries to Sue Turner: [EMAIL PROTECTED]
Ask for Group Discount ---
Looking for R Advanced course? It's comming up in Seattle on
Not sure if this is what you are looking for but you can get
the p-value with something like this:
# Create a vector
mydata<-
c(132968364, 135945080, 156539568, 157817896, 162399496,
168344072, 173146584, 176302744, 182878168, 183946152,
18506
Dear all
I am trying to compare the performances of several methods using the AUC0.1
and
not the whole AUC. (meaning I wanted to compare to AUC's whose x axis only
goes to
0.1 not 1)
I came to know about the Mcneil Hanley test from Bernardo Rangel Tura
and I referred to the original paper for th
Something like. . .
> midpoint <- c(132968364, 135945080, 156539568, 157817896,
+ 162399496, 168344072, 173146584, 176302744,
+ 182878168, 183946152, 185068720, 190791232,
+ 84317660, 93708872, 106810172, 12684,
+ 148519056, 150945112, 155771432, 181069984,
+ 87104384
+ )
> shapiro.test(
Here's a sample:
> unif_rand_1 <- runif(1000);
> unif_rand_2 <- runif(1000);
> ks.test(unif_rand_1,unif_rand_2);
Two-sample Kolmogorov-Smirnov test
data: unif_rand_1 and unif_rand_2
D = 0.021, p-value = 0.9802
alternative hypothesis: two-sided
So in your case:
> ks.test( runif( length( you
Dear R User,
say I have this sample of data ( attach with). What i'm going to do is to
test whether this data is uniformly distributed or not by finding the p-value.
I've tried using the punif command but it gave me the value of 1 of all the
data. Any suggestion on R command to find the p-
Hi Andrew,
Perhaps this example would help. You can add in spaces to the mtext text
to move the text sideways.
par(mai=c(0.5,0.5,0.5,0.5),oma=c(2,2,2,2)) #mai units are INCHES, oma
units are LINES
plot(runif(50),xlab="xlab",ylab="ylab",bty="l") #n.b. these labels don't
appear
mtext("First in
Try this workaround:
library(methods)
setClass("of")
setAs("character", "of", function(from) as.ordered(from))
Input <- "A B
b 1
c 2
a 3
"
DF <- read.table(textConnection(Input), header = TRUE,
colClasses = c("of", "numeric"))
str(DF)
On Thu, Jun 12, 2008 at 4:57 AM, Birgitle <[EMAIL PROTECTE
Here's a naive question about axis()
How do you control the location of the labels with the axis() command?
In the following example:
foo <- data.frame(plot.x=seq(1:3), plot.y=seq(4:6))
plot(foo$plot.x, foo$plot.y, type='n', axes=FALSE)
points(foo$plot.x, foo$plot.y)
axis(1, at=foo$plot.x, label
- begin included message
In case cohort study, we can fit proportional hazard regression model to
case-cohort data. In R, the function is cch() in Survival package
Now I am working on case cohort analysis with time dependent covariates
using cch() of "Survival" R package. I wonder if cch() pro
Wrap each element in an environment, flatten that and then
extact the element in each environment. (Be sure not to use
an old version of R since sufficiently far back R had a bug when
environments were stored in lists that was since fixed.)
L <- rapply(test.list, function(el) environment(), how =
Thanks. As a (relatively) new user of R and programming in general, I tend to
miss things like that. I appreciate your patience.
SR
Steven H. Ranney
Graduate Research Assistant (Ph.D)
USGS Montana Cooperative Fishery Research Unit
Montana State University
PO Box 173460
Bozeman, MT 59717-3460
To predict from Weight~alpha*Length^beta you need to specify Length, not
Weight. It is most likely finding Length from your workspace.
On Thu, 12 Jun 2008, Ranney, Steven wrote:
I keep running up against the same error when I try to plot a line from a nls
model. The data is fisheries length
Ranney, Steven montana.edu> writes:
> plot(Weight~Length, data = wae, pch=19,
> xlab="Length (mm)", ylab="Weight (g)",
> xlim = c(150,1000), ylim = c(0, 10050))
> mod = seq(150, 1000)
On Thu, 12 Jun 2008, Peter Dalgaard wrote:
Paul Johnson wrote:
In R version 2.7.0 (2008-04-22) as.numeric(".") returns zero.
as.numeric(".")
[1] 0
This must be a bug. Splus and previous versions of R (<= 2.6.0) return NA,
as you might expect.
Depends who is doing the expecting. Americans
I keep running up against the same error when I try to plot a line from a nls
model. The data is fisheries length/weight data. Code follows:
require(graphics)
pow = nls(Weight~alpha*Length^beta, data=wae,
start=list(alpha=0.001, beta=3.0), trace=TRUE)
pre
You have failed to provide the most basic of information as requested in
the posting guide. As you mention 'i create a x11 window and plot' I will
assume you mean that you open an X11() device and hence this is some
Unix-alike OS.
This has come up several times before, so please search the ar
Paul Johnson wrote:
> In R version 2.7.0 (2008-04-22) as.numeric(".") returns zero.
>
>
>> as.numeric(".")
>>
> [1] 0
>
> This must be a bug. Splus and previous versions of R (<= 2.6.0) return NA,
> as you might expect.
>
> I'm running R version 2.7.0 (2008-04-22) on Windows XP.
>
>
I su
I've been trying to write the consoles output to a tktext window, but have not
succeeded...
Does anybody know if that works?
Any help would be highly appreciated.
Thanks in advance,
Andreas Posch
__
R-help@r-project.org mailing list
https://stat.ethz.
Paul Johnson:
> In R version 2.7.0 (2008-04-22) as.numeric(".") returns zero.
>
>> as.numeric(".")
> [1] 0
Seems to be fixed already. In R version 2.7.0 Patched (2008-06-12 r45898):
$ as.numeric(".")
[1] NA
Warning message:
NAs introduced by coercion
--
Karl Ove Hufthammer
__
Prof Brian Ripley wrote:
>
> See ?rapply
Golly, the things one learns when least expecting it.
Jim
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guid
Hi,
thanks a lot for your help. Somehow rapply had escaped my notice. I
also have a follow-up question on that. I would like to "flatten" my
output list to a list with only one level. Option "unlist" in rapply
returns a character vector, in my example:
> rapply(test.list, rev, how="unlist")
In R version 2.7.0 (2008-04-22) as.numeric(".") returns zero.
> as.numeric(".")
[1] 0
This must be a bug. Splus and previous versions of R (<= 2.6.0) return NA,
as you might expect.
I'm running R version 2.7.0 (2008-04-22) on Windows XP.
Paul
___
1 - 100 of 119 matches
Mail list logo