Re: [R] RODBC vs gdata

2012-01-09 Thread Hasan Diwan
On 9 January 2012 10:46, Christof Kluß wrote: > thank you very much, so it is a known problem with the Microsoft Excel > ODBC drivers :( As I was advised a few weeks ago, the best way for Excel to get into R is to export the file as CSV and use read.csv, read.csv2, or read.table. Perhaps this is

Re: [R] Web based R-help not a list

2011-11-09 Thread Hasan Diwan
On 9 November 2011 15:24, Jeff Newmiller wrote: > Such a resource would no longer be R-help. You might like stackoverflow. Perhaps our man was looking for a searchable mail archive? If no one has one, I can set one up pretty quickly. Just let me know... Thanks in advance! -- H -- Sent from my mo

[R] KalmanSmooth

2012-03-07 Thread Hasan Diwan
I have a bunch of clean timeseries data obtained from a sensor and I'd like to apply a Kalman Filter to it to smoothe it out. Through a few days of Googling, reading papers, implementing such a filter in various languages, I finally realised that it may be built into R. So I did a "??kalman" at the

[R] ggmap crash

2012-03-16 Thread Hasan Diwan
Not sure if this is the right place to report this, but: Am using ggmap to generate a map of a bounding box from 161 latitude/longitude pairs and the code crashes R (in ess). Data is at http://analysis.d8u.us/~hdiwan/plotSource.csv and the code to read it is below. I'm not sure if ess, emacs, ggma

Re: [R] Format wanted...

2012-03-25 Thread Hasan Diwan
Duncan, On 25 March 2012 15:28, Duncan Murdoch wrote: > In case anyone is interested, I want to output code in a language (GLSL) > that sees 1 and 1. as different types.  I want a floating point value, so I > need the decimal point. GLSL, assuming it's the one that I'm looking at[1], supports im

[R] Finding Instances of a Pattern Throughout Data Set

2012-04-02 Thread Hasan Diwan
I have approximately 2.5 million rows from a number of sensor readings. Having plotted these, I can see a given pattern (say a spike in the amplitude away from the mean). I would now like to automate this procedure as we're expecting a great deal more data in the near future. Is there any package o

Re: [R] Finding Instances of a Pattern Throughout Data Set

2012-04-02 Thread Hasan Diwan
Mr Gunter, On 2 April 2012 21:15, Bert Gunter wrote: > I strongly suggest you consult with a local statistician. Your > description is far too vague (to me anyway) to make any sense of and > probably requires a good deal of back and forth between you and a > competent data analyst to pin down wha

[R] Most efficient way to do this...

2012-04-09 Thread Hasan Diwan
I have time-series data looking like this: > dataIn[sample(c(1:nrow(dataIn)), 25),] accelerometer_y id data_block_epoch_time 782 0.8424 201300 133179733 1868 0.3432 202386 1331797384000 1828 0.3510 202346 1331797382000 1026 0

Re: [R] how to divide data by week

2012-04-13 Thread Hasan Diwan
Stefano, On 13 April 2012 20:51, Stefano Sofia wrote: > I have a data frame as below specified. > From the 1st of May to the 30th of September of several years (e.g. from > 2004 to 2011) I have a frequency of accidents. > I need the mean of accidents divided by weeks (i.e. the mean of accidents >

[R] rjava on FreeBSD

2012-01-11 Thread Hasan Diwan
Trying to install Rjava on FreeBSD 9 and am getting the following error: > install.packages('rJava') trying URL 'http://cran.cnr.Berkeley.edu/src/contrib/rJava_0.9-3.tar.gz' Content type 'application/x-gzip' length 537153 bytes (524 Kb) opened URL ==

[R] Points inside a polygon

2012-01-11 Thread Hasan Diwan
I have a list of bounds for a series of polygons. I do understand the formula to determine whether point i is within polygon X (X[x1] < i[x] & X[x2] > i[x] & X[y1] < i[y] & X[y2] > i[y]), and I can apply this throughout the dataset. However, this naive algorithm doesn't scale very well. The data se

[R] point.in.polygon help

2012-01-13 Thread Hasan Diwan
x <- sapply(c(1:max(greens[,1])), function() { poly.x <- greens[greens[,1] == hole, 2] poly.y <- greens[greens[,1] == hole, 3] p.x <- gps[,3] p.y <- gps[,4] require(sp) gps[which(point.in.polygon(p.x,p.y,poly.x,poly.y) != 0),ncol(gps)] <- gps[which(point.in.polygon(p.x,p.y

Re: [R] Logrithmic histogram?

2012-01-22 Thread Hasan Diwan
On 22 January 2012 19:29, Kevin Burton wrote: > I have some data where the frequency is heavily weighted on the lower end. > So I have lots of low values with very few higher values. I would like to > find breakpoints that cover the data with as much detail as possible. I find > that if I use hist

[R] PosixCT subsecond accuracy

2012-01-27 Thread Hasan Diwan
A sample of the data I have is: > head(sensor) logged_onaccx accy accz compassx compassy compassz gyrox gyroy gyroz 1 1326561428000 -0.4602 0.8346 0.0936 0.145508 -0.350586 0.259766 59.617390 28.521740 59.617390 2 1326561428050 -0.4212 1.0452 0.1326 0.219727 -0.321289 0.2

Re: [R] PosixCT subsecond accuracy

2012-01-27 Thread Hasan Diwan
Never mind... options(digits.sec) is what I needed to set... -- H On 27 January 2012 10:44, Hasan Diwan wrote: > A sample of the data I have is: >> head(sensor) >      logged_on    accx   accy   accz compassx  compassy compassz > gyrox      gyroy      gyroz > 1 1326561428

[R] Grouping miliseconds By Hours

2012-02-05 Thread Hasan Diwan
I have a list of numbers corresponding to timestamps, a sample of which follows: c(1327211358, 1327221999, 1327527296, 1327555433, 1327701042, 1327761389, 1327780993, 1327815670, 1327822964, 1327897497, 1327897527, 1327937072, 1327938300, 1327957589, 1328044466, 1328127921, 1328157588, 1328213951,

[R] read.csv "Duplicate row.names not allowed"

2012-02-06 Thread Hasan Diwan
I'm trying to read in a CSV, with lines looking like: HEADER, Latitude DecDeg, Latitude Hemisphere, Longitude DecDeg, Longitude Hemisphere, Speed knots, Bearing Degrees, fixQualityGga, noOfSatGga, altGga, heightGga, selectionGsa, fixGsa, pdopGsa, hdopGsa, vdopGsa, noOfSatGsv, Time, *c

[R] "Zoomable" time series plots

2012-02-07 Thread Hasan Diwan
Not sure if the question is appropos, but I have multiple csv's which are read into an xts object, corresponding to telemetry data (accelerometer, magnetometer/compass, and gyroscope). For examination, it would be über useful if plot.zoo (or something similar) allowed me to zoom in and out of a sub

[R] Scriptable Integration

2012-02-10 Thread Hasan Diwan
My data: > dput(mydata) structure(list(V1 = c(1328565067, 1328565067.05, 1328565067.1, 1328565067.15, 1328565067.2, 1328565067.25), V2 = c(0.0963890795246276, 0.227296347215609, 0.240972698811569, 0.221208948983498, 0.230898231782485, 0.203282153087549), V3 = c(0.0245045248243853, 0.083567941170357

Re: [R] Scriptable Integration

2012-02-10 Thread Hasan Diwan
Michael, On 10 February 2012 18:11, R. Michael Weylandt wrote: > I'm not quite sure what you mean, but perhaps this will help: > spf <- splinefun(mydata$V2) > splInt <- function(low, up) integrate(spf, low, up)$value Sort of, I'm looking to get the nth order integral, where the only thing I know

[R] only 0s may be mixed with negative subscripts

2012-02-13 Thread Hasan Diwan
I'd like to get the sum of every other row in a data.frame. When I actually set about doing this, I get the error in the subject line of this message. A sample of my data is below, followed by the function call that should give me the results I want: > dput(head(sens2)) structure(list(Time = c(132

Re: [R] only 0s may be mixed with negative subscripts

2012-02-13 Thread Hasan Diwan
On 13 February 2012 14:46, ilai wrote: > The function you posted runs without error (on these 6 lines), but > does not return anything that looks remotely like a sum, or cumsum of > anything. Can you clarify what you are trying to do? I assume by "sum > of every other row" you don't mean summing T

[R] Spline Question

2012-02-14 Thread Hasan Diwan
> dput(sensor.sample) structure(c(1328565718.65, 1328566608.9, 1328566162.65, 1328566571.1, 1328566598.85, 1328565634.3, 1328566513.95, 1328565123.65, 1328565827.1, 1328566719.9, 1328565527.55, 1328565118.05, 1328565556.85, 1328565623.85, 1328565230.75, 1328566083.85, 1328566012.45, 1328566795.75,

Re: [R] Spline Question

2012-02-14 Thread Hasan Diwan
Rolf, On 14 February 2012 21:26, Rolf Turner wrote: >    What did you actually *do* to create your spline? >    Did you use spline() or splinefun()?  And if not, why not? Yes... I used the spline() function to get a list of points that should go though every point in the dataset, but it does not

Re: [R] time series interpolation - zoo? approx? spline? what to use?

2012-02-16 Thread Hasan Diwan
Sir, On 16 February 2012 16:55, Henry wrote: > Please see my question from a few minutes ago - I wanted to improve the > title. xts über alles -- H -- Sent from my mobile device Envoyait de mon portable __ R-help@r-project.org mailing list https://sta

Re: [R] still need read.zoo command help

2012-02-17 Thread Hasan Diwan
Henry, You're reading a CSV with read.zoo. This is not likely to work. The way I'd do this is: data <- read.csv('/tmp/Kevin-0-comma-ITPower.txt', header=FALSE) z <- zoo(data[,2], order.by=as.POSIXct(data[,1], format='%d/%m/%y %H:%M:%S') # or whatever your format actually is... -- H Sent from my mo

Re: [R] help updating package rJava (on ubuntu)

2012-02-18 Thread Hasan Diwan
On 18 February 2012 13:13, Karl Brand wrote: > Thanks for yout fast response. Thing is - i managed to get Version 0.9-1 > installed and fully functional. And > > $ locate jdk > returns too many entries to post here, so i'm pretty sure its on the > machine. What you want to look for is javac, not

Re: [R] difficulty in Formatting time series data

2012-04-22 Thread Hasan Diwan
Raghu, On 22 April 2012 09:53, Raghuraman Ramachandran wrote: > I have a data frame (from CSV file) which has its first column called Date. > The Date is in the format mm/dd/. I was trying to get the weekday for > these dates and I tried using wday() and day.of.week() functions and both > of

[R] Rjava on Ubuntu quantal

2012-05-14 Thread Hasan Diwan
I just upgraded to Ubuntu Quantal from Precise and RJava stopped working, log follows: 0}% /usr/bin/find $HOME/workspace/FinanceOCR/visualizations/ -name '*R' -print | /usr/bin/xargs -n 1 -i% /usr/bin/Rscript % $1 [~] Loading required package: RJDBC Loading required package: methods Loading require

Re: [R] Warning message: Removed 888 rows containing missing values or values outside the scale range (`geom_line()`)

2024-10-03 Thread Hasan Diwan
These are warnings, not errors. On Thu, 3 Oct 2024 at 21:02, roslinazairimah zakaria wrote: > Dear all, > I tried to rerun the examples given by Hyndman in otexts but keep on > getting errors and I have searched through google but no solution yet. > > Thank you in advance for any help given. > >

Re: [R] Change data frame to time series data

2024-10-02 Thread Hasan Diwan
On Wed, 2 Oct 2024 at 08:20, roslinazairimah zakaria wrote: > Let say, this is my data and I want to extract from 2014-01-01 00:00:00 > to 2014-01-01 16:30:00 > > dt_ts['2014-01-01 00:00:00'::'2014-01-01 16:30:00'] Try that? -- OpenPGP: https://hasan.d8u.us/openpgp.asc If you wish to request

Re: [R] Change data frame to time series data

2024-10-02 Thread Hasan Diwan
On Wed, 2 Oct 2024 at 07:53, roslinazairimah zakaria wrote: > Next question, how do I delete the date from 16 December until 31 December > 2014? > Something like: myData <- xtsObj[myData$date < "2014-12-16" & myData$date > "2024-12-31"] -- H -- OpenPGP: https://hasan.d8u.us/openpgp.asc If you

Re: [R] Change data frame to time series data

2024-10-02 Thread Hasan Diwan
> dt_ts['2014-01-01 00:00:00/2014-12-15 23:59:00'] Does that work? -- H -- OpenPGP: https://hasan.d8u.us/openpgp.asc If you wish to request my time, please do so using *bit.ly/hd1AppointmentRequest *. Si vous voudriez faire connnaisance, allez a *bit.ly/hd1Ap

Re: [R] Save spatial data in a csv file

2024-11-30 Thread Hasan Diwan
Kindly respond with the output of `dput(nyc_ct_geo)` -- thank you! -- H -- OpenPGP: https://hasan.d8u.us/openpgp.asc If you wish to request my time, please do so using *bit.ly/hd1AppointmentRequest *. Si vous voudriez faire connnaisance, allez a *bit.ly/hd1Ap

<    1   2