[R] phyloclim help
David Winsemius
dwinsemius at comcast.net
Thu Jun 14 03:46:30 CEST 2012
On Jun 13, 2012, at 6:29 PM, Brent Hendrixson wrote:
>
> Hi all –
>
> My apologies if this is a redundant message. I am a newbie to R and
> have had a terrible time trying to figure out how to set up an
> analysis. I have installed and loaded the appropriate package
> (phyloclim), but I'm not sure I have defined the arguments correctly.
>
> The usage for the command I’m trying to perform is:
>
> niche.equivalency.test(spec, n, maxent, mx = 2000)
You might give the name of the package. (I'm not likely to have any
experience with that package, but it might ring a bell so someone with
the right background.)
>
> I am comfortable with the arguments "spec", "n", and "mx" but have
> had problems with "maxent"
>
> maxent is a list containing the location of the MAXENT
> application and its input files (see below)
>
>> From what I have gathered, the maxent argument is a list of four
>> elements:
>
> app the path to the MAXENT application (MAXENT
> is a JAVA program)
>
> samples the path to a SWD-formatted file with sample
> points (e.g., samples.csv)
>
> background the path to a SWD-formatted file with background
> points (e.g., background.csv)
>
> projections the path to a folder containing environmental GIS
> layers to be used for projection of the MAXENT models
>
> Suppose all of these files are placed into the directory “C:
> \Documents and Settings\hendrb\Desktop\R”. Can anyone determine if
> I'm on the right track with the following syntax or am I way off?
>
>> app <- file.path("C:\\Documents and Settings\\hendrb\\Desktop\\R\
>> \maxent.jar")
>> samples <- file.path("C:\\Documents and Settings\\hendrb\\Desktop\\R
>> \\allspecies_swd.csv")
>> background <- file.path("C:\\Documents and Settings\\hendrb\\Desktop
>> \\R\\background_swd.csv")
>> projections <- file.path("C:\\Documents and Settings\\hendrb\
>> \Desktop\\R")
>> maxent <- list(app, samples, background, projections)
>
> When I try to execute the command niche.equivalency.test based on
> the above information, I get the following statement:
>
>> niche.equivalency.test(spec, n = 10, maxent, mx = 2000)
> Error in read.table(file = file, header = header, sep = sep, quote =
> quote, :
> 'file' must be a character string or connection
Right. So what is the object named "spec"? The R interpreter is
expecting a file name or a connection object.
>
> I'm incredibly confused by all of this and sincerely appreciate any
> help you can provide.
>
> Regards,
>
> Brent
>
David Winsemius, MD
West Hartford, CT
More information about the R-help
mailing list