Re: [R-sig-Geo] Maptools package

2013-04-04 Thread Roger Bivand
On Thu, 4 Apr 2013, Jesse Berman wrote: Hi all, I've loaded the new version of R 3.0.0 and it seems the package 'maptools' is not available on the mirrors. It's not urgent, but I'm curious if anyone knows when it might become available? Thanks. This only applies to OSX for 3.0.0, 2.15.*

[R-sig-Geo] seemingly unresolved problem with predict() in package raster

2013-04-04 Thread Gonzalez-Mirelis Genoveva
Hi all, I have a problem with the function raster::predict very similar to the one described here [1], [2] using raster package version 2.0-41 and party package version 1.0-6, where my model is a conditional inference forest (party::cforest). Could not find a solution in either post. The

[R-sig-Geo] predict function of regressors in the raster package

2013-04-04 Thread Bouwmeester, Hein
Hi, I would like to make a raster, based on the regression coefficients with 5 other rasters (Predictors). In theory this should be easy using the predict function of the raster package (http://cran.r-project.org/web/packages/raster/raster.pdf). But I fail to get it to work. First I fit a

[R-sig-Geo] collect latitude/longitude of various countries

2013-04-04 Thread hnstedu
Dear list, How can I obtain the latitude/longitude of various countries? In addition, does anyone know how to calculate absolute latitude? wanhai Best regards [[alternative HTML version deleted]] ___ R-sig-Geo mailing list

Re: [R-sig-Geo] rgdal and MSSQL Server geometries

2013-04-04 Thread cmundy
Hi Shannon, The following syntax has worked for me for the past year. projstring - CRS('+init=epsg:28355') ##Establish the dsn # Note: use the odbc tool in Windows to create a dsn for your SQL Server database beforehand myMSSQLdsn -

[R-sig-Geo] Help converting matlab raster to R raster brick

2013-04-04 Thread cmundy
Hi All, I have been provided with a .mat file containing a time series of Sea Surface Temperature data (50 x 42 cells with 92 time layers). It was a Struct object in Matlab. I can happily import the file in to R using R.matlab, creating a list as follows. My question is how then to convert this

Re: [R-sig-Geo] predict function of regressors in the raster package

2013-04-04 Thread Jesse Berman
Hi Hein, I'm not sure if this will help, but one thing to check is that your prediction grid has covariate data for each of the 40,000 cells. If a large number of cells have 'NA' as data values, then sometimes the prediction will not work. Offhandedly, it strikes me that ycoord may be limited

Re: [R-sig-Geo] predict function of regressors in the raster package

2013-04-04 Thread Robert J. Hijmans
Hein, I think this problem goes away if you use a clean formula, like this: model - glm(t0~ycoord+prec+tempmean+tempmax+tempmin, family=binomial(link=logit), data=c3p) Robert On Thu, Apr 4, 2013 at 7:42 AM, Jesse Berman berman.je...@gmail.com wrote: Hi Hein, I'm not sure if this will

Re: [R-sig-Geo] seemingly unresolved problem with predict() in package raster

2013-04-04 Thread Robert J. Hijmans
cforest with factors are currently not supported (although they may work in some cases). I will change the predict function to make it more general by adding a 'levels' argument such that you can indicate (for models with a non-standard structure such as cforest) which variables are factors and

Re: [R-sig-Geo] rgdal and MSSQL Server geometries

2013-04-04 Thread Shannon E. Albeke
Craig, thanks for the idea. I did create a DSN using ODBC as well as using an explicit string connection. Both give me the same result of: 'Cannot open data source' Thus, I am thoroughly confused because I can connect to the SQL Server via all of my other methods (RODBC) and software with no

Re: [R-sig-Geo] rgdal and MSSQL Server geometries

2013-04-04 Thread cmundy
Hi Shannon, The other requirement to read tables from MS SQL Server is that details of the table with geometry columns must be registered in a table called geometry_columns in your database. If your database doesn't have this table, do the following; 1) write a small point or polygon object

Re: [R-sig-Geo] Help converting matlab raster to R raster brick

2013-04-04 Thread Michael Sumner
Hi Craig, see the array method for ?brick: brick(x, xmn=0, xmx=1, ymn=0, ymx=1, crs=NA So, something like x - brick(test$data[[2], xmn = min(test$data[[5]]), ymx = max(test$data[[5]]), ymn = min(test$data[[4]]), ymx = max(test$data[[4]])) You might need to mess around to get the x/y ranges

[R-sig-Geo] [raster] conserving dimensions when regridding a 4D Brick or Stack

2013-04-04 Thread Tom Roche
summary: When regridding a 4D Brick (e.g., the netCDF data variable Fraction_of_Emissions(TSTEP, LAY, ROW, COL) in netcdf GFED-3.1_2008_N2O_3hourly_fractions { dimensions: TSTEP = 12 ; LAY = 8 ; ROW = 360 ; COL = 720 ; variables: float Fraction_of_Emissions(TSTEP, LAY, ROW,