[R] How Does One Use the Value of Density Function?

2009-09-06 Thread Gundala Viswanath
How do people usually use the result of density function (e.g. dnorm)? Especially when its value can be greater than 1. What do they do with such density >1? > dnorm(2.02,2,.24) [1] 1.656498 - G.V. __ R-help@r-project.org mailing list https://stat.et

Re: [R] (no subject)

2009-09-06 Thread milton ruser
May be you also want: x<-runif(1000,min=0, max=600) x3<-x[x<=300] summary(x3) hist(x3, ,breaks = c(0,50,100,150,200,250,300)) bests milton On Mon, Sep 7, 2009 at 1:01 AM, milton ruser wrote: > Hi Roslina, > > x<-runif(1000,min=0, max=600) > hist(x) > > x2<-ifelse(x<=300,x,300) > summary(x2

Re: [R] (no subject)

2009-09-06 Thread milton ruser
Hi Roslina, x<-runif(1000,min=0, max=600) hist(x) x2<-ifelse(x<=300,x,300) summary(x2) hist(x2, ,breaks = c(0,50,100,150,200,250,300)) good luck milton On Mon, Sep 7, 2009 at 12:51 AM, Roslina Zakaria wrote: > Hi r-users, > > I would like to know how to put all the data that is greater than

[R] (no subject)

2009-09-06 Thread Roslina Zakaria
Hi r-users,   I would like to know how to put all the data that is greater than certain value in certain cell for my histogram.  For example, since maximum value of p1 is 588 it doesn't fit in the breaks that we specified.  Can we write breaks >300?   max(p1[,2]) pre.hist <- hist(p1[,2],breaks =

Re: [R] get the command line

2009-09-06 Thread Steve Lianoglou
On Mon, Sep 7, 2009 at 12:00 AM, Peng Yu wrote: > On Sun, Sep 6, 2009 at 10:50 PM, Steve > Lianoglou wrote: >> Hi, >> >> On Sun, Sep 6, 2009 at 11:25 PM, Peng Yu wrote: >>> Hi, >>> >>> commandArgs gives me the arguments. I am wondering what command can >>> give the whole command line. >> >> What do

Re: [R] get the command line

2009-09-06 Thread Peng Yu
On Sun, Sep 6, 2009 at 10:50 PM, Steve Lianoglou wrote: > Hi, > > On Sun, Sep 6, 2009 at 11:25 PM, Peng Yu wrote: >> Hi, >> >> commandArgs gives me the arguments. I am wondering what command can >> give the whole command line. > > What does "the whole command line" mean? Are you looking for the > c

Re: [R] get the command line

2009-09-06 Thread Steve Lianoglou
Hi, On Sun, Sep 6, 2009 at 11:25 PM, Peng Yu wrote: > Hi, > > commandArgs gives me the arguments. I am wondering what command can > give the whole command line. What does "the whole command line" mean? Are you looking for the command args in one string? paste(commandArgs(), collapse=" ") Can yo

[R] get the command line

2009-09-06 Thread Peng Yu
Hi, commandArgs gives me the arguments. I am wondering what command can give the whole command line. Regards, Peng __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.o

Re: [R] DOE in R?

2009-09-06 Thread b miner
I attempted to use the package algdesign. I used the following code. However, the results were very much not matching the reference I noted (which is located at http://www2.sas.com/proceedings/sugi31/196-31.pdf). Instead of 30 design points, I received 25 and those that were returned, only half

Re: [R] Plot 2 ecdf in one graph

2009-09-06 Thread Rolf Turner
Two things: (1) type="l" won't work; plot.ecdf() calls plot.stepfun() and it doesn't have a ``type'' argument. (2) Giving plot two separate objects to plot makes no sense at all. (3) If you've got ***frequency*** data then ecdf() is probably not the right thing to do in the first pla

[R] Plot 2 ecdf in one graph

2009-09-06 Thread Roslina Zakaria
Hi r-users,   I would like to compare the cdf between historical and predicted. My x.obs and x.pre are the frequency data in classes of 0-300. I tried: plot(ecdf(x.obs),ecdf(x.pre),type="l",col="red")   and it gives me: Error in plot.stepfun(x, ..., ylab = ylab, verticals = verticals, pch = pch)

Re: [R] struggling with "split" function

2009-09-06 Thread Dimitri Liakhovitski
Found a mistake - it was mine! Thanks a lot for your help! On Sun, Sep 6, 2009 at 8:43 AM, Dimitri Liakhovitski wrote: > Thanks a lot, Dimitris. > It totally works on my example data frame. > I know, it's probably hard to address, but when I try to apply it to > the real huge data frame I have, af

Re: [R] Why this statement does not print anything in an if-statement that includes 'q()'?

2009-09-06 Thread jim holtman
You need to explicitly 'print' the second 'length' function call. Only at the top level of the interactive session is the value of an object printed out if you just reference the object. On Sun, Sep 6, 2009 at 9:13 PM, Peng Yu wrote: > Hi, > > I run the following script. I don't understand why the

Re: [R] Why tempdir() always give me the same results in the same session?

2009-09-06 Thread cls59
Peng Yu wrote: > > > tempdir() always gives me the same result. Should it give a different > result each time I call it? > > The help page for tempdir() contains the following explanation of the return value: ?tempdir ... For tempdir, the path of the per-session temporary directory. I w

[R] Why this statement does not print anything in an if-statement that includes 'q()'?

2009-09-06 Thread Peng Yu
Hi, I run the following script. I don't understand why the second 'length(args)' does not show anything but the first one shows '0'. Is it because the command 'q()' affects anything in the if-statement. However, if I change the second 'length(args)' to 'print(length(args))', the script will print

[R] Why tempdir() always give me the same results in the same session?

2009-09-06 Thread Peng Yu
Hi, tempdir() always gives me the same result. Should it give a different result each time I call it? > tempdir() [1] "/tmp/RtmppB72wH" > tempdir() [1] "/tmp/RtmppB72wH" Regards, Peng __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/l

Re: [R] Is there a package for generating standardized R script command line options?

2009-09-06 Thread Gabor Grothendieck
Check out the getopt package on CRAN. On Sun, Sep 6, 2009 at 8:28 PM, Peng Yu wrote: > Hi, > > In python, there is a package that helps generating command line > options. I am wondering if there is such a package in R that helps > generating the command options for a R script? > > http://docs.pyth

[R] Is there a package for generating standardized R script command line options?

2009-09-06 Thread Peng Yu
Hi, In python, there is a package that helps generating command line options. I am wondering if there is such a package in R that helps generating the command options for a R script? http://docs.python.org/library/optparse.html Regards, Peng __ R-help

[R] CRAN (and crantastic) updates this week

2009-09-06 Thread Crantastic
CRAN (and crantastic) updates this week New packages * AICcmodavg (1.01) Marc J. Mazerolle http://crantastic.org/packages/AICcmodavg This package includes functions to create model selection tables based on Akaike's information criterion (AIC) and the second-order AIC (AIC

Re: [R] Nested Fixed Effects - basic questions

2009-09-06 Thread Daniel Malter
You will have to talk to your local statistician/econometrician. Given that you say you will have three observations per student, your description of the data is incomplete. Therefore, it is impossible to tell what the right approach would be. Assumed that all observations are independent, you woul

Re: [R] How to wait for a user response in Rscript?

2009-09-06 Thread Alfredo
Sorry, did not realize that it was for Rscript -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Peng Yu Sent: Sunday, September 06, 2009 5:24 PM To: r-h...@stat.math.ethz.ch Subject: Re: [R] How to wait for a user response in Rscript?

Re: [R] How to wait for a user response in Rscript?

2009-09-06 Thread Joshua Wiley
Hello Peng Yu, Invert the order of plot and par. See below: x=1:10 y=1:10 X11() par(ask=T) plot(x,y) That should wait for some user input. I hope that helps, Joshua On Sun, Sep 6, 2009 at 2:23 PM, Peng Yu wrote: > Hi, > > The following script will run without asking me anything. > > $ Rsc

Re: [R] avoid NA in list

2009-09-06 Thread Peter Alspach
Tena koe Alternatively, for instances where you have a list element which is a vector of all NA: > grzes <- list(a=1:4, b=NA, c=letters[1:5], d=c(1,NA,10), e=rep(NA,5)) > grzes $a [1] 1 2 3 4 $b [1] NA $c [1] "a" "b" "c" "d" "e" $d [1] 1 NA 10 $e [1] NA NA NA NA NA > grzes[sapply(grzes, fu

Re: [R] How to wait for a user response in Rscript?

2009-09-06 Thread Peng Yu
Hi, The following script will run without asking me anything. $ Rscript plot.R > x=1:10 > y=1:10 > X11() > plot(x,y) > par(ask=T) > Regards, Peng On Sun, Sep 6, 2009 at 11:55 AM, RIOS,ALFREDO ARTURO wrote: > Hi Peng > > I think this is what you are looking for > > par(ask=T) > > Alfredo > > > O

Re: [R] How many attributes are there of a variable?

2009-09-06 Thread Frank E Harrell Jr
Peng, You can create all the attributes you want, with one headache: R does not keep attributes across subsetting operations so you need to write classes and "[.something" methods when attributions need to be kept or adjusted upon subsetting rows. The Hmisc package uses attributes such as la

Re: [R] Two packages ane one method

2009-09-06 Thread Henrique Dallazuanna
You have tried gtools::combinations(3,2,letters[1:3]) ? On Sun, Sep 6, 2009 at 2:10 PM, Grzes wrote: > > Hi! > I want to use one method "combinations" from "gtools" package but in my > code > I must use also "dprep" method where is method "combinations" too. Mayby I > show you result of help f

Re: [R] How to refer the element in a named list?

2009-09-06 Thread Duncan Murdoch
On 06/09/2009 1:45 PM, David Winsemius wrote: On Sep 6, 2009, at 1:35 PM, Duncan Murdoch wrote: On 06/09/2009 1:04 PM, Peng Yu wrote: Hi, I thought that 'coefficients' is a named list, but I can not refer to its element by something like r$coefficients$y. I used str() to check r. It says the f

[R] How many attributes are there of a variable?

2009-09-06 Thread Peng Yu
Hi, According to the example below this email, attr(x,"names") is the same as names(x). I am wondering how many attributes there are of a given variable. How to find out what they are? Can I always use some_attribute(x) instead of attr(x, "some_attribute")? Regards, Peng > x=c(1,2,3) > attr(x,"n

Re: [R] How to refer the element in a named list?

2009-09-06 Thread Peng Yu
On Sun, Sep 6, 2009 at 12:45 PM, David Winsemius wrote: > > On Sep 6, 2009, at 1:35 PM, Duncan Murdoch wrote: > >> On 06/09/2009 1:04 PM, Peng Yu wrote: >>> >>> Hi, >>> I thought that 'coefficients' is a named list, but I can not refer to >>> its element by something like r$coefficients$y. I used s

Re: [R] avoid NA in list

2009-09-06 Thread Henrique Dallazuanna
Try this: your_list[!is.na(your_list)] On Sun, Sep 6, 2009 at 4:32 PM, Grzes wrote: > > Hi! > I Have list, for example: > ... > [[22]] > [1] 27 51 69 107 119 > > [[23]] > [1] NA > > [[24]] > [1] 54 57 62 > > And I would like to avoid NA value. Similar way like I may do it in vector > using n

Re: [R] Creating adjacency matrix from a data frame

2009-09-06 Thread Henrique Dallazuanna
Try this: xtabs(kmdist ~ ida + idb, data = x) On Sun, Sep 6, 2009 at 5:12 PM, Thomas Jensen < thomas.jen...@eup.gess.ethz.ch> wrote: > Dear R-list, > > Sorry for spamming the list, but I am just learning how to manipulate data > in R, so if this is a trivial question I am sorry. > > I have the

[R] Creating adjacency matrix from a data frame

2009-09-06 Thread Thomas Jensen
Dear R-list, Sorry for spamming the list, but I am just learning how to manipulate data in R, so if this is a trivial question I am sorry. I have the following data which list the distance between capitals: ida idb kmdist 7108"UK" "BEL" " 313" 71

[R] avoid NA in list

2009-09-06 Thread Grzes
Hi! I Have list, for example: ... [[22]] [1] 27 51 69 107 119 [[23]] [1] NA [[24]] [1] 54 57 62 And I would like to avoid NA value. Similar way like I may do it in vector using na.value() function. Do you have any idea? -- View this message in context: http://www.nabble.com/avoid-NA-in-lis

[R] Two packages in one method

2009-09-06 Thread Grzes
Hi! I want to use one method "combinations" from "gtools" package but in my code I must use also "dprep" method where is method "combinations" too. Mayby I show you result my help function: Help on topic 'combinations' was found in the following packages: Package Library dpre

Re: [R] Combining expressions.

2009-09-06 Thread Rolf Turner
Many thanks to Gabor Grothendieck and William Dunlap who both solved my problem for me, right rapidly! cheers, Rolf Turner ## Attention:\ This e-mail message is privileged and confid...{{dropped:9}} __

Re: [R] eps file with embedded font

2009-09-06 Thread Ted Harding
I am going back to Simone's original query (though this will split the thread) because subsequent replies did not include his original. Some comments interspersed below; the main response at the end. I have had some private correspondence with Simone, who sent me two of his files that exhibit the

Re: [R] Creating mixed line and point graphs with xyplot

2009-09-06 Thread David Winsemius
On Sep 6, 2009, at 3:03 PM, John Kane wrote: I think you have a couple of typos. Should it not be par(new=True) points(x,b) Probably not "True" --- On Sat, 9/5/09, jim holtman wrote: From: jim holtman Subject: Re: [R] Creating mixed line and point graphs with xyplot To: "Paul Sweeti

Re: [R] Creating mixed line and point graphs with xyplot

2009-09-06 Thread John Kane
I think you have a couple of typos. Should it not be par(new=True) points(x,b) --- On Sat, 9/5/09, jim holtman wrote: > From: jim holtman > Subject: Re: [R] Creating mixed line and point graphs with xyplot > To: "Paul Sweeting" > Cc: r-help@r-project.org > Received: Saturday, September 5,

Re: [R] How to pop up the graphics window from Rscript?

2009-09-06 Thread David Winsemius
On Sep 6, 2009, at 1:42 PM, Gabor Grothendieck wrote: Try this (contents of plot.R): png("mygraphic.png") plot(1:10) dev.off() browseURL("mygraphic.png") It will pop up the graphic in a browser window. On a Mac that shows up in a Preview window. The X11() device does open a plot on a Mac

Re: [R] [Hmisc] Latex to pdf

2009-09-06 Thread Liviu Andronic
On 9/6/09, Jeroen Ooms wrote: > I would like to print some tables and figures to a PDF device on a CentOS 5 > vps. However, I cannot seem to get the latex function from Hmisc working. I > There is also xtable() for transferring tables to LaTeX. Liviu

Re: [R] How to refer the element in a named list?

2009-09-06 Thread David Winsemius
On Sep 6, 2009, at 1:35 PM, Duncan Murdoch wrote: On 06/09/2009 1:04 PM, Peng Yu wrote: Hi, I thought that 'coefficients' is a named list, but I can not refer to its element by something like r$coefficients$y. I used str() to check r. It says the following. Can somebody let me know what it mea

Re: [R] How to pop up the graphics window from Rscript?

2009-09-06 Thread Gabor Grothendieck
Try this (contents of plot.R): png("mygraphic.png") plot(1:10) dev.off() browseURL("mygraphic.png") It will pop up the graphic in a browser window. On Sun, Sep 6, 2009 at 12:53 PM, Peng Yu wrote: > Hi, > > I am wondering how to pop up the graphics window from Rscript. I run > the following code

Re: [R] How to pop up the graphics window from Rscript?

2009-09-06 Thread David Winsemius
Perhaps you should read the Posting Guide (again?) and then adopt a consistent practice of including system information in your questions to r-help. Not everyone keeps a mental list of what OS you are using. Graphics commands are highly OS specific. capabilities() # at an interactive R prom

Re: [R] How to refer the element in a named list?

2009-09-06 Thread Duncan Murdoch
On 06/09/2009 1:04 PM, Peng Yu wrote: Hi, I thought that 'coefficients' is a named list, but I can not refer to its element by something like r$coefficients$y. I used str() to check r. It says the following. Can somebody let me know what it means? The line that matters is the one $ coefficie

Re: [R] How to pop up the graphics window from Rscript?

2009-09-06 Thread Peng Yu
I get the following error. $ Rscript plot.R > x=1:10 > y=1:10 > windows() Error: could not find function "windows" Execution halted On Sun, Sep 6, 2009 at 11:59 AM, RIOS,ALFREDO ARTURO wrote: > maybe > > windows() > > > On Sun Sep 06 12:53:14 EDT 2009, Peng Yu wrote: > >> Hi, >> >> I am wonderi

[R] How to refer the element in a named list?

2009-09-06 Thread Peng Yu
Hi, I thought that 'coefficients' is a named list, but I can not refer to its element by something like r$coefficients$y. I used str() to check r. It says the following. Can somebody let me know what it means? ..- attr(*, "names")= chr [1:2] "(Intercept)" "y" $ Rscript lm.R > x=1:10 > y=1:10 >

Re: [R] How to wait for a user response in Rscript?

2009-09-06 Thread Duncan Murdoch
On 06/09/2009 12:52 PM, Peng Yu wrote: Hi, In 'example(barplot)' running in R, I see 'Hit to see next plot:', then R waits for my input. I am wondering how to wait for a user response in Rscript. Rscript doesn't run R interactively, so I doubt if there's a way to do this. Rterm has the --es

Re: [R] How to pop up the graphics window from Rscript?

2009-09-06 Thread RIOS,ALFREDO ARTURO
maybe windows() On Sun Sep 06 12:53:14 EDT 2009, Peng Yu wrote: Hi, I am wondering how to pop up the graphics window from Rscript. I run the following code, but I don't see the graphics window, even transiently. Regards, Peng $ Rscript plot.R x=1:10 y=1:10 plot(x,y) __

Re: [R] How to wait for a user response in Rscript?

2009-09-06 Thread RIOS,ALFREDO ARTURO
Hi Peng I think this is what you are looking for par(ask=T) Alfredo On Sun Sep 06 12:52:31 EDT 2009, Peng Yu wrote: Hi, In 'example(barplot)' running in R, I see 'Hit to see next plot:', then R waits for my input. I am wondering how to wait for a user response in Rscript. Regards,

[R] How to pop up the graphics window from Rscript?

2009-09-06 Thread Peng Yu
Hi, I am wondering how to pop up the graphics window from Rscript. I run the following code, but I don't see the graphics window, even transiently. Regards, Peng $ Rscript plot.R > x=1:10 > y=1:10 > plot(x,y) > __ R-help@r-project.org mailing list htt

[R] How to wait for a user response in Rscript?

2009-09-06 Thread Peng Yu
Hi, In 'example(barplot)' running in R, I see 'Hit to see next plot:', then R waits for my input. I am wondering how to wait for a user response in Rscript. Regards, Peng __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-hel

Re: [R] How to figure the type of a variable?

2009-09-06 Thread Jorge Ivan Velez
Dear Peng, Perhaps str(r) is what you are looking for. HTH, Jorge On Sun, Sep 6, 2009 at 12:33 PM, Peng Yu wrote: > Hi, > > I want to know what is there returned values of 'lm'. 'class' and 'lm' > does not show that the returned value has the variable coefficients, > etc. I am wondering what

Re: [R] How to figure the type of a variable?

2009-09-06 Thread Duncan Murdoch
On 06/09/2009 12:33 PM, Peng Yu wrote: Hi, I want to know what is there returned values of 'lm'. 'class' and 'lm' does not show that the returned value has the variable coefficients, etc. I am wondering what is the command to show the detailed information. If possible, I aslo want the lower leve

[R] How to figure the type of a variable?

2009-09-06 Thread Peng Yu
Hi, I want to know what is there returned values of 'lm'. 'class' and 'lm' does not show that the returned value has the variable coefficients, etc. I am wondering what is the command to show the detailed information. If possible, I aslo want the lower level information. For example, I want to sho

[R] linear mixed model question

2009-09-06 Thread Wen Huang
Hello, I wanted to fit a linear mixed model to a data that is similar in terms of design to the 'Machines' data in 'nlme' package except that each worker (with triplicates) only operates one machine. I created a subset of observations from 'Machines' data such that it looks the same as th

Re: [R] Color index in image function

2009-09-06 Thread Schalk Heunis
By default the z-values are split into equal ranges to match the number of colors. The first color is then for first interval from min(z) etc. Look at the code for image.default for clarity - there seems to be some influence from the "oldstyle" parameter. If you want to be 100% sure about which

Re: [R] [Hmisc] Latex to pdf

2009-09-06 Thread Oliver Bandel
Jeroen Ooms uu.nl> writes: [...] > Output written on file643c9869.dvi (1 page, 372 bytes). > Transcript written on file643c9869.log. > Error: Can't open display: The can't open display-error rather looks like an X11-problem. Are you reglar user on that system ? Try to look at the dvi with you

Re: [R] Color index in image function

2009-09-06 Thread Henrique Dallazuanna
Try this to see which colors the codes are: Color <- function(color){ z <- matrix(1:length(color), ncol = length(color)) image(y = seq(1, length(color)), z, col = color, axes = FALSE) text(0, y = z, labels = color, pos = 1, offset = 0, cex = 0.7) } Color(topo.colors(5)) Co

Re: [R] How can I appoint a small part of the whole data

2009-09-06 Thread Yichih Hsieh
Dear Mark, many thanks for your suggestions ! best, yichih -- Yichih Hsieh e-mail : yichih.hs...@gmail.com [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do re

Re: [R] How can I appoint a small part of the whole data

2009-09-06 Thread Yichih Hsieh
Dear baptiste, many thanks for your suggestions ! best, yichih 2009/9/5, baptiste auguie : > > Hi, > > you have two problems in your first scenario, > > 1- Wrong operator precedence. For example, > > > 1 == 2 | 3 > [1] TRUE > > where 1==2 is tested as FALSE, but 1 is not tested against 3 for e

Re: [R] selecting columns based on values of two variables

2009-09-06 Thread Dimitris Rizopoulos
probably you're looking for subset(capdist, ida %in% c("DEN","SWD","FIN") & idb %in% c("DEN","SWD","FIN")) I hope it helps. Best, Dimitris Thomas Jensen wrote: Dear R-list, I am having troubles selecting rows from a very large data-set containing distances between capitals. The struc

[R] selecting columns based on values of two variables

2009-09-06 Thread Thomas Jensen
Dear R-list, I am having troubles selecting rows from a very large data-set containing distances between capitals. The structure of the data-set looks like this: numaida numbidb kmdist midist 12 USA 20 CAN 731

Re: [R] Color index in image function

2009-09-06 Thread FMH
Hi, Thank you for your response. I'm looking for the names of the colors denoted by these  codes and what do these colors represent for. For instance, if we use topo.colors(5) in the image function, five different colors will be used in which its codes are denoted as: [1] "#4C00" "#004CFF

Re: [R] ggplot2::qplot() -- arbitary transformations of coordinate system?

2009-09-06 Thread David Winsemius
Is there a place to find a list of the legal values for the coord_trans parameters. I spent a bunch of time searching the ggplot2 docs and r-help for same without success. I also made an attempt at looking at the code in R which also failed. -- David. On Sep 6, 2009, at 10:12 AM, hadley wi

Re: [R] saving large matrices with decimal numbers

2009-09-06 Thread Uwe Ligges
Moreno Ignazio Coco wrote: Please tell us what you did exactly when you got the empty file: PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. well, that's exactly the point, I didn't do anything

Re: [R] how do I draw this surface -- hand drawn in the attachemtn

2009-09-06 Thread Steve Lianoglou
Hi, On Sat, Sep 5, 2009 at 5:16 AM, gallon li wrote: > Basially I have the observation for x, y, and z > > for each fixed z, the value of y moves from 0 to y0 as x moves from 0 to x0. > I then move the curve for z from 0 to z0 and form a continuous surface. want > to know if there is a way that R

Re: [R] About BIC

2009-09-06 Thread Henrique Dallazuanna
The AIC function calculate the BIC. See ?AIC On Sat, Sep 5, 2009 at 5:40 PM, wrote: > Hello, > > I am working on getting optimal lags by using BIC, But I don't know how to > calculate BIC. Is there any code or useful function for it? > > Thanks and regards, > Dan Zhao > > __

Re: [R] Color index in image function

2009-09-06 Thread Steve Lianoglou
Hi, On Sat, Sep 5, 2009 at 7:06 AM, FMH wrote: > Dear All, > > I was looking for the color index in image function, such as from > topo.colors(n) and etc. but still never found it. For instance, from the help > menu. The answer is in the code: > ### > #

Re: [R] using histogram to find cdf

2009-09-06 Thread Steve Lianoglou
Hi, On Sun, Sep 6, 2009 at 7:03 AM, maram salem wrote: > Dear all, > How can I use the histogram density estimate (hist) to find the value of the > cdf at a certain point? Can you just use the ecdf function on your original data? -steve -- Steve Lianoglou Graduate Student: Computational Syste

Re: [R] Concentration ellipsoid

2009-09-06 Thread Duncan Murdoch
On 06/09/2009 6:08 AM, RON70 wrote: In the mean time, i have found one package "ellipse" to do the same. The syntax is : plot(ellipse(Sigma), type='l') However I am still struggling on how to use "qplot" (in GGPLOT2) to draw above plot. I want to get some stylish view for my presentation prepar

Re: [R] ggplot2::qplot() -- arbitary transformations of coordinate system?

2009-09-06 Thread hadley wickham
Hi Michael, You could use aes(y = 1000 * myyvar) and coord_trans(trans_y = "inverse") Hadley On Sun, Sep 6, 2009 at 6:30 AM, Michael Kubovy wrote: > Hi Stephen, > > Because coord_trans() does all the work of plotting the original values on > the tranformed scale. See ?coord_trans. To quote: "The

Re: [R] About BIC

2009-09-06 Thread Steve Lianoglou
Hi Dan, On Sat, Sep 5, 2009 at 4:40 PM, wrote: > Hello, > > I am working on getting optimal lags by using BIC, But I don't know how to > calculate BIC. Is there any code or useful function for it? The second formula listed on the wikipedia page for BIC seems pretty straightforward to calculate:

Re: [R] Matrix as input to xyplot {lattice} - proper extended formula syntax

2009-09-06 Thread David Winsemius
On Sep 6, 2009, at 12:51 AM, David Winsemius wrote: I'm not exactly sure what structure df has. Here's my effort to duplicate it: df <- data.frame(y=matrix(rnorm(24), nrow=6), x=1:6) > df y.1y.2y.3y.4 x 1 0.1734636 0.2348417 -1.2375648 -1.3246439 1 2 1.9551

Re: [R] DOE in R?

2009-09-06 Thread Carlos J. Gil Bellosta
Hello, This is your starting point: http://cran.r-project.org/web/views/ExperimentalDesign.html Best regards, Carlos J. Gil Bellosta http://www.datanalytics.com On Thu, 2009-09-03 at 17:38 -0700, B_miner wrote: > Hello! > > > This is not a topic I am well versed in but required to become we

Re: [R] struggling with "split" function

2009-09-06 Thread Dimitri Liakhovitski
Thanks a lot, Dimitris. It totally works on my example data frame. I know, it's probably hard to address, but when I try to apply it to the real huge data frame I have, after the last line I get: Error in `[.default`(x$A, na.ind, -1) : incorrect number of dimensions. I know it's impossible to answ

[R] Simulation of population dynamics in R?

2009-09-06 Thread Oliver Bandel
Hello, are there simulation packages to simulate population dynamics, for example for epidemiology? Or are there (open source) tools that can do that task and can be used from within R (or at least can read the resulting data files)? Oliver __ R-help

Re: [R] Anova over a list of models

2009-09-06 Thread Schalk Heunis
Jeroen This seems to work for (1): anova(myModels[[1]], force(myModels[[2]])) OR anova(myModels[[1]], (myModels[[2]])) I suspect this is about lazy-evaluation, looking at the source code for anova for mer objects: selectMethod("anova","mer"), something goes wrong with the sapply to get the names,

Re: [R] Video Analysis?

2009-09-06 Thread Romain Francois
On 09/06/2009 01:51 PM, spencerg wrote: Thanks to Kevin Middleton, Barry Bowlingson, M. Austenfeld: The Hedrick reference is very interesting, digitizing a video of the flight of a moth. This shows the state of the art AND describes "freely available MATLAB" code. I've used Matlab before, but i

Re: [R] Video Analysis?

2009-09-06 Thread spencerg
Thanks to Kevin Middleton, Barry Bowlingson, M. Austenfeld: The Hedrick reference is very interesting, digitizing a video of the flight of a moth. This shows the state of the art AND describes "freely available MATLAB" code. I've used Matlab before, but it would strain my budget right

[R] [Hmisc] Latex to pdf

2009-09-06 Thread Jeroen Ooms
I would like to print some tables and figures to a PDF device on a CentOS 5 vps. However, I cannot seem to get the latex function from Hmisc working. I followed the example, and got an error: sh: xdvi: command not found. I tried installing the 'tetex-xdvi' linux package, and now it returns: Error:

Re: [R] ggplot2::qplot() -- arbitary transformations of coordinate system?

2009-09-06 Thread Michael Kubovy
Hi Stephen, Because coord_trans() does all the work of plotting the original values on the tranformed scale. See ?coord_trans. To quote: "The difference between transforming the scales and transforming the coordinate system is that scale transformation occurs BEFORE statistics, and coordi

[R] using histogram to find cdf

2009-09-06 Thread maram salem
Dear all, How can I use the histogram density estimate (hist) to find the value of the cdf at a certain point? Thanks Maram [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo

Re: [R] Concentration ellipsoid

2009-09-06 Thread RON70
In the mean time, i have found one package "ellipse" to do the same. The syntax is : plot(ellipse(Sigma), type='l') However I am still struggling on how to use "qplot" (in GGPLOT2) to draw above plot. I want to get some stylish view for my presentation preparation. Any help please? Thanks, R

Re: [R] struggling with "split" function

2009-09-06 Thread Dimitris Rizopoulos
one way is the following: ind <- rle(is.na(x$A)) ind <- rep(seq_along(ind$lengths), ind$lengths) na.ind <- is.na(x$A) split(x[na.ind, -1], ind[na.ind]) I hope it helps. Best, Dimitris Dimitri Liakhovitski wrote: I am very sorry for such a simple question, but I am struggling with "split". I

Re: [R] Video Analysis?

2009-09-06 Thread Bio7
In my application you can transfer images or single frames from ImageJ to R very efficiently and easily. http://www.uni-bielefeld.de/biologie/Oekosystembiologie/bio7app/flashtut/processavis.htm http://www.uni-bielefeld.de/biologie/Oekosystembiologie/bio7app/flashtut/processavis.htm However, t

[R] struggling with "split" function

2009-09-06 Thread Dimitri Liakhovitski
I am very sorry for such a simple question, but I am struggling with "split". I have the following data frame: x<-data.frame(A=c(NA,NA,NA,NA,"split",NA,NA,NA,NA,"split",NA,NA,NA,NA,"split",NA,NA,NA,NA), B=c("Name1","text1","text2","text3",NA,"Name2","text1","text2","text3",NA,"Name3","text1","text2

[R] Concentration ellipsoid

2009-09-06 Thread RON70
Hi all, Can anyone please guide me how to draw a Concentration ellipsoid for a bivariate system with a bivariate normal dist. having a VCV matrix : Sigma <- matrix(c(1,2,2,5), 2, 2) I would like to draw in using GGPLOT. Your help will be highly appreciated. Thanks, -- View this message in co

Re: [R] Matrix as input to xyplot {lattice} - proper extended formula syntax

2009-09-06 Thread Deepayan Sarkar
On Sat, Sep 5, 2009 at 10:43 PM, Bryan Hanson wrote: > Thanks David, your way of constructing df is much more compact than what I > was using, so I've incorporated it.  I also had my rows and columns > transposed relative to how xyplot wanted them (though I had tested for that, > other problems int

Re: [R] Video Analysis?

2009-09-06 Thread Barry Rowlingson
On Sun, Sep 6, 2009 at 1:07 AM, spencerg wrote: >     What software exists for digitizing video to quantify the motion of > specific features in the image?  I might be willing to use something that's > NOT in R, though I'd prefer something in R (or at least with an R > intereface). The 'Motion' p