Re: [R] Incorrect Dimension

2009-09-18 Thread Schalk Heunis
Marcio Looking at the script (not much explanation re your intention), I think there is a couple of problems: 1. Not sure if the attached was supposed to be working code, but the assignment operator is - not = 2. The functions should be defined OUTSIDE the loop, otherwise you are redefining the

Re: [R] Datetime conversion

2009-09-18 Thread David Winsemius
On Sep 18, 2009, at 1:03 AM, premmad wrote: I'm relatively new to R .I tried converting the datetime column with values like 01apr1985:00:00:00.000 using strptime(datetime,%d%b%Y).Could anyone help me in this regard .Please reply ASAP i need . You will need to give us a more complete

Re: [R] Incorrect Dimension

2009-09-18 Thread Schalk Heunis
On Fri, Sep 18, 2009 at 8:12 AM, Schalk Heunis schalk.heu...@enerweb.co.zawrote: Marcio Looking at the script (not much explanation re your intention), I think there is a couple of problems: 1. Not sure if the attached was supposed to be working code, but the assignment operator is - not =

[R] merging data frames with matrix objects when missing cases

2009-09-18 Thread Kari Ruohonen
Hi, I have faced a problem with the merge() function when trying to merge two data frames that have a common index but the second one does not have cases for all indexes in the first one. With usual variables R fills in the missing cases with NA if all=T is requested. But if the variable is a

Re: [R] RCurl and Google Scholar's EndNote references

2009-09-18 Thread Jarno Tuimala
Hi! Thanks for the code examples. I'll try to elaborate a bit here. If you paste this: http://scholar.google.fi/scholar?hl=fioe=ASCIIq=Frank+Harrell to your browser, you'll get the citations, and each citation lists a link (Import to EndNote) to export a citation in EndNote format. And, if

Re: [R] Suppressing script commands in R console when executing long program

2009-09-18 Thread Ishwor
Steve. Hi. I have a script composing of more than 1000 lines and would like suppress the R codes from the console when executing the script (to reduce the physical processing time) I have tried options(echo=T) but no luck.. *Q1. Are there any way of suppressing the commands in the R

Re: [R] define a new family (and a new link function) for gam in gam package

2009-09-18 Thread Corrado
Dear David, I am using gam in gam package (not in mgcv) it is possible to force gam in mgcv to behave like gam in gam package? On Thursday 17 September 2009 23:00:17 David Winsemius wrote: On Sep 17, 2009, at 1:39 PM, Topi, Corrado wrote: Dear R list, is it possible to define a new

[R] problem regarding the data

2009-09-18 Thread meghana kulkarni
Hi, This is Meghana Kulkarni. I have a problem regarding the data I am working with. I have a data frame as follows: x V1 V2 V3V10 414 A 416 A 417 A 417 B 418 A 421 A 421 B 421 C 422 A I want to conver this data

Re: [R] Datetime conversion

2009-09-18 Thread premmad
Thanks for your reply datetime 01OCT1987:00:00:00.000 12APR2004:00:00:00.000 01DEC1987:00:00:00.000 01OCT1975:00:00:00.000 01AUG1979:00:00:00.000 26JUN2003:00:00:00.000 01JAN1900:00:00:00.000 13MAY1998:00:00:00.000 30SEP1998:00:00:00.000 is in the file and i have imported it in to R and created

Re: [R] generating unordered combinations

2009-09-18 Thread Dan Halligan
That's brilliant - thanks. On 17 Sep 2009, at 23:36, William Dunlap wrote: There is a 1-1 correspondance between your n-sets consisting of m possible element types (0 through m-1 in your example) and the number of n-subsets of a (n+m-1)-set. E.g., your example had m=3 and n=3 and subtracting

[R] Help a newbie

2009-09-18 Thread ogbos okike
Hello, To me as a beginner, every problem looks big. Below is what I was asked to do as part of a code that will solve my problem. I have used read.table to read my data into R and assigned the column names with colnames(dat)- ... . But to go from txt- to the last at the bottom of the table below

[R] A stat related question

2009-09-18 Thread RON70
Can I ask a small stat. related question here? Suppose I have two predictors for a time series processes and accuracy of predictor is measured from MSEs. My question is, if two predictors give same MSE then, necessarily they have to be identical? Can anyone provide me any counter example?

Re: [R] Help a newbie

2009-09-18 Thread baptiste auguie
I don't understand your question. Where does your data come from in the first place? Is it stored in a file, or is it a result of a previous operation in R, or is it something you need to copy and paste in your script, or ...? the textConnection() construct is often used to make for

Re: [R] problem regarding the data

2009-09-18 Thread Jim Lemon
On 09/18/2009 04:10 PM, meghana kulkarni wrote: Hi, This is Meghana Kulkarni. I have a problem regarding the data I am working with. I have a data frame as follows: x V1 V2 V3V10 414 A 416 A 417 A 417 B 418 A 421

Re: [R] Datetime conversion

2009-09-18 Thread Girish A.R.
Seems to work alright for me. datetime -c( 01OCT1987:00:00:00.000, 12APR2004:00:00:00.000, 01DEC1987:00:00:00.000, 01OCT1975:00:00:00.000, 01AUG1979:00:00:00.000, 26JUN2003:00:00:00.000, 01JAN1900:00:00:00.000, 13MAY1998:00:00:00.000, 30SEP1998:00:00:00.000) date-strptime(datetime,%d%b%Y)

[R] Lattice barplot not wokring in for-loop?

2009-09-18 Thread stvienna wiener
Dear List-Members, I am plotting a barplot with the lattice package. The code works, but when I execute the same code in a for-loop no plot is shown. Can't figure what the problem is. (Maybe I am missing something here, but I tried it with plot device pdf, calling windows() or X11(), testing on

Re: [R] Lattice barplot not wokring in for-loop?

2009-09-18 Thread Romain Francois
On 09/18/2009 11:44 AM, stvienna wiener wrote: Dear List-Members, I am plotting a barplot with the lattice package. The code works, but when I execute the same code in a for-loop no plot is shown. Can't figure what the problem is. (Maybe I am missing something here, but I tried it with plot

Re: [R] A stat related question

2009-09-18 Thread Meyners, Michael, LAUSANNE, AppliedMathematics
Let's assume you have just three observations, and x-- = 1:3 for your observations. Predictor 1:y = x^2 Predictor 2:y = 1 if x=1 y = 4 if x=2 y = 9 if x=3 y = 0 elsewhere These predictors are obviously not the same,

Re: [R] SVM

2009-09-18 Thread Samuel Okoye
Thank you again for your reply! What I would like to do is to class my sample into two group (0,1). I am not sure which method to apply and whether the svm is the correct one! However, when I apply the below R code I get two group the samples in TRUE and FALSE. Can I take this result to put

Re: [R] Datetime conversion

2009-09-18 Thread Girish A.R.
See if this is what you are looking for: dt - as.data.frame(datetime) date-strptime(as.character(dt$datetime),%d%b%Y) date [1] 1987-10-01 2004-04-12 1987-12-01 1975-10-01 1979-08-01 2003-06-26 [7] 1900-01-01 1998-05-13 1998-09-30 cheers, -Girish

[R] some irritation with heteroskedasticity testing

2009-09-18 Thread Bunny, lautloscrew.com
Dear all, Trying to test for heteroskedasticity I tried several test from the car package respectively lmtest. Now that they produce rather different results i am somewhat clueless how to deal with it. Here is what I did: 1. I plotted fitted.values vs residuals and somewhat intuitively

Re: [R] Errors and line numbers in scripts?

2009-09-18 Thread Duncan Murdoch
ws wrote: Is there a way to have R return the line number in a script when it errors out? I call my script like: $ R --vanilla script.R output.txt I seem to remember a long discussion about this at some point, but I can't remember the outcome. The current development version

Re: [R] Suppressing script commands in R console when executing long program

2009-09-18 Thread Duncan Murdoch
Ishwor wrote: Steve. Hi. I have a script composing of more than 1000 lines and would like suppress the R codes from the console when executing the script (to reduce the physical processing time) I have tried options(echo=T) but no luck.. *Q1. Are there any way of suppressing the commands

Re: [R] Datetime conversion

2009-09-18 Thread Girish A.R.
I'm not able to replicate your problem. Here's what I get. See if this is what you want: dt$date-strptime(as.character(dt$datetime),%d%b%Y) dt datetime date 1 01OCT1987:00:00:00.000 1987-10-01 2 12APR2004:00:00:00.000 2004-04-12 3 01DEC1987:00:00:00.000 1987-12-01 4

Re: [R] Datetime conversion

2009-09-18 Thread premmad
Girish it works for me also if its a vector.I have problem if the data is stored as dataframe(rows and columns) please do help me in this Girish A.R. wrote: Seems to work alright for me. datetime -c( 01OCT1987:00:00:00.000, 12APR2004:00:00:00.000, 01DEC1987:00:00:00.000,

[R] Maximum No.of code in R

2009-09-18 Thread premmad
I tried running 50 lines of ifelse statement in R and the system says context stack overflow at 50 line.Is it the limitation of R or is there any way around that can be done to overcome this.Thanks -- View this message in context:

Re: [R] Datetime conversion

2009-09-18 Thread premmad
It works but what i need is the result also as a column . I tried using the following code . dt$new-strptime(as.character(dt$datetime),%d%b%Y. It shows the following error Error in `$-.data.frame`(`*tmp*`, Sa_dt, value = list(sec = c(0, 0, : replacement has 9 rows, data has 14. Please help

Re: [R] Datetime conversion

2009-09-18 Thread premmad
The same what you have worked out is my need but i'm getting the following error Error in `$-.data.frame`(`*tmp*`, date, value = list(sec = c(0, 0, : replacement has 9 rows, data has 14 Please help me in this -- View this message in context:

Re: [R] Suppressing script commands in R console when executing long program

2009-09-18 Thread Philipp Pagel
On Fri, Sep 18, 2009 at 03:46:27PM +1000, Steven Kang wrote: *Q1. Are there any way of suppressing the commands in the R console?* I think this has been answered already. *Q2. Is R capable of reading numbers that are represented with 1,000 separator commas?* I am not aware of an option to

Re: [R] Datetime conversion

2009-09-18 Thread Philipp Pagel
The same what you have worked out is my need but i'm getting the following error Error in `$-.data.frame`(`*tmp*`, date, value = list(sec = c(0, 0, : replacement has 9 rows, data has 14 Please give more detail about what you did. This error is certainly not from the example used in

Re: [R] Datetime conversion

2009-09-18 Thread Girish A.R.
Can you post a reproducible code snippet, along with the output/error messages, and the output of sessionInfo(). That way other folks on R-help may be able to offer help. Here's myl output of sessionInfo()

Re: [R] Suppressing script commands in R console when executing long program

2009-09-18 Thread Philipp Pagel
On Fri, Sep 18, 2009 at 12:59:16PM +0200, Philipp Pagel wrote: foo$B - as.numeric(sub(',', '', as.character(foo$B))) Thinking about it some more, you should use gsub instead of sub here. Otherwise only the first occurrence of the thousands separator will be removed. cu Philipp --

[R] Error: length(f1) == length(f2) is not TRUE

2009-09-18 Thread A Singh
Dear R users, I am trying to fit an lmer model with only random effects which is giving me the following error: Error : length(f1) == length(f2) is not TRUE In addition: Warning messages: 1: In P1L55:family : numerical expression has 390 elements: only the first used 2: In P1L55:family :

Re: [R] Maximum No.of code in R

2009-09-18 Thread Duncan Murdoch
On 9/18/2009 5:49 AM, premmad wrote: I tried running 50 lines of ifelse statement in R and the system says context stack overflow at 50 line.Is it the limitation of R or is there any way around that can be done to overcome this.Thanks You can always break it up into multiple lines. For

Re: [R] lattice: How to display no box but only a y-axis on the left + Thicker lines

2009-09-18 Thread lith
1.) How do I make lattice (e.g. barchart) to not draw a box but only a y-axis on the left hand side so that the plot looks like barplot with default settings? Does nobody have an idea? Or is the solution that obvious? __ R-help@r-project.org mailing

Re: [R] Datetime conversion

2009-09-18 Thread jim holtman
Your problem is that 'strptime' returns an object of POSIXlt type which is 9 elements; what you what is: ( you need a POSIXct type) dt$new-as.POSIXct(strptime(as.character(dt$datetime),%d%b%Y)) On Fri, Sep 18, 2009 at 6:26 AM, premmad mtechp...@gmail.com wrote: It works but what i need is the

Re: [R] some irritation with heteroskedasticity testing

2009-09-18 Thread John Fox
Dear matt, -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Bunny, lautloscrew.com Sent: September-18-09 6:18 AM To: r-help@r-project.org Subject: [R] some irritation with heteroskedasticity testing Dear all, Trying to

[R] Linear objective function with Quadratic constraints

2009-09-18 Thread vikrant S
I am new to R and I want to solve this following problem using R. My Objective function is a linear function with Quadratic constraints.I want to know how to solve this problem and which package will be helpful for me for solving such type of problems.Moreover my one constraint is linear and

Re: [R] Datetime conversion

2009-09-18 Thread premmad
Thanks .I tried its working but when i tried to view the dataframe i got the following error Error in edit.data.frame(get(subx, envir = parent), title = subx, ...) : can only handle vector and factor elements -- View this message in context:

Re: [R] Datetime conversion

2009-09-18 Thread premmad
Sorry for confusing you all with my inexperienced posting . I tried as u said if you have 9 rows in the data it is working fine but please try out the same example as you have suggested earlier with morethan 9 rows. I tried it as following datetime -c( + 01OCT1987:00:00:00.000, +

[R] matching pairs regardless of order

2009-09-18 Thread Juliane Struve
Dear list,   I am using match() to match pairs of locations, e.g. trip=loc1,loc2 from a list of such pairs, e.g. list=(loc1,loc2, loc1,loc3, loc2,loc3,loc2,loc1).   In this example match() will match trip with the first element of list, but not the 4th, because the order is reversed.   How

Re: [R] Maximum No.of code in R

2009-09-18 Thread premmad
Thanks for the reply and it is useful.What i want to know here is i'm going to try and write an automated procedure using batch processing in R by the way input of the next step is going to be this steps output .so one will not able to predict the lines please also do answer in taking

Re: [R] SVM

2009-09-18 Thread Steve Lianoglou
Thank you again for your reply! What I would like to do is to class my sample into two group (0,1). I am not sure which method to apply and whether the svm is the correct one! However, when I apply the below R code I get two group the samples in TRUE and FALSE. Can I take this result to

[R] Updating R-code in own package

2009-09-18 Thread Katrine Damgaard
Hey everybody! We have created our own package, and need to do some corrections in the R-code of one of the function included in the package. How can I do that. I have read a manual how to create an R package, but I can't find anything about updating R-code in the package. Best regards, Katrine

Re: [R] Compare a group of line slopes

2009-09-18 Thread Juliet Hannah
The test that a slope differs by group is a test that the variable*group interaction equals zero (overall test). Maybe searching post-hoc comparisons in regression will give you some leads. On Tue, Sep 15, 2009 at 10:57 AM, Jun Shen jun.shen...@gmail.com wrote: Hi, all, I am thinking to

Re: [R] Updating R-code in own package

2009-09-18 Thread Steve Lianoglou
Hi, On Sep 18, 2009, at 8:31 AM, Katrine Damgaard wrote: Hey everybody! We have created our own package, and need to do some corrections in the R-code of one of the function included in the package. How can I do that. I have read a manual how to create an R package, but I can't find

Re: [R] lattice: How to display no box but only a y-axis on the left + Thicker lines

2009-09-18 Thread baptiste auguie
No box is easy, bwplot(y~x, data=data.frame(y=rnorm(10),x=sample(letters[1:3],10,repl=T)), par.settings=list(axis.line=list(col=NA))) but that seems to remove all axis lines and ticks as well. You may have to define a custom panel.axis() function. An alternative is to use grid.remove() to

[R] msm package - interpreting categorical results

2009-09-18 Thread Hans Roggeman
Hi, I have a simple question on interpreting output results from your msm package in R when using a categorical model with hcovariates i.e. covariates on the parameters of the emission model. The interpretation is straightforward for normal distributions, etc. but when using categorical

[R] Missing link(s) in documentation object

2009-09-18 Thread Jon Olav Skoien
Hi, I want to cross-reference from the documentation of pkg1 to pkg2, which is imported in the NAMESPACE of pkg1, and under Depends in DESCRIPTION of pkg1. According to Writing R extensions, this can be done by: \code{\link{foo}} when foo is an aliased function in the documentation of pkg2.

Re: [R] matching pairs regardless of order

2009-09-18 Thread Henrique Dallazuanna
Try this: x[mapply(function(x, y)all(x %in% y), strsplit(x, ','), strsplit(trip, ','))] On Fri, Sep 18, 2009 at 9:47 AM, Juliane Struve juliane_str...@yahoo.co.uk wrote: Dear list, I am using match() to match pairs of locations, e.g. trip=loc1,loc2 from a list of such pairs, e.g.

[R] as.POSIXct(as.Date()) independent of timezone

2009-09-18 Thread Markus Loecher
Dear R users, I am struggling a bit with the converting dates to full POSIX timestamps, in particular, I would like to somehow force the timezone to be local, i.e. the output of as.POSIXct(as.Date(2008-07-01)) should always be equal to 2008-07-01 00:00:00, is that achievable ? I tried to set the

[R] Within-group correlation confidence intervals

2009-09-18 Thread jlwoodard
I'm trying to obtain within-group correlations on a subset of variables. I first selected my variables using the following command: mydata$x-mydata[c(iq,education,achievement)] I'd like to look at correlations among those variables separately for men and women. My gender variable in mydata is

Re: [R] Why S4 method is not visible from another package?

2009-09-18 Thread Gábor Csárdi
On Thu, Sep 17, 2009 at 5:59 PM, Martin Morgan mtmor...@fhcrc.org wrote: Gábor Csárdi wrote: Dear All, maybe this is something obvious, I seem to be incapable of understanding how S4 works. So, in package 'A' I defined a summary method for my class: setMethod(summary,

Re: [R] matching pairs regardless of order

2009-09-18 Thread jim holtman
Here is an example: x - c('loc1,loc2', 'loc2,loc3', 'loc2,loc1', 'loc3,loc1') x.s - strsplit(x, ',') # now sort them x.s - sapply(x.s, sort) # create new output unique(apply(x.s, 2, paste, collapse=',')) [1] loc1,loc2 loc2,loc3 loc1,loc3 On Fri, Sep 18, 2009 at 8:47 AM, Juliane Struve

Re: [R] Updating R-code in own package

2009-09-18 Thread Duncan Murdoch
On 9/18/2009 9:05 AM, Steve Lianoglou wrote: Hi, On Sep 18, 2009, at 8:31 AM, Katrine Damgaard wrote: Hey everybody! We have created our own package, and need to do some corrections in the R-code of one of the function included in the package. How can I do that. I have read a manual how to

Re: [R] Why S4 method is not visible from another package?

2009-09-18 Thread Martin Morgan
Gábor Csárdi wrote: On Thu, Sep 17, 2009 at 5:59 PM, Martin Morgan mtmor...@fhcrc.org wrote: Gábor Csárdi wrote: Dear All, maybe this is something obvious, I seem to be incapable of understanding how S4 works. So, in package 'A' I defined a summary method for my class: setMethod(summary,

Re: [R] Maximum No.of code in R

2009-09-18 Thread David Winsemius
On Sep 18, 2009, at 7:58 AM, premmad wrote: Thanks for the reply and it is useful.What i want to know here is i'm going to try and write an automated procedure using batch processing in R by the way input of the next step is going to be this steps output .so one will not able to predict

Re: [R] as.POSIXct(as.Date()) independent of timezone

2009-09-18 Thread Gabor Grothendieck
Try this: as.POSIXct(format(as.Date(2008-07-01))) [1] 2008-07-01 EDT See R News 4/1 for more. On Fri, Sep 18, 2009 at 10:19 AM, Markus Loecher markus.loec...@gmail.com wrote: Dear R users, I am struggling a bit with the converting dates to full POSIX timestamps, in particular, I would like

Re: [R] define a new family (and a new link function) for gam in gam package

2009-09-18 Thread Simon Wood
I am using gam in gam package (not in mgcv) it is possible to force gam in mgcv to behave like gam in gam package? -- not *exactly*, no. But what do you want to do? (i.e. what feature of `gam' do you need?) -- Simon Wood, Mathematical Sciences, University of Bath, Bath, BA2 7AY UK +44

Re: [R] Error: length(f1) == length(f2) is not TRUE

2009-09-18 Thread A Singh
I just wanted to know whether the chances of getting help with this would be greater if I posted this on the mixed models list, even though I would be cross-posting.. ? --On 18 September 2009 12:41 +0100 A Singh bz...@bristol.ac.uk wrote: Dear R users, I am trying to fit an lmer model with

Re: [R] matching pairs regardless of order

2009-09-18 Thread jim holtman
You are going to have to order your values for comparison. Use 'strsplit' to split on the comma, then rejoin the data items based on the sorting order. On Fri, Sep 18, 2009 at 8:47 AM, Juliane Struve juliane_str...@yahoo.co.uk wrote: Dear list, I am using match() to match pairs of locations,

Re: [R] Error: length(f1) == length(f2) is not TRUE

2009-09-18 Thread William Dunlap
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of A Singh Sent: Friday, September 18, 2009 4:42 AM To: r-help@r-project.org Subject: [R] Error: length(f1) == length(f2) is not TRUE Dear R users, I am trying to fit an lmer model with only random

Re: [R] Datetime conversion

2009-09-18 Thread jim holtman
use View to view the dataframe. On Fri, Sep 18, 2009 at 8:17 AM, premmad mtechp...@gmail.com wrote: Thanks .I tried its working but when i tried to view the dataframe i got the following error Error in edit.data.frame(get(subx, envir = parent), title = subx, ...) :  can only handle vector

Re: [R] T-test to check equality, unable to interpret the results.

2009-09-18 Thread Greg Snow
It appears that you have a fundamental misunderstanding of what p-values do and do not say (though this misunderstanding is commom). The following article addresses this issue and could help with a better understanding: Murdock, D, Tsai, Y, and Adcock, J (2008) _P-Values are Random

[R] Writing Reports from R in Microsoft Office Open XML format (follow-up)

2009-09-18 Thread Tobias Sing
Dear Duncan and other R users, The department in which I work will soon make some decisions to improve our reporting. Since I hope that our solution will support R and Sweave-like functionality (otherwise it wouldn't be an improvement), I hope it's ok to repeat my question back from June if

Re: [R] T-test to check equality, unable to interpret the results.

2009-09-18 Thread Greg Snow
Rolf, I no longer claim to be young, the naïve part is still up for debate, but I find that restricting the null to only include = to be more confusing than to have it include the inequality. To have the alternative be and the null be = implies that we are working on the assumption

Re: [R] Writing Reports from R in Microsoft Office Open XML format (follow-up)

2009-09-18 Thread Duncan Temple Lang
Tobias Sing wrote: Dear Duncan and other R users, The department in which I work will soon make some decisions to improve our reporting. Since I hope that our solution will support R and Sweave-like functionality (otherwise it wouldn't be an improvement), I hope it's ok to repeat my

Re: [R] Error: length(f1) == length(f2) is not TRUE

2009-09-18 Thread A Singh
Hi Bill, Thanks, I did try out what you suggested but it doesn't seem to work. I get the same error again. There's obviously something here that I don't get. Need to figure it out. Aditi --On 18 September 2009 08:34 -0700 William Dunlap wdun...@tibco.com wrote: From:

Re: [R] Suppressing script commands in R console when executing long program

2009-09-18 Thread Ishwor
Hi Duncan You can try putting this in your Rprofile options(keep.source=F) This will work in the R cmd but it will not work in the RGui The syntax is wrong there:  that should be options(keep.source=F).  But I don't think it addresses either question. I was working from my memory here.

Re: [R] Missing link(s) in documentation object

2009-09-18 Thread Martin Morgan
Jon Olav Skoien wrote: Hi, I want to cross-reference from the documentation of pkg1 to pkg2, which is imported in the NAMESPACE of pkg1, and under Depends in DESCRIPTION of pkg1. According to Writing R extensions, this can be done by: \code{\link{foo}} when foo is an aliased function in

Re: [R] Writing Reports from R in Microsoft Office Open XML format (follow-up)

2009-09-18 Thread Greg Snow
The people who brought us rexcel are working on sword which is a sweave for ms word, the current version is at: http://rcom.univie.ac.at/download.html hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111

Re: [R] Writing Reports from R in Microsoft Office Open XML format (follow-up)

2009-09-18 Thread Duncan Temple Lang
I believe that their approach is based on DCOM and the post was about Office Open XML. We have had the ability to do this via DCOM for at least 6 years, but unfortunately DCOM is limited to Windows. Greg Snow wrote: The people who brought us rexcel are working on sword which is a sweave for

[R] lapply - value changes as parameters to function?

2009-09-18 Thread Mark Knecht
Hi, I'm trying to get better at things like lapply but it still stumps me. I have a function I've written, tested and debugged using individual calls to the function, ala: ResultList5 = DoAvgCalcs(IndexData, Lookback=5, SampleSize=TestSamples , Iterations=TestIterations ) ResultList8 =

Re: [R] Simple as.Date question dealing with a timezone offset

2009-09-18 Thread esawdust
Took me a minute to grok the gsubfn solution, but that is sweet! very nice. thank you very much both for the suggestions, Landon -- View this message in context: http://www.nabble.com/Simple-as.Date-question-dealing-with-a-timezone-offset-tp25491955p25512218.html Sent from the R help mailing

[R] Sum according observation

2009-09-18 Thread MarcioRibeiro
Hi listers, I have a simple doubt... I need to manipulate the data base as: var1 var2 7 0.1 7 0.1 8 0.12 100.15 120.18 200.31 I would like to aggregate the equal cases as var1 making the sum of var2... I would get... var1 var2 7 0.2 8 0.12 100.15 12

Re: [R] lapply - value changes as parameters to function?

2009-09-18 Thread Phil Spector
Mark - The l in lapply refers to that fact that it will *return* a list, not that it wants a list for input. You could input a list, but then each element of the list would be one of the values you wanted processed. So I think you want x = seq(5:20) ResultList = lapply(x, DoAvgCalcs,

[R] R on browser

2009-09-18 Thread vinay basavanal
Hi i can get sites that can r code on browser -- View this message in context: http://www.nabble.com/R-on-browser-tp25508719p25508719.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

Re: [R] Writing Reports from R in Microsoft Office Open XML format (follow-up)

2009-09-18 Thread Greg Snow
I read the original post as asking if there is something like odfWeave that works for msword (I assumed windows, but I guess they could be asking about MSword on other platforms, it just sounds like a windows shop). But yes, sword only works on windows (and is in beta version still) and uses a

Re: [R] Sum according observation

2009-09-18 Thread Henrique Dallazuanna
Try this: with(DF, tapply(var2, var1, sum)) On Fri, Sep 18, 2009 at 12:18 PM, MarcioRibeiro mes...@pop.com.br wrote: Hi listers, I have a simple doubt... I need to manipulate the data base as: var1 var2 7      0.1 7      0.1 8      0.12 10    0.15 12    0.18 20    0.31 I would like

Re: [R] generating unordered combinations

2009-09-18 Thread Bryan Keller
The combn solution offered by Bill is great. It struck me that what you are doing, in fact, is generating the null distribution of the two-sample Wilcoxon test where the first group has size m and the second group has size n. In general, the length of the array has size choose(n+m-1,m) which

Re: [R] Datetime conversion

2009-09-18 Thread Philipp Pagel
On Fri, Sep 18, 2009 at 04:32:27AM -0700, premmad wrote: Sorry for confusing you all with my inexperienced posting . I tried as u said if you have 9 rows in the data it is working fine but please try out the same example as you have suggested earlier with morethan 9 rows. I tried it as

Re: [R] lapply - value changes as parameters to function?

2009-09-18 Thread Mark Knecht
Phil, Thanks for the reply. Your suggestion is actually the one I started with (assuming I'm understanding you) but I didn't seem to even get down into my function, or the error message is from other place within my function that I haven't discovered yet: x = seq(5:20) ResultList = lapply(x,

Re: [R] merging data frames with matrix objects when missing cases

2009-09-18 Thread johannes rara
This has something to do with your data.frame structure see str(df1) 'data.frame': 3 obs. of 2 variables: $ a : int 1 2 3 $ X1: 'AsIs' int [1:3, 1:2] 1 2 3 4 5 6 str(df2) 'data.frame': 2 obs. of 2 variables: $ a : int 1 2 $ X2: 'AsIs' int [1:2, 1:2] 11 12 13 14 This seems to work

Re: [R] wilcox.test p-value = 0

2009-09-18 Thread Keo Ormsby
Hello Thomas and Bryan, Thanks for the correction, sorry Murat I was mistaken. Actually your answers solved me a problem I was having using multiple fisher.test() on nucleic acid sequences, where we come up with hundreds of thousands of p values, a lot of which are 0's. Since we have to

Re: [R] wilcox.test p-value = 0

2009-09-18 Thread Keo Ormsby
Hello, Thanks for the correction, sorry Murat I was mistaken. Actually your answers solved me a problem I was having using multiple fisher.test() on nucleic acid sequences, where we come up with hundreds of thousands of p values, a lot of which are 0's. Since we have to correct for multiple

Re: [R] lapply - value changes as parameters to function?

2009-09-18 Thread jim holtman
Change the order of the parameters in your function so that Lookback is the first one. The first parameter of the lapply is what is passed to the function as its first parameter. Now just have ResultList - lapply(x, DoAvgCalcs, IndexData=IndexData, SampleSize=TestSamples,

Re: [R] R on browser

2009-09-18 Thread Steve Lianoglou
Hi, On Sep 18, 2009, at 9:32 AM, vinay basavanal wrote: Hi i can get sites that can r code on browser Oh don't mean to sound rude, but can you try to rephrase your question? I think a lot of people are having a hard time understanding what you're really asking, but we'd be happy to help.

Re: [R] Error: length(f1) == length(f2) is not TRUE (fwd)

2009-09-18 Thread A Singh
-- Forwarded Message -- Date: 18 September 2009 19:24 +0100 From: A Singh bz...@bristol.ac.uk To: William Dunlap wdun...@tibco.com Subject: RE: [R] Error: length(f1) == length(f2) is not TRUE Yup, they are all factors- and its still doesn't work. Getting to the stage where I

[R] Predicting the Present with R at Google

2009-09-18 Thread Roger Koenker
I thought some R-help readers might enjoy seeing the paper by Hal Varian on predicting the present using R and Google Trends that is linked via the following blog comment: http://googleresearch.blogspot.com/2009/04/predicting-present-with-google-trends.html Apologies in advance if this has

[R] missing values at a combination of two factors

2009-09-18 Thread Timothy Clough
Dear All, I have two factors: GROUP and PATIENT, where PATIENT is nested within GROUP. levels(example$GROUP) [1] 0 1 2 3 4 levels(example$PATIENT) [1] 1 2 3 There are three observations at each combination of these factors. However, there are no observations for PATIENT = 3 and GROUP =

Re: [R] lapply - value changes as parameters to function?

2009-09-18 Thread Mark Knecht
Thanks Jim. That did the trick. I had wondered in passing about that as all the examples in the ?lapply page were pretty simple and each time it was the first argument. However I didn't read that this was a requirement so I didn't go there. Is this really stated and I just cannot see it or

[R] Ruuid missing Gtk glib.dylib

2009-09-18 Thread Christopher Bare
Hi, I get an error indicating a missing library from the package 'Ruuid'. I suppose this means I should install RGtk. I just thought I'd document the error. Maybe a dependency entry is missing? R 2.9.0 OS X 10.5.8 Thanks, - chris biocLite('Ruuid') Using R version 2.9.0, biocinstall version

Re: [R] Ruuid missing Gtk glib.dylib

2009-09-18 Thread David Winsemius
We are in the same boat (which I think is caused in my case by never having been successful in installing a 64 bit version of Gtk+ on my Mac, if such a beast exists). My errors are a tad bit different than yours. Are you attempting this from an R64 version? I get no error when I install

Re: [R] Error: length(f1) == length(f2) is not TRUE

2009-09-18 Thread A Singh
Bill, It worked!!! lmer(data=vcdf, peg.no~1 + (1|family/P1L55)) Linear mixed model fit by REML Formula: peg.no ~ 1 + (1 | family/P1L55) Data: vcdf AIC BIC logLik deviance REMLdev 2981 2997 -1487 29762973 Random effects: Groups NameVariance Std.Dev. P1L55:family

Re: [R] Writing Reports from R in Microsoft Office Open XML format (follow-up)

2009-09-18 Thread Tobias Sing
Thanks Duncan and Greg for the replies so far. Duncan, many thanks for your continued work on this; please let us (or at least me) know when your package will be available. Greg, the DCOM option sounds great, but we run R on a Linux cluster, and therefore it would be good to be able to write the

Re: [R] Ruuid missing Gtk glib.dylib

2009-09-18 Thread Martin Morgan
Hi Chris -- Christopher Bare wrote: Hi, I get an error indicating a missing library from the package 'Ruuid'. I suppose this means I should install RGtk. I just thought I'd document the error. Maybe a dependency entry is missing? R 2.9.0 OS X 10.5.8 Thanks, - chris

[R] Emacs and ESS help

2009-09-18 Thread Data Analytics Corp.
Hi, I decided to try emacs and ess with R, but to no avail. How are these things suppose to work with R - or work, period? I downloaded the latest windows versions of each and installed them as the documentation says. But then the documentation for ess says to add (require 'ess-site) to

Re: [R] Writing Reports from R in Microsoft Office Open XML format (follow-up)

2009-09-18 Thread David Winsemius
That website says: Our components and applications for seamless integration allow to embed statistics software from the R project and data analysis and computation services from Scilab into applications on Microsoft Windows, MacOS X and Linux. Does anyone know if the claim to be

Re: [R] lapply - value changes as parameters to function?

2009-09-18 Thread Bert Gunter
It **IS** stated explicitly, though perhaps not so obviously, already in the help file, In the Note section at the end it says: ... This means that the recorded call is always of the form FUN(X[[0L]], ...), with 0L replaced by the current integer index. ... So you need to read more carefully

[R] Unable to install lme4

2009-09-18 Thread Zege, Andrew
I am unable to install package lme4, after several attempts to do so using various repository URLs. Just to make sure everything works fine with proxy, connection, etc, I installed ggplot2 and it worked fine. I am using command install.packages(lme4, lib=/myRlibs), optionally using contrib

  1   2   >