[R-sig-Geo] Problem in ENFA: infinite or missing values

Michael Sumner mdsumner at gmail.com
Wed May 24 11:29:02 CEST 2017


Can you you put together a reproducible example ( reprex)? I'm happy to
help but the set up is too onerous.

I'd recommend using raster to count points and for gridded data generally
but the advice is perhaps too abstract without an example. cellFromXY gives
the right output for a point in cell count as a grouped aggregate summary,
 but it's a module requiring to be embedded in a workflow (which means it's
super powerful, efficient and flexible) rather than a high level solution
requiring no further composition.

Cheers, Mike


On Fri, 19 May 2017, 16:51 Perry Beasley-hall <
perry.beasley-hall at sydney.edu.au> wrote:

> Hello everyone,
> I'm trying to do an ENFA using the package adehabitatHS. I'm following the
> example code and am creating the 'pr' file using:
>
> pr <- slot(count.points(species, map), "data")[,1]
>
> Where 'species' is a .csv file with two columns of latitude and longitude,
> and 'map' is a SpatialGridDataFrame file of 23 .asc inputs. For reference,
> I'm importing my .asc files using readGDAL and then using the cbind command
> to put them into the 'map' file.
>
> I encounter the following warning message when trying to create 'pr':
>
> 1: In points2grid(points, tolerance, round) :
>   grid has empty column/rows in dimension 1
> 2: In points2grid(points, tolerance, round) :
>   grid has empty column/rows in dimension 2
>
> I assumed this would be alright, but I'm getting the subsequent error when
> I attempt the enfa command:
>
> enfa1 <- enfa(pc, pr, scannf = FALSE)
>
> Error in eigen(Se) : infinite or missing values in 'x'
>
> Some searching online has told me that this might mean not all of my rows
> in the 'species' .csv correspond to variables in the 'map' file, but I
> don't think this is the case for my dataset.
>
> Can anyone help me with this issue? Many thanks in advance.
> ____
>
> Perry Beasley-Hall
> PhD Candidate
> School of Life and Environmental Sciences
>
> THE UNIVERSITY OF SYDNEY
> Room 329, Edgeworth David Building A11
> Sydney NSW 2006, Australia
> E-mail: perry.beasley-hall at sydney.edu.au
> Phone: +61 420 494 584
>
>         [[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
>
-- 
Dr. Michael Sumner
Software and Database Engineer
Australian Antarctic Division
203 Channel Highway
Kingston Tasmania 7050 Australia

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list