Re: [R] outputing text colors

2010-03-18 Thread Jim Lemon
On 03/19/2010 12:37 PM, rtist wrote: Hi all, I was wondering if there is a way to output text tables with the color of the text corresponding to a condition. More specifically, I"m outputting an time series table and want the console colors to be green>0 and red<0. This is very easy to do in e

[R] OT: Import HTML, was Re: How good is R at making publication quality tables?

2010-03-18 Thread Johannes Huesing
Jim Lemon [Wed, Mar 17, 2010 at 11:43:21PM CET]: [...] > All > of the word processing packages that I use can directly import HTML > documents, and the result has been good enough for any application > so far. I have only MS Word as work and failed to import HTML so far (sometimes succeeded wi

Re: [R] outputing text colors

2010-03-18 Thread Peter Alspach
Tena koe Perhaps the thread started earlier this week ([R] How good is R at making publication quality tables?) would help you. HTH Peter Alspach > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > project.org] On Behalf Of rtist > Sent: Friday, 19

[R] chron package install fail in intel I7 - fedora 12

2010-03-18 Thread Juan Santiago Ramseyer
install packages chron fail in Fedora 12, cpu I7/860 See down. Regard, Juan S. Ramseyer. > install.packages() Loading Tcl/Tk interface ... done --- Please select a CRAN mirror for use in this session --- Warning in install.packages() : argument 'lib' is missing: using '/usr/lib64/R/library'

Re: [R] One main title and One legend for multiple lattice plots

2010-03-18 Thread Kim Jung Hwa
Hi David, Thank you for your reply. I'm sorry if I've misconveyed my question: here it goes again: *** I want a common "main title" and a common "legend" after I output/print four different lattice plots on a single .wmf or .pdf file*** Somewhat as in this image: http://www.ncl.ucar.edu/Training

[R] How to plot two cumulative frequency graph together

2010-03-18 Thread Gundala Viswanath
Dear masters, I have data that looks like this: #val Freq1 Freq2 0.000 178 202 0.001 4611 5300 0.002 99 112 0.003 26 30 0.004 17 20 0.005 15 20 0.006 11 14 0.007 11 13 0.008 13 13 ...many more lines.. Full data can be found here: http://dpaste.com/173536/plain/ What I intend to do is to have a

[R] Maximum Data Size that works in RPART Routine

2010-03-18 Thread Ying Huang
Hi there, Can some R guru advise the maximum data size ( e.g. > 100MB but <500 MB) that can be handled in RPART routine? I am running 32-bit R on 64 bit version of Windows. Thank you very much for your help! Ying [[alternative HTML version deleted]]

Re: [R] One main title and One legend for multiple lattice plots

2010-03-18 Thread David Winsemius
On Mar 18, 2010, at 10:10 PM, Kim Jung Hwa wrote: Hi All, Can anyone please help me with getting a "single title" and "legend" for both the plots in the following R code. I'll eventually be using .wmf file. This is either incredibly simple or you have not explained what you reall want.

[R] lmer: mixed effects models: predictors as random slopes but not found in the fixed effects?

2010-03-18 Thread Hamish and Joy Wilman
Hello all, I using lmer to develop a mixed effects model. I start with an overly parameterized model (as suggested in Zuur et al. Mixed Effects Models and Extension in Ecology with R) that looks something like this: m1 <- lmer( Y ~ aS + bS + c + d + e + (c|SpeciesId) + (d|SpeciesId) + (e|Speci

[R] One main title and One legend for multiple lattice plots

2010-03-18 Thread Kim Jung Hwa
Hi All, Can anyone please help me with getting a "single title" and "legend" for both the plots in the following R code. I'll eventually be using .wmf file. # R code: library(lattice) p1 <- xyplot(decrease ~ treatment, OrchardSprays, groups = rowpos, type = "a", main="Same title / legend",

Re: [R] multiple print commands in win.metafile()

2010-03-18 Thread Kim Jung Hwa
Nothing wrong with that, its working fine... thanks a lot! Kim On Thu, Mar 18, 2010 at 2:16 PM, jim holtman wrote: > 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

Re: [R] Please Post Planned Contrasts Example in lme {nlme}

2010-03-18 Thread Tobias Verbeke
Hi Martin, Martin Turcotte wrote: Hi I am running some linear and non-linear mixed effect models and would like to do some planned contrasts (a priori contrasts) I have looked in the help and in many forums and it seems possible to do so but don't understand how to write the function and I cou

[R] outputing text colors

2010-03-18 Thread rtist
Hi all, I was wondering if there is a way to output text tables with the color of the text corresponding to a condition. More specifically, I"m outputting an time series table and want the console colors to be green>0 and red<0. This is very easy to do in excel using conditional formatting. Any

[R] error in map library

2010-03-18 Thread Nilza BARROS
Dear Ruser, > > > I am trying to use the map library. But unfortunately I am facing the > warning message above: > Warning message: > *In readGDAL(destfile, silent = TRUE) : GeoTransform values not available > * I want to use that library because I intend to plot some station in a Brazilian map.

Re: [R] can I rotate a matrix

2010-03-18 Thread Steve Taylor
How about this for a more generalised matrix rotation function (works with 1-column and 1-row matrices too) ... rotate = function(mat) t(mat[nrow(mat):1,,drop=FALSE]) >>> From: To: Date: 19/Mar/2010 10:15a Subject: Re: [R] can I rotate a matrix > Now that *is* neat! Thanks! Unfortunately, i

Re: [R] recommendations on use of -> operator

2010-03-18 Thread Emmanuel Charpentier
Le jeudi 18 mars 2010 à 15:49 -0400, Duncan Murdoch a écrit : > On 18/03/2010 3:10 PM, Emmanuel Charpentier wrote: > > An old (Lisp ? C ?) quote, whose author escapes me now, was : > > > > "syntactic sugar causes cancer of the semicolon" > > > > .. but nowadays semicolons are rarely used in "real

Re: [R] probable timezone confusion with as.yearmon

2010-03-18 Thread Gabor Grothendieck
No, its not documented in the released version of zoo but it is in the development version of zoo. There is more on time date classes in R News 4/1. On Thu, Mar 18, 2010 at 7:47 PM, Peter Keller wrote: > > Thanks, that clears that up. > > Is this behavior documented in the help?  I've looked, bu

Re: [R] probable timezone confusion with as.yearmon

2010-03-18 Thread Peter Keller
Thanks, that clears that up. Is this behavior documented in the help? I've looked, but didn't see anything which noted a conversion to GMT. Perhaps I just don't understand the different time methods, which is entirely possible since I'm a relative beginner. Peter -- View this message in co

[R] Creating Rcpp RcppDatetime from string with millisecond

2010-03-18 Thread R_help Help
Hi, I was trying to generate RcppDatetime from a string. The main problem for me is that my string contains millisecond. I saw that RcppDatetime takes in double of seconds since epoch. I try to generate a double using boost but has no success. I'm wondering if you have any sample snippet? The str

Re: [R] Count of entries in a row of a data frame

2010-03-18 Thread Phil Spector
Thomas - Two ways that come to mind are apply(dat,1,function(x)sum(x != 0)) and rowSums(dat!=0) (assuming your data frame is named "dat"). - Phil Spector Statistical Computing Facility

Re: [R] How to read.table with “Hebrew” c olumn names (in R)?

2010-03-18 Thread William Dunlap
My test was on Windows XP. On an old Linux distro I have access to (Ubuntu 8.04.3 hardy) it does work better, although the putty terminal emulator (on the Windows side) reverses all the lines containing any Hebrew text (pushing them against the right edge of the terminal window). When I look at y

[R] Count of entries in a row of a data frame

2010-03-18 Thread Thomas Jensen
Dear R-list, I have data in the following format: Country 1 Country 2Country 3 ... 1 0 10 2 1 02 3 0 10 Now I would like to create a variable that counts every

Re: [R] Imported tables from Access 2007

2010-03-18 Thread Ryan Utz
David, Thanks for responding. You were right; I misplaced a backspace (\) with a forward space (/) in my posting. The c:\ doesn't actually work; in my true code there is a forward space. Anyway, the results of str(data) appears as follows: 'data.frame': 90 obs. of 9 variables: $ Fish (PCOrd)

Re: [R] Imported tables from Access 2007

2010-03-18 Thread David Winsemius
On Mar 18, 2010, at 7:04 PM, David Winsemius wrote: (I am attaching your original question so it will be easier for me and those who choose to comment further,) Hi all, I am very new to R and I'm trying to import data from Microsoft Access. So far, I've managed to do so successfully usi

Re: [R] probable timezone confusion with as.yearmon

2010-03-18 Thread Gabor Grothendieck
as.yearmon converts relative to GMT. If you want something else convert it to character first: as.yearmon(format(...)) On Thu, Mar 18, 2010 at 2:20 PM, Peter Keller wrote: > It looks like a timezone issue, and it's causing confusion to me at least. > > My original data: > gmt <- > c("19880101

Re: [R] Imported tables from Access 2007

2010-03-18 Thread David Winsemius
(I am attaching your original question so it will be easier for me and those who choose to comment further,) Hi all, I am very new to R and I'm trying to import data from Microsoft Access. So far, I've managed to do so successfully using the following code: testdb <- file.path("c:\Databse

Re: [R] How to read.table with “Hebrew” column names (in R)?

2010-03-18 Thread Ista Zahn
Seems to work fine on my machine: > data1 <- read.table("http://www.talgalili.com/files/aa.txt";, + header = TRUE, sep = "\t", encoding="UTF-8", check.names=FALSE) > data1 אחת שתיים שלוש 1 12976 2 123 354 44 3 6 13 > colnames(data1) [1] "אחת" "שתיים" "שלוש" > colna

Re: [R] How to read.table with “Hebrew” c olumn names (in R)?

2010-03-18 Thread William Dunlap
I tried this on R 2.11.0 unstable (2010-03-07 r51225) using encoding="UTF-8" and check.names=FALSE in read.table(). It seemed to basically work, except that the data.frame/matrix printing routine wants to print the Unicode codes for the characters in the names: > data1 <- read.table("http://www

Re: [R] merge.zoo produces non unique chron time series

2010-03-18 Thread Gabor Grothendieck
Here is a shorter and improved version: # 2 Rnd <- function(x) { time(x) <- trunc(time(x), "sec") x } zoo.ts.cor.2 <- merge.zoo(Rnd(zoo.ts.pot), Rnd(zoo.ts)) # 3 MATCH.times <- function(x, table, nomatch = NA, ...) match(trunc(x, "sec"), trunc(table, "sec"), nomatch = nomatch, ...)

Re: [R] recommendations on use of -> operator

2010-03-18 Thread RICHARD M. HEIBERGER
PL1 used semi-colons, therefore so does SAS (Yes, SAS was originally written in PL1). [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://

[R] Please Post Planned Contrasts Example in lme {nlme}

2010-03-18 Thread Martin Turcotte
Hi I am running some linear and non-linear mixed effect models and would like to do some planned contrasts (a priori contrasts) I have looked in the help and in many forums and it seems possible to do so but don't understand how to write the function and I couldn't find an example in Pinheiro a

Re: [R] Rcmdr plugins produce error

2010-03-18 Thread John Fox
Dear Robert, I don't know what specifically produced the problems that you encountered, but it's perfectly possible for Rcmdr plug-ins to be incompatible with each other: For example, one plug-in could remove a menu to which another tries to add an item. As to the Rcmdr detecting the errors or rec

Re: [R] Imported tables from Access 2007

2010-03-18 Thread David Winsemius
On Mar 18, 2010, at 5:43 PM, David Winsemius wrote: On Mar 18, 2010, at 4:46 PM, Ryan Utz wrote: Hi all, I am very new to R and I'm trying to import data from Microsoft Access. So far, I've managed to do so successfully using the following code: testdb <- file.path("c:\Databse.accdb")

Re: [R] Imported tables from Access 2007

2010-03-18 Thread David Winsemius
On Mar 18, 2010, at 4:46 PM, Ryan Utz wrote: Hi all, I am very new to R and I'm trying to import data from Microsoft Access. So far, I've managed to do so successfully using the following code: testdb <- file.path("c:\Databse.accdb") I am surprised that worked. I was under the impression

[R] How to read.table with “Hebrew” column names (in R)?

2010-03-18 Thread Tal Galili
(I am reposting this question after a few months without a solution...) Hi all, I am trying to read a .txt file, with Hebrew column names, but without success. I uploaded an example file to: http://www.talgalili.com/files/aa.txt And tried the command: read.table("http://www.talgalili.com/file

Re: [R] Locating an error

2010-03-18 Thread Worik R
Thank you everybody for your help. I am sure using the information you provided I'll be able to do better than my current approach of using "cat" to trace my programmes! cheers Worik [[alternative HTML version deleted]] __ R-help@r-project.org

[R] Imported tables from Access 2007

2010-03-18 Thread Ryan Utz
Hi all, I am very new to R and I'm trying to import data from Microsoft Access. So far, I've managed to do so successfully using the following code: testdb <- file.path("c:\Databse.accdb") channel2 <- odbcConnectAccess2007(testdb) data.table <- sqlFetch(channel2,"data") This successfully imports

[R] Rcmdr plugins produce error

2010-03-18 Thread Robert Baer
I recently updated all my plugins, and for the fun of it, I added ALL the Rcmdr Plugins to my collection to see what functionality might exist. I started Rcmdr and loaded ALL the available Plugins from to the Rcdmdr Tools menu. To my suprise Rcmdr produced a number of warnings and finally an er

Re: [R] Substitute NAs in a data frame

2010-03-18 Thread Sharpie
Marsh wrote: > > Excuse me for what I'm sure is a stupid beginner's question, but I've > given up trying to find the answer to this question from the help, > RSiteSearch, or any of the usual places. > > I have a list that looks like this: > >myList > $first > [1] "--" "18" "8" "32" > > $sec

Re: [R] can I rotate a matrix

2010-03-18 Thread Seeliger . Curt
> >> mat > >> # [,1] [,2] [,3] > >> # [1,]121 > >> # [2,]326 > >> # [3,]453 > >> > >> matrix(rev(mat),nrow=3,byrow=TRUE)[(3:1),] > >> # [,1] [,2] [,3] > >> # [1,]431 > >> # [2,]522 > >> # [3,]361

[R] Substitute NAs in a data frame

2010-03-18 Thread Marshall Feldman
Excuse me for what I'm sure is a stupid beginner's question, but I've given up trying to find the answer to this question from the help, RSiteSearch, or any of the usual places. I have a list that looks like this: >myList $first [1] "--" "18" "8" "32" $second [1] "--" "--" "40" "54" I want a

Re: [R] can I rotate a matrix

2010-03-18 Thread Ted Harding
On 18-Mar-10 20:25:22, seeliger.c...@epamail.epa.gov wrote: >> > I want to be able to rotate a matrix 90 degrees, clockwise. >> > For > example, >> >> mat >> > [,1] [,2] [,3] >> > [,1] 12 1 >> > [,2] 32 6 >> > [,3] 45 3 >> > >> > I want to rotate it, so that it

Re: [R] R front end help

2010-03-18 Thread Tal Galili
Also have a look at deducer: http://www.deducer.org/manual.html Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com

Re: [R] can I rotate a matrix

2010-03-18 Thread Seeliger . Curt
> > I want to be able to rotate a matrix 90 degrees, clockwise. > > For > example, > >> mat > > [,1] [,2] [,3] > > [,1] 12 1 > > [,2] 32 6 > > [,3] 45 3 > > > > I want to rotate it, so that it looks like this... > > [,1] [,2] [,3] > > [,1] 43 1 >

Re: [R] R front end help

2010-03-18 Thread Sharpie
rrp wrote: > > hi > I am doing a project in R language.I need help with creating a front end > in R language. > i created a dialog box with file menu n file consists of load ,save and > quit options. But these options are not working.I try to load my data into > r using these options but its not

Re: [R] R front end help

2010-03-18 Thread David Winsemius
Look at how John Fox built Rcmdr. http://socserv.mcmaster.ca/jfox/Misc/Rcmdr/ Others are out there as well. And there is a GUI SIG http://www.sciviews.org/_rgui/ ... and maybe a Task View or maybe that page with 15 GUI's down the side was what I was remembering? Seems like there might be

[R] R front end help

2010-03-18 Thread rr
hi I am doing a project in R language.I need help with creating a front end in R language. i created a dialog box with file menu n file consists of load ,save and quit options. But these options are not working.I try to load my data into r using these options but its not working. pls help. thanks

[R] r-help

2010-03-18 Thread rr
hi I am doing a project in R language.I need help with creating a front end in R language. i created a dialog box with file menu n file consists of load ,save and quit options. But these options are not working.I try to load my data into r using these options but its not working.pls help.

Re: [R] Please help with loop, thanks

2010-03-18 Thread Marc Schwartz
Mark, Sorry to come to the party late, but if the result vectors are going to be the same length: mat <- matrix(rnorm(40), 10, 4) colnames(mat) <- c("A","B","C","D") > mat AB C D [1,] -0.6489907 -1.000256771 0.69287228 0.81174708 [2,] 0.18

Re: [R] can I rotate a matrix

2010-03-18 Thread Ted Harding
On 18-Mar-10 19:10:46, dc896148 wrote: > useR's, > I want to be able to rotate a matrix 90 degrees, clockwise. > For > example, >> mat > [,1] [,2] [,3] > [,1] 12 1 > [,2] 32 6 > [,3] 45 3 > > I want to rotate it, so that it looks like this... > [,1] [,2] [,

Re: [R] Plotting symbols over a screenshot

2010-03-18 Thread Greg Snow
One approach: Read in and plot background image (possibly using EBImage package or other). Use the updateusr function from the TeachingDemos package to set the user coordinates to match your image. Add points using points or symbols function. Hope this helps, -- Gregory (Greg) L. Snow Ph.D. St

Re: [R] can I rotate a matrix

2010-03-18 Thread Rolf Turner
On 19/03/2010, at 8:10 AM, dc896148 wrote: > > useR's, > I want to be able to rotate a matrix 90 degrees, clockwise. For example, >> mat > [,1] [,2] [,3] > [,1] 12 1 > [,2] 32 6 > [,3] 45 3 > > I want to rotate it, so that it looks like this... > [,1] [,2

Re: [R] can I rotate a matrix

2010-03-18 Thread Phil Spector
I belive that apply(t(mat),2,rev) [,1] [,2] [,3] [1,]163 [2,]225 [3,]134 will do what you want. I'll leave it up to you to decide whether it's straightforward. - Phil Spector

Re: [R] can I rotate a matrix

2010-03-18 Thread Greg Hirson
Not sure why you are doing it, but you can do it like this: m = matrix(c(1,3,4,2,2,5,1,6,3), nrow =3) [,1] [,2] [,3] [1,]121 [2,]326 [3,]453 t(m)[ , ncol(m):1] [,1] [,2] [,3] [1,]431 [2,]522 [3,]361 I hope that

Re: [R] recommendations on use of -> operator

2010-03-18 Thread Duncan Murdoch
On 18/03/2010 3:10 PM, Emmanuel Charpentier wrote: An old (Lisp ? C ?) quote, whose author escapes me now, was : "syntactic sugar causes cancer of the semicolon" .. but nowadays semicolons are rarely used in "real-life" R. Emmanuel Charpentier PS and, B

Re: [R] can I rotate a matrix

2010-03-18 Thread Henrique Dallazuanna
Try this: t(mat[3:1,]) On Thu, Mar 18, 2010 at 4:10 PM, dc896148 wrote: > > useR's, > I want to be able to rotate a matrix 90 degrees, clockwise.  For example, >> mat >     [,1] [,2] [,3] > [,1]   1    2     1 > [,2]   3    2     6 > [,3]   4    5     3 > > I want to rotate it, so that it looks

[R] can I rotate a matrix

2010-03-18 Thread dc896148
useR's, I want to be able to rotate a matrix 90 degrees, clockwise. For example, > mat [,1] [,2] [,3] [,1] 12 1 [,2] 32 6 [,3] 45 3 I want to rotate it, so that it looks like this... [,1] [,2] [,3] [,1] 43 1 [,2] 52 2 [,3] 36

Re: [R] recommendations on use of -> operator

2010-03-18 Thread Emmanuel Charpentier
An old (Lisp ? C ?) quote, whose author escapes me now, was : "syntactic sugar causes cancer of the semicolon" .. but nowadays semicolons are rarely used in "real-life" R. Emmanuel Charpentier PS and, BTW, neither C nor Lisp have much use for semicolons..

Re: [R] Please help with loop, thanks

2010-03-18 Thread Mark Na
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

Re: [R] Please help with loop, thanks

2010-03-18 Thread jim holtman
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.

Re: [R] Using a function to consolidate variables

2010-03-18 Thread Phil Spector
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 = consol

Re: [R] merge.zoo produces non unique chron time series

2010-03-18 Thread Gabor Grothendieck
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] 1.81

[R] Please help with loop, thanks

2010-03-18 Thread Mark Na
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 pro

Re: [R] Please help with loop, thanks

2010-03-18 Thread Dennis Murphy
> 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.28208

Re: [R] greek symbols on ylab=

2010-03-18 Thread RICHARD M. HEIBERGER
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

[R] probable timezone confusion with as.yearmon

2010-03-18 Thread Peter Keller
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

Re: [R] multiple print commands in win.metafile()

2010-03-18 Thread jim holtman
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 numbe

Re: [R] greek symbols on ylab=

2010-03-18 Thread Henrique Dallazuanna
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 wrote: > Hi All, > > I'm trying to get following but not

[R] strptime(): on Linux system it seems to call system time?

2010-03-18 Thread Alexander Peterhansl
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),

[R] greek symbols on ylab=

2010-03-18 Thread Peng Cai
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

[R] merge.zoo produces non unique chron time series

2010-03-18 Thread Jan Schwanbeck
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 <- chron(

Re: [R] R and getting a file through https

2010-03-18 Thread Orvalho Augusto
Thank you! I did not know about this resource. Caveman On Thu, Mar 18, 2010 at 6:26 AM, David Winsemius 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 username and

Re: [R] R output to Rich Text Format

2010-03-18 Thread lith
> 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 __ R-help@r-pr

Re: [R] multiple print commands in win.metafile()

2010-03-18 Thread Kim Jung Hwa
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 wrote: > ?win.metafile > >

[R] Using a function to consolidate variables

2010-03-18 Thread David Young
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 ca

Re: [R] Pedigree / Identifying Immediate Family of Index Animal

2010-03-18 Thread Charles C. Berry
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 co

Re: [R] list names

2010-03-18 Thread David Winsemius
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"

Re: [R] list names

2010-03-18 Thread Sharpie
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 ty

[R] list names

2010-03-18 Thread Robert M. Flight
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

Re: [R] Regression of a time series on its Quarters

2010-03-18 Thread Achim Zeileis
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 serie

Re: [R] Regression of a time series on its Quarters

2010-03-18 Thread Gabor Grothendieck
Try this: lm(a.ts ~ factor(cycle(a.ts)) - 1) On Thu, Mar 18, 2010 at 12:30 PM, Len Vir 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: > > #   

Re: [R] How to match two matrices with different dates

2010-03-18 Thread Loïc Marechal
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 14

Re: [R] Using indexing to manipulate data

2010-03-18 Thread William Dunlap
> -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,

[R] [R-pkgs] spikeslab 1.0.0 now available on CRAN

2010-03-18 Thread Udaya B. Kogalur
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 con

Re: [R] how to return "date" part of POSIXct

2010-03-18 Thread ManInMoon
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 a

[R] Help with multiple output

2010-03-18 Thread Meng Wu
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 pro

Re: [R] Constrained non linear regression using ML

2010-03-18 Thread Corrado
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 distri

Re: [R] How to match two matrices with different dates

2010-03-18 Thread jim holtman
PLEASE do read the posting guide http://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

Re: [R] Unable to install Cairo package

2010-03-18 Thread Sharpie
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

Re: [R] multiple print commands in win.metafile()

2010-03-18 Thread jim holtman
?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,

[R] How to match two matrices with different dates

2010-03-18 Thread Loïc Marechal
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 ga

[R] multiple print commands in win.metafile()

2010-03-18 Thread Kim Jung Hwa
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

[R] Regression of a time series on its Quarters

2010-03-18 Thread Len Vir
# 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 -0.0227

[R] R output to Rich Text Format

2010-03-18 Thread Alex Bryant
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 _

[R] [R-pkgs] package JM -- version 0.6-0

2010-03-18 Thread Dimitris Rizopoulos
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 time-to-even

Re: [R] IRT simulation repeated

2010-03-18 Thread jim holtman
result <- lapply(1:100, yourFunction) On Thu, Mar 18, 2010 at 9:05 AM, Helena 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 write the R code to make i

Re: [R] "unbind" matrix?

2010-03-18 Thread Bert Gunter
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

Re: [R] how to return "date" part of POSIXct

2010-03-18 Thread David Winsemius
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:1

Re: [R] Reshape dataframe according to ordered variables

2010-03-18 Thread MORNEAU François
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 :

Re: [R] how to return "date" part of POSIXct

2010-03-18 Thread jim holtman
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 wrote: > > How do I get a number representing a date from a POSIX

  1   2   >