Re: [R] multiple R sessions from one working directory using GNU screen

2010-08-04 Thread Olga Lyashevska
Dear Steven, Thanks for your post. It explains a lot. The reason I wanted to use multiple sessions simultaneously is that because when I run something it usually takes quite a while (calculating distance matrices), meaning that I have to wait before R can handle the next task. Also RAM is reaching

Re: [R] grid.table and expression in table body?

2010-08-04 Thread baptiste Auguié
Try this, source("http://gridextra.googlecode.com/svn/trunk/inst/test/expressions.r";) library(grid) e = expression(p[Wilcoxon], "<"*2.2%*%10^{-16}) grid.expr(e) HTH, baptiste On Aug 4, 2010, at 9:56 AM, Johannes Graumann wrote: > Hi Baptiste, > > This is, I fear a bit beyond my level of com

[R] merge two data frames

2010-08-04 Thread Amos Folarin
Hi Arnaud, It is slightly confusing what you are asking but if you just want a dataframe with the two zz$"PL" and av$"PL" columns concatenated then merge is not what you are after. Try something like this. t <- rbind(data.frame(PL=zz$PL), data.frame(PL=av$PL)) > t PL 1 307

Re: [R] grep with search terms defined by a variable

2010-08-04 Thread Amos Folarin
You might also find match and pmatch of use here. On Aug 3, 2010, at 12:05 AM, Daniel Malter wrote: > > Hi, I have a good grasp of grep() and gsub() for finding and > extracting > character strings. However, I cannot figure out how to use a search > term > that is stored in a

Re: [R] multiple R sessions from one working directory using GNU screen

2010-08-04 Thread david.jessop
Olga There was a presentation at the London R user group about doing what you ask using the bigmemory package (http://www.londonr.org/LondonR-20090331/realtimeR.pdf). I believe you can do the same thing with ff. This wouldn't share the whole workspace but just the objects you choose. Regards

Re: [R] Best way to Convert String to Time for comparison?

2010-08-04 Thread Gabor Grothendieck
On Wed, Aug 4, 2010 at 8:43 AM, allany wrote: > > Hi guys, > > I have a large text file with a bunch of Time in "HH:MM" format, what would > be the best way to process it into a Time Object so that I can use > comparisons like (1:00<"1:15") or (13:00>"2:00") to both return true. > > Right now if I

[R] Best way to Convert String to Time for comparison?

2010-08-04 Thread allany
Hi guys, I have a large text file with a bunch of Time in "HH:MM" format, what would be the best way to process it into a Time Object so that I can use comparisons like (1:00<"1:15") or (13:00>"2:00") to both return true. Right now if I do a comparison like (3:00 < "1:59") I get a true, but if I

Re: [R] retrieve name of an object?

2010-08-04 Thread Duncan Murdoch
On 04/08/2010 7:47 AM, Liviu Andronic wrote: Dear all Is there an easier way to retrieve the name of an object? For example, > tmp <- 1:10 > as.character(quote(tmp)) [1] "tmp" > as.character(quote(mtcars$cyl)) [1] "$" "mtcars" "cyl" > as.character(quote(mtcars$cyl))[3] [1] "cyl" The l

Re: [R] save plot

2010-08-04 Thread Alain Guillet
?jpeg On 04-Aug-10 14:28, linda.s wrote: Can I make a group of jpeg instead of pdfs? Thanks. Linda On Wed, Aug 4, 2010 at 6:47 AM, John Kane wrote: Yes, ?jpeg --- On Tue, 8/3/10, linda.s wrote: From: linda.s Subject: Re: [R] save plot To: gavin.simp...@ucl.ac.uk Cc: r-help@r-project.org

Re: [R] barplot and x-axis font size

2010-08-04 Thread Jim Lemon
On 08/04/2010 05:38 PM, Roslina Zakaria wrote: Hi all, I would like to draw a side by side bar plot. How can I adjust the the font size for the x-axis? Furthermore, I'm not sure what to write for 'at=?'. I tried cex.axis and cex.lab but still fail. Here is my data and code: t(all)

Re: [R] save plot

2010-08-04 Thread linda.s
Can I make a group of jpeg instead of pdfs? Thanks. Linda On Wed, Aug 4, 2010 at 6:47 AM, John Kane wrote: > Yes,  ?jpeg > > --- On Tue, 8/3/10, linda.s wrote: > >> From: linda.s >> Subject: Re: [R] save plot >> To: gavin.simp...@ucl.ac.uk >> Cc: r-help@r-project.org >> Received: Tuesday, Augus

Re: [R] ggplot2 barplot: extra markers in graph

2010-08-04 Thread David Winsemius
On Aug 4, 2010, at 7:52 AM, Dieter Vanderelst wrote: Dear List, (self-contained example + version info at the bottom) I'm having trouble producing a barplot using the functions in ggplot2. When I use the position="dodge" option, the bars are plotted but also a number of spurious markers.

Re: [R] How to connect R with SAP

2010-08-04 Thread Henrique Dallazuanna
Try this: library(RDCOMClient) ## Criando a conexao com o SAP oLogonControl <- COMCreate("SAP.Logoncontrol.1") ## Conectando com o usuario ao SAP g_connection <- oLogonControl$NewConnection() g_connection[["System"]]<- "PD4" g_connection[["ApplicationServer"]] <- "server_ip" g_connec

Re: [R] retrieve name of an object?

2010-08-04 Thread Henrique Dallazuanna
Tryu this: deparse(substitute(mtcars)) On Wed, Aug 4, 2010 at 8:47 AM, Liviu Andronic wrote: > Dear all > Is there an easier way to retrieve the name of an object? For example, > > tmp <- 1:10 > > as.character(quote(tmp)) > [1] "tmp" > > as.character(quote(mtcars$cyl)) > [1] "$" "mtcars" "c

Re: [R] retrieve name of an object?

2010-08-04 Thread jim holtman
I am not sure what you mean by a "hack"? Can you elaborate further, give details on the problem you are trying to solve. Does this work as a "lesser hack": > tail(as.character(quote(mtcars$cyl)),1) [1] "cyl" > tail(as.character(quote(cyl)),1) [1] "cyl" > On Wed, Aug 4, 2010 at 7:47 AM, Liviu A

[R] ggplot2 barplot: extra markers in graph

2010-08-04 Thread Dieter Vanderelst
Dear List, (self-contained example + version info at the bottom) I'm having trouble producing a barplot using the functions in ggplot2. When I use the position="dodge" option, the bars are plotted but also a number of spurious markers. More specifically, a number of black dots are plotted in t

[R] retrieve name of an object?

2010-08-04 Thread Liviu Andronic
Dear all Is there an easier way to retrieve the name of an object? For example, > tmp <- 1:10 > as.character(quote(tmp)) [1] "tmp" > as.character(quote(mtcars$cyl)) [1] "$" "mtcars" "cyl" > as.character(quote(mtcars$cyl))[3] [1] "cyl" The last call more than anything seems a hack. Is ther

Re: [R] Using '[' as a function

2010-08-04 Thread peter dalgaard
On Aug 3, 2010, at 7:59 PM, Johann Hibschman wrote: > Duncan Murdoch writes: >> On 29/07/2010 6:18 PM, chipmaney wrote: >>> >>> -Why does R recognize '[' as a function? >> >> Because it is a function. > > More explicitly, '[' is a string. sapply then calls match.fun to look > up that strin

Re: [R] Spliting a text

2010-08-04 Thread David Winsemius
On Aug 4, 2010, at 7:04 AM, Megh Dal wrote: Hi, I want to split a text to seperate numerical and non-numerical portions of that. For example suppose I have a text "abc 3456" and I want to split in 2 parts like "abc" & "3456". Is there any function to do that? ?strsplit ?regex -- David W

Re: [R] Spliting a text

2010-08-04 Thread Gabor Grothendieck
On Wed, Aug 4, 2010 at 7:04 AM, Megh Dal wrote: > Hi, I want to split a text to seperate numerical and non-numerical portions > of that. For example suppose I have a text "abc 3456" and I want to split in > 2 parts like "abc" & "3456". > > Is there any function to do that? > If the parts of you

Re: [R] merge two data frames

2010-08-04 Thread arnaud gaboury
TY Petr, it works. I will then replace NA by 0. 2010/8/4 Petr PIKAL : > Hi > > you tried OK > > result <- merge(zz, av, by="DESCRIPTION", all=TRUE) > > and as you did not specify what to do when one value is NA  here is one > possible solution > > rowSums(cbind(result$PL.x, result$PL.y), na.rm=T)

Re: [R] Question regarding S4 objects and reading in excel data with RODBC

2010-08-04 Thread Duncan Murdoch
On 04/08/2010 5:38 AM, Sander wrote: L.S. I am trying to get data from an excel sheet using the RODBC library, quite like the example on page 34 of the 'Data manipulation with R' book written by Phil Spector. It seems very straightforward, yet I get the same error everytime I try it, with differ

[R] Spliting a text

2010-08-04 Thread Megh Dal
Hi, I want to split a text to seperate numerical and non-numerical portions of that. For example suppose I have a text "abc 3456" and I want to split in 2 parts like "abc" & "3456". Is there any function to do that? Thanks, __ R-help@r-project.org ma

[R] Question regarding S4 objects and reading in excel data with RODBC

2010-08-04 Thread Sander
L.S. I am trying to get data from an excel sheet using the RODBC library, quite like the example on page 34 of the 'Data manipulation with R' book written by Phil Spector. It seems very straightforward, yet I get the same error everytime I try it, with different excel sheets and trying to tweek t

Re: [R] Help with plots

2010-08-04 Thread Sarah Chisholm
Hi, I am trying to plot several time series plots with R, but I can't seem to get the x-axis properly formatted. What I am doing at the moment is: dates <- seq(as.Date("2007/06/10", "%Y/%m/%d"), as.Date("2010/03/28", "%Y/%m/%d"), 7) par(mfrow=c(5,2)) plot(DateJonEnd1, End1Jon, main="Weekly Tr

Re: [R] save plot

2010-08-04 Thread John Kane
Yes, ?jpeg --- On Tue, 8/3/10, linda.s wrote: > From: linda.s > Subject: Re: [R] save plot > To: gavin.simp...@ucl.ac.uk > Cc: r-help@r-project.org > Received: Tuesday, August 3, 2010, 5:36 PM > > [I presume you addressed this to > Duncan Murdoch for a good reason???] > > > > Open a new device

Re: [R] Substring of a character column

2010-08-04 Thread Alain Guillet
Hi, a <- c("ID=NM_182905.1;Name=NM_182905;Alias=FLJ00038;Note=hypothetical protein + LOC375690 + ","ID=NM_001005484;Alias=OR4F5;Note=olfactory receptor%2C family 4%2C + subfamily F + ","ID=NM_001005224.1;Name=NM_001005224;Alias=OR4F3;Note=olfactory + receptor%2C family 4%2C subfamily F + ") f

[R] Finding points where two timeseries cross over

2010-08-04 Thread Blair Sutton
Hi Is there any way to find out at what points two timeseries cross over perhaps with some information on how they cross? Alternatively, I could write a loop that solves pairs of adjacent points using linear algebra but looking for a simpler way. Thanks in advance, Blair [[alternative H

Re: [R] geoR - likfit failure

2010-08-04 Thread Rubén Roa
Questions about geoR should be directed to R-SIG-GEO. Anyway, you should provide more info about your problem. Read the Posting Guide. Have you tried changing the model? Sometimes falling back from Matern to exponential or Gaussian allows successful convergence. HTH Rubén

Re: [R] save-d file format forward compatibility

2010-08-04 Thread Duncan Murdoch
Godfrey van der Linden wrote: G'day, All. I've recently started writing up my dissertation and need to consider how to store the research results. I'd like to use the binary compressed save() format as it is considerably smaller than the raw data. However, will a future R be able to read it

Re: [R] Substring of a character column

2010-08-04 Thread Gabor Grothendieck
On Wed, Aug 4, 2010 at 6:00 AM, LogLord wrote: > > Hi, > > I have a dataframe with a rather complicated descriptive column (V9): > >> test3[(1:3), ] >     V1     V4     V5 > 10 1   4559   7173 > 17 1  58954  59871 > 19 1 357522 358458 > > V9 > 10 ID=NM_182905.1;Name=NM_182905;Alias=FLJ00038;Note=h

[R] Modelling poisson distribution with variance structure

2010-08-04 Thread Karen Moore
I'm dealing with count data that's nested and has spatial dependence. I ran a glmm in lmer with a random factor for nestedness. Spatial dependence seems to have been accommodated by model. However I can't add a variance strcuture to this model (to accommodate heterogeneity). Is there a model that

Re: [R] SQLDF from Variable Matrix

2010-08-04 Thread Gabor Grothendieck
On Wed, Aug 4, 2010 at 12:29 AM, Suphajak Ngamlak wrote: > Dear all, > > I would like to do sample statistics, e.g. mean, median from very large > dataset. This is part of commands I use routinely with several dataset > so I would like to make it into function. The simplified examples are > > Test

[R] Odp: merge two data frames

2010-08-04 Thread Petr PIKAL
Hi you tried OK result <- merge(zz, av, by="DESCRIPTION", all=TRUE) and as you did not specify what to do when one value is NA here is one possible solution rowSums(cbind(result$PL.x, result$PL.y), na.rm=T) Regards Petr r-help-boun...@r-project.org napsal dne 04.08.2010 11:52:00: > Dear li

[R] Substring of a character column

2010-08-04 Thread LogLord
Hi, I have a dataframe with a rather complicated descriptive column (V9): > test3[(1:3), ] V1 V4 V5 10 1 4559 7173 17 1 58954 59871 19 1 357522 358458 V9 10 ID=NM_182905.1;Name=NM_182905;Alias=FLJ00038;Note=hypothetical protein LOC375690 17 ID=NM_001005484;Alias=OR4F5;Note=ol

[R] merge two data frames

2010-08-04 Thread arnaud gaboury
Dear list, here are my two data frames: av <- structure(list(DESCRIPTION = c("COFFEE C Sep/10", "COPPER Sep/10", "CORN Dec/10", "CRUDE OIL miNY Sep/10", "GOLD Aug/10", "HENRY HUB NATURAL GAS Sep/10", "PALLADIUM Sep/10", "SILVER Sep/10", "SOYBEANS Nov/10", "SPCL HIGH GRADE ZINC USD", "SUGAR NO.11

Re: [R] does R have a command the same with Stata's loop command: ` '

2010-08-04 Thread Patrick Burns
So you *can* do it. There is a question remaining of whether you *should* do it. More R-ish is to use a list. On 04/08/2010 01:39, jim holtman wrote: ?paste ?assign On Tue, Aug 3, 2010 at 8:29 PM, Hey Sky wrote: hey, Rers in Stata therer is a loop command ` ' which could do the following:

[R] How to let Rterm be vi style under windows?

2010-08-04 Thread Yue Wu
Hi list, As title, under windows, the method of ~/.inputrc won't work, is it possible to let Rterm be vi style on windows? P.S. I've sent it serveral days ago, get no response, so I send it again to check if I've failed to send it. -- Regards, Yue Wu Key Laboratory of Modern Chinese Medi

Re: [R] question!!!!

2010-08-04 Thread Michael Bedward
Hi > I made some design matrix X(in linear regression model) > > I there any method to normalize X? You can normalize a matrix column-wise like this: # m is a matrix apply(m, 2, function(x) x / max(x) ) Or normalize row-wise like this: t(apply(m, 1, function(x) x / max(x) )) I'm sure there are

[R] geoR - likfit failure

2010-08-04 Thread Mohammed Ouassou
Hi I'm using geoR package to perform linear spatial interpolation(OK). The function likfit() fails to compute REML. The error meassage is : Error in solve.default(v$varcov, xmat); How I can find out that likfit() is failed to process and retrieving the error message ? Thank you so much for

Re: [R] barplot and x-axis font size

2010-08-04 Thread Ivan Calandra
Hi! Your example is not really easy to copy paste. Next time, try using dput(), this would help a lot. I haven't tried, but I think that cex.axis is correct. The problem is in your call to barplot(). You have to specify xaxt="n" so that the x-axis won't be plotted. You then plot it with your

Re: [R] Adding collumn to existing data frame

2010-08-04 Thread Jeff Newmiller
Sometimes we try to make things behave the way we think they ought to and find it surprisingly difficult. Later we discover that our original premise was flawed and we wasted our time trying to force fit our ideas to work. Since all of the i-th elements of the columns of a data table are suppose

[R] question!!!!

2010-08-04 Thread leepama
I made some design matrix X(in linear regression model) I there any method to normalize X? -- View this message in context: http://r.789695.n4.nabble.com/question-tp2312938p2312938.html Sent from the R help mailing list archive at Nabble.com. __ R-he

[R] barplot and x-axis font size

2010-08-04 Thread Roslina Zakaria
Hi all, I would like to draw a side by side bar plot.  How can I adjust the the font size for the x-axis?  Furthermore, I'm not sure what to write for 'at=?'.  I tried cex.axis and cex.lab but still fail.  Here is my data and code:   > t(all)    0-100 100-150  150-200 200-250 250-300 30

<    1   2