Please ask the maintainer. The 'udunits' R package seems to require its
libraries in particular places. Note that it is looking for
/usr/lib/libudunits.a, that is a static library in a 32-bit library
directory, whereas you most likely have /usr/lib64/libudunits.so or
/usr/lib64/libudunits.a
Dear all,
It's fairly straightforward to plot cumulative histograms using the hist()
function. You do something like:
h - hist(rnorm(100), plot=FALSE)
h$counts- cumsum(h$counts)
plot(h)
However, I have failed to find any example where this is done using the
lattice histogram() function. I
Hi,
Is there a simple command for computing the standard error of a
combination of parameter estimates in a GLM?
For example:
riskdata$age1 - riskdata$age
riskdata$age2 - ifelse(riskdata$age67,0,riskdata$age-67)
model - glm(death~age1+age2+ldl,
On 11 May 2008, at 22:45, Andrew Robinson wrote:
lme(y ~ selection * males, random = ~1|replica/selection/males,
mydata)
forgive me, but I seem to see nesting in the random statement.
That is
what happens when we separate factors with a '/'; they are nested. We
would expect that
It's fairly straightforward to plot cumulative histograms using the
hist()
function. You do something like:
h - hist(rnorm(100), plot=FALSE)
h$counts- cumsum(h$counts)
plot(h)
However, I have failed to find any example where this is done using the
lattice histogram() function. I
On 12/05/2008, at 4:52 AM, Federico Calboli wrote:
On 10 May 2008, at 07:36, Kingsford Jones wrote:
Federico,
I think you'll be more likely to receive the type of response you're
looking for if you formulate your question more clearly. The
inclusion of commented, minimal, self-contained,
On 12 May 2008, at 01:05, Andrew Robinson wrote:
On Mon, May 12, 2008 at 10:34:40AM +1200, Rolf Turner wrote:
On 12/05/2008, at 9:45 AM, Andrew Robinson wrote:
On Sun, May 11, 2008 at 07:52:50PM +0100, Federico Calboli wrote:
The main point of my question is, having a 3 way anova (or
On Tuesday 06 May 2008 23:34, David Katz wrote:
In Dr. Wood's book on GAM, he suggests in section 4.1.6 that it might be
useful to shrink a single smooth by adding S=S+epsilon*I to the penalty
matrix S. The context was the need to be able to shrink the term to zero if
appropriate. I'd like to
You can use the esticon function in the doBy package.
Regards
Søren
Fra: [EMAIL PROTECTED] på vegne af Mark Donoghoe
Sendt: ma 12-05-2008 09:11
Til: r-help@r-project.org
Emne: [R] Standard error of combination of parameter estimates
Hi,
Is there a simple
On 12 May 2008, at 09:29, Dieter Menne wrote:
Federico:
First, mixed models are different from standard 101 Anova, and
quite a lot
of the nesting stuff I used to ponder about 30 year ago when I started
teaching this is no longer relevant and works implicitely when you
code the
parameters
Hi
I am planning to use a CART analysis with rpart() to analyse the
impact of, among others, slope, altitude and aspect on mortality
rates.
My question is:
Is there a p[roblem with using aspect as a predictor as it is circular?
And if it is a problem (which I suspect), is there a transformation I
Ola Caster ola.caster at gmail.com writes:
It's fairly straightforward to plot cumulative histograms using the hist()
function. You do something like:
h - hist(rnorm(100), plot=FALSE)
h$counts- cumsum(h$counts)
plot(h)
However, I have failed to find any example where this is done using
On 11 May 2008, at 23:34, Rolf Turner wrote:
It doesn't seem to me to be a complaint as such. It is a
request for insight. I too would like some insight as to
what on earth is going on. And why do you say Federico
shows no evidence of having searched the
On 12 May 2008, at 10:05, Ken Beath wrote:
There is only one random effect, so where does the crossing come
from ? The fixed effects vary across blocks, but they are fixed so
are just covariates. For this type of data the usual model in lme4
is y~fixed1+fixed2+1|group and for lme split into
On Mon, May 12, 2008 at 10:50:03AM +0100, Federico Calboli wrote:
On 12 May 2008, at 01:05, Andrew Robinson wrote:
On Mon, May 12, 2008 at 10:34:40AM +1200, Rolf Turner wrote:
On 12/05/2008, at 9:45 AM, Andrew Robinson wrote:
On Sun, May 11, 2008 at 07:52:50PM +0100, Federico Calboli
Hi R,
A quick question How can I optimize the objective function
constrained to quadratic constraints? Which function of R is useful for
quadratic constraints?
Many Thanks,
Shubha
This e-mail may contain confidential and/or privileged i...{{dropped:13}}
On 12 May 2008, at 11:16, Andrew Robinson wrote:
Well. I have documentation relevant to nlme that goes back about 10
years. I don't know when it was first added to S-plus, but I assume
that it was about then. Now, do you think that if the thing that you
want to do was really bog standard,
Create an encoding function which replaces single quotes with
two single quotes:
# first string is a single character consisting of single quote
# second string is two characters consisting of two single quotes
enc - function(x) gsub(', '', x)
dbGetQuery(con,sprintf(insert into dd (txt) values
Hello R,
By any chance, Rdonlp2 package of R defined in
http://arumat.net/Rdonlp2/tutorial.html#SECTION0002
serves the below purpose?
BR, Shubha
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Shubha Vishwanath Karanth
Sent: Monday, May
It works. Thanks very much.
Best
On Mon, May 12, 2008 at 7:02 PM, Gabor Grothendieck
[EMAIL PROTECTED] wrote:
Create an encoding function which replaces single quotes with
two single quotes:
# first string is a single character consisting of single quote
# second string is two characters
I *think* the syntax for the model Federico wants is this:
lmer(y~selection*males+ (selection|month) + (males|month))
My lme syntax is a bit rusty, so I'm not confident how to recode with nested
random effects, as in PB p24.
Two quick points:
1. I think Federico has caused some confusion on
Hi,
how can I order the rows and columns of a matrix A to generate B, in order
to minimize the length(rle(B)$lengths) for all the rows and columns ?
set.seed(5)
a - matrix(rnorm(200), nrow=20)
a[a=0] - 0
a[a0] - 1
a
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
[1,]01
Hi Rainer,
In a similar situation I used the two components of the normal vector
of the surface (northing easting). I.e. for a horizontal plane
both are 0, for a vertical slope facing south northing=-1and
easting=0, etc. This descartian decomposition of the slope vector
avoids the problem of
On Sun, May 11, 2008 at 9:49 AM, amarkos [EMAIL PROTECTED] wrote:
On May 11, 4:47 pm, Douglas Bates [EMAIL PROTECTED] wrote:
Do you mean that you want to collapse similar rows into a single row
and perhaps a count of the number of times that this row occurs?
Let me rephrase the problem by
But that avoids the question as to *why* it isn't very well
set up for crossed random effects? What's the problem?
What are the issues? The model is indeed bog-standard.
It would seem not unreasonable to expect that it could be
fitted in a straightforward
Hello,
I would like to create a subscriptable collection (presumably a list)
of lm() models.
I have a data frame DX containing 6 groups of data. The general idea
is (NOT RUN) ...
for (i in 1:6)
{ DXS = subset( DX, whatever);
LMX[ i] = lm( formula, data = DXS);
}
Now access
Perhaps
?mosaic
or
?mosaicplot
_
Professor Michael Kubovy
University of Virginia
Department of Psychology
USPS: P.O.Box 400400Charlottesville, VA 22904-4400
Parcels:Room 102Gilmer Hall
McCormick RoadCharlottesville, VA 22903
Office:
I have tried without success to find a way including the square root symbol
in lattice strips as part of my conditioning labels. I have tried
supplementing by creating a list of vectors using the var.name function
coupled with the expression function used in xlab/ylab.
Hello. I'm trying find the ratios between each of the integers in a
vector. I have:
for (n in x) {
ratio - (x[n]/x[n-1])
ratio.all - c(ratio.all, ratio)
}
Of course this doesn't work, nor does diff(n)/diff(n-1). Is there a
way to specify a pair of integers in a vector?
Thank you,
On Mon, 12 May 2008, Chip Barnaby wrote:
Hello,
I would like to create a subscriptable collection (presumably a list) of lm()
models.
I have a data frame DX containing 6 groups of data. The general idea is (NOT
RUN) ...
for (i in 1:6)
{ DXS = subset( DX, whatever);
LMX[ i]
try something like the following:
x - runif(1000, -3, 3)
y - 2 + 3 * x + rnorm(1000)
f - gl(10, 100)
lm.lis - vector(list, 10)
for (i in 1:10) {
lm.lis[[i]] - lm(y ~ x, subset = f == as.character(i))
}
sapply(lm.lis, coef)
sapply(lm.lis, fitted)
I hope it helps.
Best,
Dimitris
Hi
In the following, the graph I see on the screen and the .png output
coincide. However, in the .pdf file, the fonts seem to be scaled
fairly larger, resulting in the label for the top legend disappearing.
Is this an infelicity or bug, or is there something I've missed?
More generally, how do
On 12 May 2008, at 12:21, Nick Isaac wrote:
I *think* the syntax for the model Federico wants is this:
lmer(y~selection*males+ (selection|month) + (males|month))
I'll try and check against some back of the envelope calculations --
as I said, the model is, per se, nothing really new, and my
On 12 May 2008, at 14:37, Doran, Harold wrote:
I haven't followed this thread carefully, so apologies if I'm too off
base. But, in response to Rolf's questions/issues. First, SAS cannot
handle models with crossed random effects (at least well at all).
SAS is
horribly incapable of handling
On Mon, May 12, 2008 at 6:29 AM, Bálint Czúcz [EMAIL PROTECTED] wrote:
Hi Rainer,
In a similar situation I used the two components of the normal vector
of the surface (northing easting). I.e. for a horizontal plane
both are 0, for a vertical slope facing south northing=-1and
easting=0, etc.
I am trying to install R on a SLED 10.1 machine.
R-base-2.7.0-7.1-i586.rpm fails with
[EMAIL PROTECTED]:~/RPMs rpm -Uvh R-base-2.7.0-7.1.i586.rpm
warning: R-base-2.7.0-7.1.i586.rpm: Header V3 DSA signature: NOKEY,
key ID 14ec5930
error: Failed dependencies:
libgfortran.so.1 is needed by
Dear list,
How can I calculate the difference in days between the eventdate and basedate
in the below dataset?
id basedate outcome.3 eventdate daydiff
1 1001 1999-09-28 2 1999-10-013
2 1002 1999-09-22 1
3 1003 2000-01-19 1
4
I have tried without success to find a way including the square root symbol
in lattice strips as part of my conditioning labels. I have tried
supplementing by creating a list of vectors using the var.name function
coupled with the expression function used in xlab/ylab.
What version of R and OS is this? Prior to R 2.7.0 there was little
attempt to match output dimensions from various devices, and one of the
png devices in 2.7.0 has an error in doing so, fixed in R-patched (see
NEWS).
On Mon, 12 May 2008, Michael Friendly wrote:
Hi
In the following, the
Hi,
I'm new to R. I'm using a Mac OS X 10.5 and R 2.7.0. I'm trying to
change the font family for a plot in a quartz device.
Simply passing the desired font by using the family argument works
with other devices, but not with quartz. Am I missing anything? I've
already checked the docs
Tom Cohen wrote:
Dear list,
How can I calculate the difference in days between the eventdate and basedate in the below dataset?
id basedate outcome.3 eventdate daydiff
1 1001 1999-09-28 2 1999-10-013
2 1002 1999-09-22 1
3 1003 2000-01-19
Sorry for not providing this in my initial posting.
I'm using R version 2.7.0 (2008-04-22), on Win XP Pro.
As I said, the .png output matched what I saw on screen.
It was the .pdf output for which the font size was noticeably
larger, enough to make the legend run off the screen.
-Michael
Prof
Hi Lydia,
Try this:
# Function
ratio=function(x){
temp=NULL
for (n in 1:length(x)) temp=c(temp,x[n]/x[n-1])
temp
}
# Example
x=c(1,2,3,2,1,2,3)
ratio(x)
[1] 2.000 1.500 0.667 0.500 2.000 1.500
HTH,
Jorge
On Mon, May 12, 2008 at 9:52 AM, Lydia N. Slobodian [EMAIL
In relation to my previous email, I've discovered that
quartz(family = Monaco)
works fine with 2.6.2. However, it doesn't with 2.7.0.
Moreover, with 2.6.2 I get lot's of warnings, that previously I
didn't. Maybe an update of the OS has broken some code leading to a bug?
El 12/05/2008, a
this can be more efficiently coded using indexing, e.g.,
x - c(1,2,3,2,1,2,3)
n - length(x)
x[2:n] / x[1:(n-1)]
Best,
Dimitris
Dimitris Rizopoulos
Biostatistical Centre
School of Public Health
Catholic University of Leuven
Address: Kapucijnenvoer 35, Leuven, Belgium
Tel:
More generally, how do I control the size of fonts used in legends
and axis labels?
There is no general way (yet) - it is on my customisation to do list,
which I hope to make progress on over summer.
Hadley
--
http://had.co.nz/
__
Hi Lydia,
I compared my ratio function with Dimitris and Phil's suggestions. Please do
NOT use my approach because it's painfully slow for a large vector (as Phil
told me). Here is why (using Win XP SP2, Intel Core- 2 Duo 2.4 GHz, R 2.7.0
Patched):
# Vector
x=rnorm(10,0,1)
# Suggestion
I have tried without success to find a way including the square root
symbol
in lattice strips as part of my conditioning labels. I have tried
supplementing by creating a list of vectors using the var.name function
coupled with the expression function used in xlab/ylab.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Esmail Bonakdarian
Sent: Sunday, May 11, 2008 7:25 AM
To: Prof Brian Ripley
Cc: [EMAIL PROTECTED]
Subject: Re: [R] Random number generation
[snip]
What I read doesn't seem to be incorrect however
Dear R Fellow-Travellers:
What is your recommended way of dealing with a left-censored response
(non-detects) in (linear Gaussian) mixed effects models?
Specifics: Response is a numeric positive measurement (of volume, actually);
but when it falls below some unknown and slightly random value
I would have thought that:
lm( C1 ~ M^2, data=DF )
Would give the main effects and 2 way interaction(s) (but a quick test did not
match my expectation). Possibly a feature request is in order if people plan
to use this a lot.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
I'm entering this discussion late so I may be discussing issues that
have already been addressed.
As I understand it, Federico, you began by describing a model for data
in which two factors have a fixed set of levels and one factor has an
extensible, or random, set of levels and you wanted to fit
On 5/12/08, Andrewjohnclose [EMAIL PROTECTED] wrote:
I have tried without success to find a way including the square root symbol
in lattice strips as part of my conditioning labels. I have tried
supplementing by creating a list of vectors using the var.name function
coupled with the
On Mon, 12 May 2008, Arcadio Rubio García wrote:
Hi,
I'm new to R. I'm using a Mac OS X 10.5 and R 2.7.0. I'm trying to change the
font family for a plot in a quartz device.
Simply passing the desired font by using the family argument works with other
devices, but not with quartz. Am I
On 12 May 2008, at 17:09, Douglas Bates wrote:
I'm entering this discussion late so I may be discussing issues that
have already been addressed.
As I understand it, Federico, you began by describing a model for data
in which two factors have a fixed set of levels and one factor has an
El 12/05/2008, a las 18:18, Prof Brian Ripley escribió:
On Mon, 12 May 2008, Arcadio Rubio García wrote:
Hi,
I'm new to R. I'm using a Mac OS X 10.5 and R 2.7.0. I'm trying to
change the font family for a plot in a quartz device.
Simply passing the desired font by using the family
On Mon, 2008-05-12 at 11:41 -0400, Jorge Ivan Velez wrote:
Hi Lydia,
[I'm struggling to see what this has to do with the subject line?]
I compared my ratio function with Dimitris and Phil's suggestions. Please do
NOT use my approach because it's painfully slow for a large vector (as Phil
On Mon, May 12, 2008 at 11:27 AM, amarkos [EMAIL PROTECTED] wrote:
Thanks, it works!
Could you please provide the direct method you mentioned for the
multivariate case?
I'm not sure what you mean. I looked at what I wrote and I don't see
anything that would fit that description.
May I
Dear helpers,
I am using the function constrOptim to estimate a model with ML with an
inequality constraint using the option method='Nelder-Mead'.
When I specify the option: hessian = TRUE I obtain the response:
Error in f(theta, ...) : unused argument(s) (hessian = TRUE)
I guess the function
The common Monty Hall problem (where the MC helps out the contestant) is not
random! See:
http://en.wikipedia.org/wiki/Monty_Hall_problem
My edits were removed as I had no references. :-(
Maybe you can verify my statements, included below. :-)
Another analysis considers three types of
On Mon, May 12, 2008 at 11:22 AM, Federico Calboli
[EMAIL PROTECTED] wrote:
On 12 May 2008, at 17:09, Douglas Bates wrote:
I'm entering this discussion late so I may be discussing issues that
have already been addressed.
As I understand it, Federico, you began by describing a model for data
Use pspline within a Cox model. It includes a fairly general test for
nonlinearity, that is similar to GAM models.
Terry Therneau
coxph(Surv(time, status) ~ ph.ecog + pspline(age), lung)
Call:
coxph(formula = Surv(time, status) ~ ph.ecog + pspline(age),
data = lung)
-== begin included message -
Hello.
I get a bit confused by the output from the predict function when used
on an object from coxph in combination with p-spline, e.g.
fit - coxph(Surv(time1, time2, status)~pspline(x), Data)
predict(fit, newdata=data.frame(x=1:2))
- end
Hi Gurus:
In the coxph() objects in Survival package, there is an attribute called
residuals. Usually, there are several kinds for censored survival data. I can't
seem to find in the documentation as to which one this is calculating. Anyone
knows?
Karen
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
are represented by dots of
Thanks. It works!
I think I found another solution, working straight with the indicator
matrix.
count - factor(table(apply(ind, 1, paste, collapse=)))
However, that way I can't store the indices of the collapsed rows.
-Angelos Markos
__
Thanks for all of the help! Everything's working beautifully now, and
I've accomplished in a few hours what it takes most of my colleagues
weeks to do, so I think I'll stick with R after all!
Lydia
On Mon, May 12, 2008 at 4:41 PM, Jorge Ivan Velez
[EMAIL PROTECTED] wrote:
Hi Lydia,
I
I assume you've looked at the NADA package(?) While I don't believe
it goes as far as dealing the mixed effects models, it might give you
a starting point, and possibly some additional references.
-Don
At 9:08 AM -0700 5/12/08, Bert Gunter wrote:
Dear R Fellow-Travellers:
What is your
Is there any built-in way to lexicographically compare two vectors of
the same length in R? The textbook algorithm could be coded as follows:
lex.cmp - function (vec1,vec2) {
for (j in 1:length(vec1)) {
if (vec1[j] vec2[j]) { return(-1) }
if (vec1[j] vec2[j]) { return(1) }
}
Hi, dear all,
I just switch to vista (ultimate) and have heard there is some problem
for the installation of xemacs on vista. Is there any insight or
experience that you could share? I really appreciate any input.
thank you so much!
__
On 5/12/2008 2:58 PM, Gabriel Valiente wrote:
Is there any built-in way to lexicographically compare two vectors of
the same length in R? The textbook algorithm could be coded as follows:
lex.cmp - function (vec1,vec2) {
for (j in 1:length(vec1)) {
if (vec1[j] vec2[j]) { return(-1) }
Bert Gunter gunter.berton at gene.com writes:
Dear R Fellow-Travellers:
What is your recommended way of dealing with a left-censored response
(non-detects) in (linear Gaussian) mixed effects models?
Your description of the data calls for a tobit model
Le lun. 12 mai à 15:15, Wensui Liu a écrit :
Hi, dear all,
I just switch to vista (ultimate) and have heard there is some problem
for the installation of xemacs on vista. Is there any insight or
experience that you could share?
Yes: go with GNU Emacs. There doesn't seem to be any compelling
Hello everybody,
I'm new to MCMClogit. I'm trying to use MCMClogit to fit a logistic
regression model but I got some warnings I can't understand.
My input data X is 32(tissue sample)*20(genes) matrix, each element in this
matrix corresponds to the expression value of one particular gene in
Hi,
I am using rpart as a part of my masters' project. I am trying to print out
the resulting model using plot() function along with text() function. I am
having difficulties with labels being cut-off. In text() function, I am
using use.n=T option to get the number of people in each nodes but
You probably want to look at Sweave in the utils package or the odfWeave
package.
Both let you set up a planned set of commands interspersed with text (notes,
explanations, full report, etc.) and then you process the file and get the
output (and commands) in either a LaTeX file or an
Stas, this doesn't solve your problem but may shed some light on what might
have gone wrong. Just recently I installed R 2.7.0 under openSuse 10.3 in a
brand new 64-bit Lenovo ThinkPad. The first install failed because of a
dependency error just like yours. It complained it couldn't find BLAS
Hello everybody,
I'm new to MCMClogit. I'm trying to use MCMClogit to fit a logistic
regression model but I got some warnings I can't understand.
My input data X is 32(tissue sample)*20(genes) matrix, each element in this
matrix corresponds to the expression value of one particular gene in one
Hello all,
I've been using the following qplot command:
qplot(pixX,pixY, data=som, geom=tile, fill=rgb) +
scale_fill_identity() + opts(aspect.ratio = .75) + facet_grid(unitX ~ unitY)
Now I would like to convert it into the explicit ggplot grammar, so I
can remove the extras: axes, labels,
Hello everybody,
I'm new to MCMClogit. I'm trying to use MCMClogit to fit a logistic
regression model but I got some warnings I can't understand.
My input data X is 32(tissue sample)*20(genes) matrix, each element in this
matrix corresponds to the expression value of one particular gene in one
Hello everybody,
I'm new to MCMClogit. I'm trying to use MCMClogit to fit a logistic
regression model but I got some warnings I can't understand.
My input data X is 32(tissue sample)*20(genes) matrix, each element in
this matrix corresponds to the expression value of one particular gene
in one
Wensui Liu wrote:
Hi, dear all,
I just switch to vista (ultimate) and have heard there is some problem
for the installation of xemacs on vista. Is there any insight or
experience that you could share? I really appreciate any input.
thank you so much!
Hi,
I don't know about XEmacs, but I am
Hello everybody,
I'm new to MCMClogit. I'm trying to use MCMClogit to fit a logistic
regression model but I got some warnings I can't understand.
My input data X is 32(tissue sample)*20(genes) matrix, each element in
this matrix corresponds to the expression value of one particular gene
in one
Sorry to bother your.
I am trying to post my question for more than 10 times, but I still
didn't see it.
It drives my crazy!!!
It is a test for posting some simple pure text.
Chao
__
R-help@r-project.org mailing list
Some answers are on the help pages for plot.rpart and text.rpart.
On Mon, 12 May 2008, Linus An wrote:
Hi,
I am using rpart as a part of my masters' project. I am trying to print out
the resulting model using plot() function along with text() function. I am
having difficulties with labels
Hi,
What's one way to convert an integer to a string with preceding 0's?
such that
'13' becomes '013'
to be put into a string
I've tried formatC, but they removes all the zeros and replace it with
blanks
Thanks
--
Regards,
Anh Tran
[[alternative HTML version deleted]]
Hello,
Could someone tell me what the SPLUS is.category function do and what is
its equivalent in R?
Thank you, I couldn't find any help elsewhere...
--
View this message in context:
http://www.nabble.com/is.category-tp1719p1719.html
Sent from the R help mailing list archive at
Thanks. formatC(flag) works.
But it's awefully slow. I try to do that for 65000 numbers (generating ID
for each item) and it seems like forever.
Is there any faster way?
Thank all.
Anh Tran
On Mon, May 12, 2008 at 2:36 PM, Uwe Ligges
[EMAIL PROTECTED] wrote:
Anh Tran wrote:
Hi,
Hi, I am do some plotting and need to add title to each of the plots, Can
anyone help me on how to add the variables to the title?
here it is the program, the title i want should look like, j=1, j=2..,
but if i use title(j=,j), the j will go to the x axis. Can anyone help me
on this?
thanka s
You probably should check this section in your R-help
subscription options (via
https://stat.ethz.ch/mailman/options/r-help/, I think):
Receive your own posts to the list?
Ordinarily, you will get a copy of every message you post to the list. If you don't want to receive this copy, set this
On May 12, 2008, at 5:22 PM, Anh Tran wrote:
Hi,
What's one way to convert an integer to a string with preceding 0's?
such that
'13' becomes '013'
to be put into a string
I've tried formatC, but they removes all the zeros and replace it with
blanks
formatC(13, width=10, format=d,
Anh Tran wrote:
Thanks. formatC(flag) works.
But it's awefully slow. I try to do that for 65000 numbers (generating ID
for each item) and it seems like forever.
On my not that recent laptop:
system.time(formatC(1:65000, width=10, flag=0))
user system elapsed
1.920.001.94
Anh Tran wrote:
Hi,
What's one way to convert an integer to a string with preceding 0's?
such that
'13' becomes '013'
to be put into a string
I've tried formatC, but they removes all the zeros and replace it with
blanks
Not so for me:
formatC(13, digits=10, flag=0)
Uwe LIgges
Yea, thanks all. I checked back and I got a few things mistyped.
The array is 650,000 and it took 25 seconds :p. It's acceptable. Just that I
had too many variable at the time I ran it.
Also, seems like sprintf is a little faster.
Thanks all.
Anh Tran
On Mon, May 12, 2008 at 2:55 PM, Uwe
I guess little means different things to different people:
x = sample(1:100,65,replace=TRUE)
system.time(a-formatC(x,digits=10,flag='0'))
user system elapsed
32.854 0.444 34.813
system.time(b-sprintf(%011d,x))
user system elapsed
0.352 0.012 0.363
If you look at the
On 13/05/2008, at 4:09 AM, Douglas Bates wrote:
I'm entering this discussion late so I may be discussing issues that
have already been addressed.
As I understand it, Federico, you began by describing a model for data
in which two factors have a fixed set of levels and one factor has an
That's what I ended up doing. I've had complaints about blas, too, but
I rpm-ed them out with --nodeps. I've compiled R from the sources (I
had to add some -devel- packages, too), and then copied over the
stats.*.so library from my fully successful 2.6.2 compilation to
semi-successful 2.7.0
Michael Kubovy wrote:
Perhaps
?mosaic
or
?mosaicplot
Thanks for these helpful suggestions - I will try them both out -
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
Just in case you think Vincent is pushing his distribution as opposed to
some other approach, let me endorse his suggestion as someone who has
recently made the change to GNU Emacs.
Vincent's distribution is truly very nice. I have installed it on Vista
without any problems and for anyone
Please read the docs (starting with An Introduction to R) . It is
unreasonable to expect to use command line based software without first
reading the how to manuals.
Also, and always, read the man pages: e.g. ?plot, ?plot.default and
appropriate links.
Finally, as a matter of etiquette, signed
1 - 100 of 103 matches
Mail list logo