Re: [R] what does cut(data, breaks=n) actually do?

2007-12-13 Thread Peter Dalgaard
melissa cline wrote: Hello, I'm trying to bin a quantity into 2-3 bins for calculating entropy and mutual information. One of the approaches I'm exploring is the cut() function, which is what the mutualInfo function in binDist uses. When it's called in the format cut(data, breaks=n), it

Re: [R] what does cut(data, breaks=n) actually do?

2007-12-13 Thread Domenico Vistocco
cut(data, breaks=n) splits the data in n bins of (approximately) the same size. The used size is obtained by: max(data) - min(data) n x=rnorm(x) cut(x,breaks=3) [1] (1.79,9.97] (-6.39,1.79] (9.97,18.2] (9.97,18.2] (-6.39,1.79] [6]

Re: [R] confidence intervals for y predicted in non linearregression

2007-12-13 Thread florencio . gonzalez
I´m sorry for no explain this before. It´s nls2 from INRA not from CRAN that i was unsecesfull to install. Mensaje citado por Patrick Connolly [EMAIL PROTECTED]: On Wed, 05-Dec-2007 at 01:40PM +0100, Florencio González wrote: | | Hi Thanks for your suggestion, I'm trying to install this

[R] use ggplot in a function to which a column name is given

2007-12-13 Thread jiho
Hi everyone, Hi ggplot users in particular, ggplot makes it very easy to plot things given their names when you use it interactively (and therefore can provide the names of the columns). qplot(x,foo,data=A) where A has columns (x,y,foo,bar) for example but I would like to use this

[R] Summary, was Re: Nine questions about methods and generics

2007-12-13 Thread Michael Dewey
At 12:17 06/12/2007, Michael Dewey wrote: I have a series of question about methods and generics. To avoid extra clutter I have deleted the rather long question which is obtainable from https://www.stat.math.ethz.ch/pipermail/r-help//2007-December/147754.html I received a very helpful response

Re: [R] use ggplot in a function to which a column name is given

2007-12-13 Thread jiho
Follow up. On 2007-December-13 , at 10:45 , jiho wrote: foo1 - function(uv=u) { # solution 1: do not use the data argument at all # (forces the use of qplot, could be more elegant) B = A[A$y=5,] qplot(B$x, B$y, fill=B[[uv]], geom=tile) } --- actually this

Re: [R] Rd files with unknown encoding?

2007-12-13 Thread Prof Brian Ripley
On Wed, 12 Dec 2007, Spencer Graves wrote: How can I identify the problem generating a warning in R CMD check for Rd files with unknown encoding? Google identified an email from John Fox with a reply from Brian Ripley about this last 12 Jun 2007. But not on this list:

Re: [R] Measure of agreement??

2007-12-13 Thread Jim Lemon
Öhagen Patrik wrote: Dear List, Please put me on the right track. I have been searching for the R functions for measures of agreement. Where should I look? Hi Patrik, Tried the irr package? Jim __ R-help@r-project.org mailing list

[R] Flushing (Reset) 'last.warning'

2007-12-13 Thread Tiago R Magalhães
Dear members of the mailing list, I want to fetch warnings() from a series of prop.test calls. I want to get none if no warning is issued, and warning if there is a problem. I have looked (and relooked) at options(warn) and warning(), warnings() and 'last.warning' but to no avail. I am a

Re: [R] Flushing (Reset) 'last.warning'

2007-12-13 Thread Duncan Murdoch
Tiago R Magalhães wrote: Dear members of the mailing list, I want to fetch warnings() from a series of prop.test calls. I want to get none if no warning is issued, and warning if there is a problem. I have looked (and relooked) at options(warn) and warning(), warnings() and 'last.warning'

Re: [R] Probelms on using gam(mgcv)

2007-12-13 Thread Simon Wood
A smooth of `disbinary' doesn't really make sense. It should enter the model parametrically. The problem is easy to see in 1D. Consider the model y_i = f(x_i) + error_i where `f' is a smooth function. If x_i only takes the values 0 and 1 then you really don't have much of a basis for estimating

Re: [R] ggplot - Setting the y-scale in a bar plot

2007-12-13 Thread Pedro de Barros
Hi Hadley, Thanks for the help. I found the problem. In the code you sent me earlier to correct the scale_y_continuous, (below) the parameter is limits, rather than limit, as you write it. If I run my code without introducing the change you sent me, it works, but if I first correct it, then

Re: [R] Number of ways to select population members

2007-12-13 Thread Dimitris Rizopoulos
try something like this: combn(LETTERS[1:3], 2, paste, collapse = ) I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven, Belgium Tel: +32/(0)16/336899 Fax:

[R] Number of ways to select population members

2007-12-13 Thread Megh Dal
Hi all, Suppose I have a population of 3 alphabets : A, B, C. From this population, number of ways that any 2 can be chosen is 3 i.e. AB, AC, and BC. Is there any R function to generalize this process, for any number of alphabets/numbers and for any sub-sample size? Thanks and

[R] Very simple question on plot

2007-12-13 Thread Ronaldo Reis Junior
Hi, I try to make a plot like this: Y | | | o | oo | o o | o o |o o o | 0 10 20 30 40 50 60 70 80 90 100 (A) 100 90 80 70 60 50 40 30 20 10 0 (B)

[R] spliting strings ...

2007-12-13 Thread Monica Pisica
Hi everyone, I have a vector of strings, each string made up by different number of words. I want to get a new vector which has only the first word of each string in the first vector. I came up with this: str - c('aaa bbb', 'cc', 'd eee aa', 'mmm o n') str1 - rep(1, length(str)) for (i in

Re: [R] spliting strings ...

2007-12-13 Thread Dimitris Rizopoulos
one way is the following: str - c('aaa bbb', 'cc', 'd eee aa', 'mmm o n') sapply(strsplit(str, ), [, 1) I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven,

Re: [R] spliting strings ...

2007-12-13 Thread Romain Francois
Hi, if you only want the first word, then this should do the trick : R sub( +.*, , str ) [1] aaa cc d mmm Cheers, Romain Monica Pisica wrote: Hi everyone, I have a vector of strings, each string made up by different number of words. I want to get a new vector which has only the

Re: [R] Very simple question on plot

2007-12-13 Thread Duncan Murdoch
On 12/13/2007 8:16 AM, Ronaldo Reis Junior wrote: Hi, I try to make a plot like this: Y | | | o | oo | o o | o o |o o o | 0 10 20 30 40

Re: [R] Very simple question on plot

2007-12-13 Thread David Barron
Something like this? x-0:100 y-dnorm(x,50,20) plot(x,y) axis(3,seq(0,100,by=20),labels=seq(100,0,by=-20)) On 12/13/07, Ronaldo Reis Junior [EMAIL PROTECTED] wrote: Hi, I try to make a plot like this: Y | | | o | oo | o o |

Re: [R] Very simple question on plot

2007-12-13 Thread Richard . Cotton
I try to make a plot like this: Y | | | o | oo | o o | o o |o o o | 0 10 20 30 40 50 60 70 80 90 100 (A) 100 90 80 70 60 50 40 30 20 10 0

Re: [R] R and Excel Interface

2007-12-13 Thread John Kane
See the data imput export manual on CRAN --- [EMAIL PROTECTED] wrote: Hello everyone, I'll to request some input on what is available for use as an R/Excel interface; any help will be appreciated. Tony. [[alternative HTML version deleted]]

[R] How to use R to estimate a model which has two sets of lagged time series independent variables

2007-12-13 Thread Suen, Michael
Hi, I would like to use R to estimate the following model: X(t) = a + b1*X(t-1) + b2*X(t-2) + c1*Y(t) + c2*Y(t-1) + c3*Y(t-2) Is there any R function that performs this type of estimation? I know that if I only have one time series (i.e. lagged value of X) on the right hand side then there are

Re: [R] spliting strings ...

2007-12-13 Thread Prof Brian Ripley
On Thu, 13 Dec 2007, Monica Pisica wrote: Hi everyone, I have a vector of strings, each string made up by different number of words. You need to define 'word' and 'first'. Your solution says the first word of aa is , which is not what most people would think. I want to get a new

[R] ls() pattern

2007-12-13 Thread livia
Hello everyone, I get some data in the following format and I would like to combine them to form a dataframe. The data is like: cbcname1 = 0.1, cbcname2= 0.2, cbcname3=0.3,... name1, name2, name2 are just some random names. I would like to achieve sth like: (cbcname1=0.1, cbcname2=0.2,

Re: [R] spliting strings ... THANKS!

2007-12-13 Thread Monica Pisica
Folks, Thanks a lot for a very speady answer. I usually read the list quite a bit because sometimes others put questions i may be interested in. One obs. i made was that lots of neat tricks can be made with apply, sapply and tapply. But even if i read all the help on these functions , and

[R] Helpfiles in HTML browser

2007-12-13 Thread Knut Krueger
I forgot how to switch between Windows helpfiles and Browser helpfiles. f.e ?lm should open the browser. Maybe anybody could give me a hint? Regards Knut __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] spliting strings ...

2007-12-13 Thread seanpor
Good afternoon Monica, Relying on regular expressions, substituting nothing for everything starting with a space until the end of the line (i.e. with a dollar sign) str1 - sub( .*$, , str) Regards, Sean Monica Pisica wrote: Hi everyone, I have a vector of strings, each string made

Re: [R] spliting strings ...

2007-12-13 Thread Peter Dalgaard
Monica Pisica wrote: Hi everyone, I have a vector of strings, each string made up by different number of words. I want to get a new vector which has only the first word of each string in the first vector. I came up with this: str - c('aaa bbb', 'cc', 'd eee aa', 'mmm o n') str1 -

Re: [R] Very simple question on plot

2007-12-13 Thread John Kane
There is probably a better way but something like this should do it for your second version. aa - 1:20 bb - c(5,10,15,20 ) cc - c(25, 50, 75, 100) plot(aa) axis(side=3, labels=cc, at=bb) --- Ronaldo Reis Junior [EMAIL PROTECTED] wrote: Hi, I try to make a plot like this: Y | | |

Re: [R] How to use R to estimate a model which has two sets of laggedtime series independent variables

2007-12-13 Thread Pfaff, Bernhard Dr.
Hi, I would like to use R to estimate the following model: X(t) = a + b1*X(t-1) + b2*X(t-2) + c1*Y(t) + c2*Y(t-1) + c3*Y(t-2) Is there any R function that performs this type of estimation? I know that if I only have one time series (i.e. lagged value of X) on the right hand side then there are

Re: [R] use ggplot in a function to which a column name is given

2007-12-13 Thread hadley wickham
Hi Jiho, The key to solving this problem is to use aes_string instead of aes. Instead of the complicated munging that aes does to get the names of the variables, aes_string works directly with strings, so that: aes_string(x = mpg, y = wt) == aes(x = mpg, y = wt) So your function would look

Re: [R] ggplot2: can not find current.grobTree()

2007-12-13 Thread hadley wickham
Is the function current.grobTree() implemented in ggplot2? According to the draft ggplot2 book, on page 43, we can get a list of all grobs with current.grobTree(). But when I try that, I get 'Error: could not find function current.grobTree'. Ooops - the book is now out of date. Paul Murrell

Re: [R] How to use R to estimate a model which has two sets of lagged time series independent variables

2007-12-13 Thread Gabor Grothendieck
If you don't need a complex error structure then the dyn package (and also the dynlm package) can do it. Using R's builtin EuStockMarkets time series: library(dyn) z - as.zoo(EuStockMarkets) mod1 - dyn$lm(DAX ~ lag(DAX, -(1:2)) + lag(FTSE, -(0:2)), z) mod1 # compare to model without FTSE mod2 -

Re: [R] ggplot - Setting the y-scale in a bar plot

2007-12-13 Thread hadley wickham
PS: If you care to explain: why do all parameters in the code below have a . before the name, except precisely limits? I know it has to do with proto, but could not find out why this one was different. Not really - I started off with the convention that variables should start with a . to

Re: [R] cyclic dependency error

2007-12-13 Thread Guy Brock
I deleted the file zzz.R from the R subdirectory which contained the following: ## startup file for clValid package #.First.lib - function(libname, pkgname, where) { # if( !require(methods) ) stop(we require methods for package clValid) # where - match(paste(package:, pkgname, sep=), search())

Re: [R] Adding data labels to Lattice plots

2007-12-13 Thread chandrasekhar ganduri
Thanks for the reply..though I am trying to still work around the problem of overlapping labels -- Chandrasekhar Ganduri 320 West Union St, APT # 105 Athens, OH - 45701 Ph: 740-274-9170 [[alternative HTML version deleted]] __

Re: [R] use ggplot in a function to which a column name is given

2007-12-13 Thread jiho
On 2007-December-13 , at 15:56 , hadley wickham wrote: Hi Jiho, The key to solving this problem is to use aes_string instead of aes. Instead of the complicated munging that aes does to get the names of the variables, aes_string works directly with strings, so that: aes_string(x = mpg, y =

[R] More than one value of Y for each value of X (Model I regression)

2007-12-13 Thread lowen
Dear readers, Is it possible to compute a Model I regression (Sokhal Rolf 1995) in R where there is more than one value of Y for each value of X? Thanks, John Lowen -- View this message in context:

Re: [R] use ggplot in a function to which a column name is given

2007-12-13 Thread hadley wickham
great! I knew you would have thought this through. That's perfect. As always there's the trade-off between writing code and documenting the code already written. In this case the trade-off turned toward the code part I guess. Autodetection of strings by aes would be even greater but that

Re: [R] ls() pattern

2007-12-13 Thread Richard . Cotton
I get some data in the following format and I would like to combine them to form a dataframe. The data is like: cbcname1 = 0.1, cbcname2= 0.2, cbcname3=0.3,... name1, name2, name2 are just some random names. I would like to achieve sth like: (cbcname1=0.1, cbcname2=0.2,

[R] [R-pkgs] New version of seqinR released

2007-12-13 Thread Simon Penel
Dear useRs, the seqinR package contains utilities to import and analyze biological sequence data. For a general introduction see this document: http://pbil.univ-lyon1.fr/software/SeqinR//vignette.pdf Please do not use r-help for questions about seqinR or r-bugs for bug report about seqinR. Use

Re: [R] ls() pattern

2007-12-13 Thread Richard . Cotton
Thank you very much for your reply.I came across with another problem for assigning the variables. in order to achieve cbcname1 = 0.1, I would use sth like: paste(cbc,name1,=,function(),sep=) But it seems incorrect. Any advice? This sounds like a different problem. Do you mean

[R] RMySQL with Xampp could never work?

2007-12-13 Thread Paolo D'Onorio De Meo
Hello everybody, i had a big issue with RMySQL, working on an installation of R on multiple nodes via net file-system. The point is that we installed Xampp as suite for mysql, perl, apache and php on every node, and we need to use R scripts with mysql. Xampp doesn't compile anything, it gives

Re: [R] parsing dates in input file

2007-12-13 Thread Prof Brian Ripley
On Thu, 13 Dec 2007, Tim Coote wrote: I've hunted around to try to work this out and cannot find anything aposite, although there are exhortations to read News files and the fine manual in response to similar queries. Hope I haven't missed anything obvious. I want to read in csv files that

[R] Gaussian Smoothing

2007-12-13 Thread thierrydb
Hello, I'm new to R, and I would like to know if there is a way to smooth a curve using a Gaussian smoothing with R. Thank you very much, TDB -- View this message in context: http://www.nabble.com/Gaussian-Smoothing-tp14321313p14321313.html Sent from the R help mailing list archive at

[R] Two repeated warnings when runing gam(mgcv) to analyze my dataset?

2007-12-13 Thread zhijie zhang
Dear all, I run the GAMs (generalized additive models) in gam(mgcv) using the following codes. m.gam -gam(mark~s(x)+s(y)+s(lstday2004)+s(ndvi2004)+s(slope)+s(elevation)+disbinary,family=binomial(logit),data=point) And two repeated warnings appeared. Warnings$B!'(B 1: In gam.fit(G, family =

Re: [R] ls() pattern

2007-12-13 Thread Richard . Cotton
Yes, I know this works. I just give it for example to show what I would like to achieve. In fact, I have many variables, you can imagine it is very annoying to construct the data frame by mannually assigning the variables and binding them. Therefore, I would like to do it automaticlly. So

[R] Function for AUC?

2007-12-13 Thread Armin Goralczyk
Hello Is there an easy way, i.e. a function in a package, to calculate the area under the curve (AUC) for drug serum levels? Thanks for any advice -- Armin Goralczyk, M.D. -- Universitätsmedizin Göttingen Abteilung Allgemein- und Viszeralchirurgie Rudolf-Koch-Str. 40 39099 Göttingen -- Dept. of

[R] VARMA in R

2007-12-13 Thread creepa1982
Hi all, does anyone know of a package/function for fitting Vector Autoregressive Moving Average models? I looked through most of the packages available but could only find functions to fit a VAR. Any help would be appreciated! Benjamin -- View this message in context:

Re: [R] Multiple Reponse CART Analysis

2007-12-13 Thread Bardwell, Jeff H
Thank you for the reply. With the improved formula, mvpart worked like a charm. Sincerely, Jeff Jeff H Bardwell, M.S. Biology Department ENV 1101 Lab Coordinator Goebel 115, OH: Thu 1pm-4pm 710-6596 (e-mail preferred) From: Gavin Simpson [mailto:[EMAIL

[R] Overlaying trellis xyplot on contourplot

2007-12-13 Thread Seth W Bigelow
Friends: I wish to overlay data points on a contour graph. The following example produces a nice contour plot, but I have not mastered the concept of using panel functions to modify plots. Can someone show me how to overlay the data points (given after contour plot statement) on the contourplot?

[R] multiple ANOVAs

2007-12-13 Thread Kevin J Emerson
Hello R help-ers, I have a basic question, but I have been playing with it for a while and haven't quite gotten a hang of how to get it working. I want to perform multiple one-way ANOVAs on subsets of data and am not sure how to do it in an automated way. I am thinking of doing something

Re: [R] [OT] vernacular names for circular diagrams

2007-12-13 Thread Julian Burgos
I should say that the name of this chart varies even among Spanish-speaking countries. In Argentina is diagrama de torta which is something like cake-chart. Julian ahimsa campos-arceiz wrote: Two non-eatable examples from Spain and Japan: in Spanish we call them diagrama de sectores or

Re: [R] Overlaying trellis xyplot on contourplot

2007-12-13 Thread Deepayan Sarkar
On 12/13/07, Seth W Bigelow [EMAIL PROTECTED] wrote: Friends: I wish to overlay data points on a contour graph. The following example produces a nice contour plot, but I have not mastered the concept of using panel functions to modify plots. Can someone show me how to overlay the data points

Re: [R] Overlaying trellis xyplot on contourplot

2007-12-13 Thread hadley wickham
Hi Seth, An alternative would be to use ggplot2, http://had.co.nz/ggplot2: model - function(a,b,c,X1,X2) { (exp(a + b*X1 + c*X2)) / (1 + exp(a + b*X1 + c*X2)) } g - expand.grid(X1 = seq(0.40, 0.8,0.01), X2 = seq(0.03,0.99,0.03)) a - -37.61 b - 34.88 c - 28.44 g$z- model(a, b, c, g$X1,g$X2)

Re: [R] Overlaying trellis xyplot on contourplot

2007-12-13 Thread Seth W Bigelow
Deepayan: Very nice, thanks for introducing me to a new resource. I will include the entire, functioning example in the event others may find it useful. --Seth ## Sample code for overlaying data points on a contour graph, using xyplot and contourplot ## library(lattice)

[R] counting weekday in a month in R

2007-12-13 Thread tom soyer
Hi, I am trying to count weekday of the month using R. For example, 1/4/2001 is the 4th weekday of Jan, and 1/5/2001 is the 5th weekday of the month, and 1/8/2001 is the 6th weekday of the month, etc. I get as far as extracting the weekdays from a sequence of dates (see below). But I have not yet

Re: [R] VARMA in R

2007-12-13 Thread Giovanni Petris
You may want to check package dlm and, possibly, dse. In dlm you can cast a VARMA model in state space form (dlmModARMA) and estimate unknown parameters by maximum likelihood (dlmMLE). Best, Giovanni Date: Thu, 13 Dec 2007 11:17:47 -0800 (PST) From: creepa1982 [EMAIL PROTECTED] Sender:

[R] Calculating Rsquared values in rpart

2007-12-13 Thread Andrew Park
Hi there In rpart, one can get a graph of R-squared (using rsq.rpart (fit)), in which the x axis is the number of splits, and which contains two lines - an apparent R squared and an Rsquared based on the x error. I would like to caclulate these R-squared values, but cannot work out from the

Re: [R] counting weekday in a month in R

2007-12-13 Thread Nordlund, Dan (DSHS/RDA)
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of tom soyer Sent: Thursday, December 13, 2007 1:27 PM To: r-help@r-project.org Subject: [R] counting weekday in a month in R Hi, I am trying to count weekday of the month using R. For example,

Re: [R] Calculating Rsquared values in rpart

2007-12-13 Thread Frank E Harrell Jr
Andrew Park wrote: Hi there In rpart, one can get a graph of R-squared (using rsq.rpart (fit)), in which the x axis is the number of splits, and which contains two lines - an apparent R squared and an Rsquared based on the x error. I would like to caclulate these R-squared values, but

[R] Average Precision (APR)

2007-12-13 Thread Wan Kyu Kim
Hi, Is there a R library (code) to calculate Average Precision? I have been using ROCR to calculate other measure like AUC, F-measure etc. But ARP (average precision) was not available although it provides precision/recall. I am almost sure that someone already implemented it. wan

[R] RMySQL and free text variable

2007-12-13 Thread H. Paul Benton
Hi all, I have a quick question, I want to send a select statement to the mysql server. With the code below I connect and ask my select statement. As you can see from the code I want to have a mode = +. The '+' needs to be free text and hence the \ around it. But it doesn't work. If i put

[R] convergence error code in mixed effects models

2007-12-13 Thread Ilona Leyer
Dear All, I want to analyse treatment effects with time series data: I measured e.g. leaf number (five replicate plants) in relation to two soil pH - after 2,4,6,8 weeks. I used mixed effects models, but some analyses didn´t work. It seems for me as if this is a randomly occurring problem since

Re: [R] convergence error code in mixed effects models

2007-12-13 Thread Douglas Bates
On Dec 13, 2007 4:15 PM, Ilona Leyer [EMAIL PROTECTED] wrote: Dear All, I want to analyse treatment effects with time series data: I measured e.g. leaf number (five replicate plants) in relation to two soil pH - after 2,4,6,8 weeks. I used mixed effects models, but some analyses didn´t

[R] Different display of same graphs on different screens

2007-12-13 Thread Judith Flores
Dear R-experts, I need to run a R code on different computers (MACs and PCs) on different monitos sizes. The code generates graphs that are displayed in the same page. But there are some elements of the graphs that appear at the right position on a PC, but they don't appear at all when I run

Re: [R] Different display of same graphs on different screens

2007-12-13 Thread Dylan Beaudette
On Thursday 13 December 2007, Judith Flores wrote: Dear R-experts, I need to run a R code on different computers (MACs and PCs) on different monitos sizes. The code generates graphs that are displayed in the same page. But there are some elements of the graphs that appear at the right

Re: [R] Calculating Rsquared values in rpart

2007-12-13 Thread Dylan Beaudette
On Thursday 13 December 2007, Frank E Harrell Jr wrote: Andrew Park wrote: Hi there In rpart, one can get a graph of R-squared (using rsq.rpart (fit)), in which the x axis is the number of splits, and which contains two lines - an apparent R squared and an Rsquared based on the x error.

Re: [R] ls() pattern

2007-12-13 Thread Moshe Olshansky
Hi Livia, Below is my solution. I believe that other list members will post a better one. Regards, Moshe. rm(list=ls()) eval(parse(text=paste(paste(x,1:5,sep=),paste(-1.,1:5,;,sep= eval(parse(text=paste(paste(y,1:5,sep=),paste(-2.,1:5,;,sep=

Re: [R] Calculating Rsquared values in rpart

2007-12-13 Thread Ravi Varadhan
The author is actually Ye, and not Yi. It is titled On Measuring and correcting the effects of data mining and model selection by Jianming Ye, JASA(1998). Here is link from JSTOR: http://www.jstor.org/view/01621459/di015668/01p00145/0?currentResult=0162145

Re: [R] spliting strings ...

2007-12-13 Thread Moshe Olshansky
Hi Monica, Try sapply(as.list(str),function(x) unlist(strsplit(x, ))[1]) --- Monica Pisica [EMAIL PROTECTED] wrote: Hi everyone, I have a vector of strings, each string made up by different number of words. I want to get a new vector which has only the first word of each string in

Re: [R] Helpfiles in HTML browser

2007-12-13 Thread Francisco J. Zagmutt
Go to your Rprofile file (in the etc directory) and add the following line: options(htmlhelp=TRUE) I hope this helps Francisco Knut Krueger wrote: I forgot how to switch between Windows helpfiles and Browser helpfiles. f.e ?lm should open the browser. Maybe anybody could give me a hint?

Re: [R] RMySQL and free text variable

2007-12-13 Thread H. Paul Benton
Yea that worked !! Did paste(SELECT * FROM MET WHERE molid=, molid, AND mode=, \' mode, \' , sep=) I guess all I needed was the sep= which I totally forgot about. Cheers, Paul Eric wrote: Does this work for you? SELECT * FROM data WHERE molNUM = 165 AND mode = '+' Possibly related: when

[R] RODBC, optimizing memory, Error: cannot allocate vector of size 522 Kb.

2007-12-13 Thread Thomas Pujol
I am using RODBC and odbcConnect. I have successfully used odbcConnect to extract modest amounts of data from SQL. For convenience, (and maybe speed?) I wish, if possible, to extract larger amounts of data in a single query. (I am running R2.6.0 under a machine running Windows Small

[R] Help! - boxcox transformations

2007-12-13 Thread Nuno Prista
Hi, Hope this does not sound too ignorant . I am trying to detrend and transform variables to achieve normality and stationarity (for time series use, namely spectral analysis). I am using the boxcox transformations. As my dataset contains zeros, I found I need to add a constant to it

Re: [R] Analyzing Publications from Pubmed via XML

2007-12-13 Thread Farrel Buchinsky
I am afraid not! The only thing I know about Python (or Perl, Ruby etc) is that they exist and that I have been able to download some amazing freeware or open source software thanks to their existence. The XML package and specifically the xmlTreeParse function looks as if it is begging to do the

[R] Analyzing Publications from Pubmed via XML

2007-12-13 Thread Farrel Buchinsky
I would like to track in which journals articles about a particular disease are being published. Creating a pubmed search is trivial. The search provides data but obviously not as an R dataframe. I can get the search to export the data as an xml feed and the xml package seems to be able to read

Re: [R] multiple ANOVAs

2007-12-13 Thread Ashoka Polpitiya
Kevin, I guess this may not have a one line solution (I may be wrong). I would try something like this: -Get all the unique (use 'unique') values in 'temp' -Loop through these values and extract the subset of data and perform the ANOVA on this subset. As an example, code may go something like

Re: [R] Help! - boxcox transformations

2007-12-13 Thread Peter Dunn
I am trying to detrend and transform variables to achieve normality and stationarity (for time series use, namely spectral analysis). I am using the boxcox transformations. As my dataset contains zeros, I found I need to add a constant to it in order to run boxcox. If your data are

Re: [R] Analyzing Publications from Pubmed via XML

2007-12-13 Thread Rajarshi Guha
On Dec 13, 2007, at 9:03 PM, Farrel Buchinsky wrote: I would like to track in which journals articles about a particular disease are being published. Creating a pubmed search is trivial. The search provides data but obviously not as an R dataframe. I can get the search to export the

Re: [R] Analyzing Publications from Pubmed via XML

2007-12-13 Thread Gabor Grothendieck
On Dec 13, 2007 9:03 PM, Farrel Buchinsky [EMAIL PROTECTED] wrote: I would like to track in which journals articles about a particular disease are being published. Creating a pubmed search is trivial. The search provides data but obviously not as an R dataframe. I can get the search to export

Re: [R] Analyzing Publications from Pubmed via XML

2007-12-13 Thread Rajarshi Guha
On Dec 13, 2007, at 9:16 PM, Farrel Buchinsky wrote: I am afraid not! The only thing I know about Python (or Perl, Ruby etc) is that they exist and that I have been able to download some amazing freeware or open source software thanks to their existence. The XML package and specifically

[R] RJDBC to OpenOffice Calc as RODBC to MS Excel

2007-12-13 Thread Metz, Thomas (IRRI)
Under Windows, I have used RODBC to connect to Excel spreadsheets as per the example below: library(RODBC); connect = odbcConnectExcel(testdata.xls); query = SELECT [data$.ethn], [data$.sex], [data$.age], [data$.height], [data$.weight], [label$.label]

Re: [R] Analyzing Publications from Pubmed via XML

2007-12-13 Thread Robert Gentleman
or just try looking in the annotate package from Bioconductor Gabor Grothendieck wrote: On Dec 13, 2007 9:03 PM, Farrel Buchinsky [EMAIL PROTECTED] wrote: I would like to track in which journals articles about a particular disease are being published. Creating a pubmed search is trivial. The

Re: [R] RODBC, optimizing memory, Error: cannot allocate vector of size 522 Kb.

2007-12-13 Thread Prof Brian Ripley
This question is nothing to do with RODBC. You need to study the rw-FAQ Q2.9: I believe you should be able to get up to (almost) 3GB on that system. (BTW, you seem confused about units: I hope you have 3GB of RAM, where G means 1024^3.) On Thu, 13 Dec 2007, Thomas Pujol wrote: I am using

Re: [R] RJDBC to OpenOffice Calc as RODBC to MS Excel

2007-12-13 Thread Prof Brian Ripley
On Fri, 14 Dec 2007, Metz, Thomas (IRRI) wrote: Under Windows, I have used RODBC to connect to Excel spreadsheets as per the example below: library(RODBC); connect = odbcConnectExcel(testdata.xls); query = SELECT [data$.ethn], [data$.sex], [data$.age], [data$.height],