Thanks for sharing the interesting information about cran2deb. I was
unaware of that project (but I did know that Dirk E. had been doing Octave
and R binaries for Debian for years). Dirk Eddelbuettel (you spelled his
name correctly) and Charles Blundell gave a talk at UseR! 2009...
On Thu, Mar 18, 2010 at 5:26 AM, Peng Cai pengcaimaill...@gmail.com wrote:
Thanks Richard and Jim for your reply!
@All:
Is there a way to do this without altering default x-labels (because in my
case there could be up to 30-40 x-labels and I may have to repeat the script
multiple times with
Thanks - that works
--
View this message in context:
http://n4.nabble.com/Date-conversion-issue-tp1596548p1597627.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
On 03/18/2010 04:05 PM, duncandonutz wrote:
I know one of R's advantages is it's ability to index, eliminating the need
for control loops to select relevant data, so I thought this problem would
be easy. I can't crack it. I have looked through past postings, but
nothing seems to match this
One approach is the following:
Dat - read.table(textConnection(
Jim A
BobA
BobC
Larry D
Alice C
Tom F
Tom D
Tom A
Alice B
NancyB))
closeAllConnections()
names(Dat) - c(name, act)
out - tapply(as.character(Dat$name), Dat$act, function
Here are two solutions. The first uses merge and the second uses
sqldf. They both do a self join picking off the unique pairs. The
sqldf solution also sorts the result:
# input
DF - structure(list(Actor = c(Jim, Bob, Bob, Larry, Alice,
Tom, Tom, Tom, Alice, Nancy), Act = c(A, A, C,
D, C, F, D,
Have a look at this presentation of Matthew Keller:
http://www.matthewckeller.com/Lecture1.ppt
Best regards,
Thierry
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek
team Biometrie Kwaliteitszorg
new_ns$chr - factor(new_ns$chr, levels=paste(1:22))
Soyeon Kim yunni0...@gmail.com 18/03/2010 00:57
Dear All,
My data looks like this
new_ns
chr nc_two nc_not_two
11488 58
22325114
33233 79
44200153
55239 53
Worik R wrote:
Related: I found the problem eventually. It was a parameter that was too
large and the function called stop.
Looking at the documentation I see I can supply my own error handler. Cool.
Are there already written error handlers that dump a stack trace?
See
Hello Again,
Doesn't anyone know where the problem might be? I could not get any more
information from the help page.
Many thanks
Best
Sergii
[R] question about multinom function (nnet)
* This message: [ Message body
http://tolstoy.newcastle.edu.au/R/e9/help/10/03/9009.html#start
Hi
r-help-boun...@r-project.org napsal dne 17.03.2010 18:01:50:
Building on the question how to replace NA with 0.
My data set below has date, station 1, flags for station 1, station 2,
flags
for station 2, etc...
I would like to make the values in the station columns equal to 1 and
I have never used - but I noticed at
http://github.com/jiho/r-utils/blob/master/beamer_colors.R
that some people do. In fact, the above-named code has a sort of elegance
about it (except for the use of = for assignment...). To my eye, - calls
to mind a type of assignment that
Hi,
there´s something that really bothers me about R and after hours and hours of
internet research, I´m still stuck with the same problem: I installed R and it
is in Spanish, as the system on my work. I would really like it in English and
there seems to be no way to change that!?! I´m
Hi petr,
Thanks for the reply.
My original data is in comma separated variable (csv) format with variable
names in column 1 and numeric data in the remaining columns. The read.csv
command reads this data set into object name pcrdata as a dataframe where
the variable names and numeric data are
Hi Michael
r-help-boun...@r-project.org napsal dne 18.03.2010 12:02:19:
Hi petr,
Thanks for the reply.
My original data is in comma separated variable (csv) format with
variable
names in column 1 and numeric data in the remaining columns. The
read.csv
command reads this data set into
I am trying to use nlme and coxme in one Sweave document. I have read the
thread in r-devel on the subject,
http://markmail.org/thread/snchg6ynofrzbf2v
and nlme::fixef works, but I did not understand what workaround to use when
I am calling a function in a package that I do not want to change.
Hi
r-help-boun...@r-project.org napsal dne 18.03.2010 11:16:26:
Hi,
there´s something that really bothers me about R and after hours and
hours of
internet research, I´m still stuck with the same problem: I installed R
and it
is in Spanish, as the system on my work. I would really
G'day Katharina,
On Thu, 18 Mar 2010 11:16:26 +0100
Katharina Gerstendorf katharin...@hotmail.com wrote:
there_s something that really bothers me about R and after hours and
hours of internet research, I_m still stuck with the same problem:
And during these hours of research you did not come
You haven't told us your OS, so it is probably Windows ...
This is an FAQ, specifically
http://cran.r-project.org/bin/windows/base/rw-FAQ.html#I-want-R-in-English_0021
Since you seem to be unfamiliar with FAQs, there is a lot more useful
information there, and the posting guide asked you to
On 18/03/2010 6:16 AM, Katharina Gerstendorf wrote:
Hi,
there´s something that really bothers me about R and after hours and hours of
internet research, I´m still stuck with the same problem: I installed R and it
is in Spanish, as the system on my work. I would really like it in English
On 18/03/2010 7:08 AM, Dan Kelley wrote:
I have never used - but I noticed at
http://github.com/jiho/r-utils/blob/master/beamer_colors.R
that some people do. In fact, the above-named code has a sort of elegance about it (except for
the use of = for assignment...). To my eye, -
Dear Paul,
There are links to materials from two R courses that I taught fairly recent
on my home page at http://socserv.mcmaster.ca/jfox/, and I always keep
links to course materials there.
Regards,
John
John Fox
Senator William McMaster
Professor of Social
- is usually only used when you suddenly remember you wanted to keep
result of a computation, especially in the days before command-line
editors were universal.
fn(a,b) ... oh I'd better keep that ... - z
On Thu, 18 Mar 2010, Dan Kelley wrote:
I have never used - but I noticed at
Hi
as you did not provide data it is hard to say what is wrong.
You can see that it is working on dates similar what you described.
test - data.frame(x=letters[1:10], y=rnorm(10), z=runif(10))
test
x y z
1 a 0.09980806 0.32211567
2 b 0.70559139 0.32204076
3 c
ya it looks like you can't use predict to take in data.
In general you could do the following:
fit a model to n-(prediction sample set length). Then use the predict
function to do a 1 step forward forecast. Test to see how close it is to the
actual 1 value ahead.
Then train your model on
I have a function that take a variable number of arguments, each of which
must be a vector.
Is there a way to unbind a matrix that would pass the columns as vectors?
Myfunc-function(...) {
[My code]
}
Myfunc(z[,1],z[,2]) works
but Myfunc(z[,1:2]) is passing a submatrix
Is there something
Hi, i have 8.10 Ubuntu, R version 2.7.1 on 64 bit pc. I install packages
fine, but when i try to do install.packages(debug) i get error message
package 'debug' is not available
Does this package exist for Ubuntu?
--
View this message in context:
Thank! This worked great!
--
View this message in context:
http://n4.nabble.com/how-to-take-multiple-subsets-from-a-matrix-tp1597411p1597899.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
Hi everyone,
I have a response matrix (y) and two predictor matrices (x.a, x.b), how
should i proceed if i want to regress y on x.a and x.b column by column?
To be specific, what i want to do is:
y[,1]~x.a[,1]+x.b[,1]
y[,2]~x.a[,2]+x.b[,2]
.
.
.
I have tried lm(y~x1+x2) but it does not work as
Hello R:
i work on an IRT simulation research. I've written a code to generate a
single dataset.As i will repeat simulating the data 100 times under every
condition, how can i write the R code to make it run the single simulation
code 100 times and save the generate results each time?
zerdna azege at yahoo.com writes:
Hi, i have 8.10 Ubuntu, R version 2.7.1 on 64 bit pc. I install packages
fine, but when i try to do install.packages(debug) i get error message
package 'debug' is not available
Does this package exist for Ubuntu?
Your problem is probably R 2.7.1
?c
On Mar 18, 2010, at 8:39 AM, ManInMoon wrote:
I have a function that take a variable number of arguments, each of
which
must be a vector.
Is there a way to unbind a matrix that would pass the columns as
vectors?
Myfunc-function(...) {
[My code]
}
Myfunc(z[,1],z[,2]) works
try this:
y - matrix(rnorm(100*100), 100, 100)
x.a - matrix(rnorm(100*100), 100, 100)
x.b - matrix(rnorm(100*100), 100, 100)
M - ncol(y)
models - vector(list, M)
for (m in 1:M) {
Dat - data.frame(y = y[, m], x.a = x.a[, m], x.b = x.b[, m])
models[[m]] - lm(y ~ ., data = Dat)
}
Moreover
Thanks Marsh,
I'll look in to those references.
MS
--
View this message in context:
http://n4.nabble.com/Help-with-calculating-entropy-of-data-tp1593954p1597963.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org
On 17.03.2010 00:16, Xanthe Walker wrote:
Hi,
I have successfully completed a PCA and printed the loadings, however,
numerous values are blank. I know that this means the values are just very
small but not equal to zero.
Is there a way to print out the loadings, including the very small
Try this:
mapply(function(y, x, z)lm(y ~ x + z), as.data.frame(y),
as.data.frame(x.a), as.data.frame(x.b), SIMPLIFY = FALSE)
On Thu, Mar 18, 2010 at 8:35 AM, Frederick Ho cres...@gmail.com wrote:
Hi everyone,
I have a response matrix (y) and two predictor matrices (x.a, x.b), how
should i
I am trying to un-c...
--
View this message in context:
http://n4.nabble.com/unbind-matrix-tp1597887p1597987.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
IIs there an equivalent of cumsum for a matrix? i.e cumsum is applied to each
column ?
--
View this message in context:
http://n4.nabble.com/cumsum-for-matrix-tp1597985p1597985.html
Sent from the R help mailing list archive at Nabble.com.
__
Did you try it?
On Mar 18, 2010, at 10:03 AM, ManInMoon wrote:
I am trying to un-c...
--
View this message in context:
http://n4.nabble.com/unbind-matrix-tp1597887p1597987.html
Sent from the R help mailing list archive at Nabble.com.
__
On Thu, Mar 18, 2010 at 6:26 AM, Dieter Menne
dieter.me...@menne-biomed.de wrote:
I am trying to use nlme and coxme in one Sweave document. I have read the
thread in r-devel on the subject,
http://markmail.org/thread/snchg6ynofrzbf2v
and nlme::fixef works, but I did not understand what
Hi ManInMoon,
Perhaps the following apply(yourmatrix, 2, cumsum, na.rm = TRUE) ? See
?cumsum and ?apply for more information.
HTH,
Jorge
On Thu, Mar 18, 2010 at 10:01 AM, ManInMoon wrote:
IIs there an equivalent of cumsum for a matrix? i.e cumsum is applied to
each
column ?
--
Hello Everyone,
At last count, I had 14 responses to my question. Thanks very much to everyone
who replied, for helping me to understand that R is in fact capable of making
publication quality tables and is very flexible in rendering these outputs. I'm
still working my way through some of the
I think I may have figured out what you _might_ have meant. An example
would have speeded this process up considerably. Try:
apply(mtx, 2, function) # perhaps within the MyFunc ... that you also
did not provide.
--
David.
On Mar 18, 2010, at 10:03 AM, ManInMoon wrote:
I am trying to
Dear all,
i am looking for a possibility to use two lines in the same plot with different
scales. i.e the standard y-axis should represent the line created by vector x
and the vertical line vice versa should be used as a second y-axis for the plot
of vector y. I´ve seen that often,
I have a data frame containing the Id, Mother, Father and Sex from about
10,000 animals in our colony. I am interested in graphing simple family
trees for a given subject or small number of subjects. The basic idea is:
start with data frame from entire colony and list of index animals. I need
In some sense you _are_ in the wrong list because there is a strong
opposition to that presentation strategy, but there are plenty of
worked examples in the archives and I believe that some plotting
functions in plotrix will also do this, twoord.plot perhaps?
On Mar 18, 2010, at 10:40 AM,
David,
A quick correction. I have been posting for less than one month (my first
posting was Mar 5, verify if so inclined). Thank you for making me aware of
dput and dump capabilities, I will use them in future posts. Secondly, I would
assume that all of us are either directly or indirectly
I read the post
http://n4.nabble.com/Error-setting-rowname-if-rowname-currently-NULL-td794579.html#a794579
where it says that the problem is that
dimnames(acuracia) is Null -equivalent to rownames(fred) is NULL (in the
post)
Then I tried to define all the dimnames first as random names to be
Maybe this is what you are searching for:
2-Y-axes on same plot
https://stat.ethz.ch/pipermail/r-help/2008-December/182374.html
Best regards,
Christian
Bunny, lautloscrew.com wrotes:
Dear all,
i am looking for a possibility to use two lines in the same plot with different
scales. i.e the
Hello.
Until today I've been using R2.9 and since today R2.10 (on a PC).
In both of them it takes about 20 sec for the prompt to appear IN R
console after I start R. And every time it says: Previous saved work
space restored - even if I have not saved any workspace or, in case
of R2.10 - even
thx everybody. The twoord.plot from the plotrix packages just helped !
Sometimes you just don´t find what you´re looking for - even if it is that
simple...
On 18.03.2010, at 15:59, Christian Ruckert wrote:
Maybe this is what you are searching for:
2-Y-axes on same plot
Someone gave me a tip - it turns out I accidentally saved a workspace
in the directory R opens in and forgot about it.
I deleted it and my problem was solved.
Dimitri
On Thu, Mar 18, 2010 at 11:08 AM, Dimitri Liakhovitski ld7...@gmail.com wrote:
Hello.
Until today I've been using R2.9 and since
Dear all,
I am still a R apprentice... Apologies for the basic question.
I am trying to reshape a dataframe based on the order of two variables
(a character variable and a numerical variable). To simplify it,
consider the following dataframe
df-data.frame(id=c(b,b,a,a,a),ord=c(2,1,1,3,2))
id
Dear R users,
I'm running R version 2.10.1.
I tried installing the Cairo package and I got the
following message:
* installing *source* package Cairo ...
checking for gcc... gcc -std=gnu99
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
I have--no-save --no-restoreon my startup of R since I only
save/load explicitly what I want.
On Thu, Mar 18, 2010 at 11:24 AM, Dimitri Liakhovitski ld7...@gmail.comwrote:
Someone gave me a tip - it turns out I accidentally saved a workspace
in the directory R opens in and forgot
How do I get a number representing a date from a POSIXct i.e. removing the
time elements?
--
View this message in context:
http://n4.nabble.com/how-to-return-date-part-of-POSIXct-tp1598109p1598109.html
Sent from the R help mailing list archive at Nabble.com.
try this:
df
id ord
1 b 2
2 b 1
3 a 1
4 a 3
5 a 2
df[order(df$id, df$ord),]
id ord
3 a 1
5 a 2
4 a 3
2 b 1
1 b 2
On Thu, Mar 18, 2010 at 11:27 AM, Duarte Viana viana.s...@gmail.com wrote:
Dear all,
I am still a R apprentice... Apologies for the basic
Sorry David,
Here's cut down version of my function - real version does some fancy plot
formatting.
I have found a way round my problem because cbind will bind vectors and
matrices into a single matrix, which I can work with. It is not the answer I
was looking for - but it does the job.
Many
Does one of these work for you:
x - as.POSIXct('2010-03-18 12:15')
x
[1] 2010-03-18 12:15:00 EDT
unclass(x)
[1] 1268928900
attr(,tzone)
[1]
as.vector(x)
[1] 1268928900
On Thu, Mar 18, 2010 at 11:18 AM, ManInMoon xmoon2...@googlemail.comwrote:
How do I get a number representing a date
Hello Duarte,
It seems that order is what you are looking for :
df - df[order(df$id, df$ord), ]
Regards,
François
-Message d'origine-
De : r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] De la
part de Duarte Viana
Envoyé : jeudi 18 mars 2010 16:27
À : r-help
Objet :
On Mar 18, 2010, at 11:37 AM, jim holtman wrote:
Does one of these work for you:
x - as.POSIXct('2010-03-18 12:15')
x
[1] 2010-03-18 12:15:00 EDT
unclass(x)
[1] 1268928900
attr(,tzone)
[1]
as.vector(x)
[1] 1268928900
I was guessing he wanted:
x - as.POSIXct('2010-03-18 12:15')
Convert your matrix to a data frame and use do.call().
?do.call
do.call(Myfunc, data.frame(yourMatrix))
You need to do the data frame conversion because do.call wants the arguments
as a list and a data frame **is** a list (the columns are the list members)
with a dim attribute (+ others).
Bert
result - lapply(1:100, yourFunction)
On Thu, Mar 18, 2010 at 9:05 AM, Helena helenaguchen...@hotmail.com wrote:
Hello R:
i work on an IRT simulation research. I've written a code to generate a
single dataset.As i will repeat simulating the data 100 times under every
condition, how can i
Dear R-users,
I'd like to announce the release of the new version of package JM (soon
available from CRAN) for the joint modelling of longitudinal and
time-to-event data using shared parameter models. These models are
applicable in mainly two settings. First, when focus is in the
Hi, Does anyone know of an existing package that will output to rtf?
Something along the lines of pdf(ds,'file.pdf') or write.csv(ds,'file.csv').
Thanks,
//
// Alex Bryant
// Software Developer
// Integrated Clinical Systems, Inc.
// 908-996-7208
# Dear List,
# I want to characterize a time series according to its Quarter components.
# My data (a.ts:
http://docs.google.com/View?id=dfvvwzr2_478cr9k4cdb) look like:
# Qtr1 Qtr2 Qtr3 Qtr4
# 1948 -0.0714961837 0.0101747827 0.0654816569
Hi All,
I need a file which I can import to MS Word, I'm trying win.metafile(), but
it does not seem to support multiple print commands at once (please see
below). Is there an alternative to get plots file which can be used in
powerpoint/word?
# R code:
# this does not work; but same thing works
Dear R users,
I am experiencing a problem, I am trying to merge two matrices composed like
this:
Matrix1 :
Col1 datetime // Col2 Data1
Matrix2:
Col1 datetime // Col2 Data2
The datetime are matching most of the time, but on both matrices, there are
some values missing, and this generates a
?win.metafile
For win.metafile only one plot is allowed per file, and Windows seems to
disallow reusing the file. So the *only* way to allow multiple plots is to
use a parametrized filename as in the example.
win.metafile(Rplot%02d.wmf, pointsize = 10)
Notice the %02d in the file name.
On Thu,
Alla Bulashevska wrote:
Dear R users,
I'm running R version 2.10.1.
I tried installing the Cairo package and I got the
following message:
* installing *source* package Cairo ...
{snip}
checking cairo.h usability... no
checking cairo.h presence... no
checking for cairo.h...
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.htmlhttp://www.r-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
example data would be useful.
Try 'merge' and the post processing of the data, but with no data, no idea
of
Dear Gabor, Arne, Ravi, R users,
I am firstly trying the maximum likelihood approach, then will try the
Bayesian approach.
The likelihood function, and the log likelihood function, will depend on
the pdf of the error e in the formula:
y=f(theta*x)+e
Now let's say that e is Gaussian
I am trying pairwise t-test with thousands of genes in different sample group
so I am trying some code like:
for (i in 1:length(GENE)){
array[i]-pairwise.t.test(AGE6TTEST[[GENE[i]]],Lable,p.adj=fdr)
}
I want to put the output in an array list, then I can check them, but seems
I have the
You are right David - I found the as.Date by myself eventually(must be
getting better at this!)
But unclass is new to me - thanks very much
--
View this message in context:
http://n4.nabble.com/how-to-return-date-part-of-POSIXct-tp1598109p1598250.html
Sent from the R help mailing list archive
Please find release 1.0.0 of the new CRAN package spikeslab now
available for download. Thank you.
-
RELEASE 1.0.0 is the first and initial release of this package.
Fits a rescaled spike and slab model using a
-Original Message-
From: r-help-boun...@r-project.org
[mailto:r-help-boun...@r-project.org] On Behalf Of Jim Lemon
Sent: Thursday, March 18, 2010 1:33 AM
To: duncandonutz
Cc: r-help@r-project.org
Subject: Re: [R] Using indexing to manipulate data
On 03/18/2010 04:05 PM,
Hello jim, thank you for your quick answer!
Here is an example:
*TIME1**DATA1* *TIME2 DATA2*
2 14:38:00 1.07212 14:38:00 1.51339
3 *14:40:00 1.07195 14:39:00 1.51330*
4 14:41:00 1.07218 14:40:00 1.51335
5 14:42:00 1.07246 14:41:00 1.51326
6
Try this:
lm(a.ts ~ factor(cycle(a.ts)) - 1)
On Thu, Mar 18, 2010 at 12:30 PM, Len Vir len...@gmail.com wrote:
# Dear List,
# I want to characterize a time series according to its Quarter components.
# My data (a.ts:
http://docs.google.com/View?id=dfvvwzr2_478cr9k4cdb) look like:
#
On Thu, 18 Mar 2010, Gabor Grothendieck wrote:
Try this:
lm(a.ts ~ factor(cycle(a.ts)) - 1)
An equivalent but somewhat more convenient interface is available in
dynlm where you can say dynlm(a.ts ~ season(a.ts)) or
dynlm(a.ts ~ season(a.ts) - 1):
R dynlm(a.ts ~ season(a.ts))
Time series
So I have a list variable, and each item has a name. Is it possible to
return just the names in the list and not the contents of each one?
Example:
Currently, if I have a list variable matrices, and it contains 3
matrices, M1, M2, and M3, if I type:
matrices, R returns $M1 - listing of numbers
Robert M. Flight wrote:
So I have a list variable, and each item has a name. Is it possible to
return just the names in the list and not the contents of each one?
Example:
Currently, if I have a list variable matrices, and it contains 3
matrices, M1, M2, and M3, if I type:
On Mar 18, 2010, at 1:12 PM, Robert M. Flight wrote:
So I have a list variable, and each item has a name. Is it possible to
return just the names in the list and not the contents of each one?
?names
Example:
Currently, if I have a list variable matrices, and it contains 3
matrices, M1,
On Thu, 18 Mar 2010, Ben Bimber wrote:
I have a data frame containing the Id, Mother, Father and Sex from about
10,000 animals in our colony. I am interested in graphing simple family
trees for a given subject or small number of subjects. The basic idea is:
start with data frame from entire
Dear List,
I'm getting the error: object of type 'closure' is not subsettable
And am not sure how to get around the problem. I've included two
short code sets below. One that shows what I want to do and works,
but without using the function much, and another that tries to use the
function but
Hi Jim, thank you for your reply.
Apart from win.metafile(), is there some other function available which can
handle multiple prints or par(mfrow=c(2,2)) command and eventually can be
used in powerpoint/word. thanks,
Kim
On Thu, Mar 18, 2010 at 12:42 PM, jim holtman jholt...@gmail.com wrote:
Hi, Does anyone know of an existing package that will output to rtf?
Something along the lines of pdf(ds,'file.pdf') or write.csv(ds,'file.csv').
You could use odfWeave and then use OpenOffice to generate an RTF
file.
Regards,
Tom
__
Thank you!
I did not know about this resource.
Caveman
On Thu, Mar 18, 2010 at 6:26 AM, David Winsemius dwinsem...@comcast.net wrote:
On Mar 18, 2010, at 12:03 AM, Orvalho Augusto wrote:
Dears!
I have a system that generates links on a https webserver.
I have to be logged on with a
Dear all,
merge.zoo produces duplicated time indexes in the example stated below.
Can anybody explain, what I am doing wrong?
Many thanks!
Jan
(R 2.10.0, WindowsXP)
require(chron)
require(zoo)
# create time series (zoo.ts) with no data from 31Aug2009 14:50 to
3Sep2009 7:25
t.st -
Hi All,
I'm trying to get following but not successfully:
# this works okay
ylab=expression(PM2.5 Concentration (*mu*g/m^3*))
# But I need 2.5 as a subscript to PM and below this an additional line
saying some text, like.
ylab=expression(PM[2.5] Concentration (*mu*g/m^3*)\n(random text in
Dear List,
For what I understand, strptime() simply converts from one class
representation to another; i.e., from character to POSIXct/POSIXlt.
One strange feature of this command running on Linux is that there are
repeated calls to system time (as was revealed in a trace of system
calls),
Try this:
par(mar = c(5.1, 6, 4, 2))
plot(1, ylab = '')
mtext(expression(PM[2.5] ~ Concentration ~(mu*g/m^3)), side = 2, line = 4)
mtext((random text in brackets), side = 2, line = 3, cex = 0.8)
On Thu, Mar 18, 2010 at 3:02 PM, Peng Cai pengcaimaill...@gmail.com wrote:
Hi All,
I'm trying to
It depends on what you want them for. With win.metafile, what is the
problem with multiple files? You can still include them in
powerpoint/word. If you want it in one file, then use PDF and you can
cut/paste the graph from the pages that you want. I typically create a PDF
file if I have a
It looks like a timezone issue, and it's causing confusion to me at least.
My original data:
gmt -
c(19880101 , 19880101 0100, 19880101 0300, 19880101 0400,
19880101 0500, 19880101 0600)
These were converted to local dates/times with
akst-strptime(gmt,format=%Y%m%d %H%M)-(3600*9) # because I
xyplot(1:10 ~ 1:10, ylab=list(expression(atop(PM[2.5] ~ Concentration ~
frac(mu*g,m^3),(random text in brackets, crt=90)
See ?plotmath for atop and many more functions
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing
indiv - LETTERS[1:4]
for(i in seq_along(indiv)) assign(indiv[i], rnorm(10))
A
[1] -0.4140121 -0.8506043 -1.6704603 -0.3153009 1.9337826 -0.7736769
[7] -0.7906979 0.6925713 2.4678820 0.3889229
B
[1] -0.03521033 -0.01071611 -0.74209425 1.36974281 -1.22775441 0.29621976
[7] 0.28208192
Dear R helpers,
I would like to write a loop that makes 4 objects (called A, B, C, and D)
each of which contains ten random numbers.
This attempt:
individuals-c(A,B,C,D)
for(i in 1:length(individuals)) {
individuals[i]-rnorm(10)
}
does not work because individuals[i] is not the proper way to
It occurs because the two series have times that are slightly
different. For example, it may appear that the times at positions 909
and 910 are the same but in fact they are different:
tt - time(zoo.ts.cor)[909:910]; tt
[1] (03/09/09 12:30:00) (03/09/09 12:30:00)
diff(as.numeric(tt))
[1]
David -
I think what you're looking for is something like this:
mydat = data.frame(a=c(1,2,3),b=c(5,1,4))
consolidate.fun = function(data,var1,var2,saved.max){
+data$saved.max = apply(data[,c(var1,var2)],1,max)
+data[,var1] = NULL
+data[,var2] = NULL
+data
+ }
mydat =
better yet consider using a list:
result - list()
individuals-c(A,B,C,D)
for (i in individuals) result[[i]] - runif(10)
result
$A
[1] 0.61464497 0.55715954 0.32877732 0.45313145 0.50044097 0.18086636
0.52963060 0.07527575 0.27775593 0.21269952
$B
[1] 0.28479048 0.89509410 0.44623532
Many thanks to everyone who helped me solve this problem.
I think I must have described my problem poorly, but Phil, Patrick and Jim
were able to see through the haze and suggest that I use a list to contain
the output from my loop. This solution works very well.
Thanks again for your help, Mark
1 - 100 of 157 matches
Mail list logo