Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
Can anyone please tell me how to plot location data in the R language?
Suppose I have data "Date-time" with X and Y coordinates (latitude and Longitude) as mentioned below;I am trying to do in R language.
Date: 2016-02-25 17:21:09.147,
Location (2.39, 48.71)
To visualise your 3D data, you can use plot3d and combine it with datetick to format the time axes.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
I have a question about R prophet. I can plot the forecast using:
plot(
prophet_plot[[1]],
prophet_plot[[2]])
However, I would like to plot only the past X data points before the forecast and the forecast itself.
Namely, I am using data from 2013-01-01 until 2018-11-25 and making a forecast until 2018-12-25. What I would like to see on the plot is the data+forecast from 2015-11-25 until 2018-12-25.
So basically an xlim, but on a Prophet object.
Could someone help me with this?
Cheers,
Irina
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I have passive GPS data(approx 500000 spatial points) for around 10,000 vehicles.I need to find the first point for each of the vehicles.Each spatial point is associated with its own id.I need to get the first point from each id.
If your data.frame is called data1 and columns are vehicleID, x, y, etc.
data1[order(data1$vehicleID),]
If you want to just return the first point of each vehicle.
data1[data1$vehicleID==1,]
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I'm at the moment learning R from a fellow student. I have heard that it's possible to download data from Bloomberg and then, for example, calculate the Returns from Prices. Do I have to convert the data into a time series ?
An example would be great.
yes this is possible but you need be able access Bloomberg of course.
The code I'm using to download the data into R is:
start.date=as.Date('2016-01-04')
end.date= as.Date('2017-02-17')
opt = c("periodicitySelection"="DAILY")
blpConnect()
Bloombergdata=bdh(c("DAX Index", INDU Index"),"PX_LAST",start.date,end.date,options=opt,include.non.trading.days = TRUE)
After getting the data I transform this into time series with a function:
f.xts=function(dat.l){
out=as.xts(dat.l[,2],order.by=dat.l[,1])
return(out)}
out=na.locf(do.call("merge",lapply(data,f.xts)))
I hope this will help...
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
Is it possible to create correlation matrix in ggplot2 package that will include histograms and scatterplots of included variables?
I'm looking for something similar to the following graph generated with the gpairs() function from the YaleToolkit package.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
How to use the output from contour(), which is just x, y and z data, to make a shapefile of the contour lines for output into ArcMap?
As a matter of fact there is a function for that in package maptools: ContourLines2SLDF converts the output of contourLines into a SpatialLinesDataFrame object.
cl <- contourLines(volcano)
shp <- ContourLines2SLDF(cl)
You can then save it to a file using maptools's writeSpatialShape or rgdal's writeOGR.