[R] Why don't formulas that work for lm() work for plotmeans?

2009-09-18 Thread jrflanders
I know that simple line plots showing a point representing the mean + an error bar are difficult in R, but I am clearly missing something. I simply want to show how a the mean and 95% CI of a chemical concentration (y) vary over space (x) under four temperature regimes (T; a categorical factor).

Re: [R] Emacs and ESS help

2009-09-18 Thread jaropis
> Any and all help is deeply appreciated. If you do not want to learn all the inns and outs of Emacs, just download the Emacs distribution provided by Vincent Goulet - it has ESS. Uninstall your present Emacs, go to http://vgoulet.act.ulaval.ca/en/ressources/emacs/ download Vincent's distributi

[R] Filled contour in a irregular map (shapefile)

2009-09-18 Thread Zhongkui.Luo
Hello All, I want to draw a figure with filled contour in a irregular map. But I found that the contours overlap the boundaries of the map, and also some regions in the map were not filled. I have following data: data1. A shapefile (i.e., a map with boundary, for example, the whole Australia

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

2009-09-18 Thread Kari Ruohonen
Yes, that was the original question: when a variable in a data frame is a matrix instead of an ordinary variable merge() handles the missing cases so that only the first column of the matrix gets NA and the rest are recycled. If the matrix is broken to several variables everything works fine. Why

[R] Use of R in Schools

2009-09-18 Thread John Maindonald
I am looking for information on experimentation with the use of R in the teaching of statistics and science in schools. Any leads would be very welcome. I am certain that there is such experimentation. I've made this inquiry on r-sig-teaching, with no response. John. John Maindonald

Re: [R] Ubuntu 2.9.2 packages broken for amd64

2009-09-18 Thread Ivan Adzhubey
Hi Dirk, Thank you for your prompt reply. The issue has been actually resolved in just a few hours after I posted it. Many apologies for being too impatient! Best, Ivan On Thursday 17 September 2009 10:15:04 pm Dirk Eddelbuettel wrote: > Ivan, > > On 17 September 2009 at 21:22, Ivan Adzhubey w

Re: [R] Any concept of 'by reference' or 'address of' in R?

2009-09-18 Thread Dirk Eddelbuettel
On 18 September 2009 at 17:11, Don MacQueen wrote: | I'd suggest using Rprof to find out where the cpu time is being | spent. Seconded. Profiling should help you. Some other ideas: -- look at the data.table package (on CRAN) by Matt Dowle which he uses as a fast lookup 'database alternativ

Re: [R] Any concept of 'by reference' or 'address of' in R?

2009-09-18 Thread Steve Lianoglou
On Fri, Sep 18, 2009 at 8:11 PM, Don MacQueen wrote: > I wouldn't assume R is making a copy; it depends on what you're doing with > the dataframe. Indeed ... I thought R had copy-on-write semantics for function arguments, no? If so, then if your function doesn't change the elements in the matrix/

Re: [R] Any concept of 'by reference' or 'address of' in R?

2009-09-18 Thread Don MacQueen
I wouldn't assume R is making a copy; it depends on what you're doing with the dataframe. I'd suggest using Rprof to find out where the cpu time is being spent. If you can adapt your problem to use all numbers or all characters then you can store the data in a matrix instead of a data frame,

Re: [R] Any concept of 'by reference' or 'address of' in R?

2009-09-18 Thread David Winsemius
On Sep 18, 2009, at 7:38 PM, Mark Knecht wrote: Hi, Is there a way to pass the address of a data.frame through a set of functions in R? I've got some code which is slowing down I think because my data.frames are getting much larger - now approaching 1 million rows by 50-100 columns - and my f

Re: [R] Any concept of 'by reference' or 'address of' in R?

2009-09-18 Thread Gabor Grothendieck
You can use R environments or proto objects from the proto package (http://r-proto.googlecode.com) which are environments with additional oo support using the prototype model) or the oo.R package which is similar but uses a more conventional oo model. On Fri, Sep 18, 2009 at 7:38 PM, Mark Knecht

[R] Any concept of 'by reference' or 'address of' in R?

2009-09-18 Thread Mark Knecht
Hi, Is there a way to pass the address of a data.frame through a set of functions in R? I've got some code which is slowing down I think because my data.frames are getting much larger - now approaching 1 million rows by 50-100 columns - and my functions - originally written for much smaller data

Re: [R] xyplot: Can I identify groups but not use them for regression?

2009-09-18 Thread Peter Ehlers
And if you make 'year' a factor with levels '2007' and '2008' you'll get your second wish. Peter Sundar Dorai-Raj wrote: I think this ought to work for you: library(lattice) set.seed(42) d <- data.frame(year = c(rep(2007,12), rep(2008,12)), treatment = rep(LETTERS[1:3], each =

Re: [R] xyplot: Can I identify groups but not use them for regression?

2009-09-18 Thread Sundar Dorai-Raj
I think this ought to work for you: library(lattice) set.seed(42) d <- data.frame(year = c(rep(2007,12), rep(2008,12)), treatment = rep(LETTERS[1:3], each = 4, times = 2)) d$cover <- rnorm(nrow(d)) d$variable <- rnorm(nrow(d)) xyplot(variable ~ cover | year, d, panel = fun

Re: [R] Sum according observation

2009-09-18 Thread John Kane
?aggregate with(xx,aggregate(var2, list(var1=var1),sum) --- On Fri, 9/18/09, MarcioRibeiro wrote: > From: MarcioRibeiro > Subject: [R] Sum according observation > To: r-help@r-project.org > Received: Friday, September 18, 2009, 11:18 AM > > Hi listers, > I have a simple doubt... > I need to

[R] xyplot: Can I identify groups but not use them for regression?

2009-09-18 Thread Seth W Bigelow
I wish to identify groups representing different treatments, but to plot them and do a regression using a continuous variable ("cover") ignoring the groupings. d$year <- NA d$year <-c(rep(2007,12), rep(2008,12)) d$treatment <- c(rep("A",4),rep("B",4),rep("C",4), rep("A",4), rep("B",4), rep("C",

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

2009-09-18 Thread Peter Ehlers
See brief comment inline below. A Singh wrote: 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

Re: [R] help with $ and % symbols in R

2009-09-18 Thread David Winsemius
On Sep 18, 2009, at 5:24 PM, Edward Chen wrote: Could someone explain to me briefly and point me to where I can find help on what the symbols $ and % mean in R? I have seen them in many others' codes, but I am still very unsure as to what they mean and what they do. Thank you very much! F

[R] Alternatives to Rgraphviz -- request suggestions

2009-09-18 Thread William Revelle
Dear R-helpers, Can anyone suggest a useful alternative to Rgraphviz? I am trying to create fairly simple graphs showing the structures of a hierarchical cluster analysis or of a structural equation model. That is, I need to be able to control the shape (rectangles vs ovals) of a limited nu

Re: [R] help with $ and % symbols in R

2009-09-18 Thread cls59
Edward Chen-3 wrote: > > Could someone explain to me briefly and point me to where I can find help > on > what the symbols $ and % mean in R? I have seen them in many others' > codes, > but I am still very unsure as to what they mean and what they do. > Thank you very much! > > Help pages fo

[R] help with $ and % symbols in R

2009-09-18 Thread Edward Chen
Could someone explain to me briefly and point me to where I can find help on what the symbols $ and % mean in R? I have seen them in many others' codes, but I am still very unsure as to what they mean and what they do. Thank you very much! -- Edward Chen Email: edche...@gmail.com Cell Phone: 510-

[R] Why residual=T doesn't work in plot.gam?

2009-09-18 Thread Yan Li
Hi, all In mgcv package, I tried to plot data.gam. However, residuals=TRUE doesn't work for my data. No data points appear on the plot. What is the reason? The number of the observation of my data set is almost 2000. plot(data.gam,residuals=TRUE,shade=TRUE) Thank you, Lee [[alternative

Re: [R] Emacs and ESS help

2009-09-18 Thread Steve Lianoglou
Hi, On Sep 18, 2009, at 4:23 PM, Richard M. Heiberger wrote: See the documentation for ESS in the ESS distribution ess/doc/html/readme.html There is even more detail in ess/doc/html/ess.html For the specific question about the emacs initialization file ~/.emacs, that file is in your home

Re: [R] Emacs and ESS help

2009-09-18 Thread Richard M. Heiberger
See the documentation for ESS in the ESS distribution ess/doc/html/readme.html There is even more detail in ess/doc/html/ess.html For the specific question about the emacs initialization file ~/.emacs, that file is in your home directory which emacs will find. The "~" abbreviation is required a

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

2009-09-18 Thread Mark Knecht
Bert, Boy, to me that's one of those 'you have to know what it means to know what it means' sort of things. Thanks for pointing it out though. I appreciate it. Cheers, Mark On Fri, Sep 18, 2009 at 1:09 PM, Bert Gunter wrote: >  It **IS** stated explicitly, though perhaps not so obviously,  al

[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

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 careful

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 supporti

[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] 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 > >

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] 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] 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 Ruu

[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] 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 possibl

[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 PATIEN

[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 alrea

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 To: William Dunlap 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 can use 'summary()' is the problem- the

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, Iteration=TestIteratio

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] 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 te

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 correct

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] 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] 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

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 g

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 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 to

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

[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 https://stat.ethz.

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, In

[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 120

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] 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 = DoAvgC

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

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 > -O

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 functi

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

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 wrote: From: r-help-boun...@r-project.org [mailto:r-he

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

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

[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 th

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 Va

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 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 and factor elem

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 r

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 wrote: > Dear list, > > I am using match() to match pairs of locations, e.g. trip="loc1,loc2" fr

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 wrote: Dear R users, I am trying to fit an lmer model with only random effects

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 > +

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 wrote: > Dear R users, > I am struggling a bit with the converting dates to full POSIX timestamps, in > particular, I would like to somehow force

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] 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 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: >>> >>> setMetho

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 c

[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

[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 th

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 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. list=("loc1,loc2", "loc1,loc3",

[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] 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 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", signature(object="

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, Ju

[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 distrib

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 remove

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 anythin

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 wrote: > Hi, all, > > I am thinking to compare a group of slopes

[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] 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 put

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 consideratio

[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 revers

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", + "12APR2004:0

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: http://www.nabble.com/Datetime-conversion-tp25503

[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 equa

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, > > Try

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 wrote: > > It works but what i need is the result also as

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 maili

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 example

[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 : nu

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 --

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() > sessionI

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 i

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 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: http://www.nabble.com/Datetime-conversion-tp2

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 h

[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: http://www.nabble.com/Maximum-No.of-code-in-R-tp25506024p25506024

  1   2   >