[R-sig-Geo] questions on spatial interpolation exercise(NL)
Edzer Pebesma
edzer.pebesma at uni-muenster.de
Mon Nov 24 09:41:56 CET 2014
Mengxi, please provide a minimal script that reproduces your error.
On 11/23/2014 11:51 PM, Mengxi Yang wrote:
> Dear list,
> I have a question on write.table. I found an nice exercise on spatial
> interpolation from
> http://spatial-analyst.net/wiki/index.php?title=Spatial_interpolation_exercises_(NL)#Spatial_prediction_of_daily_precipitation_in_the_Netherlands
>
> In this exercise, the date is 200906. but when I change to 201310. there is
> a wrong message like:
>
>> tmp <- readLines(paste(getwd(), "/", "monv_201310.txt", sep=""))
>> tmp <- gsub(pattern=' . ', replacement=' 0.0 ', tmp, fixed = TRUE)
>> tmp <- gsub(pattern='[[:space:]]{2,7}', replacement=',', tmp)
>> write.table(t(matrix(unlist(strsplit(tmp, ",")[-c(1:8)]), nrow=41)),
> "tmp.txt", col.names=FALSE, row.names=FALSE)
> Warning message:
> In matrix(unlist(strsplit(tmp, ",")[-c(1:8)]), nrow = 41) :
> data length [13625] is not a sub-multiple or multiple of the number of
> rows [41]
>
>
> I checked several month, some success but some not.
> Does anyone know what is the wrong with it? should I change something?
>
> Thank you very much.
>
> Mengxi Yang
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
--
Edzer Pebesma, Co-Editor-in-Chief Computers & Geosciences
Institute for Geoinformatics (ifgi), University of Münster
Heisenbergstraße 2, 48149 Münster, Germany. Phone: +49 251
83 33081 http://ifgi.uni-muenster.de GPG key ID 0xAC227795
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: OpenPGP digital signature
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20141124/57312653/attachment.bin>
More information about the R-sig-Geo
mailing list