[R-sig-Geo] assign coordinates(...) possible on rows?
Fabian Ries
fabian.ries at hydrology.uni-freiburg.de
Fri Mar 8 11:00:35 CET 2013
Dear all,
I want to realize spatial analysis on rainfall data on a five minute time
step.
The data has the following format.
Station Stat_01 Stat_02 Stat_03 Stat_04
X 180000 195900 181950 192150
Y 157550 150950 154550 141650
30.04.11 00:05 0 0 0 0
30.04.11 00:10 0 0 0 0
30.04.11 00:15 0 0 0 0
30.04.11 00:20 0 0 0 0
30.04.11 00:25 0.2 0.4 1.2 0
30.04.11 00:30 0 0 0 0
30.04.11 00:35 0 0 0 0
30.04.11 00:40 0 0 0 0
30.04.11 00:45 0 0 0 0
30.04.11 00:50 0 0 0 0
When I convert the data now into SpatialPointsDataFrame I have to assign
coordinates(data) < ~X+Y. All examples I saw until now are transposing
the data first so that the coordinates are changed to columns. If I follow
these examples and convert my data with t(data) I end up with a
SpatialPointsDataFrame with a huge amount of columns and have performance
problems to do some simple calculations through every object in the
dataframe.
I'm happy about any help
Cheers
Fabian
More information about the R-sig-Geo
mailing list