Re: [R] make: Nothing to be done for `all'.

2010-05-11 Thread Romain Francois
Le 12/05/10 00:23, Elizabeth Lawson a écrit : Why would I want to remove (rm) the file. I am trying to compile it. make thinks : "Why would I compile this file, the result is already there" First time : rom...@naxos /tmp $ R CMD SHLIB hello.c gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Fra

[R] Package RPostgreSQL : Problem with dbWriteTable

2010-05-11 Thread PALMIER Patrick - CETE NP/INFRA/TRF
Hello, I have a probem with dbWriteTable method of package RPostrgreSQL The table is well added in the database but R doesn't succeed in inserting rows But If I send the "COPY FROM" as an sql query in R, the rows are then well added I think it is a problem with the temp file create by dbWrit

Re: [R] How to generate Mackey-Glass time series with "ddesolve" package?

2010-05-11 Thread Thomas Petzoldt
Hello Mike, please provide a reproducible example, so that we can see why and how ddesolve "hangs". In addition you may consider using function dede from package deSolve which allows to choose between different solver methods for dealing with delay differential equations. Thomas Petzoldt A

Re: [R] finite difference scheme for 2D differential equations

2010-05-11 Thread Thomas Petzoldt
Hello Subodh Acharya, I've been away for a field trip for two weeks, and I guess you have already found a solution for your problem. If your question is still open, you may consider to look into package deSolve that now provides functions (ode1D, ode2D and ode3D) for solving 1-3 dimensional

Re: [R] Summarizing counts by multiple factors

2010-05-11 Thread Dennis Murphy
Hi: How about > as.data.frame(with(df, table(group, level, color))) group level color Freq 1 A 1 blue1 2 B 1 blue1 3 A 2 blue1 4 B 2 blue2 5 A 1 Red1 6 B 1 Red0 7 A 2 Red2 8 B 2 Red2 whe

Re: [R] sorting rows of dataframe

2010-05-11 Thread David Winsemius
On May 11, 2010, at 10:44 PM, michael westphal wrote: Hello: I have a dataframe, where the first column in a month: Month CATCHMENT_ medmin max 1Apr Alknda01 71.68080 11.9406600 196.2753 2Apr Alknda02 69.44580 12.1065600 196.2753 3Apr ArialKhan 39.89310 5.8

Re: [R] Creating data frames in a loop

2010-05-11 Thread David Winsemius
On May 11, 2010, at 11:01 PM, Nish wrote: Hello, I am new to R and have a question on creating data frames at run time in a loop. How can I create it? For example, something like the following which will create 20 dataframes. Well not unless you for(i in 1:20) { ddat_ <- data other p

Re: [R] Is there an easier way to replace the object name in the R code

2010-05-11 Thread Erik Iverson
mam3xs wrote: Hi all, I have a R code with quite a few lines. For instance AA <- read.csv(C:\\AA.txt) AA.diff <- diff(log(AA)) . Now I want to re-define the code with different object, like BB, CC..ZZ(the codes are the same). Thus, I was wondering whether their is an efficient wa

Re: [R] intersect

2010-05-11 Thread David Winsemius
On May 11, 2010, at 10:31 PM, Yuan Jian wrote: Hi there, how can I test every element in a vector whether appears in another vector? such as a<-c("aa", "bb", "ff", "cc") b <-c("oo","jj","bb","cc") somefunction(a,b) gives [False, True, False, True] The other answers probably gave you what

Re: [R] summing items within a row

2010-05-11 Thread David Winsemius
On May 11, 2010, at 8:36 PM, Q wrote: Hello, I am trying to figure out how to do a sum of items within a row. For example, I have a data frame something like this: A1 B1 ... A2 B2 ... 1 1 41 4 2 2 52 5 3 3 63 6 What I want, is for each row, to get

Re: [R] Whiskers on the default boxplot {graphics}

2010-05-11 Thread David Winsemius
On May 11, 2010, at 11:55 PM, Jason Rupert wrote: Okay...Let me see if I've got it... I'm just trying to use the default boxplot {graphics} capability in R... So I call something like the following: boxplot(mpg~cyl,data=mtcars, main="Car Milage Data", xlab="Number of Cylinders", ylab="Mi

Re: [R] Whiskers on the default boxplot {graphics}

2010-05-11 Thread David Winsemius
On May 11, 2010, at 10:35 PM, Jason Rupert wrote: HummMaybe I need to look some place else than boxplot.stats {grDevices} for a definition of how the upper/lower whiskers are produced. By any chance are they "the lowest datum still within 1.5 IQR of the lower quartile, and the highes

Re: [R] Whiskers on the default boxplot {graphics}

2010-05-11 Thread Jason Rupert
Okay...Let me see if I've got it... I'm just trying to use the default boxplot {graphics} capability in R... So I call something like the following: > boxplot(mpg~cyl,data=mtcars, main="Car Milage Data", xlab="Number of > Cylinders", ylab="Miles Per Gallon") \ That produces something as shown i

Re: [R] intersect

2010-05-11 Thread Sean Anderson
wrote: > how can I test every element in a vector whether appears in another vector? > such as > a<-c("aa", "bb", "ff", "cc") > b <-c("oo","jj","bb","cc") a %in% b [1] FALSE TRUE FALSE TRUE __ R-help@r-project.org mailing list https://stat.ethz.ch/ma

[R] summing items within a row

2010-05-11 Thread Q
Hello, I am trying to figure out how to do a sum of items within a row. For example, I have a data frame something like this: A1 B1 ... A2 B2 ... 1 1 41 4 2 2 52 5 3 3 63 6 What I want, is for each row, to get A1 + A2, B1 + B2, etc. which would, perha

Re: [R] intersect

2010-05-11 Thread Jorge Ivan Velez
Hi Yuan, Try > a<-c("aa", "bb", "ff", "cc") > b <-c("oo","jj","bb","cc") > a %in% b [1] FALSE TRUE FALSE TRUE HTH, Jorge On Tue, May 11, 2010 at 10:31 PM, Yuan Jian <> wrote: > Hi there, > > how can I test every element in a vector whether appears in another vector? > such as > a<-c("aa", "

Re: [R] make: Nothing to be done for `all'.

2010-05-11 Thread Elizabeth Lawson
Why would I want to remove (rm) the file. I am trying to compile it. For the file hello2.c /* hello.c: display a message on the screen */ #include main() { printf("hello, world\n"); } I used gcc hello2.c and it works fine. But fort eh file hello.c #include void hello(int *n) {

[R] 3d surface plot

2010-05-11 Thread kun . zhao
Hi,Sir or Miss: We meet a problem of plotting 3d, which is a part of 5D. In other word, we just fixed the rest of 2 variables and slice 5d into 3d. Consider a function like Y=f(x1, x2, x3, x4). We want to have a 3D surface plot in R for the fitted value Yhat (which is of course a function of x

[R] Creating data frames in a loop

2010-05-11 Thread Nish
Hello, I am new to R and have a question on creating data frames at run time in a loop. How can I create it? For example, something like the following which will create 20 dataframes. for(i in 1:20) { ddat_ <- data other processing... } Thanks. -- View this message in context: http://r.789

[R] 3d surface plot

2010-05-11 Thread kun . zhao
Hi,Thomas: We meet a problem of plotting 3d, which is a part of 5D. In other word, we just fixed the rest of 2 variables and slice 5d into 3d. Consider a function like Y=f(x1, x2, x3, x4). We want to have a 3D surface plot in R for the fitted value Yhat (which is of course a function of x1, x2,

Re: [R] Revolution R and the R Community?

2010-05-11 Thread Duncan Murdoch
On 11/05/2010 4:03 PM, Tal Galili wrote: Hi Iaw (or Ivo ?!), I have seen REvolution in useR 2009. I personally know one of the students they sponsored once, and have been following David Smith's (great) online work for over a year now. REvolution is real, and I hope they (and more companies lik

[R] intersect

2010-05-11 Thread Yuan Jian
Hi there, how can I test every element in a vector whether appears in another vector? such as a<-c("aa", "bb", "ff", "cc") b <-c("oo","jj","bb","cc") somefunction(a,b) gives [False, True, False, True] thanks yuan jian [[alternative HTML version deleted]] _

[R] argument is of length zero

2010-05-11 Thread cobbler_squad
Dear R gurus, We are working on a problem in R - the following script is getting a subset of values from a table that is read in and calculating the average of these values in the subset defined. the table looks like this: subject stim trial xmax ymax xmin ymin flag 1 4 dur1

[R] How to extract sum of particular months in a monthly data series

2010-05-11 Thread Zablone Owiti
Dear Users, I have a monthly data for a number of years(1960-2007) for a number of stations and i wish to extract sesonal time-series for the months of March-May and October-November for very station. I have read this data with read.table in R with stations as columns and time (months) as rows

Re: [R] Whiskers on the default boxplot {graphics}

2010-05-11 Thread RJ Cunningham
I think not. Isn't the "secret" here? Arguments: x: a numeric vector for which the boxplot will be constructed ('NA's and 'NaN's are allowed and omitted). coef: this determines how far the plot 'whiskers' extend out from the box. If 'coef' is positive, the whiskers extend to t

[R] Is there an easier way to replace the object name in the R code

2010-05-11 Thread mam3xs
Hi all, I have a R code with quite a few lines. For instance AA <- read.csv(C:\\AA.txt) AA.diff <- diff(log(AA)) . Now I want to re-define the code with different object, like BB, CC..ZZ(the codes are the same). Thus, I was wondering whether their is an efficient way or automatic w

[R] sorting rows of dataframe

2010-05-11 Thread michael westphal
Hello: I have a dataframe, where the first column in a month: Month CATCHMENT_ medmin max 1Apr Alknda01 71.68080 11.9406600 196.2753 2Apr Alknda02 69.44580 12.1065600 196.2753 3Apr ArialKhan 39.89310 5.8598700 175.4433 4AprArjun01 4.79652 0.0093336

Re: [R] Whiskers on the default boxplot {graphics}

2010-05-11 Thread Jason Rupert
HummMaybe I need to look some place else than boxplot.stats {grDevices} for a definition of how the upper/lower whiskers are produced. By any chance are they "the lowest datum still within 1.5 IQR of the lower quartile, and the highest datum still within 1.5 IQR of the upper quartile"? No

Re: [R] Whiskers on the default boxplot {graphics}

2010-05-11 Thread Jason Rupert
Wowzers... From ?boxplot.stats: Details The two ‘hinges’ are versions of the first and third quartile, i.e., close to quantile(x, c(1,3)/4). The hinges equal the quartiles for odd n (where n <- length(x)) and differ for even n. Whereas the quartiles only equal observations for n %% 4 == 1 (n

Re: [R] dbSendQuery with R variables

2010-05-11 Thread kMan
?paste See also, http://rwiki.sciviews.org/doku.php?id=large_scale_data:lsdioi_sqchunk for additional examples. Assuming stations[1:2] are tables your database: simpleQuery<- paste("SELECT * FROM", stations[1]) # should read the whole table when invoked dbGetQuery(con_stations, simpleQuery) Is t

Re: [R] Whiskers on the default boxplot {graphics}

2010-05-11 Thread David Winsemius
On May 11, 2010, at 9:45 PM, Jason Rupert wrote: How are the lower/upper whiskers defined in the default version of boxplot {graphics}? I tried help(boxplot) and searching www.rseek.org, but I was unable to determine an absolute answer. You need to follow the links from the help pages an

Re: [R] Summarizing counts by multiple factors

2010-05-11 Thread David Winsemius
On May 11, 2010, at 9:08 PM, David Winsemius wrote: On May 11, 2010, at 8:38 PM, Noah Silverman wrote: Hi, An example data set is: grouplevelcolor A1"blue" A1"Red" B1"blue" B2"Red" A2"Red" B2

[R] Whiskers on the default boxplot {graphics}

2010-05-11 Thread Jason Rupert
How are the lower/upper whiskers defined in the default version of boxplot {graphics}? I tried help(boxplot) and searching www.rseek.org, but I was unable to determine an absolute answer. I checked out the definition of boxplot according to Wikipedia (http://en.wikipedia.org/wiki/Box_plot),

Re: [R] Problems plotting date and time column from excel using R

2010-05-11 Thread Gabor Grothendieck
Check out the options listed here: http://rwiki.sciviews.org/doku.php?id=tips:data-io:ms_windows On Tue, May 11, 2010 at 9:00 AM, Terry Bassett wrote: > I am using R to read from an excel(csv) file. Within the excel file is a > column with the date set that looks likes this: > >  53:40.2 > and

Re: [R] Summarizing counts by multiple factors

2010-05-11 Thread David Winsemius
On May 11, 2010, at 8:38 PM, Noah Silverman wrote: Hi, An example data set is: grouplevelcolor A1"blue" A1"Red" B1"blue" B2"Red" A2"Red" B2"Red" B2"blue" B2"

Re: [R] Revolution R and the R Community?

2010-05-11 Thread ivo welch
thank you, everybody, for enlightening me and others about the relationships involved. I hope Revolution R and other companies like it will succeed. I don't mind RR being free to academics---if nothing else, I like it for the fact that I can install RR without worry on a couple of different compu

[R] Summarizing counts by multiple factors

2010-05-11 Thread Noah Silverman
Hi, An example data set is: grouplevelcolor A1"blue" A1"Red" B1"blue" B2"Red" A2"Red" B2"Red" B2"blue" B2"blue" A2"blue" A2"Red"

Re: [R] removing duplicate rows

2010-05-11 Thread Sean Anderson
On Tue, May 11, 2010 at 9:07 PM, Jim Bouldin wrote: > > I'm trying to identify and remove rows in a data frame that are duplicated > only on particular columns within it (i.e. not on all columns). This is probably the cleanest way: dat <- data.frame(x = c(1, 2, 3), y = c(1, 1, 3)) subset(dat, !d

[R] removing duplicate rows

2010-05-11 Thread Jim Bouldin
I'm trying to identify and remove rows in a data frame that are duplicated only on particular columns within it (i.e. not on all columns). The "unique" function looks for uniqueness across all columns of a data frame. Identifying unique rows based only on specific columns of interest returns onl

Re: [R] how to extract the variables used in decision tree

2010-05-11 Thread David Winsemius
On May 11, 2010, at 6:49 PM, Changbin Du wrote: HI, Dear R community, How to extract the variables actually used in tree construction? I want to extract these variables and combine other variable as my features in next step model building. help(package=rpart, rpart.object) printcp(

[R] how to extract the variables used in decision tree

2010-05-11 Thread Changbin Du
HI, Dear R community, How to extract the variables actually used in tree construction? I want to extract these variables and combine other variable as my features in next step model building. > printcp(fit.dimer) Classification tree: rpart(formula = outcome ~ ., data = p_df, method = "class") V

Re: [R] Revolution R and the R Community?

2010-05-11 Thread Barry Rowlingson
On Tue, May 11, 2010 at 4:08 PM, ivo welch wrote: > As an end-user, I wonder about Revolution R.  Is the relationship > between Revolution R and the R community at-large a positive one?  Do > the former contribute to the development efforts of the latter?  Is > there a competitive aspect?  is thei

[R] make: Nothing to be done for `all'.

2010-05-11 Thread Elizabeth Lawson
I recently bought a new macbook pro 10.6.3 and I am trying to compile some C code I have. I reinstalled R and Xcode on the Mac but I keep running into the same problem. The code help.c #include void hello(int *n) { int i; for(i=0; i < *n; i++) { Rprintf("Hello, world!\n"); } } I try R C

Re: [R] P values

2010-05-11 Thread Frank E Harrell Jr
On 05/11/2010 04:50 PM, Bert Gunter wrote: Inline below. -- Bert Bert - I disagree with you. You have understated the problems with P-values :-) Frank Bert Gunter Genentech Nonclinical Statistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-pr

Re: [R] P values

2010-05-11 Thread Bert Gunter
Inline below. -- Bert Bert Gunter Genentech Nonclinical Statistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Greg Snow Sent: Tuesday, May 11, 2010 2:37 PM To: Bak Kuss; murdoch.dun...@gmail.com; jorism...@gmail.com Cc: R-he

[R] What are your thoughts about the "R programming" wiki-book ?

2010-05-11 Thread Tal Galili
An R community member named Ajay wrote today about the "R programming" wiki-book project (link to Ajay's post), and I would like to know what you think about the project: http://en.wikibooks.org/wiki/R_Programming Ajay believes

Re: [R] P values

2010-05-11 Thread Greg Snow
Bak, I think that you are focusing too much on strict definitions rather than on understanding the concepts. Definitions are important to make sure that we are consistent, but understanding is more important. The main idea behind p-values and other forms of hypothesis testing is a measure of

Re: [R] Random walk

2010-05-11 Thread Sergio Andrés Estay Cabrera
Dear Giovanni, Thanks so much for your answer, but your script returns gaussian white noise not a random walk, at least the time series generated don't have the expected periodogram for a random walk. That's the reason why I use cumsum, the sum of a white noise is a easy way produce a random

Re: [R] Pairwise combination

2010-05-11 Thread chen jia
Thanks, everyone. combn function works pretty well for me. Best, Jia On Tue, May 11, 2010 at 5:12 PM, Henrique Dallazuanna wrote: > Or: > > combn(1:4, 2, paste, collapse = ' and ') > > On Tue, May 11, 2010 at 5:54 PM, Ista Zahn wrote: >> >> On Tuesday 11 May 2010 4:27:01 pm David Winsemius wro

[R] Vectorized expression to extrapolate matrix columns with columns of another matrix

2010-05-11 Thread Abiel X Reinhart
I have two identically sized matrices of data that represent time series (I am storing the data in zoo objects, but the idea should apply to any matrix of data). The time series in the second matrix extend further than in the first matrix, and I would like to use the data in matrix 2 to extrapol

Re: [R] Problems plotting date and time column from excel using R

2010-05-11 Thread RICHARD M. HEIBERGER
I recommend that you use RExcel to get your files directly from the xls or xlsx file into R. RExcel correctly transfers dates from Excel to R. rcom.univie.ac.at for full information. You can begin with the RExcelInstaller package from CRAN. Rich [[alternative HTML version deleted]] __

Re: [R] Pairwise combination

2010-05-11 Thread Henrique Dallazuanna
Or: combn(1:4, 2, paste, collapse = ' and ') On Tue, May 11, 2010 at 5:54 PM, Ista Zahn wrote: > On Tuesday 11 May 2010 4:27:01 pm David Winsemius wrote: > > On May 11, 2010, at 1:45 PM, chen jia wrote: > > > Hi there, > > > > > > I am looking for a function that takes a vector as input and gen

Re: [R] Pairwise combination

2010-05-11 Thread David Winsemius
On May 11, 2010, at 4:54 PM, Ista Zahn wrote: On Tuesday 11 May 2010 4:27:01 pm David Winsemius wrote: On May 11, 2010, at 1:45 PM, chen jia wrote: Hi there, I am looking for a function that takes a vector as input and generates all pair wise combination of the elements of the input vecto

Re: [R] Pairwise combination

2010-05-11 Thread Ista Zahn
On Tuesday 11 May 2010 4:27:01 pm David Winsemius wrote: > On May 11, 2010, at 1:45 PM, chen jia wrote: > > Hi there, > > > > I am looking for a function that takes a vector as input and generates > > all pair wise combination of the elements of the input vector. > > ?combn > > > For example, th

Re: [R] Help with scatter plot

2010-05-11 Thread Greg Snow
Probably easiest using the segments function. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > project.org] On Behalf Of A Ezhil > Sent:

Re: [R] Random walk

2010-05-11 Thread Giovanni Petris
Hi Sergio, Your function does not estimate what you want. In fact it does not estimate anything useful. A random walk is not stationary; in particular, the variance at time t is t. Therefore, estimating variances based on one run, averaging over time, does not make any sense. This is what you are

Re: [R] Table and Sweave

2010-05-11 Thread Ista Zahn
It would be easier to help if you made your example reproducible (what is IDADE and where does it come from?). -Ista On Tuesday 11 May 2010 4:22:27 pm Silvano wrote: > Hi, > > in Latex I get the table using: > > \begin{table}[H] > \centering > \renewcommand{\arraystretch}{1.3} > \setlength{\ta

Re: [R] median of two groups

2010-05-11 Thread Greg Snow
Here is a simple example of a permutation test on medians without pairing and different numbers of subjects in each group: sw <- iris$Sepal.Width[ c(101:130, 51:70) ] group <- rep( 1:2, c(30,20) ) out <- replicate( 1999, { tmp <- sample(group); median(sw[tmp==1]) - median(sw[tmp==2]) }

Re: [R] [Fwd: Re: Plotting log-axis with the exponential base to

2010-05-11 Thread Ted Harding
Thanks, Peter! The use of curve() is nice. (I hadn't come across that function before, but then ... ). Thanks also to Mark Difford for a further suggestion. Ted. On 11-May-10 18:27:37, Peter Ehlers wrote: > Ted, > > Regarding the addition of a 'line' to a plot with log-y axis, > there is a bette

Re: [R] Problems plotting date and time column from excel using R

2010-05-11 Thread David Scott
David Winsemius wrote: On May 11, 2010, at 9:00 AM, Terry Bassett wrote: I am using R to read from an excel(csv) file. Within the excel file is a column with the date set that looks likes this: 53:40.2 and in the Insert function box it looks likes this: 9/21/2006 4:53:40 PM This is reall

Re: [R] Rd files must have a non-empty \title

2010-05-11 Thread Rolf Turner
On 12/05/2010, at 5:25 AM, Greg Snow wrote: > I nominate Duncan's last statement: > >> If you don't want informative help files, it's really not much work to >> make uninformative ones. >> >> Duncan Murdoch > > For the fortunes package. I second the motion! cheers, R

Re: [R] odfweave with openOffice 3.2

2010-05-11 Thread Jean lobry
At 15:57 -0400 11/05/10, Max Kuhn wrote: Problems have been reported, such as: https://stat.ethz.ch/pipermail/r-help/2010-May/237577.html but I have not reproduced them. For me it works fine with the results in the above link and with: sessionInfo() R version 2.10.0 RC (2009-10-18 r5016

Re: [R] Supercripting text

2010-05-11 Thread David Winsemius
On May 11, 2010, at 12:37 PM, Shang Gao wrote: Another question: is it possible to keep the superscripts unbolded? For example if you run the codes below, it can be seen that using the expression(bold(paste(...))) command will result in the text being bolded but not the superscripts. our

Re: [R] Pairwise combination

2010-05-11 Thread Ista Zahn
combn(1:4, 2) will do it. -Ista On Tuesday 11 May 2010 1:45:14 pm chen jia wrote: > Hi there, > > I am looking for a function that takes a vector as input and generates > all pair wise combination of the elements of the input vector. > > For example, the input vector is c(1,2,3,4). The output v

Re: [R] Regressions with fixed-effect in R

2010-05-11 Thread Daniel Malter
if the plm function only puts out one r-squared, it should be the within r-squared, but I could be wrong. Stata, for example, gives you a within, a between, and an overall r-squared. Here is what they do. set.seed(1) x=rnorm(100) fe=rep(rnorm(10),each=10) id=rep(1:10,each=10) ti=rep(1:10,10) e=rn

Re: [R] Pairwise combination

2010-05-11 Thread David Winsemius
On May 11, 2010, at 1:45 PM, chen jia wrote: Hi there, I am looking for a function that takes a vector as input and generates all pair wise combination of the elements of the input vector. ?combn For example, the input vector is c(1,2,3,4). The output vector is c(1 and 2, 1 and 3, 1 and 4

Re: [R] Pairwise combination

2010-05-11 Thread Henrique Dallazuanna
try this: combn(c(1,2,3,4), 2) On Tue, May 11, 2010 at 2:45 PM, chen jia wrote: > Hi there, > > I am looking for a function that takes a vector as input and generates > all pair wise combination of the elements of the input vector. > > For example, the input vector is c(1,2,3,4). The output ve

Re: [R] Panel data with binary dependent variable

2010-05-11 Thread Daniel Malter
RE models are available in the lme4 and MASS packages in the glmer and glmmPQL functions, respectively. -- View this message in context: http://r.789695.n4.nabble.com/Panel-data-with-binary-dependent-variable-tp2156043p2184223.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] Revolution R and the R Community?

2010-05-11 Thread Tal Galili
Hi Iaw (or Ivo ?!), I have seen REvolution in useR 2009. I personally know one of the students they sponsored once, and have been following David Smith's (great) online work for over a year now. REvolution is real, and I hope they (and more companies like them) will flourish in the future. I agr

Re: [R] [Fwd: Re: Plotting log-axis with the exponential base to

2010-05-11 Thread Mark Difford
Hi All, You can also add a line using lines() if you transform in the call using the same log-base---but not via R's log="y" argument (because of what's stored in par("yaxp")). ## par(mfrow=c(1,3)) plot(1:10, log="y") lines(log10(1:10)) par("yaxp") plot(log10(1:10), yaxt="n") axis(side=2, at=sa

[R] Table and Sweave

2010-05-11 Thread Silvano
Hi, in Latex I get the table using: \begin{table}[H] \centering \renewcommand{\arraystretch}{1.3} \setlength{\tabcolsep}{18pt} \begin{tabular}{cc} \hline Idade & Frequência \\ \hline $18 \vdash 26$ & 11 \\ $26 \vdash 34$ &8 \\ $34 \vdash 42$ & 26 \\ $42 \vdash 50$ & 2

[R] Help with scatter plot

2010-05-11 Thread A Ezhil
Dear All, I would like to add the mean line in the scatter plot by groups. I have plotted (X.val is 3 groups: 0, 1, 2): plot( Y ~ X.val). How can I add mean/median line (horizontal) for each group on the scatter plot? Thanks in advance. Kind regards, Ezhil

Re: [R] RWinEdt in WinEdt 6

2010-05-11 Thread Gregoire
Thanks for your reply Uwe. I'll just have to keep up with the cutting and pasting, which isn't so bad. But it's a useful little plugin. Thanks for your willingness to continue to develop it. All the best, Gregory -- View this message in context: http://r.789695.n4.nabble.com/RWinEdt-in-WinEdt-6

Re: [R] Supercripting text

2010-05-11 Thread Shang Gao
Another question: is it possible to keep the superscripts unbolded? For example if you run the codes below, it can be seen that using the expression(bold(paste(...))) command will result in the text being bolded but not the superscripts. ourtitle <- function(title, footnotes=NULL) { if (lengt

Re: [R] Regressions with fixed-effect in R

2010-05-11 Thread chen jia
Thanks. I have the PDF document that you suggest. It is very brief on fixed-effect in panel regressions. I will look into plm package. Best, Jia On Tue, May 11, 2010 at 8:19 AM, Liviu Andronic wrote: > On 5/11/10, chen jia wrote: >>  Are there any functions that specifically deal with fixed-ef

[R] RWinEdt in WinEdt 6

2010-05-11 Thread Gregoire
I'm having difficulty installing RWinEdt in WinEdt 6. I receive the following message: Error : .onAttach failed in attachNamespace() for 'RWinEdt', details: call: getWinEdt() error: WinEdt is not installed properly. I have tried following the manual instructions in the readme.txt withou

[R] Pairwise combination

2010-05-11 Thread chen jia
Hi there, I am looking for a function that takes a vector as input and generates all pair wise combination of the elements of the input vector. For example, the input vector is c(1,2,3,4). The output vector is c(1 and 2, 1 and 3, 1 and 4, 2 and 3, 2 and 4, 3 and 4). The representation here is gen

Re: [R] dbSendQuery with R variables

2010-05-11 Thread Seth Falcon
On 5/11/10 5:01 AM, jim holtman wrote: ?paste On Mon, May 10, 2010 at 6:21 PM, Jonathan Greenberg wrote: Rhelpers: I'd like to modify this RSQLite statement: rs_stations<-dbSendQuery(con_stations, "select * from stations") so that stations is actually an R variable, e.g.: stations=c("stati

Re: [R] odfweave with openOffice 3.2

2010-05-11 Thread Max Kuhn
Problems have been reported, such as: https://stat.ethz.ch/pipermail/r-help/2010-May/237577.html but I have not reproduced them. For me it works fine with the results in the above link and with: > sessionInfo() R version 2.10.0 RC (2009-10-18 r50160) x86_64-apple-darwin9.8.0 locale: [1] en_

Re: [R] predicting without a model

2010-05-11 Thread Felipe Carrillo
Exactly what I want, thanks a lot Ben.   Felipe D. Carrillo Supervisory Fishery Biologist Department of the Interior US Fish & Wildlife Service California, USA - Original Message > From: Ben Bolker > To: r-h...@stat.math.ethz.ch > Sent: Tue, May 11, 2010 12:11:00 PM > Subject: Re: [R]

Re: [R] Mantel-Byar test

2010-05-11 Thread Raphael Fraser
Thank you Terry. On Tue, May 11, 2010 at 8:28 AM, Terry Therneau wrote: > >> The Mantel-Byar test is a simple modification to the logrank test. Can >> R perform this test or any other similar test? > > The logrank test = "score test" from coxph > The Mantel-Byar is the score test from a Cox mod

Re: [R] RWinEdt in WinEdt 6

2010-05-11 Thread Uwe Ligges
On 11.05.2010 18:01, Gregoire wrote: I'm having difficulty installing RWinEdt in WinEdt6. I receive the following message: Error : .onAttach failed in attachNamespace() for 'RWinEdt', details: call: getWinEdt() error: WinEdt is not installed properly. I have tried following the manual

Re: [R] a matter of etiquette

2010-05-11 Thread John Sorkin
In the spirit of open software, and in the spirit of R which encourages review of software, if you find an error I think you should let the R community know of the error. Of course you should give the package maintainer the first crack at fixing the error, but if no fix is forthcoming, please in

Re: [R] nls() and nls2() behavior?

2010-05-11 Thread Gabor Grothendieck
On Tue, May 11, 2010 at 11:24 AM, Walmes Zeviani wrote: > > I think the problem with nls() is the model specification. Look: > >> y <- c(0.4334,0.3200,0.5848,0.6214,0.3890,0.5233,0.4753, > +        0.2104,0.3240,0.2827,0.3847,0.5571,0.5432,0.1326,0.3481) >> x <- c(0.3521,0.4334,0.3200,0.5848,0.621

Re: [R] predicting without a model

2010-05-11 Thread Rob Forler
I forgot to reply to all: This is what I sent earlier to him: """ I would look at the data. You don't really have any information other than what appears to be the weekly passage. I would look to see if there is any relationship between the current value of passage and previous values of passage.

[R] odfweave with openOffice 3.2

2010-05-11 Thread Jean lobry
Dear list, since I have upgraded openOffice to version 3.2 I have some trouble to open very simple ODT files generated by odfweave: the file is apparently corrupted (but recovery is fine). I have observed this under windows and mac OS 10.4.11 with R 2.10.0, odfWeave_0.7.11, XML_2.6-0, lattice_0.

Re: [R] predicting without a model

2010-05-11 Thread Ben Bolker
Felipe Carrillo yahoo.com> writes: ## snip In the absence of any other information, I would say your best bet would just be to take the weekly average across the previous years. There are lots of ways to do this (tapply, aggregate, etc.), but cast() works: fallavg <- cast(fallmelt,value="val

Re: [R] Improving loop performance

2010-05-11 Thread jim holtman
You are spending most of the time in the loop accessing the dataframe. Put the data you want out to a vector and then process that: > x <- read.table(textConnection(" Row.ID AgilentProbe GeneSymbol GeneID Exons AgilentStart first.geneid first.exon last.geneid last.exon + 8 1348 A_23_P11

Re: [R] Revolution R and the R Community?

2010-05-11 Thread Duncan Murdoch
On 11/05/2010 12:23 PM, David Smith wrote: On Tue, May 11, 2010 at 8:08 AM, ivo welch wrote: > As an end-user, I wonder about Revolution R. Is the relationship > between Revolution R and the R community at-large a positive one? Do > the former contribute to the development efforts of the latte

Re: [R] ANCOVA in R, single CoVar, two Variables

2010-05-11 Thread RICHARD M. HEIBERGER
I recommend the ancova function in the HH package. install.packages("HH") library(HH) example(ancova) ?ancova For your example, tmp <- textConnection( "day A B 0 10.010.0 7 9.0 9.1 14 8.0 8.2 21 7.0 7.3 28 6.0 6.4 35 5.0 5.5 42

Re: [R] [Fwd: Re: Plotting log-axis with the exponential base to

2010-05-11 Thread Peter Ehlers
Ted, Regarding the addition of a 'line' to a plot with log-y axis, there is a better way: curve() with 'add=TRUE' will respect the current plot's log setting: plot((1:10), log="y", yaxt="n") axis(side=2, at=c(1,2,5,10)) f <- function(x, a=0, b=1) {a + b*x} curve(f, add = TRUE)

[R] predicting without a model

2010-05-11 Thread Felipe Carrillo
Hello: I have 5 years of weekly passage data and want to predict fish passage for the following year. I don't have a model to use to predict data for the sixth year. Can I somehow still predict based on these five years? I just want to see on the graph what the predicted year would look like and ho

Re: [R] Fw: Improving loop performance

2010-05-11 Thread Patrick Burns
I didn't see the cumulative paste before, so my 'ifelse' suggestion doesn't make much sense, sorry. But if what you show is representative in that there are very few 'FALSE' values in 'first.exon', then you could use 'ifelse' and then go back and fix the wrong ones with a loop over the rows that

Re: [R] Gantt chart - more than one colour on a line

2010-05-11 Thread David Winsemius
On May 11, 2010, at 11:52 AM, D Holl wrote: Dear all I would like to plot a Gantt chart type plot, but with more than one colour on a line. The gantt.chart function will allow me to add more than one bar on a line, but it is in the same colour as the first bar on that line. For example (using

[R] Fw: Improving loop performance

2010-05-11 Thread Mark Lamias
I will clarify my problem as others has asked for more detail: I have a dataframe, aga2, that looks like this:    Row.ID AgilentProbe GeneSymbol GeneID Exons AgilentStart first.geneid first.exon last.geneid last.exon 8    1348 A_23_P116898    A2M  2    34  9112685 TRUE  

Re: [R] Rd files must have a non-empty \title

2010-05-11 Thread Greg Snow
I nominate Duncan's last statement: > If you don't want informative help files, it's really not much work to > make uninformative ones. > > Duncan Murdoch For the fortunes package. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111

[R] RWinEdt in WinEdt 6

2010-05-11 Thread Gregoire
I'm having difficulty installing RWinEdt in WinEdt6. I receive the following message: Error : .onAttach failed in attachNamespace() for 'RWinEdt', details: call: getWinEdt() error: WinEdt is not installed properly. I have tried following the manual instructions in the readme.txt without suc

[R] Gantt chart - more than one colour on a line

2010-05-11 Thread D Holl
Dear all I would like to plot a Gantt chart type plot, but with more than one colour on a line. The gantt.chart function will allow me to add more than one bar on a line, but it is in the same colour as the first bar on that line. For example (using the code helpful provided in the R graphics gall

Re: [R] sprintf funny behavior

2010-05-11 Thread Mario Valle
Not always the result of a function is printed on screen. Use: for(i in 1:4) print(sprintf("%d",4)) ciao! mario Matt Young wrote: >> sprintf("%d",4) > [1] "4" >> for(i in 1:4) sprintf("%d",4) >> for(i in 1:4) print(4) > [1] 4 > [1] 4 > [1] 4 > [1] 4 > > Why doesn't sprintf like the for l

Re: [R] sprintf funny behavior

2010-05-11 Thread Ted Harding
On 11-May-10 16:53:56, Matt Young wrote: >> sprintf("%d",4) > [1] "4" >> for(i in 1:4) sprintf("%d",4) >> for(i in 1:4) print(4) > [1] 4 > [1] 4 > [1] 4 > [1] 4 > > Why doesn't sprintf like the for loop here Because, as a general rule, output generated inside loops, and within execution of functi

  1   2   >