Re: [R] Unexpected values obtained when reading in data using ncdf and ncdf4

2016-05-23 Thread Louise Mair
roblem, so thanks very much for your help! Best wishes, Louise -Original Message- From: Roy Mendelssohn - NOAA Federal [mailto:roy.mendelss...@noaa.gov] Sent: den 22 april 2016 17:31 To: Louise Mair Cc: r-help@r-project.org; David W. Pierce Subject: Re: [R] Unexpected values obt

[R] Unexpected values obtained when reading in data using ncdf and ncdf4

2016-04-22 Thread Louise Mair
Dear R Users, I am encountering a problem when reading nc files into R using the ncdf and ncdf4 libraries. The nc files are too large to attach an example (but if someone is interested in helping out I could send a file privately via an online drive), but the code is basic: for(i in 1:length(t

[R] Obtaining r-squared values from phylogenetic autoregression in ape

2012-06-18 Thread Louise Mair
Hello, I am trying to carry out a phylogenetic autoregression to test whether my data show a phylogenetic signal, but I keep calculating bizzare R-squared values. My script is: > library(ape) > x <- "R:1,GK:1)d:1,(MW:1,G:1)n:1)a:1,SPW:1)a:1,WB:1)b:1,(((SPBF:1,PBF:1)n:1,(HBF:1,SWF:1)c:1)

[R] Creating polygons from scattered points

2012-03-14 Thread Louise Mair
Hello, I have a distribution dataset for species consisting of xy coordinates at the 1km resolution, with only presence data. So a simplified example of a species distribution might be: y <- rbind(as.integer(rnorm(100,50,20)), as.integer(rnorm(200,100,30)), as.integer(rnorm(100,180,15))) x <- rbi

[R] chisq.test vs manual calculation - why are different results produced?

2012-02-20 Thread Louise Mair
Hello, I am trying to fit gamma, negative exponential and inverse power functions to a dataset, and then test whether the fit of each curve is good. To do this I have been advised to calculate predicted values for bins of data (I have grouped a continuous range of distances into 1km bins), and the

[R] creating categorical frequency tables from continuous data

2011-01-27 Thread Louise Mair
Hello, I am working with a dataset which essentially has only one column - a list of distances in metres, accurate to several decimal places. eg distance 1000 6403.124 1000 1414.214 1414.214 1000 I want to organise this into a frequency table, grouping into categories of 0 - 999, 1000 - 199