Re: [R] binary symmetric matrix combination

2013-09-21 Thread supernovartis
Hi Arun, I get the following error when I enter the command: library(reshape2) Error in library(reshape2) : there is no package called ‘reshape2’ Any ideas? Thanks again. On Fri, Sep 20, 2013 at 3:09 PM, arun kirshna [via R] ml-node+s789695n4676569...@n4.nabble.com wrote: Hi Elio,

[R] raster package: OpenStreetMap broken on Ubuntu, works on Mac

2013-09-21 Thread jos
Hi, I'm a novice in R and I was trying to play with OpenStreetMap package as in a few examples on the web. And the examples worked on my Mac but on Ubuntu (12.04) they fail to work. The simplest one is: library(OpenStreetMap) library(rgdal) map - openmap(c(70,-179), c(-70,179)) plot(map)

Re: [R] time zones from longitude, latitude, and date

2013-09-21 Thread carlisle thacker
I was looking for something like shown on the map: http://upload.wikimedia.org/wikipedia/commons/8/88/World_Time_Zones_Map.png Information about local daylight savings times would also help. The data are from ships, supposedly in local time, but no time-zone info is given. A function that would

Re: [R] search species with all absence in a presence-absence matrix

2013-09-21 Thread Richard Kwock
Hi, I believe the function you are looking for is: which(yourdata == 0, arr.ind = T) The arr.ind parameter in the which function will return you a matrix with row, column indices for where there are 0's in your dataset. set.seed(6584) data - matrix(sample(c(0,1), 36, replace = T), nc = 6,

Re: [R] raster package: OpenStreetMap broken on Ubuntu, works on Mac

2013-09-21 Thread Prof Brian Ripley
What did the OpenStreetMap maintainer say (see the posting guide)? Hint: he and the raster maintainer are aware of their problem, and a correction is way overdue. The issue is not Ubuntu vs Mac but the order in which packages are installed (and for binary packages that is when they were

Re: [R] time zones from longitude, latitude, and date

2013-09-21 Thread Gabor Grothendieck
On Fri, Sep 20, 2013 at 4:31 PM, carlisle thacker carlisle.thac...@gmail.com wrote: I was looking for something like shown on the map: http://upload.wikimedia.org/wikipedia/commons/8/88/World_Time_Zones_Map.png Information about local daylight savings times would also help. The data are from

Re: [R] time zones from longitude, latitude, and date

2013-09-21 Thread Prof Brian Ripley
On 21/09/2013 08:17, Gabor Grothendieck wrote: On Fri, Sep 20, 2013 at 4:31 PM, carlisle thacker carlisle.thac...@gmail.com wrote: I was looking for something like shown on the map: http://upload.wikimedia.org/wikipedia/commons/8/88/World_Time_Zones_Map.png Information about local daylight

Re: [R] CRAN mirror for R in India: new one at WBUT, how do we get listed in the CRAN website?

2013-09-21 Thread Uwe Ligges
See http://cran.r-project.org/mirror-howto.html Uwe Ligges On 19.09.2013 14:04, abhinav kashyap wrote: [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] cov and huge matrix

2013-09-21 Thread Uwe Ligges
On 17.09.2013 18:11, Hermann Norpois wrote: Hello, I tried to compute the covariance (between the columns) of a matrix with 20. This failed ... Error: cannot allocate vector of size 691.2 GB Ok, this is rather huge. But ... On the other hand ... Is there an alternative to cov? Maybe

Re: [R] Re : Privacy rights of an old user of this list

2013-09-21 Thread Uwe Ligges
The locations where the mailing list are archived are not even controlled by any member of R-core or the R foundation. Everybody, including John, could collect mails from the list and publish them. This is a well known property of a public mailing list. Uwe Ligges On 17.09.2013 13:29, Adan

[R] Error in library() call

2013-09-21 Thread David Winsemius
On Sep 20, 2013, at 1:27 PM, supernovartis wrote: Hi Arun, I get the following error when I enter the command: library(reshape2) Error in library(reshape2) : there is no package called ‘reshape2’ Packages need to be installed before they are loaded. You are also requested not to

Re: [R] time zones from longitude, latitude, and date

2013-09-21 Thread David Winsemius
On Sep 21, 2013, at 3:13 AM, Prof Brian Ripley wrote: On 21/09/2013 08:17, Gabor Grothendieck wrote: On Fri, Sep 20, 2013 at 4:31 PM, carlisle thacker carlisle.thac...@gmail.com wrote: I was looking for something like shown on the map:

[R] Obtaining data from a different row of data frame

2013-09-21 Thread Ira Sharenow
I have a large data frame with 2,000 rows and 600 columns. I can write loops to solve a smaller problem, but I need a better strategy for this data frame. Below is a simple example with just two stocks. In the data frame, each row represents a trading day. The first column is dates. The next

Re: [R] binary symmetric matrix combination

2013-09-21 Thread arun
Hi Elio, Use ?write.table() write.table(res,Eliores.txt,quote=FALSE) #and as read the file mat1- as.matrix(read.table(Eliores.txt,header=TRUE)) #or even this should work mat1-  as.matrix(read.table(Eliores.txt)) #If you have very big matrix, you may try: library(tseries)

Re: [R] search species with all absence in a presence-absence matrix

2013-09-21 Thread arun
Hi Elaine, #You can either convert the .xls dataset to .csv and read it with ?read.csv() or use one of the packages to read excel dataset library(XLConnect) wb- loadWorkbook(is_matrix.xls) dataRM- readWorksheet(wb,sheet=is_matrix,rownames=1) dim(dataRM) #[1] 22 23  mat1- as.matrix(dataRM)

Re: [R] Filtering out data from list

2013-09-21 Thread arun
Hi,  list1-lapply(c(,2:3),function(x) paste0(hi I am here!,x)) #or list1-  as.list(paste0(hi I am here!,c(,2:3)))  str(list1) #List of 3 # $ : chr hi I am here! # $ : chr hi I am here!2 # $ : chr hi I am here!3 It is not a list within a list   list2-list1[grepl(2,unlist(list1))]  list2 #[[1]]

[R] Grouping variables by a irregular time interval

2013-09-21 Thread Raoni Rodrigues
Hello all, I have a very large data frame (more than 5 million lines) as below (dput example at the end of mail): Station Antenna TagDateTime Power Events 1 2 999 22/07/2013 11:00:2117 1 1 2 999 22/07/2013 11:33:4731 1 1 2 999

[R] Display all element names neatly in a Venn Diagram

2013-09-21 Thread davideps
Hello, I want to create a Venn diagram that displays all the elements of the sets and overlap regions. The closest tool I've found for this is in Vennerable, described here: http://stackoverflow.com/questions/7029987/r-how-to-display-elements-instead-of-just-counts-within-each-circle-of-a-venn

[R] Psedocode in R

2013-09-21 Thread John S.
I have never written my own function, psedocode, in R. Can anyone show me how to write a psedocode if I want to return, say, like mode or class...? Thanks [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] Psedocode in R

2013-09-21 Thread Berend Hasselman
On 21-09-2013, at 18:31, John S. johnatlant...@gmail.com wrote: I have never written my own function, psedocode, in R. Can anyone show me how to write a psedocode if I want to return, say, like mode or class...? Thanks What is psedocode? Furthermore: this is incomprehensible.

Re: [R] Display all element names neatly in a Venn Diagram

2013-09-21 Thread Rui Barradas
Hello, There's a package VennDiagram, I don't know if it is what you want, but it makes nice graphs. Hope this helps, Rui Barradas Em 21-09-2013 17:43, davideps escreveu: Hello, I want to create a Venn diagram that displays all the elements of the sets and overlap regions. The closest

Re: [R] Obtaining data from a different row of data frame

2013-09-21 Thread William Dunlap
Note that your inner loop for(i in 1:10 ) { rowNumber = i + df1[i,j-2] df1[i,j] = df1[rowNumber, j-4] } # end i loop is equivalent to the much quicker i - 1:10 rowNumbers - i + df1[i, j-2] df1[i, j] - df1[rowNumbers, j-4] Bill Dunlap Spotfire, TIBCO Software wdunlap

Re: [R] Re : Privacy rights of an old user of this list

2013-09-21 Thread Rainer M Krug
If you say something inn public, it will be there and people may remember it - you can't take back what you said. So why is a mailing list different? it is just that we are typing instead of talking - it goes into the public and there it stays. Ever heard of the Streisand effect

Re: [R] Obtaining data from a different row of data frame

2013-09-21 Thread arun
Hi Ira, Some suggestions: 1. Not sure why you created a dataframe with NA's in the beginning.  It seemed to be not required here. df1 = data.frame(matrix(rep(NA, 10*7), nrow = 10)) 2. The below code: df1 = data.frame(Dates = Dates, P1 = P1, P2 = P2, OF1 = OF1, OF2 = OF2) can be simplifed as:

Re: [R] Read a Google Spreadsheet?

2013-09-21 Thread Spencer Graves
Hi, Josh and Ista: Thanks very much for the replies. I just downloaded and installed Java x64, and library(xlsx) worked with 64-bit R when it hadn't before. This gives me hope I can fix a problem with writeFindFn2xls{sos}. It works with 32-bit R, and complains that

Re: [R] Obtaining data from a different row of data frame

2013-09-21 Thread arun
Hi Ira, #Speed comparison set.seed(29)  df2- data.frame(Dates=seq(as.Date(2006-01-03),length.out=2000,by=1 day),cbind(matrix(sample(10:120,2000*300,replace=TRUE),ncol=300),matrix(sample(0:6,2000*300,replace=TRUE),ncol=300)))  colnames(df2)[2:301]- paste0(P,1:300)  colnames(df2)[302:601]-

Re: [R] lattice: double y - problem changing axis color after doubleYScale

2013-09-21 Thread Duncan Mackay
Hi Anna I am not sure what you want but the following should get you part of the way I prefer to keep all my parameters within the function rather than use themes. useOuterStrips(strip = strip.custom(#factor.levels = , par.strip.text =

[R] Conditioning plots (wth coplot function) with logistic regression curves

2013-09-21 Thread Kiyoshi Sasaki
I have been trying to produce a conditional plot using coplot function (http://stat.ethz.ch/R-manual/R-devel/library/graphics/html/coplot.html) for a binary response (Presence in my case) variable and one continuous variable (Overstory) given a specific levels of the other continuous variable

Re: [R] Grouping variables by a irregular time interval

2013-09-21 Thread Raoni Rodrigues
Arun caught my attention that I committed a mistake with example data set. I send now the correct, with same text explain my problem. Sorry all of you for the confusion. I have a very large data frame (more than 5 million lines) as below (dput example at the end of mail): Station Antenna Tag

Re: [R] Obtaining data from a different row of data frame

2013-09-21 Thread arun
Hi, May be you can try this: Change the df1- structure(list(Dates = structure(c(13151, 13152, 13153, 13154,  13157, 13158, 13159, 13160, 13161, 13164), class = Date), P1 = c(10,  13, 16, 19, 22, 25, 28, 31, 34, 37), P2 = c(100, 102, 104, 106,  108, 110, 112, 114, 116, 118), P3 = c(90, 94, 98,

[R] Creating rectangular plots with x and y coordinates and treatments from a matrix for a randomized block design

2013-09-21 Thread Laz
Dear R users, I have a function I created to generate randomized block designs given below. Once I generate the design, I would like to plot it in a rectangular form to mimic the excel style where the blocks are represented with the treatment values placed exactly where their appropriate X

[R] Creating rectangular plots with x and y coordinates and treatments from a matrix for a randomized block design

2013-09-21 Thread Laz
Dear R users, I have a function I created to generate randomized block designs given below. Once I generate the design, I would like to plot it in a rectangular form to mimic the excel style where the blocks are represented with the treatment values placed exactly where their appropriate

[R] 答复: the values of predict( , type = terms, )

2013-09-21 Thread 岳赟
Dear Greg Snow I mean in the help documentation of predict.glm, the arguments of “type” wrote that “The terms option returns a matrix giving the fitted values of each term in the model formula on the linear predictor scale.” But I can’t get the same result of the function if I