Re: [R] How to tell if lattice is current device?

2009-02-11 Thread Dieter Menne
Remko Duursma gmail.com> writes: > >> How can I tell if the current device was made with plot() or e.g. > >> levelplot() or another lattice function? > >> dev.cur() does not help me, it just tells me "windows 2". > > Deepayan: > > A device can have both types, although that's rare. > > > > The be

[R] Optim

2009-02-11 Thread mouradster
Dear R user I follow the steps defined in Modern applied statistics page(453) to use optim. However, when I run the following code the parameters seems way off and the third parameter(p3) stayed as the initial value. below is the code: ## data da=c(418,401,416,360,411,425,537,379,484,388,486,380,3

Re: [R] 2 different colors for 2 groups of lines using xyplot

2009-02-11 Thread Dieter Menne
Yu, Xuesong scharp.org> writes: > I am trying to use xyplot to plot several lines in one panel with red > color for a group of lines, say 3 lines and blue color for another > group of lines, say 4. I know this can be easily done using regular > plot function. But i could not figure out how to d

Re: [R] How to handle large numbers?

2009-02-11 Thread david.jessop
Hi, I've realised (as I'm sure have lots of others) that the second part of my answer is complete rubbish. Obviously having a bad day. However you could work out one over your expression which then you split into two parts, calculate and then reinvert. Apologies for version 1 David -

Re: [R] Compiling Matrix on Solaris 10 x86-64 Sun Studio 12

2009-02-11 Thread Prof Brian Ripley
This is a known issue. Fixes have been passed to the Matrix authors, so please wait for an update. If that is not possible, try an older version of Matrix from the CRAN archive: I think -15 is the latest without the problematic code. (At http://cran.r-project.org/src/contrib/Archive/Matrix/,

Re: [R] Problem with loading rJava in R

2009-02-11 Thread Prof Brian Ripley
The 'specified module' is specified in a pop-up (but not on Win 2000 ans sometimes it gets hidden): this is a Windows error message, and confuses many people. You need Sun Jave installed and in your path, and you need a 32-bit Java, not a 64-bit one. My guess is that the problem is one of the

Re: [R] tcltk, tcltk2, Rcmdr, Mac OS X

2009-02-11 Thread Prof Brian Ripley
On Thu, 12 Feb 2009, Peter Dalgaard wrote: Man, I'd forgotten how fugly plain ole X11 was compared to Aqua... ;) Do we have a volunteer to get Tcl/Tk Aqua working with R? ;-) (Seriously, read Mac OS X FAQ 2.1.7 before even thinking of doing that!) For the record, the Tcl?Tk that ships with

Re: [R] tcltk, tcltk2, Rcmdr, Mac OS X

2009-02-11 Thread Monte Milanuk
Peter Dalgaard wrote: Man, I'd forgotten how fugly plain ole X11 was compared to Aqua... ;) Do we have a volunteer to get Tcl/Tk Aqua working with R? ;-) (Seriously, read Mac OS X FAQ 2.1.7 before even thinking of doing that!) Oh heavens no! ;) I was working my way through a Python progra

Re: [R] Generating Numbers With Certain Distribution in R

2009-02-11 Thread Gundala Viswanath
Dear all, Thanks so much, the latest version by Gustav work just fine. In the first version, the outcome is more digital than contiguous. - Gundala Viswanath Jakarta - Indonesia On Wed, Feb 11, 2009 at 10:35 PM, Gustaf Rydevik wrote: > On Wed, Feb 11, 2009 at 2:15 PM, Ben Bolker wrote: >> Be

Re: [R] plots and text to the same output file

2009-02-11 Thread Michael Bibo
Greg Snow imail.org> writes: > > odfWeave works just fine for me on windows and the XML package shows up in my list of packages. You may be > overthinking the problem, for most of my odfWeave projects I don't need odfInsertPlot, just use fig=TRUE > in the code chunk and only include the code

Re: [R] How do I get my IT department to "bless" R?

2009-02-11 Thread Daniel Viar
Many thanks to everyone that posted replies to this thread. I used some of the ideas from this thread and other sources to put together a case for R and I just received formal approval from our IT department today. In case this can be useful to anyone in the future, here's a summary of what was s

Re: [R] How to tell if lattice is current device?

2009-02-11 Thread Remko Duursma
Thanks for the tip. I did some reading on setHook, etc.. but I am terribly confused. Do you (or someone else!) have a quick example of what the call will look like? thanks remko - Remko Duursma Post-Doctoral Fellow Centre for Plant and Food Scienc

[R] Programming a repeating calculation

2009-02-11 Thread Neil Morris-8094
I have datasets containing a number of pairs each pair of variable length with longest set governing the column length. They are beach cross sections and I am trying examine the change specific contours. I can do this by individually working each pair but because of the number of sets would like

[R] Compiling Matrix on Solaris 10 x86-64 Sun Studio 12

2009-02-11 Thread Dongseok Choi
Hi all, I have trouble to compile Matrix packages on Solar10 x86-64 with Sun compilers. I saw some postings on this but am not sure how to solve this problem. It is becoming critical as I cannot install biocLite() because of its dependency on Matrix. Could you direct me how to resolve the issue?

Re: [R] function question

2009-02-11 Thread jim holtman
Is this what you want: > x FL number 1 34 4 2 35 3 3 36 7 > cbind(rep(x$FL, x$number), 1) [,1] [,2] [1,] 341 [2,] 341 [3,] 341 [4,] 341 [5,] 351 [6,] 351 [7,] 351 [8,] 361 [9,] 361 [10,] 361 [11,] 361

Re: [R] Looping over a matrix passed to .C

2009-02-11 Thread jim holtman
Given that there are 166,000,000,000 combinations, maybe you should find some other way of partitioning the data. On Wed, Feb 11, 2009 at 8:27 PM, Nathan S. Watson-Haigh wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > jim holtman wrote: >> Why don't you generate all the possible comb

[R] Problem with loading rJava in R

2009-02-11 Thread charis
Hello. I am trying to load the rJava package in R-2.7.2 (Windows XP 64-bit RGui) and get the following error message even though the mentioned .dll file is located at the directory listed in the error message. I have tried to uninstall and reinstall the package but that does not resolve the probl

Re: [R] General query regarding scoring new observations

2009-02-11 Thread Rolf Turner
On 12/02/2009, at 2:02 PM, Lars Bishop wrote: Hi, I was wondering if I can have some advice on the following problem. Let's say that I have a problem in which I want to predict a binary outcome and I use logistic regression for that purpose. In addition, suppose that my model includes pred

Re: [R] Looping over a matrix passed to .C

2009-02-11 Thread Nathan S. Watson-Haigh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 jim holtman wrote: > Why don't you generate all the possible combinations using 'combn' and > then use that matrix to address your data: I had thought of using this, however the size of data I'm using will more likely be orders of magnitude larger, su

Re: [R] System.time

2009-02-11 Thread jim holtman
It depends on the granularity that the operating system is recording that time; on some systems the minimum might be 0.01 seconds. If it is that short, why worry about it. There is nothing unusual about the result. On Wed, Feb 11, 2009 at 7:49 PM, John Kerpel wrote: > Hi folks! > Does anyone kn

Re: [R] two scatter plots in one

2009-02-11 Thread jim holtman
Set the xlim/ylim to the extent of the data and then do plot(x1, y1, xlim=range(x1, x2), ylim=range(y1, y2)) points(x2, y2, col='red') On Wed, Feb 11, 2009 at 3:43 PM, liujb wrote: > > Dear R users, > > I need to compare two scatter plots, > plot(x1, y1) > plot(x2, y2) > > and would like to plot

[R] System.time

2009-02-11 Thread John Kerpel
Hi folks! Does anyone know why I might see something like this after running system.time? system.time(svd(Mean_svd_data)) user system elapsed 0 0 0 The data set is tiny and the function returns results instantly, but shouldn't it still give me a time? Thanks, John

Re: [R] Linear model

2009-02-11 Thread Kingsford Jones
On Wed, Feb 11, 2009 at 1:36 PM, kayj wrote: > > I want to know how accurate are the p-values when you do linear regression in > R? > > I was looking at the variable x3 and the t=10.843 and the corresponding > p-value=2e-16 which is the same p-value for the intercept where the t-value > for the in

[R] General query regarding scoring new observations

2009-02-11 Thread Lars Bishop
Hi, I was wondering if I can have some advice on the following problem. Let's say that I have a problem in which I want to predict a binary outcome and I use logistic regression for that purpose. In addition, suppose that my model includes predictors that will not be used in scoring new obser

Re: [R] Linear model

2009-02-11 Thread Bill.Venables
If you look carefully you will see that the p-value is actually < 2e-16 where the "<" sign is telling you this is an upper limit. For many machines this is the double precision epsilon value: > .Machine$double.eps [1] 2.220446e-16 So there is no pretence to accuracy, other than "the value is

[R] two scatter plots in one

2009-02-11 Thread liujb
Dear R users, I need to compare two scatter plots, plot(x1, y1) plot(x2, y2) and would like to plot them in the same figure. How do I do it? Thank you. -- View this message in context: http://www.nabble.com/two-scatter-plots-in-one-tp21963375p21963375.html Sent from the R help mailing list a

[R] contour( ..., method='edge') incompatible with xlim & ylim

2009-02-11 Thread david.schruth
Hello, A colleague of mine in our oceanography lab has pointed out a slightly annoying imperfection with the contour plotting function. It appears that the 'edge' option for the 'method' parameter doesn't work very well (or at all?) when xlim and ylim are also set. The following code should rec

[R] 2 different colors for 2 groups of lines using xyplot

2009-02-11 Thread Yu, Xuesong
Hi All, I am trying to use xyplot to plot several lines in one panel with red color for a group of lines, say 3 lines and blue color for another group of lines, say 4. I know this can be easily done using regular plot function. But i could not figure out how to do this in xyplot. Any hel

[R] Help with XYPLOT

2009-02-11 Thread John Leonard
I am trying to replicate the following plot using Lattice: http://addictedtor.free.fr/graphiques/graphcode.php?graph=78 I'm having trouble with the equivalent of the "oma" (outside margin) setting. I've been all through the Lattice documentation and others and also searched the lists.

[R] Linear model

2009-02-11 Thread kayj
I want to know how accurate are the p-values when you do linear regression in R? I was looking at the variable x3 and the t=10.843 and the corresponding p-value=2e-16 which is the same p-value for the intercept where the t-value for the intercept is 48.402. I tried to calculate the p-value in R

[R] built in variance component function for lm

2009-02-11 Thread David Springate
Hi, Is there a built in function for calculating variance components from a standard linear model using lm? I know you can do this using lme for ML and REML, but I can't find a method for doing this for least squares. I am looking to calculate variance components for the interaction betwe

Re: [R] How to tell if lattice is current device?

2009-02-11 Thread Deepayan Sarkar
On Wed, Feb 11, 2009 at 3:40 PM, Remko Duursma wrote: > Dear R-helpers, > > I have a function that adds some segments to the current plot, but if > I the current plot is made with any of the lattice functions (in my > case, levelplot), > I should use lsegments rather than segments. > > How can I t

Re: [R] tcltk, tcltk2, Rcmdr, Mac OS X

2009-02-11 Thread Peter Dalgaard
Monte Milanuk wrote: Lawrence Hanser wrote: Monte, I vaguely remember having exactly the same error message at some point in my journey. Why don't you try simply loading tcltk first to see if you can then load Rcmdr: library(tcltk) Larry, Oddly enough, I had tried just that before, w

Re: [R] tcltk, tcltk2, Rcmdr, Mac OS X

2009-02-11 Thread Monte Milanuk
Lawrence Hanser wrote: Monte, I vaguely remember having exactly the same error message at some point in my journey. Why don't you try simply loading tcltk first to see if you can then load Rcmdr: library(tcltk) Larry, Oddly enough, I had tried just that before, with no success. This ti

[R] How to tell if lattice is current device?

2009-02-11 Thread Remko Duursma
Dear R-helpers, I have a function that adds some segments to the current plot, but if I the current plot is made with any of the lattice functions (in my case, levelplot), I should use lsegments rather than segments. How can I tell if the current device was made with plot() or e.g. levelplot() or

Re: [R] tcltk, tcltk2, Rcmdr, Mac OS X

2009-02-11 Thread Lawrence Hanser
Monte, I vaguely remember having exactly the same error message at some point in my journey. Why don't you try simply loading tcltk first to see if you can then load Rcmdr: library(tcltk) On Wed, Feb 11, 2009 at 3:03 PM, Peter Dalgaard wrote: > Monte Milanuk wrote: > >> Larry, >> >> Since it

Re: [R] tcltk, tcltk2, Rcmdr, Mac OS X

2009-02-11 Thread Peter Dalgaard
Monte Milanuk wrote: Larry, Since it looks like you've got your problem about whipped, hope you don't mind if I piggy back on here... Same sort of problem... installed Rcmdr via the Package Installer. Followed the directions for running X11/Tk ala the site mentioned earlier and this is

[R] function question

2009-02-11 Thread Felipe Carrillo
Hi everyone: I did this before with R and I can't remember how. I got some fish forklength values FL number 344 353 367 I need to breakdown the FL by the number of fish with the same length like this: 34 1 34 1 34 1 34 1 35 1 35 1 35 1 36 1 36 1 36 1 36 1 36 1 36 1 36 1

Re: [R] How to handle large numbers?

2009-02-11 Thread Stavros Macrakis
On Wed, Feb 11, 2009 at 4:38 PM, Wacek Kusnierczyk wrote: > Stavros Macrakis wrote: >> For example: >>> x<-40; log(exp(x)+1)-x >> [1] 0 >>> x<-as.brob(40); log(exp(x)+1)-x >> [1] -exp(-Inf) >> The correct answer is about 4e-18. Perhaps Ryacas or some other tool gets >> this right, > > bc gets it

Re: [R] lattice shingle with time and date format

2009-02-11 Thread Deepayan Sarkar
On Tue, Feb 10, 2009 at 6:29 AM, Jon Loehrke wrote: > Hi R-Users, > > I have a time series of bivariate observations (x,y,t). I've > developed a few panel routines to explore certain aspects of the data, > and now would like to break the time series up into smaller chunks to > explore the tempora

Re: [R] tcltk, tcltk2, Rcmdr, Mac OS X

2009-02-11 Thread Monte Milanuk
Larry, Since it looks like you've got your problem about whipped, hope you don't mind if I piggy back on here... Same sort of problem... installed Rcmdr via the Package Installer. Followed the directions for running X11/Tk ala the site mentioned earlier and this is what I get when I try

Re: [R] How to comment in R

2009-02-11 Thread Wacek Kusnierczyk
Greg Snow wrote: > Apparently I was not clear in my intention in my original reply. I have no > problem with you or anyone else implementing this in whatever way. Someone > could even use Friedl's regex to write a preprocessor in R, he did the hard > work already if you follow the rules that h

Re: [R] Can't install rggobi package

2009-02-11 Thread hadley wickham
Have you installed ggobi successfully? Exactly what problem are you having with the installation? Regards, Hadley On Wed, Feb 11, 2009 at 3:21 PM, wrote: > I am unable to install the rggobi package. I do not have trouble > installing other packages. Any advice or suggestions? > > >>session

Re: [R] How to comment in R

2009-02-11 Thread Wacek Kusnierczyk
Duncan Murdoch wrote: > >> >> what about cases where the syntax is 'obvious' and yet r does the >> opposite of what one would expect? > > We shouldn't add features like that either. In some cases we have (or > S did), and the thousands of CRAN packages mean we're stuck with most > of them. ... wh

Re: [R] How to comment in R

2009-02-11 Thread Greg Snow
Apparently I was not clear in my intention in my original reply. I have no problem with you or anyone else implementing this in whatever way. Someone could even use Friedl's regex to write a preprocessor in R, he did the hard work already if you follow the rules that he based his regex on. I

Re: [R] How to comment in R

2009-02-11 Thread Wacek Kusnierczyk
Duncan Murdoch wrote: > >>> >>> So if the behaviour isn't very obvious in cases like the one quoted >>> above, and if the new syntax doesn't add any new expressiveness, I >>> would be opposed to adding it. >> >> what about cases where the syntax is 'obvious' and yet r does the >> opposite of what o

Re: [R] Efficent way to create an nxn upper triangular matrix of one's

2009-02-11 Thread Christos Hatzis
Here is a way to do this: round(upper.tri(matrix(1, 9, 9))) Or if you also need the diagonal of one's round(upper.tri(matrix(1, 9, 9), diag = TRUE)) -Christos > -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Dale Steele >

Re: [R] How to comment in R

2009-02-11 Thread Duncan Murdoch
On 2/11/2009 3:52 PM, Wacek Kusnierczyk wrote: Duncan Murdoch wrote: On 2/11/2009 2:27 PM, Wacek Kusnierczyk wrote: Duncan Murdoch wrote: On 2/11/2009 1:21 PM, Stavros Macrakis wrote: On Wed, Feb 11, 2009 at 12:32 PM, Greg Snow wrote: ...The c-style of /* */ allows both types and you can co

Re: [R] Efficent way to create an nxn upper triangular matrix of one's

2009-02-11 Thread Jorge Ivan Velez
Dear Dale, Here is one way, probably not the best: n<-9 temp<-matrix(1,ncol=n,nrow=n) temp[lower.tri(temp)] <- 0 temp HTH, Jorge On Wed, Feb 11, 2009 at 4:22 PM, Dale Steele wrote: > The code below create an nxn upper triangular matrix of one's. I'm > stuck on finding a more efficient vector

Re: [R] How to handle large numbers?

2009-02-11 Thread Wacek Kusnierczyk
Stavros Macrakis wrote: > On Wed, Feb 11, 2009 at 6:20 AM, Robin Hankin wrote: > >>> library(Brobdingnag) >>> exp(1000)/(exp(1007)+5) >>> >> [1] NaN >> >> >>> as.numeric(exp(as.brob(1000))/(exp(as.brob(1007))+5)) >>> >> [1] 0.000911882 >> > > Though brob is certainly use

Re: [R] Efficent way to create an nxn upper triangular matrix of one's

2009-02-11 Thread Sundar Dorai-Raj
Try x <- diag(n) x[upper.tri(x)] <- 1 On Wed, Feb 11, 2009 at 1:22 PM, Dale Steele wrote: > The code below create an nxn upper triangular matrix of one's. I'm > stuck on finding a more efficient vectorized way - Thanks. --Dale > > n <- 9 > data <- matrix(data=NA, nrow=n, ncol=n) > data > for (

Re: [R] changing settings on a barchart (lattice)

2009-02-11 Thread Sundar Dorai-Raj
Add the "adj" argument to panel.text to left (adj = 0) or right(adj = 1) justify the text. Add the "font" argument to change the font. See ?text. --sundar On Wed, Feb 11, 2009 at 1:25 PM, Dimitri Liakhovitski wrote: > Thanks a lot, Sundar. I experimented somewhat and here is the code > that work

Re: [R] Table Formatting

2009-02-11 Thread Marc Schwartz
Harold, xtable() does not handle multicol's AFAICS. Short of hand coding this, which would not be hard, you can use Frank's latex() function in the Hmisc package. Something along the lines of the following will get close. install.packages("Hmisc", dependencies = TRUE) library(Hmisc) ?latex # Pr

[R] Efficent way to create an nxn upper triangular matrix of one's

2009-02-11 Thread Dale Steele
The code below create an nxn upper triangular matrix of one's. I'm stuck on finding a more efficient vectorized way - Thanks. --Dale n <- 9 data <- matrix(data=NA, nrow=n, ncol=n) data for (i in 1:n) { data[,i] <- c(rep(1,i), rep(0,n-i)) } data __

Re: [R] changing settings on a barchart (lattice)

2009-02-11 Thread Dimitri Liakhovitski
Thanks a lot, Sundar. I experimented somewhat and here is the code that works well - it allows me to modify most of the stuff I want to modify: p<-as.vector(c(0.1, 0.2, 0.3, 0.4)) names(p)<-c("A","BB","","") barchart(~sort(p), main=list("Chart Title",cex=1),xlab=list("X

Re: [R] amusement

2009-02-11 Thread Peter Dalgaard
Ben Bolker wrote: Browsing Amazon for Books > Science > Mathematics > Applied > Probability and Statistics > R () produces a nice list of R books. Unfortunately, the heading reads: "Did you mean: sas" ? Oh, well if you follow that link, you'll get Bob Muenchen's

[R] Can't install rggobi package

2009-02-11 Thread JLucke
I am unable to install the rggobi package. I do not have trouble installing other packages. Any advice or suggestions? >sessionInfo() R version 2.8.1 (2008-12-22) i386-pc-mingw32 locale: LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United S

Re: [R] How to comment in R

2009-02-11 Thread Wacek Kusnierczyk
Gavin Simpson wrote: > On Wed, 2009-02-11 at 20:22 +0100, Wacek Kusnierczyk wrote: > >> Greg Snow wrote: >> >>> If it is fairly trivial to implement then go ahead and implement it, >>> >> patches are always welcome. >> >> now that's *not* true. not so long ago i submitted a patch

Re: [R] Help with XYPLOT with marginal histograms

2009-02-11 Thread Deepayan Sarkar
On Wed, Feb 11, 2009 at 12:37 PM, John Leonard wrote: > I am trying to replicate the following plot using Lattice: > > http://addictedtor.free.fr/graphiques/graphcode.php?graph=78 Why? lattice is not the right tool for this. Try looking at http://www.stat.wisc.edu/~deepayan/771/esplot.R with

Re: [R] How to comment in R

2009-02-11 Thread Wacek Kusnierczyk
Duncan Murdoch wrote: > On 2/11/2009 2:27 PM, Wacek Kusnierczyk wrote: >> Duncan Murdoch wrote: >>> On 2/11/2009 1:21 PM, Stavros Macrakis wrote: On Wed, Feb 11, 2009 at 12:32 PM, Greg Snow wrote: > ...The c-style of /* */ allows both types and you can comment out > part of a lin

[R] Help with XYPLOT with marginal histograms

2009-02-11 Thread John Leonard
I am trying to replicate the following plot using Lattice: http://addictedtor.free.fr/graphiques/graphcode.php?graph=78 I'm having trouble with the lattice equivalent of the "oma" (outside margin) setting. I've been all through the Lattice documentation and others and also searched the l

Re: [R] Table Formatting

2009-02-11 Thread Doran, Harold
The xtable package is probably going to be helpful > -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of jimdare > Sent: Wednesday, February 11, 2009 3:26 PM > To: r-help@r-project.org > Subject: [R] Table Formatting > > > Dear R

Re: [R] How to comment in R

2009-02-11 Thread Gavin Simpson
On Wed, 2009-02-11 at 20:22 +0100, Wacek Kusnierczyk wrote: > Greg Snow wrote: > > If it is fairly trivial to implement then go ahead and implement it, > patches are always welcome. > > now that's *not* true. not so long ago i submitted a patch improving on > Prof Brian Ripley's ad hoc fix to g

[R] More help with Binary Files

2009-02-11 Thread Steve_Friedman
Does anyone else have any insights to this issue: Henrick, thank you for your very quick response. I've examined the readBin help file with respect to endian and I'm still not sure I'm getting this correct. Here is what I'm coding: con <- file(file.choose(), open="rb") Year66 <- readBin(con,

[R] Table Formatting

2009-02-11 Thread jimdare
Dear R-Users I have created the following table in R: Year TACC.SNA1 Catch.SNA1 TACC.SNA2 Catch.SNA2 TACC.SNA3 Catch.SNA3 111 1985-86 9396 185951860 530 1486 16727 112 1986-87 3155 121959506

Re: [R] How to comment in R

2009-02-11 Thread Duncan Murdoch
On 2/11/2009 2:27 PM, Wacek Kusnierczyk wrote: Duncan Murdoch wrote: On 2/11/2009 1:21 PM, Stavros Macrakis wrote: On Wed, Feb 11, 2009 at 12:32 PM, Greg Snow wrote: ...The c-style of /* */ allows both types and you can comment out part of a line, but it is not simple to match and has its own

Re: [R] tcltk, tcltk2, Rcmdr, Mac OS X

2009-02-11 Thread Lawrence Hanser
John was spot on. Turns out that when I don't load the workspace Rcmdr starts up just fine. It hadn't occurred to me that a workspace could be corrupt... On Tue, Feb 10, 2009 at 5:12 PM, John Fox wrote: > Dear Larry, > > That's odd: The only lmer of which I'm aware is a function in the lme4 >

Re: [R] R on Mobile Devices (Android)

2009-02-11 Thread Warren Young
Gustaf Rydevik wrote: "3.3.2 [...]No interpreted code may be downloaded and used in an Application except for code that is interpreted and run by Apple's Published APIs and built- in interpreter(s)." and "An Application may not itself install or launch other executable code by any means, includi

Re: [R] How to comment in R

2009-02-11 Thread Wacek Kusnierczyk
Greg Snow wrote: > Stavros, > > Thanks for the clarification and going further back in the credit for /* */. > > I don't think that the regex argument is a complete red herring (possibly a > pink herring or burnt umber herring?). The post I was responding to said > that implementing it would b

Re: [R] Eror message: not a valid package -- installed < 2.0.0

2009-02-11 Thread Ben Bolker
Is there any reason you can't just install an up-to-date version of R (R 2.8.1), from cran.us.r-project.org (or your favorite mirror, see www.r-project.org) and see if that fixes the problem? Installing R on SunOS is not quite the breeze that it is on MacOS, Windows, or Linux, but it's not tha

Re: [R] What is going on?

2009-02-11 Thread Ben Bolker
The problem is that strsplit is designed to work on a *vector* of characters (your example is a length-1 vector of characters), each of which might end up being split into a character vector of different lengths, so it returns its results as a *list* the same length as the original character vec

Re: [R] What is going on?

2009-02-11 Thread Sarah Goslee
Lists. You're missing the "list" concept. I'm sure others can explain it better, but here's the basic idea. Take a look at l after you do the split: > l [[1]] [1] "1" "2" > length(l) [1] 1 strsplit() returns a list of length 1, with two elements, the two split "bits" of your initial string. The h

Re: [R] What is going on?

2009-02-11 Thread Peter Alspach
Kia ora Paul length(l) is 1 - that is, it is a list of with one element. That list element is a character vector of length 2. HTH Peter Alspach > -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Paul Johnston > Sent: Th

Re: [R] How to comment in R

2009-02-11 Thread Wacek Kusnierczyk
Duncan Murdoch wrote: > On 2/11/2009 1:21 PM, Stavros Macrakis wrote: >> On Wed, Feb 11, 2009 at 12:32 PM, Greg Snow wrote: >>> ...The c-style of /* */ allows both types and you can comment out >>> part of a line, but it is not simple to match and has its own >>> restrictions. Friedl in his regul

Re: [R] How to comment in R

2009-02-11 Thread Wacek Kusnierczyk
Stavros Macrakis wrote: > On Wed, Feb 11, 2009 at 12:32 PM, Greg Snow wrote: > >> ...The c-style of /* */ allows both types and you can comment out part of a >> line, but it is not simple to match and has its own restrictions. Friedl in >> his regular expressions book takes 10 pages to devel

Re: [R] How to comment in R

2009-02-11 Thread Wacek Kusnierczyk
Greg Snow wrote: > If it is fairly trivial to implement then go ahead and implement it, patches > are always welcome. now that's *not* true. not so long ago i submitted a patch improving on Prof Brian Ripley's ad hoc fix to grep, and it was silently ignored. in general, it should be fairly tr

[R] What is going on?

2009-02-11 Thread Paul Johnston
Ok, so I'm new to R, but this is driving me crazy. In this example, I am trying to process each element in a list. s = "1,2" l = strsplit(s, ",", fixed=TRUE) print("BEGIN") n = length(l) i = 1 while (i <= n) { x = l[[i]] print(paste("x:", class(x), x)) print("BEFORE PRINT") print(x) pr

Re: [R] extract trend data from stl

2009-02-11 Thread Duncan Murdoch
On 2/11/2009 8:39 AM, doloop wrote: I am using the stl function to decompose a time series. I want to access the trend data hopefully by placing it into a separate vector. How do I do that? After you have run the example(stl) code, the three series are the three columns of sts. The trend is

Re: [R] bar plot/ histogram

2009-02-11 Thread Greg Snow
You can still use hist, just provide your own breaks: mydata <- sample(1:10, 100, TRUE, 10:1) br <- c( 0.5:4.5, 10.5 ) hist(mydata, breaks=br, xaxt='n') axis(1, at= c(1:4, mean(5:10)), c( 1:4, '5-10')) box(bty='l') hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermo

Re: [R] extract trend data from stl

2009-02-11 Thread Roy Mendelssohn
?stl -Roy On Feb 11, 2009, at 5:39 AM, doloop wrote: I am using the stl function to decompose a time series. I want to access the trend data hopefully by placing it into a separate vector. How do I do that? Thanks. -- View this message in context: http://www.nabble.com/extract-trend-d

Re: [R] How to apply table() on subdata and stack outputs

2009-02-11 Thread jim holtman
This may be what you want: > table(input.df$id, input.df$var_interest) happy soso unhappy jack 0 21 1 tom 1 10 1 On Wed, Feb 11, 2009 at 1:34 PM, Sean Zhang wrote: > Dear R helpers: > > I am a R novice and have a question about using table() to extract

Re: [R] How to apply table() on subdata and stack outputs

2009-02-11 Thread Uwe Ligges
Sean Zhang wrote: Dear R helpers: I am a R novice and have a question about using table() to extract frequences over many sub-datasets. A small example input dataframe and wanted output dataframe are provided below. The real data is very large so a for loop is what I try to avoid. Can someone

[R] Eror message: not a valid package -- installed < 2.0.0

2009-02-11 Thread Powers, Randall - BLS
> Hello R-help, > > > We are running R version 2.6.0 (2007-10-03). I believe that I got it > from www.sunfreeware.com. A number of the packages that we attempt to > download from http://www.r-project.org/ give us the error message > below when we attempt to run them. > > Can anyone tell me wh

Re: [R] Strange behaviour of ISOdatetime

2009-02-11 Thread pbarros
Sorry for missing this part of the posting guide. It was indeed a problem with the locales. I have fixed it now. Pedro David Winsemius wrote: > > My guess is that your two machines have different setting for locale. > What does this produce on each of them: > > sessionInfo()$locale > > (Note

[R] amusement

2009-02-11 Thread Ben Bolker
Browsing Amazon for Books > Science > Mathematics > Applied > Probability and Statistics > R () produces a nice list of R books. Unfortunately, the heading reads: "Did you mean: sas" ? cheers Ben Bolker __ R-help@r-

Re: [R] plots and text to the same output file

2009-02-11 Thread Greg Snow
odfWeave works just fine for me on windows and the XML package shows up in my list of packages. You may be overthinking the problem, for most of my odfWeave projects I don't need odfInsertPlot, just use fig=TRUE in the code chunk and only include the code for that 1 plot in that code chunk (a s

Re: [R] Variables captured in closures get copied?

2009-02-11 Thread Wacek Kusnierczyk
Peter Dalgaard wrote: > Titus von der Malsburg wrote: >> Hi list! I have a data frame called fix and a list of index vectors >> called rois: >> >> > head(rois, 3) >> [[1]] >> [1] 2 1 >> >> [[2]] >> [1] 3 >> >> [[3]] >> [1] 6 7 28 26 27 24 25 >> >> The part that's causing the issue

[R] extract trend data from stl

2009-02-11 Thread doloop
I am using the stl function to decompose a time series. I want to access the trend data hopefully by placing it into a separate vector. How do I do that? Thanks. -- View this message in context: http://www.nabble.com/extract-trend-data-from-stl-tp21954844p21954844.html Sent from the R help ma

Re: [R] Problem about SARMA model forcasting

2009-02-11 Thread Saji Ren
Somebody said that ARIMA models like discussed above are easy to implement on a spreadsheet. The prediction formula is simply a linear equation that refers to past values of original time series and past values of the errors. Thus, setting up an spreadsheet by stroing the data in one column, the

Re: [R] How to comment in R

2009-02-11 Thread Greg Snow
Stavros, Thanks for the clarification and going further back in the credit for /* */. I don't think that the regex argument is a complete red herring (possibly a pink herring or burnt umber herring?). The post I was responding to said that implementing it would be trivial, I think that the f

Re: [R] forestplot

2009-02-11 Thread Marino, Mark
Thanks, I was able to get what I wanted done by modifying the code, but I will consider writing my own based upon your suggestion. Mark Mark T. Marino, MD VP, Early Clinical Development Mannkind Corp. 61 S. Paramus Road Paramus, NJ 07652 201-983-5238 Office 203-512-4008 Cell mmar...@mannkindcor

Re: [R] OT: A test with dependent samples.

2009-02-11 Thread Rolf Turner
Thank you ***VERY*** much. That clarifies a lot of things which were vaguely knocking around in my mind but about which I could not get my thoughts properly organized. Thanks again. cheers, Rolf Turner On 11/02/2009, at 11:27 PM, Meyners,Michael,LAUSANNE,Appli

Re: [R] How to comment in R

2009-02-11 Thread Duncan Murdoch
On 2/11/2009 1:21 PM, Stavros Macrakis wrote: On Wed, Feb 11, 2009 at 12:32 PM, Greg Snow wrote: ...The c-style of /* */ allows both types and you can comment out part of a line, but it is not simple to match and has its own restrictions. Friedl in his regular expressions book takes 10 pages

[R] How to apply table() on subdata and stack outputs

2009-02-11 Thread Sean Zhang
Dear R helpers: I am a R novice and have a question about using table() to extract frequences over many sub-datasets. A small example input dataframe and wanted output dataframe are provided below. The real data is very large so a for loop is what I try to avoid. Can someone englithen me how to u

Re: [R] How to handle large numbers?

2009-02-11 Thread Stavros Macrakis
On Wed, Feb 11, 2009 at 6:20 AM, Robin Hankin wrote: >> library(Brobdingnag) >> exp(1000)/(exp(1007)+5) > [1] NaN > >> as.numeric(exp(as.brob(1000))/(exp(as.brob(1007))+5)) > [1] 0.000911882 Though brob is certainly useful in many cases, it can't substitute for thinking about numeric issues (roun

[R] plots and text to the same output file

2009-02-11 Thread lauramorg...@bluewin.ch
Hello, I would like to save different plots and some text (like summaries, AIC, ...) on the same file. I've read the e-mails entitled "Output results to a single postscript document" written some days ago and I've tried to use the function odfInsertPlot() in the package "odfWeave" but it doesn'

Re: [R] bar plot/ histogram

2009-02-11 Thread Marc Schwartz
on 02/11/2009 12:10 PM phoebe kong wrote: > Hi all, > > I would like to construct plot of the distribution of N, where N range > from 1 to 10. I couldn't just use the hist(), as I want the categories > for the bars are: 1, 2, 3, 4, >=5. So this will be a bar plot with 5 > bars, and the height of t

Re: [R] How to comment in R

2009-02-11 Thread Stavros Macrakis
On Wed, Feb 11, 2009 at 12:32 PM, Greg Snow wrote: > ...The c-style of /* */ allows both types and you can comment out part of a > line, but it is not simple to match and has its own restrictions. Friedl in > his regular expressions book takes 10 pages to develop a pattern to match > these (an

[R] bar plot/ histogram

2009-02-11 Thread phoebe kong
Hi all, I would like to construct plot of the distribution of N, where N range from 1 to 10. I couldn't just use the hist(), as I want the categories for the bars are: 1, 2, 3, 4, >=5. So this will be a bar plot with 5 bars, and the height of the bar will be the frequency of N. (eg bar#1 will be t

Re: [R] summary statistics

2009-02-11 Thread phoebe kong
Thanks a bunch! They all are helpful :) On 2/10/09, Jim Lemon wrote: > William Revelle wrote: >> At 6:41 PM -0500 2/9/09, David Winsemius wrote: >>> describe() in Hmisc provides much of the rest of what you asked for: >>> describe(pref900$TCHDL) >>> pref900$TCHDL >>> n missing unique

  1   2   >