[R] Calculating distance between longitude,latitude of 2 points

2010-11-19 Thread Lily_stats
Hi all, I would like to know a way of calculating the distance between 2 points when I already have the longitude and latitude of the points. For example : Point 1 : 52° 9'54.00"N 4°25'8.40"E Point 2 : 52°27'46.80"N 4°33'18.00"E Distance between point 1 and point in km ...

[R] Picking out dates in xts

2010-08-23 Thread Lily_stats
Hi all, I like how smart xts and would like to pick out a period from my xts object*. I am able to pick out periods of particular years, for example : conc.xts<-tt.xts['1983'] My question is, how can I pick out say, a) just the first 6 months of 1983. b) several years, say 1983 AND 1984 c)

[R] Merge xts

2010-08-17 Thread Lily_stats
Hi all , I have 12 xts objects of differing timeseries stamp. For example : > str(s1_predict.xts) An ‘xts’ object from 1990-03-25 20:00:00 to 1990-12-15 09:00:00 containing: Data: num [1:725, 1] 11.23 10.18 9.3 9.74 10.18 ... - attr(*, "dimnames")=List of 2 ..$ : NULL ..$ : NULL Index

[R] data frame handling

2010-08-16 Thread Lily_stats
Dear all, I have an xts object , t.xts with 4 columns: "v1" "DD1" "v2" "DD2" and created a data frame : t <- as.data.frame(t.xts) I would like to extract data and create a new data frame for when the values in column DD1 falls between 0 and 30 and extract the corresponding v1 value. How can I

Re: [R] Data Handling

2010-08-02 Thread Lily_stats
d etc, but I am stuck and very confused! Any help is appreciated On Fri, Jul 30, 2010 at 12:44 PM, raghu [via R] < ml-node+2307836-1452362937-369...@n4.nabble.com > wrote: > Convert your datasets into xts objects and then do a cbind ordering by the > column you want. Do a ?cbind. > &g

[R] Date and Time Formatting

2010-08-02 Thread Lily_stats
Hi , I have a huge data set (192840 x 5) and would like to convert the date and time format. The data looks something like below : 0 03/01/1983 01:00-0.10 359.0 0 03/01/1983 02:00-0.10 359.0 0 03/01/1983 03:00-0.10 359.0 0 03/01/1983 04:0

[R] Data Handling

2010-07-30 Thread Lily_stats
Hi, I am very new to R so these questions may seem simple! I have a huge 2 sets of data(matrix 5x2++) in the following formats , for example "data.txt" and "data2.txt": Date Time X Y 03/03/1983 20:00 0.1 990 I would like to recre

Re: [R] Data Handling

2010-07-30 Thread Lily_stats
Hi, I am trying to convert my dataset into xts. I have tried the following : data1<-read.table("data1.txt",header=F) data2<-read.table("data2.txt",header=F) data1.xtshttp://r.789695.n4.nabble.com/Data-Handling-tp2307770p2307936.html Sent from the R help mailing list archive at Nabble.com.