Re: [R] Military Time Comparison

2012-02-26 Thread Edgar Alminar
Oh, haha -- sorry for the vagueness: I was expecting to get the comparison to work. I also didn't mention that the dataset is much larger; I just wanted to give the first few rows. So, basically, I have a bunch of times in three columns, and I'm looking to compare them in which the command wor

[R] large data sets of irregular time series

2012-02-26 Thread stathisan
Hi, I am trying to run several types of time series/statistical analysis on large data sets of irregularly spaced time series. So far I have been playing around with zoo, but for large data sets I run into memory problems. Is there any package that offers support for such analysis? Or you think big

Re: [R] win zip archive of library(HH) for R2.12.0

2012-02-26 Thread Vijayan Padmanabhan
Thank you.. I cant imagine that I missed the most obvious route from my attempt! Regards Vijayan Padmanabhan "What is expressed without proof can be denied without proof" - Euclide. Uwe Ligges 02/27/2012 12:57 PM To Vijayan Padmanabhan cc "R. Michael Weylandt" , r-help@r-project.org Su

Re: [R] win zip archive of library(HH) for R2.12.0

2012-02-26 Thread Uwe Ligges
I wonder why nobopdy suggested to run install.packages("HH") since the binary is in the 2.12 repository on CRAN: CRAN-mirror/bin/windows/contrib/2.12/ Uwe Ligges On 27.02.2012 07:30, Vijayan Padmanabhan wrote: Dear Michael I found an alternate way that was useful at least in this case. Tr

Re: [R] win zip archive of library(HH) for R2.12.0

2012-02-26 Thread Vijayan Padmanabhan
Dear Michael I found an alternate way that was useful at least in this case. Trust someone would benefit from a similar approach in the RGroup when they face a similar problem as mine by following this approach. I saved the tar.gz file of package HH, corresponding to the R version of mine in a

Re: [R] win zip archive of library(HH) for R2.12.0

2012-02-26 Thread R. Michael Weylandt
I believe you'll have to build it yourself from the sources (in the tarball) - or perhaps find some kind soul who's willing to - the official repositories don't support a version that's about to be 18months out of date. Michael On Mon, Feb 27, 2012 at 1:12 AM, Vijayan Padmanabhan wrote: > > Dear

Re: [R] win zip archive of library(HH) for R2.12.0

2012-02-26 Thread Vijayan Padmanabhan
Dear Michael I checked this link.. the archives shown here are all tar.gz versions. I am looking for a zip archive, to install on my windows XP installation of R 2.12.0. pl help if you have the link to windows archives. Thanks Regards Vijayan Padmanabhan "What is expressed without proof can be

Re: [R] win zip archive of library(HH) for R2.12.0

2012-02-26 Thread R. Michael Weylandt
Old sources are available here: http://cran.r-project.org/src/contrib/Archive/HH/ You'll have to see which ones are compatible Michael On Mon, Feb 27, 2012 at 1:02 AM, Vijayan Padmanabhan wrote: > Dear R Group > Can any body point me to a link from where I can get zip archive of the > package H

[R] win zip archive of library(HH) for R2.12.0

2012-02-26 Thread Vijayan Padmanabhan
Dear R Group Can any body point me to a link from where I can get zip archive of the package HH for R 2.12.0? Thanks & Regards Vijayan Padmanabhan "What is expressed without proof can be denied without proof" - Euclide. Please visit us at www.itcportal.com ***

[R] Suggestion on Model Def - reg in nlme

2012-02-26 Thread Vijayan Padmanabhan
Dear RGroup I have a data of the type shown below: I am trying to use lme function followed by post hoc test as given in the code below. Am I right in my model definition, given the problem data structure. in the example, i have used column names of my data frame so that it is self explanatory.

Re: [R] Military Time Comparison

2012-02-26 Thread David Winsemius
On Feb 26, 2012, at 10:31 PM, Edgar Alminar wrote: Hello All, I have this dataset: RID VISCODE SCRNO RECNO AEWHEN AEONDATE AEONTIME INFPOINT.x INFDATE.x INFTIME.x INFPOINT.y INFDATE.y INFTIME.y 1 100 w00 IGI1480069 4 2 09/15/2009 1118 1 09/15/2009

[R] Military Time Comparison

2012-02-26 Thread Edgar Alminar
Hello All, I have this dataset: RID VISCODE SCRNO RECNO AEWHEN AEONDATE AEONTIME INFPOINT.x INFDATE.x INFTIME.x INFPOINT.y INFDATE.y INFTIME.y 1 100 w00 IGI1480069 4 2 09/15/2009 1118 1 09/15/2009 947 14 -4 1117 2 100 w00

Re: [R] count how many row i have in a txt file in a directory

2012-02-26 Thread Rui Barradas
Hello, again. > Did anyone ever mention the 'countLines' function in R.utils. No, I didn't know about it. Thanks. Rui Barradas -- View this message in context: http://r.789695.n4.nabble.com/count-how-many-row-i-have-in-a-txt-file-in-a-directory-tp4422186p4423521.html Sent from the R help ma

[R] A new book "Guidebook to R Graphics Using Microsoft Windows (Wiley)"

2012-02-26 Thread 竹澤邦夫
Dear R-Users, A new book "Guidebook to R Graphics Using Microsoft Windows (Wiley)" is out. http://as.wiley.com/WileyCDA/WileyTitle/productCd-111802639X.html http://www.amazon.com/Guidebook-Graphics-Using-Microsoft-Windows/dp/111802639X/ref=sr_1_1?ie=UTF8&qid=1330301212&sr=8-1 E-

[R] Matrix problem to extract animal associations

2012-02-26 Thread Ross Dwyer
Dear List, I have been trying to extract associations from a matrix whereby individual locations are within a certain distance threshold from one another. I have been able to extract those individuals where there is 'no interaction' (i.e. where these individuals are not within a specified dista

Re: [R] count how many row i have in a txt file in a directory

2012-02-26 Thread jim holtman
Did anyone ever mention the 'countLines' function in R.utils. On Sun, Feb 26, 2012 at 5:55 PM, Hans Ekbrand wrote: > > On Sun, Feb 26, 2012 at 09:39:46AM -0800, Rui Barradas wrote: > > Hello, > > > > > The first step before to create a loop row-by-row is to know > > > how many rows there are in t

[R] tm_map help

2012-02-26 Thread Sachinthaka Abeywardana
Hi all, I am trying to do some text mining with twitter and I am getting the error: Error in structure(names(sapply(possibleCompletions, "[", 1)), names = x) : 'names' attribute [1] must be the same length as the vector [0] When I use tm_map. Has anyone had/seen this error before? The code I

[R] fixed TkTable problem but I need to unistall/reinstall R....How do I manage that??

2012-02-26 Thread Eric P
Hello, So I need some help. I have been trying to get biocondutor to work on my computer that has Ubuntu 11.10 running on it and I found out that I needed to install something called TkTable before I install R. So I did that but now I have no idea how to properly uninstall/reinstall R, and I canno

Re: [R] tapply for enormous (>2^31 row) matrices

2012-02-26 Thread Gabor Grothendieck
On Thu, Feb 23, 2012 at 11:39 AM, Matthew Keller wrote: > Thank you all very much for your help (on both the r-help and the > bioconductor listserves). > > Benilton - I couldn't get sqldf to install on the server I'm using > (error is: Error : package 'gsubfn' does not have a name space). I > thin

Re: [R] How to deal with missing values when using Random Forrest

2012-02-26 Thread Weidong Gu
Hi, You can set na.action=na.roughfix which fills NAs with the mean or mode of the missing variable. Other option is to impute missing values using rfImpute, then run randomForest on the complete data set. Weidong Gu On Sat, Feb 25, 2012 at 6:24 PM, kevin123 wrote: > I am using the package Ran

Re: [R] read separate columns from an Excel sheet

2012-02-26 Thread Gabor Grothendieck
On Sun, Feb 26, 2012 at 2:58 PM, Ivette wrote: > Hello, > > Lets suppose I have an Excel sheet with 9 columns of data. How to tell R to > read for example column 1 and 7 of this sheet? I know only the usual code > without specifying columns: > > library(gdata) > a <- read.xls("file.xls", sheet=1)

Re: [R] count how many row i have in a txt file in a directory

2012-02-26 Thread Hans Ekbrand
On Sun, Feb 26, 2012 at 09:39:46AM -0800, Rui Barradas wrote: > Hello, > > > The first step before to create a loop row-by-row is to know > > how many rows there are in the txt file without load in R to save memory > > problem. > > > > some people know the specific function? > > > > I don't be

[R] read separate columns from an Excel sheet

2012-02-26 Thread Ivette
Hello, Lets suppose I have an Excel sheet with 9 columns of data. How to tell R to read for example column 1 and 7 of this sheet? I know only the usual code without specifying columns: library(gdata) a <- read.xls("file.xls", sheet=1)# reads in the 1st sheet Thank you. -- View t

[R] Positive semidefinite correlation Matrix

2012-02-26 Thread stephanmi1
Hello, I'm searching for a function that creates the nearest positive semidefinite correlation matrix. Up to now I was only able to find the function nearcor(). Due to the fact, that a correlation matrix is only forced to be positive semidefinite, I prefer to find the nearest

Re: [R] loop for a large database

2012-02-26 Thread mari681
Thank you!! MyTable has 21 millions rows and 15 columns, and the data is "character", they are words. When I tried the loop my computer crashed in the meaning that it freezed (froze?) and didn't allow me to do anything. The morning after I forced it off and rebooted. :-) Thank you so much, I'll t

Re: [R] loop for a large database

2012-02-26 Thread mari681
SORRY! The data in MyTable are tagsets of photos, like this: V1 V2 V3 V4 V5 V6V7 V8 230green nailpolish barrym 0 00 00 231 ny green brooklyn cleanup clean gowanus volunteer gcc 232green s

Re: [R] Help needed! Error in setwd(newdir) : cannot change working directory

2012-02-26 Thread Ivette
try setwd(choose.dir()) -- View this message in context: http://r.789695.n4.nabble.com/Help-needed-Error-in-setwd-newdir-cannot-change-working-directory-tp4421698p4422749.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-projec

Re: [R] Goodness of Fit for Copula

2012-02-26 Thread Ivette
x=your pseudo-observations in the interval [0,1] -- View this message in context: http://r.789695.n4.nabble.com/Goodness-of-Fit-for-Copula-tp4174977p4422737.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing

[R] Min-Max Normalization for Class RasterStack?

2012-02-26 Thread Cornelius Senf
Is there a way to normalize each layer of a RasterStack between 0 and 1 based on the minimum and maximum of each layer? Thanks! Cornelius -- __ Cornelius Senf, Bsc. Humboldt-University of Berlin Geography Department Geomatics Lab www.hu-geomatics.de __

Re: [R] count how many row i have in a txt file in a directory

2012-02-26 Thread Rui Barradas
Hello, > The first step before to create a loop row-by-row is to know > how many rows there are in the txt file without load in R to save memory > problem. > > some people know the specific function? > I don't believe there's a specific function. If you want to know how many rows are there in

Re: [R] svm with GRASS GIS

2012-02-26 Thread etiennebr
I usually use a rasterLayer object (from raster package) instead of a SpatialGridDataFrame, but you probably just have to bind it to your data : TL_training_2006_id.raw@data$prediction <- pred This will create a band in which you have your predictions. raster package doesn't handle the factors, so

Re: [R] loop for a large database

2012-02-26 Thread chuck.01
Untested die to no data, but this should work with a loop out=vector("list", length= length(MyVector)) for(i in 1 : length (MyVector)) { x <- data.frame (sum (MyTable ==MyVector[i])) out[[i]] <- x } sum(do.call(rbind, out)) -- View this message in context: http://r.789

Re: [R] Sweave Print xtable

2012-02-26 Thread Riccardo Romoli
Thanks for your replay!!! Problem solved!! Best Riccardo 2012/2/26 Yihui Xie > print(xtable(...), ..., table.placement = '') > > this is an xtable problem; see ?print.xtable > > Regards, > Yihui > -- > Yihui Xie > Phone: 515-294-2465 Web: http://yihui.name > Department of Statistics, Iowa Stat

Re: [R] Sweave Print xtable

2012-02-26 Thread Yihui Xie
print(xtable(...), ..., table.placement = '') this is an xtable problem; see ?print.xtable Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Sun, Feb 26, 2012 at 3:30 PM, Riccardo Romoli wrot

Re: [R] Reading spss files into R - warnings

2012-02-26 Thread Steve Taylor
suppressWarnings() will get rid of them for you. Note that in R a factor cannot have duplicate levels. Compare the results with use.value.labels turned on or off, to see which you prefer. I also get the "unknown type" warnings, but I ignore them as my data seems to arrive into R intact. Hope

Re: [R] Help needed! Error in setwd(newdir) : cannot change working directory

2012-02-26 Thread Petr Savicky
On Sun, Feb 26, 2012 at 04:12:03PM -0500, ying chen wrote: > > Hi, > > I am sorry about the format it showed up. I do not know what happened as now > it looks worse even on my own machine. I do not know what to do, I just add > "\n" to the end of each line and hope it will come out OK this ti

Re: [R] Help needed! Error in setwd(newdir) : cannot change working directory

2012-02-26 Thread jim holtman
At this point you need to learn how to do some basic debugging of your script. Open a GUI window that you can copy/paste parts of your script and execute it piece-meal. Get to the point where you want to change your working directory and do a 'getwd()' to see where you are. It is obvious from yo

[R] Sweave Print xtable

2012-02-26 Thread Riccardo Romoli
Hi, I'm working with Sweave and I have some trouble generating table. The R code is: print(xtable(myTable, caption ="", label="tab:myTab", digits=3), tabular.environment='tabular', floating=TRUE, caption.placement="top",size="\\scriptsize") and the resulting LaTeX table is: \begin{table

Re: [R] Help needed! Error in setwd(newdir) : cannot change working directory

2012-02-26 Thread Jeff Newmiller
Stop it with the "fake" code if you want help. In keeping with the posting guide, make one reproducible example that exhibits a real problem. For what it is worth, I don't have difficulty with setwd(). --- Jeff Newmiller

Re: [R] Help needed! Error in setwd(newdir) : cannot change working directory

2012-02-26 Thread ying chen
Hi, I am sorry about the format it showed up. I do not know what happened as now it looks worse even on my own machine. I do not know what to do, I just add "\n" to the end of each line and hope it will come out OK this time. The packages A, B, C are not the real package names. Basically I

Re: [R] count how many row i have in a txt file in a directory

2012-02-26 Thread Hans Ekbrand
On Sun, Feb 26, 2012 at 05:06:42PM +0100, gianni lavaredo wrote: > thanks Hans. > > It's true your idea improve the speed in the analysis respect a row-by-row > loop. > > Sorry if I ask these questions to better understand and better performening > my code: > > 1) split command in GNU coreutils,

Re: [R] Help needed! Error in setwd(newdir) : cannot change working directory

2012-02-26 Thread ying chen
Hi, I am sorry about the format it showed up. I do not know what happened as it looks fine when I read it using chrome on ubuntu 11.10 64bit. The packages A, B, C are not the real package names. Basically I have scriptA.R that works from inside a directory with my data (/home/sean/Rtest/D

Re: [R] loop for a large database

2012-02-26 Thread Petr Savicky
On Sun, Feb 26, 2012 at 04:13:49AM -0800, mari681 wrote: > Yes, I am a newbie. > > I have a data.frame (MyTable) of 1445846 rows and 15 columns with > character data. > And a character vector (MyVector) of 473491 elements. > > I want simply to get a data.frame with the count of how many times

Re: [R] loop for a large database

2012-02-26 Thread Petr Savicky
On Sun, Feb 26, 2012 at 04:13:49AM -0800, mari681 wrote: > Yes, I am a newbie. > > I have a data.frame (MyTable) of 1445846 rows and 15 columns with > character data. > And a character vector (MyVector) of 473491 elements. > > I want simply to get a data.frame with the count of how many times

Re: [R] Help needed! Error in setwd(newdir) : cannot change working directory

2012-02-26 Thread R. Michael Weylandt
This is a mess -- please resend in plain text. Also, there are not, to my knowledge, packages (not libraries) called "A", "B", or "C" so your script doesn't even begin to look reproducible were it legible. Do you have read/write access to the directories in question? Michael On Sat, Feb 25, 201

Re: [R] NaN's in class 'performance; [package "ROCR"]

2012-02-26 Thread Chet Seligman
Thanks Uwe. I definitely want to replace the NaN, unless someone has a better idea. I have a couple of lists of label-value pairs that come from a randomForest object. I plot a series of precision- recall curves (not really curves but zig-zags) from x and y lists that came from multiple randomFore

Re: [R] loop for a large database

2012-02-26 Thread David Winsemius
On Feb 26, 2012, at 7:13 AM, mari681 wrote: Yes, I am a newbie. I have a data.frame (MyTable) of 1445846 rows and 15 columns with character data. And a character vector (MyVector) of 473491 elements. I want simply to get a data.frame with the count of how many times each element of MyV

[R] Gia to R forum

2012-02-26 Thread Alaios
 apply(( DataForFrequency > threshold), 1, sum)), FrequencyBins=ncol(DataForFrequency)) num [1:292256, 1:403] -106 -108 -110 -110 -112 ... [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

[R] Line-by-line profiling, a la Matlab

2012-02-26 Thread Martin
Hi, I was wondering if there is a function or package for R that can be used for "line-by-line" profiling, and yields an output similar to Matlab's profiler? For those of you that are not familiar with the Matlab profiler, it shows you how much time each line in the code took to run. Moreover, if

Re: [R] strucchange breakpoints (Bai and Perron, 1998, 2003)

2012-02-26 Thread Achim Zeileis
On Sun, 26 Feb 2012, buehlerman wrote: If I try the breakpoints() function (strucchange package) with a minimum segment size = the number of regressors, there appears the following error message: "minimum segment size must be greater than the number of regressors" According to the documentatio

Re: [R] question about user written function (newb question)

2012-02-26 Thread Gabor Grothendieck
On Sun, Feb 26, 2012 at 9:06 AM, knavero wrote: > Quick newb question about R relating to the line of code below: > > rawCool = read.zoo("cooling.txt", FUN = as.chron, format = "%m/%d/%Y %H:%M", > sep = "\t", aggregate = function(x) tail(x, 1)) > > I'm wondering what the specifics are for the argu

[R] strucchange breakpoints (Bai and Perron, 1998, 2003)

2012-02-26 Thread buehlerman
If I try the breakpoints() function (strucchange package) with a minimum segment size = the number of regressors, there appears the following error message: "minimum segment size must be greater than the number of regressors" According to the documentation: "breakpoints implements the algorithm de

Re: [R] count how many row i have in a txt file in a directory

2012-02-26 Thread Hans Ekbrand
On Sun, Feb 26, 2012 at 03:03:58PM +0100, gianni lavaredo wrote: > Dear Researchers, > > I have a large TXT (X,Y,MyValue) file in a directory and I wish to import > row by row the txt in a loop to save only the data they are inside a buffer > (using inside.owin of spatstat) and delete the rest. Th

Re: [R] question about user written function (newb question)

2012-02-26 Thread R. Michael Weylandt
Short answer to a very good question: one has to use "function(x) tail(x, 1)" syntax to avoid using the default tail(x, 6). There are some other ways to achieve the same thing, but I think this syntax is generally preferred for its clarity. Other question: yes I believe so. Michael On Sun, Feb

Re: [R] svm with GRASS GIS

2012-02-26 Thread giuseppe calamita
Dear Ethienne, thanks a lot for your help. We finally manage to perform the svm classification in this way: library(spgrass6) ; G <- gmeta6() TL_training_2006_id.raw<-readRAST6("TL_training_2006_id") # classes training area B1_B2_B3_train.raw<-readRAST6(c("AST_L1B_2008_05_2009_area_giusta_1_t

[R] question about user written function (newb question)

2012-02-26 Thread knavero
Quick newb question about R relating to the line of code below: rawCool = read.zoo("cooling.txt", FUN = as.chron, format = "%m/%d/%Y %H:%M", sep = "\t", aggregate = function(x) tail(x, 1)) I'm wondering what the specifics are for the argument where it has "aggregate = function(x) tail(x, 1)". I u

[R] loop for a large database

2012-02-26 Thread mari681
Yes, I am a newbie. I have a data.frame (MyTable) of 1445846 rows and 15 columns with character data. And a character vector (MyVector) of 473491 elements. I want simply to get a data.frame with the count of how many times each element of MyVector appears in MyTable. I've tried a loop with :

[R] count how many row i have in a txt file in a directory

2012-02-26 Thread gianni lavaredo
Dear Researchers, I have a large TXT (X,Y,MyValue) file in a directory and I wish to import row by row the txt in a loop to save only the data they are inside a buffer (using inside.owin of spatstat) and delete the rest. The first step before to create a loop row-by-row is to know how many rows th