Re: [R] time series processing - count of datestamp delta's, per group

2014-03-24 Thread Martin Tomko
mes = structure(list( User = c("A", "B", "C", "D", "E")), .Names = "User"), call = quote(by.default(data = Date, INDICES = User, FUN = function(yy) diff(yy))), class = "by") I can access it as: foo2$A for example. I h

[R] time series processing - count of datestamp delta's, per group

2014-03-22 Thread Martin Tomko
Apologies if the question is a but naïve, I am a novice in time series data handling in R I have the following type of data, in a long format ( as called by the spacetime vignette – the table contains also space, not noted here): User | Date | Otherdata | A | 01/01/2014 | aa A | 01/01/2014 | b

Re: [R] problems subsetting

2010-11-18 Thread Martin Tomko
35 PM, Steve Lianoglou wrote: Hi, On Thu, Nov 18, 2010 at 10:25 AM, Martin Tomko wrote: Hi Gerrit, indeed, that works. Excellent tip! For reference, I did this: subset1<-subset(summarystats,(Type==1)&(Class==1)&(Category==1)) I am still not totally sure when one uses "&am

Re: [R] problems subsetting

2010-11-18 Thread Martin Tomko
ds for logical AND Thanks a lot. Martin On 11/18/2010 3:58 PM, Gerrit Eichner wrote: Hello, Martin, as to your first problem, look at function subset(), and particularly at its argument "subset". HTH, Gerrit On Thu, 18 Nov 2010, Martin Tomko wrote: Dear all, I ha

[R] problems subsetting

2010-11-18 Thread Martin Tomko
Dear all, I have searched the forums for an answer - and there is plenty of questions along the same line - but none of the paproaches shown worked to my problem: I have a data frame that I get from a csv: summarystats<-as.data.frame(read.csv(file=f_summary)); where I have the columns Datase

Re: [R] statistical test for comparison of two classifications (nominal)

2010-11-17 Thread Martin Tomko
although they evaluate in general inter/intra-cluster distance distributions. For instance, you can maximise/minimise these indices to find the best partition among a set of candidate ones. Mattia Prosperi. 2010/11/17 Marc Schwartz: On Nov 17, 2010, at 7:33 AM, Martin Tomko wrote: D

Re: [R] statistical test for comparison of two classifications (nominal)

2010-11-17 Thread Martin Tomko
ill probably have to implement this yourself. -Matt On Wed, 2010-11-17 at 08:33 -0500, Martin Tomko wrote: Dear all, I am having a hard time to figure out a suitable test for the match between two nominal classifications of the same set of data. I have used hierarchical clustering with multiple me

[R] statistical test for comparison of two classifications (nominal)

2010-11-17 Thread Martin Tomko
Dear all, I am having a hard time to figure out a suitable test for the match between two nominal classifications of the same set of data. I have used hierarchical clustering with multiple methods (ward, k-means,...) to classify my dat into a set number of classesa, and I would like to compare

[R] logging interim results using foreach/doMC

2010-11-11 Thread Martin Tomko
Dear all, I am converting a large process to a parallel backhend using doMC and foreach. Basically, I havea long list of input graph files and each of them calls soem basic igraph package functions. I am parallelizing the run, in order to save time. All works fine, and each %dopar% call ends w

Re: [R] SVM classification based on pairwise distance matrix

2010-10-22 Thread Martin Tomko
Hi Steve, thanks a lot, I will haev a look at the kernel appraoch ,that looks promising. I will first have to study the theory behind before I use it, I guess. Cheers M. On 10/21/2010 5:42 PM, Steve Lianoglou wrote: Hi, On Thu, Oct 21, 2010 at 9:42 AM, Martin Tomko wrote: Dear all, I

Re: [R] SVM classification based on pairwise distance matrix

2010-10-21 Thread Martin Tomko
significance in terms of column properties, they are basically graphs of sort. Is there a way out with the SVM, or I just forget that? Martin On 10/21/2010 5:42 PM, Steve Lianoglou wrote: Hi, On Thu, Oct 21, 2010 at 9:42 AM, Martin Tomko wrote: Dear all, I am exploring the possibilities

[R] SVM classification based on pairwise distance matrix

2010-10-21 Thread Martin Tomko
Dear all, I am exploring the possibilities for automated classification of my data. I have successfully used KNN, but was thinking about looking at SVM (which I did nto use before). I have a pairwise distance matrix of training observations which are classified in set classes, and a distance mat

Re: [R] running a long R process on Linux using putty - best practice to disconnect

2010-10-14 Thread Martin Tomko
thank you guys, R CMD BATCH seems the way to go, and I will nudge my admin to install screen /byobu Thanks heaps, Martin On 10/14/2010 7:21 PM, Uwe Ligges wrote: On 14.10.2010 18:07, Martin Tomko wrote: Dear all, I am sure this has been solved before, googling did not help much,. Warning

[R] running a long R process on Linux using putty - best practice to disconnect

2010-10-14 Thread Martin Tomko
Dear all, I am sure this has been solved before, googling did not help much,. Warning, I am not great with putty/linux servers Situation: I have been given access to an R installation on a Linux server to do some larger number crunching that was killing my machine. I use putty to connect, and

Re: [R] multiplying values in data frame by corresponding value in the first column

2010-09-21 Thread Martin Tomko
Thank you Marc, that was an elegant solution, works perfectly! Martin On 9/21/2010 10:24 PM, Marc Schwartz wrote: DF[, -c(1:2)]<- DF[, -c(1:2)] * DF$Group __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do re

[R] multiplying values in data frame by corresponding value in the first column

2010-09-21 Thread Martin Tomko
I am sure there is a simple solution to this... I have a column in a data frame specifying a grouping (1, -1) for my observations, and need to mutliply each observation in all the other columns of the data frame by the corresponding value in the given column. I played with apply, and saw some s

Re: [R] multi day R run crashed - is there a log

2010-08-25 Thread Martin Tomko
Hi , thanks, the lower.tri idea is I guess the best way. Will try that. Cheers Martin On 8/25/2010 2:21 PM, Sarah Goslee wrote: Hi, On Wed, Aug 25, 2010 at 8:11 AM, Martin Tomko wrote: Hi Sarah, thank you very much for your answer. I have been spitting things out on screen, but

Re: [R] multi day R run crashed - is there a log

2010-08-25 Thread Martin Tomko
something more elegant, but these solutions have all worked well for me in various situations. Sarah On Wed, Aug 25, 2010 at 3:46 AM, Martin Tomko wrote: Dear all, I am using an R 2.10 installation on a Windows 203 server that I have no control over. After a multi-day run I found that it

[R] multi day R run crashed - is there a log

2010-08-25 Thread Martin Tomko
Dear all, I am using an R 2.10 installation on a Windows 203 server that I have no control over. After a multi-day run I found that it was terminated/crashed. Is there any log kept by R where I could see whether something/what happened? The same process has been run beofre on a smaller dataset

Re: [R] help usin scan on large matrix (caveats to what has been discussed before)

2010-08-12 Thread Martin Tomko
I did. Did not work. Did you try your code? The matrix did not result into integer numbers as expected. MY approach resulted in a correct scan result, at least. M. > Martin Tomko wrote: >> Hi Peter, >> apologies, too fast copying and pasting. >> So, here is the explan

Re: [R] help usin scan on large matrix (caveats to what has been discussed before)

2010-08-12 Thread Martin Tomko
to naive questions, I am a newbie, in principle. Cheers Martin On 8/12/2010 4:29 PM, peter dalgaard wrote: On Aug 12, 2010, at 1:34 PM, Martin Tomko wrote: Hi Peter, thank you for your reply. I still cannot get it to work. I have modified your code as follows: rows<-length(R) cols<

Re: [R] help usin scan on large matrix (caveats to what has been discussed before)

2010-08-12 Thread Martin Tomko
d<- read.table(file, colClasses = classes, nrows=Nb[ii], skip=skip[ii], comment.char = "") if(save.inter){ save(d, file=paste(out, ".", ii, ".rda", sep="")) } print(ii) results[seq(1+skip[ii], skip[ii]+Nb[ii]), ]<- as.matrix(d

Re: [R] help usin scan on large matrix (caveats to what has been discussed before)

2010-08-12 Thread Martin Tomko
ger,15 Integer,15 Integer,15 Integer,15 Integer,15 Integer,15 Any idea where the values are gone? Thanks Martin Hence, I filled it into the matrix of dimensions On 8/12/2010 12:24 PM, peter dalgaard wrote: On Aug 12, 2010, at 11:30 AM, Martin Tomko wrote: c<-scan(file=f,what=li

[R] help usin scan on large matrix (caveats to what has been discussed before)

2010-08-12 Thread Martin Tomko
Dear all, I have a few points that I am unsure about using scan. I know that it is covered in the intro to R, and also has been discussed here: http://www.mail-archive.com/r-help@r-project.org/msg04869.html but nevertheless, I cannot get it to work. I have a potentially very large matrix that

Re: [R] strange behavior when reading csv - line wraps

2009-05-31 Thread Martin Tomko
.fields(file)) # max # now setup read.table for max number input <- read.table(file, colClasses=rep(NA, maxFields), fill=TRUE, col.names=paste("V", seq(maxFields), sep='')) On Sun, May 31, 2009 at 6:06 AM, Martin Tomko wrote: Dear Jim, with the help of Ted, we d

Re: [R] strange behavior when reading csv - line wraps

2009-05-31 Thread Martin Tomko
in the dataframe. All of this can be done in R if you can state what the criteria is. On Sat, May 30, 2009 at 4:32 AM, Martin Tomko <mailto:martin.to...@geo.uzh.ch>> wrote: Jim, the two lines I put in are the actual problematic input lines. In these examples, there are no quo

Re: [R] strange behavior when reading csv - line wraps

2009-05-30 Thread Martin Tomko
holtman wrote: You need to supply the actual input line so we can see what is happening. Are you sure you do not have unbalanced quotes in your input (try quote='') or do you have comment characters ("#") in your input? On Fri, May 29, 2009 at 3:15 PM, Martin Tomko <mailto:

[R] strange behavior when reading csv - line wraps

2009-05-29 Thread Martin Tomko
Dear All, I am observing a strange behavior and searching the archives and help pages didn't help much. I have a csv with a variable number of fields in each line. I use dataPoints <- read.csv(inputFile, head=FALSE, sep=";",fill =TRUE); to read it in, and it works. But - some lines are long an

Re: [R] install.package("TinnR") - there is no package called 'TinnR' (RESOLVED)

2009-03-24 Thread Martin Tomko
Yes, will do. I just was not in need to upgrade as everything worked... An R is not my primary development environment - i.e., I need it a couple of times a year. But you are right, it is good to be on an updated version. Cheers Martin Duncan Murdoch wrote: On 3/24/2009 8:55 AM, Martin Tomko

Re: [R] install.package("TinnR") - there is no package called 'TinnR' (RESOLVED)

2009-03-24 Thread Martin Tomko
package is visible to other under install packages in any repository? Thanks Martin Duncan Murdoch wrote: On 3/24/2009 7:05 AM, Martin Tomko wrote: I have troubles make TinnR 2.2.0.2 work, it seems that the dependency on the package TinnR that cannot be found (I tried also manual downloads, but

Re: [R] install.package("TinnR") - there is no package called 'TinnR'

2009-03-24 Thread Martin Tomko
- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Martin Tomko Sent: Tuesday, March 24, 2009 8:25 AM To: David Winsemius Cc: r-help@r-project.org Subject: Re: [R] install.package("TinnR") - there is no package called 'TinnR' David, th

Re: [R] install.package("TinnR") - there is no package called 'TinnR'

2009-03-24 Thread Martin Tomko
semius wrote: Tinn-R is not an R package. It is a standalone text editor: http://www.lmgtfy.com/?q=tinn-r -- David Winsemius On Mar 24, 2009, at 7:05 AM, Martin Tomko wrote: I have troubles make TinnR 2.2.0.2 work, it seems that the dependency on the package TinnR that cannot be found (I tr

[R] install.package("TinnR") - there is no package called 'TinnR'

2009-03-24 Thread Martin Tomko
I have troubles make TinnR 2.2.0.2 work, it seems that the dependency on the package TinnR that cannot be found (I tried also manual downloads, but I cannot find the package anywhere on any CRAN mirror). I even set a default cran mirror in the Rprofile.site file, so that the later command can

[R] plotting activity time intervals

2009-01-21 Thread Martin Tomko
Dear All, I have interval data (for Mon-Sun, 00-24h) of an activity and would like to visually plot them in a matrix-like plot, where color A would be assigned to the activity, and color X to unspecified time usage. Note that the activities are not in standardised units (hours or so), but from

Re: [R] median of binned values

2007-12-19 Thread Martin Tomko
any wiser. What if I had a vector v <- vector(c(1,10,100,1000,1)) and wanted to perform it on that? Thanks a lot Martin Chuck Cleland wrote: > Martin Tomko wrote: >> Dear list, >> I have a vector (array, table row, whatever is best) of frequency values >> for categori

[R] median of binned values

2007-12-19 Thread Martin Tomko
Dear list, I have a vector (array, table row, whatever is best) of frequency values for categories (or bins), and I need to find the median category. Trivial to do by hand, but I was wondering if there is a means to do it in R in an elegant way. The obvious medioan(vector) returns the median f

Re: [R] exporting clustering results to table

2007-11-27 Thread Martin Tomko
Hello Haris, no, that is not the problem. But thank you anyway. I figured that paste has a funny behavior. But the object resulting from pam is complex, and cannot be cast into a table frame easily... Charilaos Skiadas wrote: > On Nov 27, 2007, at 7:41 AM, Martin Tomko wrote: > >&

[R] exporting clustering results to table

2007-11-27 Thread Martin Tomko
Hello list, the following approach did not work: clustersA <- pam(distances, nkA, diss=TRUE); gc(); filenameclu = paste("filenameclu", ".txt"); write.table(clustersA , file=filenameclu,sep=","); although it worked with clustersA <- hclust(distances, method="ward"); and a consecutive kclassA <- c

[R] "pattern matching" accross multiple matrices

2007-11-08 Thread Martin Tomko
Hi all, I have a set of patterns which can occur in a series of (3) matrices. I want to identify those and create a fourth one with the identifiers of the cases. Something like: for (i in 1:l) { for (j in 1:w) { A[A[i,j]==1 & D[i,j]==1 & P[i,j]=

[R] "pattern matching" accross multiple matrices

2007-11-08 Thread Martin Tomko
Hi all, I have a set of patterns which can occur in a series of (3) matrices. I want to identify those and create a fourth one with the identifiers of the cases. Something like: for (i in 1:l) { for (j in 1:w) { A[A[i,j]==1 & D[i,j]==1 & P[i,j]=