[R] 2D Timeseries trace plot

2015-03-03 Thread AjayT
Hi, I've got a 2D timeseries of handwriting samples, xy time 1 1073 1058 769.05 2 1072 1085 769.07 3 1066 1117 769.08 4 1052 1152 769.10 5 1030 1196 769.12 6 1009 1242 769.13 7 994 1286 769.14 upto 500 I was just wondering how to plot this as an animation, so that the

Re: [R] Import variable labels to data frame columns

2011-03-28 Thread AjayT
Hi, guys. Thanks for all your help. I tried Gabors methods and they seem to work fine - robust as well. I wish I had though of those a few days ago! I'll try and give the other methods a try later. In the end though this drove me so nuts that I've managed to query the database which outputed

[R] Import variable labels to data frame columns

2011-03-27 Thread AjayT
Hi, I'm new to R and I'm stuck trying to import some data from a .dat file I've been given. The tricky bit for me is that the data has both variable values and labels? The data looks like this, Id=1 time=2011-03-27 19:23:40 start=1.4018 end=1.4017 Id=2 time=2011-03-27 19:23:40

Re: [R] Speed up sum of outer products?

2011-03-16 Thread AjayT
Hi Stefan, thats really interesting - I never though of trying to benchmark Linux-64 against OSX (a friend who works on large databases, says OSX performs better than Linux in his work!). Thanks for posting your comparison, and your hints :) i) I guess you have a very fast CPU (Core i7 or so, I

Re: [R] Speed up sum of outer products?

2011-03-15 Thread AjayT
Hi Dennis, sorry for the delayed reply and thanks for the article. I digged into it and found that if you have a GPU, the CUBLAS library beats the BLAS/ATLAS implementation in the Matrix package for 'large' problems. Here's what I mean, its = 2500 dim = 1750 X = matrix(rnorm(its*dim),its, dim)

[R] Speed up sum of outer products?

2011-03-01 Thread AjayT
Hi, I'm new to R and stats, and I'm trying to speed up the following sum, for (i in 1:n){ C = C + (X[i,] %o% X[i,]) # the sum of outer products - this is very slow according to Rprof() } where X is a data matrix (nrows=1000 X ncols=50), and n=1000. The sum has to be

Re: [R] Speed up sum of outer products?

2011-03-01 Thread AjayT
Hey thanks alot guys !!! That really speeds things up !!! I didn't know %*% and crossprod, could operate on matrices. I think you've saved me hours in calculation time. Thanks again. system.time({C=matrix(0,50,50);for(i in 1:n)C = C + (X[i,] %o% X[i,])}) user system elapsed 0.450.00