Re: [R] How to create gridded data

2019-03-25 Thread David L Carlson
li Sent: Monday, March 25, 2019 1:18 AM To: David L Carlson Cc: r-help Subject: Re: [R] How to create gridded data Now I have new question about this post. If the grid coordinates in DF1 are not complete, i.e. there are missing coordinates, how to fill these with -99 in the exported DF2? Th

Re: [R] How to create gridded data

2019-03-25 Thread lily li
> David L Carlson > Department of Anthropology > Texas A University > College Station, TX 77843-4352 > > From: lily li > Sent: Tuesday, November 13, 2018 10:50 PM > To: David L Carlson > Cc: Sarah Goslee ; R mailing list < > r-help@r-project

Re: [R] How to create gridded data

2018-11-15 Thread David L Carlson
University College Station, TX 77843-4352 From: lily li Sent: Tuesday, November 13, 2018 10:50 PM To: David L Carlson Cc: Sarah Goslee ; R mailing list Subject: Re: [R] How to create gridded data Thanks, Sarah's answer helps the question. Now how to change the gridded data back to DF1 format? I d

Re: [R] How to create gridded data

2018-11-14 Thread MacQueen, Don via R-help
> College Station, TX 77843-4352 > > > -Original Message- > From: R-help On Behalf Of Sarah Goslee > Sent: Tuesday, November 13, 2018 8:16 AM > To: lily li > Cc: r-help > Subject: Re: [R] How to create gridded data >

Re: [R] How to create gridded data

2018-11-13 Thread lily li
0 > > > David L Carlson > Department of Anthropology > Texas A University > College Station, TX 77843-4352 > > > -----Original Message----- > From: R-help On Behalf Of Sarah Goslee > Sent: Tuesday, November 13, 2018 8:16 AM &

Re: [R] How to create gridded data

2018-11-13 Thread David L Carlson
--- David L Carlson Department of Anthropology Texas A University College Station, TX 77843-4352 -Original Message- From: R-help On Behalf Of Sarah Goslee Sent: Tuesday, November 13, 2018 8:16 AM To: lily li Cc: r-help Subject: Re: [R] How to create gridded data If you

Re: [R] How to create gridded data

2018-11-13 Thread Sarah Goslee
If you want an actual spatial dataset, the best place to ask is R-sig-geo R has substantial capabilities for dealing with gridded spatial data, including in the sp, raster, and sf packages. Here's one approach, creating a SpatialGridDataFrame, which can be exported in any standard raster format

Re: [R] How to create gridded data

2018-11-13 Thread S Ellison
You might take a look at the reshape package, which switches from 'long' to 'wide' formats and vice versa in a fairly flexible way. S Ellison > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of lily li > Sent: 13 November 2018 07:22 > To: R mailing

Re: [R] How to create gridded data

2018-11-13 Thread Jim Lemon
Hi lily, Something like this should work: DF1<-read.table(text= "latitude longitude Precip 45.5 110.5 3.2 45.5 1115.0 45.5 111.5 1.8 45.5 1122.0 46 110.5 6.1 46 1114.5