Re: [R] inserting values for null

2008-09-17 Thread nalluri pratap
The group would be happy to answer your question if you can show an example data frame on what is there and what is required.   Cheers, Pratap --- On Wed, 17/9/08, Rajasekaramya <[EMAIL PROTECTED]> wrote: From: Rajasekaramya <[EMAIL PROTECTED]> Subject: [R] inserting values for null To: r-help@

Re: [R] ggplot2 - deprecated guide= argument in

2008-09-17 Thread Pedro Barros
Hi Hadley, As for now, I have not yet delved deep enough into the new version to be sure if I like it or not. It's just that I like the freedom to choose, and the previous form was great. Any chance you may put it back as an optional parameter? Thanks, Pedro hadley wrote: > > On Wed, Sep 17, 200

[R] Odp: adding rows to table

2008-09-17 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 17.09.2008 11:08:29: > Greetings everyone, > > I'm trying to add a specific table or a specific number of rows (e.g.44) to a > table with no success. > > This is my basic table > > head(dataA) > yearplot spp prop.BDCA1DCA2DCA3DCA

Re: [R] bubble(circle) plot help.

2008-09-17 Thread Yihui Xie
I don't quite understand your R code (I think your random numbers make the graph very hard to read!), but I have also written an example for the interaction effect: ## 400 bubbles to show the interaction of x and z sq = seq(0, 10, length = 20) x = rep(sq, 20) z = rep(sq, each = 20) y = c(outer(sq,

Re: [R] Interbase/Firebird

2008-09-17 Thread Dr Eberhard W Lisse
ODBC, didn't think of that, thanks. el On 18 Sep 2008, at 00:31 , David Winsemius wrote: On Sep 17, 2008, at 6:00 PM, Dr Eberhard W Lisse wrote: Hi, is there a Rdbi or other package to use firebird in R? I am reviewing options for my Practice software and might have to switch to a firebi

Re: [R] for-loop for opening a series of files

2008-09-17 Thread Yihui Xie
Hi, you may use list.files('dir-of-your-files', ...) to get the paths of all the files, and use file.info() to get the date attribute, then order them by date, and finally in a loop for(i in paths-of-your-files){ open.ncdf(i, ...) ... } Regards, Yihui -- Yihui Xie <[EMAIL PROTECTED]> Phone: +86-(

[R] manipulating apperance on circleplot

2008-09-17 Thread Wen Gu
I am having trouble manipulating the simulated effects of a circle graph. I've created a pseudo 3D plot using circle size as 3rd variable. The code I attached has simulated data values for all 3 variable, and is plotting a graph showing an interaction with all 3variables. I am trying to create

Re: [R] inserting values for null

2008-09-17 Thread Moshe Olshansky
Hi Ramya, Assuming that the problem is well defined (i.e. the values in col1 of the data.frames are unique and every value in D.F.sub.2[,1] appears also in D.F1[,1]) you can do the following: ind <- match(D.F.sub.2[,1],D.F1[,1]) D.F1[ind,] <- D.F.sub.2 --- On Thu, 18/9/08, Rajasekaramya <[EMA

Re: [R] rgl: How to position a window during open3d call

2008-09-17 Thread Yihui Xie
Thanks Duncan, I have also been wondering about this problem for a long time. Regards, Yihui -- Yihui Xie <[EMAIL PROTECTED]> Phone: +86-(0)10-82509086 Fax: +86-(0)10-82509086 Mobile: +86-15810805877 Homepage: http://www.yihui.name School of Statistics, Room 1037, Mingde Main Building, Renmin Univ

Re: [R] Is There a way to not use an explicit loop?

2008-09-17 Thread Juancarlos Laguardia
Thanks to all who help out with this question.. Cut computation time by a fourth! Victor Hernando Cervantes Botero's idea work great. As well as Dan Davidson's __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEA

[R] matrix to list - problem solved

2008-09-17 Thread Pinder, Adrian
Thanks to all who replied to this question. Jorge's script worked a treat. Hi, can someone please tell me how to convert a square matrix to a list in R? i.e. I want to convert from: a b c a 1 1 1 b 2 2 2 c 3 3 3 to: a

Re: [R] matrix to list

2008-09-17 Thread hadley wickham
On Wed, Sep 17, 2008 at 8:52 PM, Pinder, Adrian <[EMAIL PROTECTED]> wrote: > Hi, can someone please tell me how to convert a square matrix to a list in R? > > i.e. I want to convert from: > >a b c > a 1 1 1 > b 2 2 2 > c 3 3

[R] matrix to list

2008-09-17 Thread Pinder, Adrian
Hi, can someone please tell me how to convert a square matrix to a list in R? i.e. I want to convert from: a b c a 1 1 1 b 2 2 2 c 3 3 3 to: a a 1 a b 1 a c 1 b a 2 b

Re: [R] Need help creating spatial correlation for MC simulation

2008-09-17 Thread milton ruser
Dear J.J.Harden I think that on spatial stat you will find several ways of simulate spatial pattern that (point or line) that may be what you are looking for. Case not, please let me know and may be we can improve some solution. Best wishes, miltinho astronauta brazil On Wed, Sep 17, 2008 at

Re: [R] trouble with tkgetOpenFile

2008-09-17 Thread Gang Chen
Such a silly mistake! Thanks a lot, John! Gang On Wed, Sep 17, 2008 at 7:21 PM, John Fox <[EMAIL PROTECTED]> wrote: > Dear Gang, > > Your for loop is in error; try > > for (ii in seq(length=nWin)) > > I hope this helps, > John > > -- > John Fox, Professor > Department

Re: [R] function indexed weighted log-rank statistics

2008-09-17 Thread Ritwik Sinha
Hi David, Thanks, survdiff actually only has the G(rho) family, i.e. gamma is set to 0. There is another package called surv2sample, that I found only after I sent out the email, that contains what I am looking for. Thanks, Ritwik On Wed, Sep 17, 2008 at 5:53 PM, David Winsemius <[EMAIL PROTECTE

Re: [R] function indexed weighted log-rank statistics

2008-09-17 Thread Thomas Lumley
The survdiff() function in the survival package does the G(rho) family (ie, G(rho, gamma=0)). -thomas On Wed, 17 Sep 2008, Ritwik Sinha wrote: Hi, Is there an implementation of the G(rho,gamma) class of function indexed weighted log-rank statistics in R? For example those mentione

Re: [R] RCurl compilation error on ubuntu hardy

2008-09-17 Thread Emmanuel Levy
Dear Duncan and Vincent, Thanks for your help. It took me some time to upgrade R because atp-get install would not actually install the packages, but I used sudo aptitude install r-base and that managed to upgrade the r-base package. I'm also happy to say that RCurl as well as BiomaRt could now

Re: [R] unix-type commandline keystrokes in the windows RGUI

2008-09-17 Thread Adaikalavan Ramasamy
Well, I don't see why you need the CTRL-R functionality when you can just as rapidly and efficiently using SEARCH functionality in scripts too (CTRL-F in most applications, CTRL-S in emacs etc). BTW, I am quite familiar with Unix, Linux and Sun Solaris and what CTRL-R does (yes, I used it fre

[R] Reporting with down and across variables

2008-09-17 Thread Matthew Pettis
Hi, I have a dataframe like the following: xfact yfact zfact response --- --- --- -- x1 y1 z1 r1 x1 y1 z2 r2 ... I want output that looks like: ___ zfac levels___ xfact yfact z1 z2 ... zn ---

Re: [R] selecting dataframe values that are not nulls

2008-09-17 Thread Jorge Ivan Velez
Hi Ramya, In this particular case, something like ?"complete.cases" should do the job. With this function you can delete rows with one or more NA's. Here is an example: set.seed(123) DF<-matrix(rnorm(100),ncol=10) DF[1,2]<-NA DF[1,3]<-NA DF[4,10]<-NA dim(DF) [1] 10 10 DF.noNA <- DF[complete.cases

[R] Coxph and loglik converged before variable X

2008-09-17 Thread Eric Rescorla
Hi, I'm doing some coxph fits using the survival package. There are a large number of potential predictors and so I was considering using stepAIC for model selection. However, in the early stages I'm getting complaints like the following: Warning message: In fitter(X, Y, strats, offset, init, co

Re: [R] ANOVA contrast matrix vs. TukeyHSD?

2008-09-17 Thread John Fox
Dear Sam, The "basis" matrix for your contrasts is not orthogonal, and so the tests are almost surely not what you intended. Moreover, the "basis" matrix is not even of rank 5, as you can see from the message produced by lm(), "Coefficients: (1 not defined because of singularities)," and the missi

Re: [R] trouble with tkgetOpenFile

2008-09-17 Thread John Fox
Dear Gang, Your for loop is in error; try for (ii in seq(length=nWin)) I hope this helps, John -- John Fox, Professor Department of Sociology McMaster University Hamilton, Ontario, Canada web: socserv.mcmaster.ca/jfox > -Original Message- > From: [EMAIL PRO

Re: [R] Need help creating spatial correlation for MC simulatio

2008-09-17 Thread Ted Harding
On 17-Sep-08 22:36:50, jjh21 wrote: > I want to create a dataset in R with spatial correlation (i.e. > clustering) built in for a linear regression analysis. Any tips > on how to do this? > Thanks. The package 'spatstat' has functions for simulating several different kinds of spatial process. Hopi

Re: [R] creating rainbow gradients

2008-09-17 Thread Duncan Murdoch
On 17/09/2008 4:58 PM, Gillian Silver wrote: Hi, how can I create a rainbow gradient in R? For example, let's say I have a plot of y = x...and I want the plot to go from red -> orange -> yellow -> green -> blue -> etc. Right now, I know how to do something like go from red to blue, using the plot

Re: [R] creating rainbow gradients

2008-09-17 Thread hadley wickham
On Wed, Sep 17, 2008 at 3:58 PM, Gillian Silver <[EMAIL PROTECTED]> wrote: > Hi, how can I create a rainbow gradient in R? For example, let's say I have > a plot of y = x...and I want the plot to go from red -> orange -> yellow -> > green -> blue -> etc. Why would you want to? See http://epub.wu-

[R] Need help creating spatial correlation for MC simulation

2008-09-17 Thread jjh21
I want to create a dataset in R with spatial correlation (i.e. clustering) built in for a linear regression analysis. Any tips on how to do this? Thanks. -- View this message in context: http://www.nabble.com/Need-help-creating-spatial-correlation-for-MC-simulation-tp19542145p19542145.html Sent

Re: [R] Stacked Area Plot

2008-09-17 Thread Greg Snow
The example pointed to below is a good example of fortune(197). It is possible to do using polygon (and is probably not as hard as you are making it), but there is probably a better way to present your data. What question are you trying to answer with this plot? > -Original Message- >

Re: [R] Source code of Strauss Process

2008-09-17 Thread Rolf Turner
On 18/09/2008, at 9:50 AM, <[EMAIL PROTECTED]> wrote: Dear all, I want to simulate a Strauss Hard Core process in 3D. I have found that someone else tried to do the same and he recived this answer, "If you need this immediately, I suggest you follow Brian Ripley's advice. This probably

Re: [R] Interbase/Firebird

2008-09-17 Thread David Winsemius
On Sep 17, 2008, at 6:00 PM, Dr Eberhard W Lisse wrote: Hi, is there a Rdbi or other package to use firebird in R? I am reviewing options for my Practice software and might have to switch to a firebird based package so I would of course like to be able to do some stats in R. Per Prof Riple

Re: [R] creating rainbow gradients

2008-09-17 Thread Kingsford Jones
On second thought, this is more likely to be what you're looking for... library(rgl) x <- rnorm(1000) y <- rnorm(1000) z <- x + y plot3d(x, y, z, col = rainbow(1000, end = 5/6)[rank(z)], size = 3) On Wed, Sep 17, 2008 at 4:06 PM, Kingsford Jones <[EMAIL PROTECTED]> wrote: > On Wed, Sep 17, 2008

[R] for-loop for opening a series of files

2008-09-17 Thread Brian Pettegrew
Hello, I am fairly new to R programming. I have a series of netcdf files that I am able to open one at a time using open.ncdf. I want to write this into an R script so that I can successively open each file by date in a for-loop. Any suggestions? Thanks Brian Pettegrew -- Brian Pettegre

Re: [R] Loop on vector name

2008-09-17 Thread Greg Snow
Others have answered the question that you asked (it is also a variation of Faq 7.21), but here is an answer to the question that you should have asked: When working with datasets like this, it is better to create a list rather than separate objects with names like dat1, dat2, etc. For example:

Re: [R] creating rainbow gradients

2008-09-17 Thread Kingsford Jones
On Wed, Sep 17, 2008 at 3:11 PM, Gillian Silver <[EMAIL PROTECTED]> wrote: > What would I do if I have something like: > > x <- rnorm(1:1000) > y <- rnorm(1:1000) > z <- x + y > > and I want the rainbow to increase with z? (i.e., red for lowest z...all the > way up to the last color in the rainbow

[R] Interbase/Firebird

2008-09-17 Thread Dr Eberhard W Lisse
Hi, is there a Rdbi or other package to use firebird in R? I am reviewing options for my Practice software and might have to switch to a firebird based package so I would of course like to be able to do some stats in R. greetings, el __ R-help@r-proj

Re: [R] How to do Clustered Standard Errors for Regression in R?

2008-09-17 Thread Mark Difford
Hi Bo, >> I can't seem to find the right set of commands to enable me to do perform >> a >> regression with cluster-adjusted standard-errors. Frank Harrell's Design package has ?bootcov and ?robcov, which will both do it. Regards, Mark. Bo Cowgill wrote: > > I can't seem to find the right se

[R] Source code of Strauss Process

2008-09-17 Thread kelly
Dear all, I want to simulate a Strauss Hard Core process in 3D. I have found that someone else tried to do the same and he recived this answer, "If you need this immediately, I suggest you follow Brian Ripley's advice. This probably involves downloading a source tar file of the R package an

Re: [R] function indexed weighted log-rank statistics

2008-09-17 Thread David Winsemius
On Sep 17, 2008, at 5:25 PM, Ritwik Sinha wrote: Hi, Is there an implementation of the G(rho,gamma) class of function indexed weighted log-rank statistics in R? For example those mentioned in the paper by Kosorok and Lin (1999): The Versatility of Function-Indexed Weighted Log-Rank Statistics

[R] function indexed weighted log-rank statistics

2008-09-17 Thread Ritwik Sinha
Hi, Is there an implementation of the G(rho,gamma) class of function indexed weighted log-rank statistics in R? For example those mentioned in the paper by Kosorok and Lin (1999): The Versatility of Function-Indexed Weighted Log-Rank Statistics [JSTOR link : http://www.jstor.org/pss/2669706]. I wi

Re: [R] modifying patterns in a matrix

2008-09-17 Thread David Winsemius
On Sep 17, 2008, at 3:50 PM, Stacey Burrows wrote: Dear R-users, I have some very simple data where 1's represent events and zeroes non-events, e.g. temp <- rbind(c(0,1,0,0,1,1,1,0), c(0,0,0,1,0,0,0,0)) For each row in the matrix, I would like to replace a singelton event by a 0. That is

Re: [R] creating rainbow gradients

2008-09-17 Thread Gillian Silver
What would I do if I have something like: x <- rnorm(1:1000) y <- rnorm(1:1000) z <- x + y and I want the rainbow to increase with z? (i.e., red for lowest z...all the way up to the last color in the rainbow for the highest z) On Wed, Sep 17, 2008 at 2:05 PM, stephen sefick <[EMAIL PROTECTED]> w

Re: [R] creating rainbow gradients

2008-09-17 Thread Jorge Ivan Velez
Dear Gillian, See ?rainbow and its example. HTH, Jorge On Wed, Sep 17, 2008 at 4:58 PM, Gillian Silver <[EMAIL PROTECTED]>wrote: > Hi, how can I create a rainbow gradient in R? For example, let's say I have > a plot of y = x...and I want the plot to go from red -> orange -> yellow -> > green

Re: [R] creating rainbow gradients

2008-09-17 Thread stephen sefick
plot(1:20, col=rainbow(20)) On Wed, Sep 17, 2008 at 4:58 PM, Gillian Silver <[EMAIL PROTECTED]> wrote: > Hi, how can I create a rainbow gradient in R? For example, let's say I have > a plot of y = x...and I want the plot to go from red -> orange -> yellow -> > green -> blue -> etc. > Right now, I

Re: [R] inserting values for null

2008-09-17 Thread milton ruser
Dear Raja, Give a look on merge() function. Case you need more help, send us a short sample of your D.F1 and DF.sub.2 dataframes. Hope this helps, best wishes, miltinho astronauta brazil On Wed, Sep 17, 2008 at 2:13 PM, Rajasekaramya <[EMAIL PROTECTED]>wrote: > > I have a dataframe D.F1 > > >d

[R] creating rainbow gradients

2008-09-17 Thread Gillian Silver
Hi, how can I create a rainbow gradient in R? For example, let's say I have a plot of y = x...and I want the plot to go from red -> orange -> yellow -> green -> blue -> etc. Right now, I know how to do something like go from red to blue, using the plotrix library: library(plotrix) redToBlue <- col

[R] ANOVA contrast matrix vs. TukeyHSD?

2008-09-17 Thread Sam Yeaman
Dear Help List, Thanks in advance for reading...I hope my questions are not too ignorant. I have an experiment looking at evolution of wing size [centroid] in fruitflies and the effect of 6 different experimental treatments [treatment]. I have five replicate populations [replic] in each treat

[R] how to extend the whisker in boxplot?

2008-09-17 Thread cathelf
Hi, Sorry for bothering your guys. I am still working on boxplot. How can I extend the whisker to the 5% and the 95% quantiles? What I should do if I only want to show the most extreme outlier, like 0.01% and 99.99% percentiles? I saw something on boxplot.stat, but I even donot know how to conn

Re: [R] How to do Clustered Standard Errors for Regression in R?

2008-09-17 Thread Kingsford Jones
Bo, Try using RSiteSearch with the strings 'huber-white', 'sandwich' or even 'clustered standard errors'. You may also want to consider a mixed models approach -- see: http://www.stat.columbia.edu/~cook/movabletype/archives/2007/11/clustered_stand.html HTH, Kingsford Jones On Tue, Sep 16, 2

Re: [R] Creating smooth color regions with panel.contourplot()

2008-09-17 Thread Deepayan Sarkar
On Wed, Sep 17, 2008 at 1:25 PM, Deepayan Sarkar <[EMAIL PROTECTED]> wrote: > On Wed, Sep 17, 2008 at 1:12 PM, David Carslaw > <[EMAIL PROTECTED]> wrote: >> >> I think this is a very useful function that I imagine has wide appeal - >> thanks. Using the code below produces the plot OK but when I tr

Re: [R] Unexpected behaviour when testing for independence with multiple factors

2008-09-17 Thread Ben Bolker
Javier Acuña gmail.com> writes: > > Hi, I'm a new user of R. My background is Electrical Engineering, so > please bear with me if this is a silly question. > > I'm trying to assess whether the results of an experiment satisfy the > hypothesis of homoscedasticity (my ultimate goal is to use ANOV

[R] trouble with tkgetOpenFile

2008-09-17 Thread Gang Chen
I'm trying to use the following loop to open a window multiple times to select files, but only the last window shows up. What am I missing? library(tcltk) nWin <- 6 fn <- vector('list', nWin) for (ii in nWin) { fn[[ii]] <- tclvalue( tkgetOpenFile( filetypes = "{{Files} {.1D}} {{All files

Re: [R] Creating smooth color regions with panel.contourplot()

2008-09-17 Thread Deepayan Sarkar
On Wed, Sep 17, 2008 at 1:12 PM, David Carslaw <[EMAIL PROTECTED]> wrote: > > I think this is a very useful function that I imagine has wide appeal - > thanks. Using the code below produces the plot OK but when I try and > copy/save it (as a metafile) I receive the following error and an hourglass

Re: [R] modifying patterns in a matrix

2008-09-17 Thread Henrique Dallazuanna
Try this: do.call(rbind, strsplit(gsub("010", "000", apply(temp, 1, paste, collapse = "")), NULL)) On Wed, Sep 17, 2008 at 4:50 PM, Stacey Burrows <[EMAIL PROTECTED]>wrote: > Dear R-users, > > I have some very simple data where 1's represent events and zeroes > non-events, e.g. > temp <- rbind(c

Re: [R] Re adout row and column of a matrix value

2008-09-17 Thread David Winsemius
On Sep 17, 2008, at 3:36 PM, Jorge Ivan Velez wrote: Hi Chris82, Try this: res=c(which(a == max(a), arr.ind = T),max(a)) names(res)=c('row','col','value') write.csv(res,"C://yourfile.csv",row.names=TRUE) I wasn't sure that max(x) or whatever target was specified would be unique, and in th

[R] modifying patterns in a matrix

2008-09-17 Thread Stacey Burrows
Dear R-users, I have some very simple data where 1's represent events and zeroes non-events, e.g. temp <- rbind(c(0,1,0,0,1,1,1,0), c(0,0,0,1,0,0,0,0)) For each row in the matrix, I would like to replace a singelton event by a 0. That is, any 1 surrounded by zeroes (010) should be replaced by a

Re: [R] Creating smooth color regions with panel.contourplot()

2008-09-17 Thread David Carslaw
I think this is a very useful function that I imagine has wide appeal - thanks. Using the code below produces the plot OK but when I try and copy/save it (as a metafile) I receive the following error and an hourglass: Error: invalid graphics state [using XP, 2.72, lattice 0.17.13] Regards, Dav

Re: [R] Graphical Display of Values' Distribution

2008-09-17 Thread Philipp Pagel
> I therefore wish to examine all values of urban.long[,3] which are > greater than 1. I have tried the following, but receive error > messages each time: > > hist(urban.long[,3]>1) > Error in hist.default(urban.long[, 3]> 1) : 'x' must be numeric > > hist(urban.long[urban.long[,3]>1]) > Error i

Re: [R] Exact test in nxm contingency table

2008-09-17 Thread Thomas Lumley
On Wed, 17 Sep 2008, Peter Dalgaard wrote: fisher.test(, simulate.p.value=TRUE) might be more direct. Also works for chisq.test(). And, contrary to popular belief, fisher.test() does work for larger than2x2 tables, although you may run into space/time limitations. The 'exact' test comput

[R] fMultivar functions not loading under R-2.7

2008-09-17 Thread Theodore Van Rooy
I submitted this to rmetrics help list as well... I've been using R-2.4 with Rmetrics successfuly for a year or two. I recently moved to Ubuntu Linux 8.04, loaded R via apt-get install R-base etc. etc... then in the R interface i ran install.packages("fMultivar"), chose the CRAN mirror and it lo

Re: [R] Is there a way to not use an explicit loop?

2008-09-17 Thread Dan Davison
Both shape parameters of rbeta can be vectors; for x <- rbeta(n, shape1, shape2) x[i] ~ Beta(shape1[i], shape2[i]) so bbsim <- function(m=1000, num.post.draws=1e4, size.a=100, prob.a=.27, prior.count=1) { data.count <- rbinom(m, size.a, prob.a) shape1 <- rep(prior.count + data.count, e

Re: [R] Is there a way to not use an explicit loop?

2008-09-17 Thread Victor Hernando Cervantes Botero
Hi, you might try this: set.seed(100) m <- 10 size.a<- 10 prob.a<- 0.3 prior.constant = 0 draw1 = rbinom( m , size.a, prob.a ) beta.draws <- function(draw, size.a, prior.constant, n) { rbeta(n, prior.constant + draw, prior.constant + size.a - draw) } bdraws <- sapply(d

Re: [R] Blank certain areas of a contour plot

2008-09-17 Thread Duncan Murdoch
On 9/17/2008 2:29 PM, Victor Homar wrote: Thanks a lot for your suggestion but... Can I do that using the/a land-sea information from the 'worldHires' database (from mapdata)? Yes, you use the map.where function to identify the location of the points. If NA, it's out in the ocean s

Re: [R] A Simple Question

2008-09-17 Thread Ben Bolker
Gao, Aijun i3statprobe.com> writes: > > > Hi: > > I am trying to run your SCHOOLS example as following and I get an error message stated that : Error: could not > find function "bugs" > Would you please help me since I would like to run some WINBUG programs from your R by reading external data

Re: [R] Re adout row and column of a matrix value

2008-09-17 Thread Jorge Ivan Velez
Hi Chris82, Try this: res=c(which(a == max(a), arr.ind = T),max(a)) names(res)=c('row','col','value') write.csv(res,"C://yourfile.csv",row.names=TRUE) HTH, Jorge On Wed, Sep 17, 2008 at 1:47 PM, Chris82 <[EMAIL PROTECTED]> wrote: > > Hello R users, > > I want to readout the row and column

Re: [R] Different PCA results under Windows and Linux

2008-09-17 Thread Mark Difford
Hi Jathine, And then to see things more clearly still, you can do something like this on your test results: format(formatC(p1$var$coord, digits=15, format="f"), justify="right") and format(formatC(p1$var$coord, digits=16, format="f"), justify="right") Though I do hope that the second command

Re: [R] Blank certain areas of a contour plot

2008-09-17 Thread Victor Homar
Thanks a lot for your suggestion but... Can I do that using the/a land-sea information from the 'worldHires' database (from mapdata)? Best, Víctor. Greg Snow wrote: After you have interpolated your data, replace the values in the areas of the o cean with NA, then filled.conto

[R] Metadata in attributes or a list?

2008-09-17 Thread Thaden, John J
I wrote a function that reads data from a file and manipulates it to build and return a matrix with a million rows and three columns. I also need to return some metadata: these are about a half-dozen single numbers or short character strings, plus one numeric vector of length 5,000. I've been in

Re: [R] Different PCA results under Windows and Linux

2008-09-17 Thread jathine
Thank you for your reply. Here are some more info, I hope this can explain the problem a bit more clearly. Why PCA gives different results on the two different platforms? freqtest.txt file line text : M1 M2 M3 M4 M5 M6 M7 M8 -1 -1 -1 -1 -1 -1 -1 -1 0 0 0 0 -1 -1 1 1 -1 -1 -1 -1 -1 -1 -1 -1 0 0

[R] Re adout row and column of a matrix value

2008-09-17 Thread Chris82
Hello R users, I want to readout the row and column postion from a certain matrix value into a csv file. I have only found this syntax "which(a == b, arr.ind = T)" so I get a = matrix [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,]11222112 [2,]123

[R] A Simple Question

2008-09-17 Thread Gao, Aijun
Hi: I am trying to run your SCHOOLS example as following and I get an error message stated that : Error: could not find function "bugs" Would you please help me since I would like to run some WINBUG programs from your R by reading external data and I am new to R? Do I missing some function? Sh

Re: [R] Graphical Display of Values' Distribution

2008-09-17 Thread Philipp Pagel
> I have a column within a dataframe of values which range between 1 and > 2. I want to display graphically the distribution of these values > (i.e. are they clustered towards either exteme? Or spread evenly?). > What is a good way of doing this in R? > > I've tried a few things, including using

[R] Is there a way to not use an explicit loop?

2008-09-17 Thread Juancarlos Laguardia
I have a problem in where i generate m independent draws from a binomial distribution, say draw1 = rbinom( m , size.a, prob.a ) then I need to use each draw to generate a beta distribution. So, like using a beta prior, binomial likelihood, and obtain beta posterior, m many times. I have

Re: [R] Graphical Display of Values' Distribution

2008-09-17 Thread Steve Murray
Dear Phil and Jorge, Many thanks for your quick replies. I found that:> hist(urban.long[,3]) worked and displayed the data as I hoped. This reveals that the data are strongly distributed towards the value '1', and the other bars on the histogram are difficult to distinguish from each other a

Re: [R] Different PCA results under Windows and Linux

2008-09-17 Thread Mark Difford
Hi Jathine, >> I hope this can explain the problem a bit more clearly. >> Why PCA gives different results on the two different platforms? What is amazing, Jathine, is how nearly exactly identical the two sets of results are, not that they begin to differ at the 16th decimal place. To assuage yo

Re: [R] Graphical Display of Values' Distribution

2008-09-17 Thread Ben Bolker
Steve Murray hotmail.com> writes: > > > Dear all, > > I have a column within a dataframe of values which range between 1 and 2. I want to display graphically the > distribution of these values (i.e. are they clustered towards either exteme? Or spread evenly?). What is > a good way of doing thi

Re: [R] Stacked Area Plot

2008-09-17 Thread hadley wickham
On Wed, Sep 17, 2008 at 1:01 PM, Josip Dasovic <[EMAIL PROTECTED]> wrote: > Hi: > > I've searched the archives and the Internet for hours but have yet to find a > way to do stacked area plots (like the kind in Excel) in R. I think that > polygon may work but it would require a bit of manipulatio

[R] Stacked Area Plot

2008-09-17 Thread Josip Dasovic
Hi: I've searched the archives and the Internet for hours but have yet to find a way to do stacked area plots (like the kind in Excel) in R. I think that polygon may work but it would require a bit of manipulation of my data. I was hoping for an easier way. An example of what I'm trying to do

Re: [R] Command Prompt Question

2008-09-17 Thread Duncan Murdoch
On 9/17/2008 1:42 PM, Farr, David wrote: Could someone please tell me how to stop the package/function name from being included before the command prompt? This started happening today after I made some changes to my Rprofile.site file and I don't know why. For example: if I enter example(AIC), i

Re: [R] Creating smooth color regions with panel.contourplot()

2008-09-17 Thread Deepayan Sarkar
On 9/15/08, Waichler, Scott R <[EMAIL PROTECTED]> wrote: > When I use panel.contourplot() with filled color regions, the coloring > follows the stair-step edge of the underlying grid instead the smooth > contour lines themselves. How can I get the latter behavior? I would > guess there is a mu

Re: [R] Command Prompt Question

2008-09-17 Thread Peter Dalgaard
Farr, David wrote: > Could someone please tell me how to stop the package/function name from > being included before the command prompt? This started happening today > after I made some changes to my Rprofile.site file and I don't know why. > For example: if I enter example(AIC), instead of just g

Re: [R] unix-type commandline keystrokes in the windows RGUI

2008-09-17 Thread Richard M. Heiberger
Mike, There are several options to pursue, depending on your answer to the question: Why are you staying within the Rgui if you are already an Emacs ESS user? 1. If you don't need any other feature of Rgui on Windows, then don't use it. From emacs, enter M-x R and you will immediately

Re: [R] rgl: How to position a window during open3d call

2008-09-17 Thread Duncan Murdoch
On 9/17/2008 1:13 PM, Koen Stegen wrote: Dear all, The documentation on the function open3d in the rgl package, reads: open3d opens a new rgl device, and sets the parameters as requested. I want the new rgl device (window) to be sized and positioned in a specific place on my screen. So, I

[R] R 2.8.0 is scheduled for October 20

2008-09-17 Thread Peter Dalgaard
This is to announce that we plan to release R version 2.8.0 on Monday, October 20, 2008. Release procedures start Friday, September 19. The detailed schedule can be found on http://developer.r-project.org The source tarballs will be made available daily (barring build troubles) and the tarballs c

[R] Command Prompt Question

2008-09-17 Thread Farr, David
Could someone please tell me how to stop the package/function name from being included before the command prompt? This started happening today after I made some changes to my Rprofile.site file and I don't know why. For example: if I enter example(AIC), instead of just getting the regular '>' befo

Re: [R] Car.proper C[] matrix

2008-09-17 Thread jgasper
I have been using the nb2WB() package for the car.normal function in WinBUGS, but it will not create the C[] matrix; it only creates adj[], num[], and weights[]. I was planning on using this function to create the C[] matrix (by using the num matix) required for the car.proper, but I got slipped u

[R] Graphical Display of Values' Distribution

2008-09-17 Thread Steve Murray
Dear all, I have a column within a dataframe of values which range between 1 and 2. I want to display graphically the distribution of these values (i.e. are they clustered towards either exteme? Or spread evenly?). What is a good way of doing this in R? I've tried a few things, including usin

Re: [R] selecting dataframe values that are not nulls

2008-09-17 Thread David Winsemius
On Sep 17, 2008, at 1:22 PM, Rajasekaramya wrote: Hi, I have a dataframe with 14319rows and 9 colums. for some rows there are null values.I want a dataframe without these null values.I wanna select only those that have values !=NA. kindly let me know how to do that. ?is.na -- David

[R] selecting dataframe values that are not nulls

2008-09-17 Thread Rajasekaramya
Hi, I have a dataframe with 14319rows and 9 colums. for some rows there are null values.I want a dataframe without these null values.I wanna select only those that have values !=NA. kindly let me know how to do that. Ramya -- View this message in context: http://www.nabble.com/selecting-dat

Re: [R] t-test between percentages

2008-09-17 Thread Robert A LaBudde
Check prop.test(). At 12:41 PM 9/17/2008, Bunny, lautloscrew.com wrote: Hi all, though i know this is a simple question, i really hope someone could. I am just trying to compare percents respectively the difference in percents by a simple test. t.test usually compares means and is working like

[R] rgl: How to position a window during open3d call

2008-09-17 Thread Koen Stegen
Dear all, The documentation on the function open3d in the rgl package, reads: open3d opens a new rgl device, and sets the parameters as requested. I want the new rgl device (window) to be sized and positioned in a specific place on my screen. So, I try to set the "windowRect" parameter as fo

Re: [R] t-test between percentages

2008-09-17 Thread David Winsemius
On Sep 17, 2008, at 12:41 PM, Bunny, lautloscrew.com wrote: Hi all, though i know this is a simple question, i really hope someone could. I am just trying to compare percents respectively the difference in percents by a simple test. t.test usually compares means and is working like it is s

Re: [R] unix-type commandline keystrokes in the windows RGUI

2008-09-17 Thread Vincent Goulet
Look at GNU Emacs with ESS, you'll get what you want out of the box --- and much more! See http://vgoulet.act.ulaval.ca/en/emacs [shameless plug] for a distribution of Emacs bundled with ESS. HTH Vincent Le mer. 17 sept. à 09:26, mfrumin a écrit : Hi all, I am generally quite f

Re: [R] unix-type commandline keystrokes in the windows RGUI

2008-09-17 Thread mfrumin
Adaikalavan, thanks. Perhaps I was not so specific enough in what I want, for those not so familiar with unix commandline featuers. I'm looking for the 'reverse search' functionality where you hit CTRL-R, then start typing a bit of text and it finds previous commands with that bit of text, which

Re: [R] t-test between percentages

2008-09-17 Thread Bert Gunter
Sounds like a homework problem. Consult any basic statistics text. Hint: You don't use a t-test to test for a difference in percentages. Check "chi-squared" and/or "contingency table." Cheers, Bert Gunter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of B

Re: [R] unix-type commandline keystrokes in the windows RGUI

2008-09-17 Thread David Winsemius
On Sep 17, 2008, at 9:26 AM, mfrumin wrote: Hi all, I am generally quite fond of the unix commandline keystrokes (e.g. searching back in your history with [CTRL]-R, and cutting/pasting with [CTRL]- K/Y) which work in the R commandline in *nix. Does anyone know if there's any way to get

[R] t-test between percentages

2008-09-17 Thread Bunny, lautloscrew.com
Hi all, though i know this is a simple question, i really hope someone could. I am just trying to compare percents respectively the difference in percents by a simple test. t.test usually compares means and is working like it is supposed to be. Now i wonder how i can use a test in R to test

Re: [R] ggplot2 - deprecated guide= argument in

2008-09-17 Thread hadley wickham
On Wed, Sep 17, 2008 at 5:34 AM, Pedro Barros <[EMAIL PROTECTED]> wrote: > > In the help for scale_fill_identity, it is written > ## Not run: > colour <- c("red","green","blue","yellow") > qplot(1:4, 1:4, fill=colour, geom="tile") > qplot(1:4, 1:4, fill=colour, geom="tile")

Re: [R] Blank certain areas of a contour plot

2008-09-17 Thread Greg Snow
After you have interpolated your data, replace the values in the areas of the ocean with NA, then filled.contour will not plot in those areas. Hope this helps, > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > project.org] On Behalf Of Victor Homar > Sent: Tuesda

[R] Spectrum of a kernel

2008-09-17 Thread rkevinburton
For purely educational purposes I would like to see the spectrum of a kernel. I tried: spectrum(kernel("daniell", 100), taper=0, log="no") but I get: Error in complete.cases(object) : not all arguments have the same length I can plot the kernel but that is only in the time-domain. I would like

  1   2   >