Dan Olsen | 20 Apr 07:56 2014
Picon

BRB AdehabitatLT help

Hello all,

  I would like to like to create UDs of each animal (killer whales) using
biased Brownian Bridge (adehabitatLT), then stack all the rasters to then
make UDs of the whole population, then compare volume overlap of subsets of
the population.

  Is this sequence correct?   Does anyone have any sample code that might
help with a section?  I am fairly new to R, but can adapt code.

Import data
Remove duplicate time entries
Change projection from WGS84 to AlaskaAlbers 3338
Create trajectory
Create UDs
Calculate UD areas, contours
# I have everything running until here

Create grid (asc)
Rasterize UDs
Stack rasters for individual tags
Create UDs from raster stacks for population subsets.
Use volume overlap to look at subset habitat use overlap

Thanks!

Dan

ps.  The following code seems to work so far with my data.  Any
recommendations are welcome!
(Continue reading)

Barry Rowlingson | 19 Apr 10:59 2014
Picon

Re: raster plotting problem

Try:

  plot(raster("flename"), useRaster=FALSE)

Its because the remote server supports raster graphics operations but the
client you are using to connect to the server (Windows Remote Session or
some RDP client) doesn't.

On Fri, Apr 18, 2014 at 12:49 PM, Ziyu Ma <paul.ziyu.ma <at> gmail.com> wrote:

>  Dear R-sig-geo,
>
>  I was having a problem of not being able to plot a raster, simply by:
>
>   plot(raster("somefilename"))
>
>  but the plot is blank (like the attached file). There was no error
> message, and apparently the plot function was reading the raster data
> because the scale was plotted.
>
>  I tried to plot several different data sets, even one raster generated
> from a matrix of all random numbers. They all turned out to be blank.
>
>  This is not my first time encountering this "blank raster plot" problem.
> I've seen this on other cases while working as a TA. It appeared on few
> computers while using completely the same data and codes as the others in
> the class.
>
>  I encountered this problem myself today while trying to remotely work on
> the lab's GIS server. The server was running on Windows 7 with an older
(Continue reading)

Ziyu Ma | 18 Apr 13:49 2014
Picon

raster plotting problem

Dear R-sig-geo,

I was having a problem of not being able to plot a raster, simply by:

 plot(raster("somefilename"))

but the plot is blank (like the attached file). There was no error message, and apparently the plot function was reading the raster data because the scale was plotted.

I tried to plot several different data sets, even one raster generated from a matrix of all random numbers. They all turned out to be blank.

This is not my first time encountering this "blank raster plot" problem. I've seen this on other cases while working as a TA. It appeared on few computers while using completely the same data and codes as the others in the class.

I encountered this problem myself today while trying to remotely work on the lab's GIS server. The server was running on Windows 7 with an older version of R. I updated to R 3.1.0 and updated all packages, but the problem persists.

Have anyone encountered this before? What could be wrong in my case here?

Thank you very much.
Happy Easter holidays.

Ziyu Ma
PhD Student
Ecoinformatics & Biodiversity, 
Department of Bioscience, Aarhus University 
Ny Munkegade 114, DK-8000 Aarhus C, Denmark

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo <at> r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
James Rooney | 17 Apr 17:03 2014
Picon
Picon

areal data with point covariates

Dear List,

This is not strictly an R question so I hope it is allowed. I am a little unsure of what type of analysis I need to
use next so hoping someone can point me in the right direction.

I have point data representing cases of disease. I also have population data attached to polygons. I have
used this to calculate areal standardised incidence rates and applied the BYM model via Bayesian methods
to draw a smoothed relative risks map.
Now I would like to check for correlation between this risk and spatial data from other sources - e.g. soil
mineral measurements etc. Note that the cases and soil measurements are not colocated.
What should be my next step ? Do I need to krig the soil data and get mean values per polygon ? Or should I be
taking an entirely different approach here ?
Again apologies if this is off-topic.

Many thanks,
James
Bea GD | 17 Apr 13:09 2014
Picon

Overlay Spatial Points Data Frame over Raster Layer

Dear list,

I'd like to overlay points and associated attributes on a raster layer. 
Therefore, I'd like the points to give me more information than just its 
coordinates.

I show you with an example:

# 1.  Load data
# Points data: 'meuse.points' "SpatialPointsDataFrame"
data(meuse)
coordinates(meuse) <- ~x+y
meuse.points <- meuse

# Raster data: 'meuse.raster'
data(meuse.grid)
gridded(meuse.grid) <- ~x+y # SpatialPixelDataFrame
# Coerce to raster
meuse.raster <- raster(meuse.grid) # "RasterLayer"

# 2. Plotting
# Plot points with attributes
spplot(meuse.points, "soil", key.space = "bottom")

# Plot(meuse.raster)
plot(meuse.raster)

# Somehow, I'd like is to join these two plots above. I've been looking 
for information and trying different possibilities but none seems to 
work. Does anyone know what I'm not doing correctly?
# Plot points overlaying raster. It doesn't work!
plot(meuse.raster,
      addfun=(spplot(meuse.points, "soil", key.space="bottom")), add=T)

Many thanks in advance!
Ralf Schäfer | 17 Apr 12:14 2014
Picon

Re: R-sig-Geo Digest, Vol 128, Issue 17


> 
> Message: 9
> Date: Wed, 16 Apr 2014 19:23:09 +0200
> From: Roger Bivand <Roger.Bivand <at> nhh.no>
> To: Manuel Sp?nola <mspinola10 <at> gmail.com>
> Cc: "r-sig-geo <at> r-project.org" <r-sig-geo <at> r-project.org>
> Subject: Re: [R-sig-Geo] rgdal for iOS mavericks build (R 3.1.0)
> Message-ID: <alpine.LRH.2.03.1404161913120.18290 <at> reclus.nhh.no>
> Content-Type: text/plain; charset="iso-8859-15"; Format="flowed"
> 
> On Wed, 16 Apr 2014, Manuel Sp?nola wrote:
> 
>> Dear list members,
>> 
>> I am using R 3.1.0 mavericks build but I noticed that rgdal is not
>> available yet.  Any idea when will be available?
> 
> Thanks for the heads-up - this is not something the rgdal maintainer or 
> developers can answer (also I have no OSX access of any kind, let alone 
> Mavericks). Please ask on R-sig-mac to establish the current situation - 
> it may be that the new Apple build trains are creating problems for GDAL 
> and PROJ, and if they cannot be built easily, the rgdal binaries will also 
> not be forthcoming until this is dealt with. Please report back on replies 
> on R-sig-mac.
> 
> If you can install rgdal from source, look at:
> 
> http://www.kyngchaos.com/software/frameworks
> 
> for suitable frameworks for GDAL/PROJ (and GEOS if you need rgeos). There 
> are discussions related to Mavericks on Kyngchaos.
> 

The problems seem to have to do with the new built for Maverick.

However, you can download the package here:
http://cran.r-project.org/bin/macosx/contrib/3.1/
And install manually (local package with source code)

This works also for gstat, rgeos, spacetime and so on.

I found this solution here:
https://groups.google.com/forum/#!msg/r-sig-mac/3yrqRaMrSPQ/ERkzSsoYe-cJ

Best regards
Ralf
Andrew Bernj | 17 Apr 06:33 2014
Picon

Counting overlapping polygons in a given area

Hi,

I am used to work with ArcGIS but I am new to R spatial functionalities.
So, I have been searching in the archives of this list, but did not find a
previous question exaclty on what I have to accomplish.

It is the following. I have two shapefiles, one with US city and town
divisions, where each polygon is a city/town (UScities.shp) and another
with some US religious groups, where polygons represent the area where
there are significant followers of a given religion (USrelig.shp).

So, in UScities.shp of course the polygons do not overlap. While in
USrelig.shp polygons do overlap, since followers from different religions
can be present in the same place.

What I want do is to count how many religious groups according to
USrelig.shp there are in each city present in UScities.shp. It means, to
count how many polygons overlap in USrelig.shp for each polygon division
given by UScities.shp.

Is there a way to do that in R? Thanks in advance for any tip you may have
on this task.

Bernj

	[[alternative HTML version deleted]]
Moshood Agba Bakare | 17 Apr 02:08 2014
Picon
Picon

gstat Statistical measures of goodness fit of variogram model

Dear All,
The statistical measures of goodness of fit of variogram model to experimental variogram is often determined by Sums of squares error (SSErr) function of gstat library.Am I right to define this statistic to be summation of the product of weighting factor and squared of difference between experimental and model semivariance for the number of lag bins?
 
Please see the attached word document for the equation. Let me know if I am wrong please.
 
Moshood
Attachment (Statistical measure of goodness fit of variogram model.docx): application/vnd.openxmlformats-officedocument.wordprocessingml.document, 18 KiB
_______________________________________________
R-sig-Geo mailing list
R-sig-Geo <at> r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Gabriele Cozzi | 16 Apr 20:51 2014
Picon

Re: import kml with readOGR

Hi,

my understanding is that the second argument correspond to the kml layer
name, which is not necessarily the file name. However it is in my case, I
suppose (think).

>From opening my file with a text editor I get:
<Document><name>Sarikamis.kml</name>

The two arguments should correspond to the arguments:
dsn= data source name
layer= layer name

Gabriele

On Wed, Apr 16, 2014 at 7:21 PM, Frede Aakmann Tøgersen <frtog <at> vestas.com>wrote:

>  Hi
>
> I'm not close to my R right now. Can you explain to me what you think your
> second argument to readORG does?
>
> Br. Frede
>
>
> Sendt fra Samsung mobil
>
>
> -------- Oprindelig meddelelse --------
> Fra: Gabriele Cozzi
> Dato:16/04/2014 19.11 (GMT+01:00)
> Til: r-sig-geo
> Emne: [R-sig-Geo] import iml with readOGR
>
> Dear all,
>
> I am trying to import a kml (polygon) into R following the suggestions
> from:
>
> http://gis.stackexchange.com/questions/58131/how-to-efficiently-read-a-kml-file-into-r
>
> and
> https://stat.ethz.ch/pipermail/r-sig-geo/2010-May/008355.html
>
>
> the code I run is the following:
>
> S <- readOGR(“~/Documents/Sarikamis.kml", "Sarikamis”)
> and I also tried:
> S <- readOGR(“~/Documents/Sarikamis.kml", “Sarikamis.kml”)
>
> but I get the usual error:
> Error in ogrInfo(dsn = dsn, layer = layer, encoding = encoding, use_iconv =
> use_iconv) :
>   Cannot open file
>
>
> When I open the kml file using a text editor it reads as below (in blue),
> which makes me think that the kml file name is “Sarikamis” and the string
> is “Document/Sarikamis.kml”. But obviously I am doing something wrong, but
> I can’t understand what.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="
> http://www.google.com/kml/ext/2.2" xmlns:kml="
> http://www.opengis.net/kml/2.2"
> xmlns:atom="http://www.w3.org/2005/Atom">
> <Document>
> <name>Sarikamis.kml</name>
> <StyleMap id="msn_ylw-pushpin">
> <Pair>
> <key>normal</key>
> <styleUrl>#sn_ylw-pushpin</styleUrl>
> </Pair>
> <Pair>
> <key>highlight</key>
> <styleUrl>#sh_ylw-pushpin</styleUrl>
>                        ......
>                         ......
>
>
> Any advice is highly appreciated!
>
> I am running R 3.0.3 for Mac
>
>
> Best,
> Gabriele
>
>
> --
> Gabriele Cozzi
> Postdoctoral Research Associate
> Population Ecology Research Group
> http://www.popecol.org
>
> Zurich University
> Institute of Evolutionary Biology and Environmental Studies
> Winterthurerstr. 190
> 8057 Zurich - Switzerland
> E-mail: gabriele.cozzi <at> uzh.ch
> Phone: +41(0)44 635 49 12
> Fax: +41(0)16355711
> http://www.ieu.uzh.ch
>
>         [[alternative HTML version deleted]]
>
>

-- 
Gabriele Cozzi
Postdoctoral Research Associate
Population Ecology Research Group
http://www.popecol.org

Zurich University
Institute of Evolutionary Biology and Environmental Studies
Winterthurerstr. 190
8057 Zurich - Switzerland
E-mail: gabriele.cozzi <at> uzh.ch
Phone: +41(0)44 635 49 12
Fax: +41(0)16355711
http://www.ieu.uzh.ch

	[[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
Ferdinand Bersse | 16 Apr 19:58 2014
Picon

Multilevel spatial regression models, with spatial structure at the first level only

Dear list,

Is there a way to fit in R a multilevel model that accounts for the spatial
proximity/neighborhood that may exist between the cases in the first level?

I have found some older questions in R lists related to this issue, but all
related to fitting more complex models and usually with spatial correlation
in the higher-levels, what is a diferente task.

My first-level units are counties and second-level units are states. In my
model I have theoretical reasons to expect the countries of a same state to
be spatially correlated. While there is no reason to expect counties to be
spatially related to the counties of other states.

Thanks,

Ferdinand V. Bersse

	[[alternative HTML version deleted]]
Gabriele Cozzi | 16 Apr 19:10 2014
Picon

import iml with readOGR

Dear all,

I am trying to import a kml (polygon) into R following the suggestions from:
http://gis.stackexchange.com/questions/58131/how-to-efficiently-read-a-kml-file-into-r

and
https://stat.ethz.ch/pipermail/r-sig-geo/2010-May/008355.html

the code I run is the following:

S <- readOGR(“~/Documents/Sarikamis.kml", "Sarikamis”)
and I also tried:
S <- readOGR(“~/Documents/Sarikamis.kml", “Sarikamis.kml”)

but I get the usual error:
Error in ogrInfo(dsn = dsn, layer = layer, encoding = encoding, use_iconv =
use_iconv) :
  Cannot open file

When I open the kml file using a text editor it reads as below (in blue),
which makes me think that the kml file name is “Sarikamis” and the string
is “Document/Sarikamis.kml”. But obviously I am doing something wrong, but
I can’t understand what.

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="
http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2"
xmlns:atom="http://www.w3.org/2005/Atom">
<Document>
<name>Sarikamis.kml</name>
<StyleMap id="msn_ylw-pushpin">
<Pair>
<key>normal</key>
<styleUrl>#sn_ylw-pushpin</styleUrl>
</Pair>
<Pair>
<key>highlight</key>
<styleUrl>#sh_ylw-pushpin</styleUrl>
                       ......
                        ......

Any advice is highly appreciated!

I am running R 3.0.3 for Mac

Best,
Gabriele

-- 
Gabriele Cozzi
Postdoctoral Research Associate
Population Ecology Research Group
http://www.popecol.org

Zurich University
Institute of Evolutionary Biology and Environmental Studies
Winterthurerstr. 190
8057 Zurich - Switzerland
E-mail: gabriele.cozzi <at> uzh.ch
Phone: +41(0)44 635 49 12
Fax: +41(0)16355711
http://www.ieu.uzh.ch

	[[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

Gmane