That script is simple broken, the object bat.asc is used but not defined anywhere. Since the code is also not really optimal, you may want to ask an expert who knows how to write such script and how to test if their code work in the end.

Best,
Uwe Ligges



On 14.05.2012 14:12, achughes wrote:

Dear Uwe
I did previously attach the script, but I include it again here in addition to 
current and future projections (which come from different directories).Help 
would very much be appreciated!
Alice

Date: Mon, 14 May 2012 04:52:04 -0700
From: ml-node+s789695n4629915...@n4.nabble.com
To: dr_achug...@hotmail.co.uk
Subject: Re: Overlapping area script



        

On 11.05.2012 11:06, achughes wrote:

Dear All





I would really appreciate some help with a script which a colleague wrote

for me (attached), but I am having problems running (and have not been able

to contact my colleague).


I think you have to contact your colleague or you have to provide the

full script including the objects trhat are used within that script.

The error message told you that the  object 'bat.asc' was not found.

My suggestion would be to contact a local expert if your colleague is

unavailable.


Best,

Uwe Ligges



The script is designed to compare the area of suitable habitat in binary

projections of a large number of species current and future distributions,

and create an excel file detailing the total area suitable in the present

and future scenario, in addition to the area which overlaps.

These maps are made from Maxent outputs, which have been reclassified to

give binary projections for each species and will be used to assess how

climatic change may potentially effect the total area which is suitable for

each species. However despite considerable effort I cannot get the attached

script to run. It creates an excel with the first species current and future

areas of suitable extent detailed, but "NA" for overlap, then gives error

warnings (shown below), but changes I have tried have failed to make the

script run any further (though I have generated new error messages...)



Any help or advice would be very greatly appreciated, I can also send some

example files of current and future distributions if anyone thinks they

maybe able to help.

Thanks and best wishes



Alice C Hughes





"+ png(paste(out.dir, spp,'_overlap.png', sep=''),

width=nrow(spp.asc),height=ncol(spp.asc), units='px', res=300, pointsize=5,

bg='white') #start the plot

+ par(mar=c(0,0,0,0)+0.1) #remove any plot margins

+ image(overlap, ann=FALSE,axes=FALSE,col=cols, zlim=c(0,3)) #plot the

richness

+ legend.gradient(legend.pnts,cols=cols,limits=c(0,3), title='overlap',

cex=2)

+ dev.off()

+ }

Error in nrow(spp.asc) : object 'bat.asc' not found

In addition: There were 12 warnings (use warnings() to see them)



write.csv(overlap.matrix, paste(out.dir, "all_species.csv",sep=''))



http://r.789695.n4.nabble.com/file/n4625913/area2.r area2.r





--

View this message in context: 
http://r.789695.n4.nabble.com/Overlapping-area-script-tp4625913.html
Sent from the R help mailing list archive at Nabble.com.



______________________________________________

[hidden email] mailing list

https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

______________________________________________

[hidden email] mailing list

https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


        
        

        

        
        
                If you reply to this email, your message will be added to the 
discussion below:
                
http://r.789695.n4.nabble.com/Overlapping-area-script-tp4625913p4629915.html
        
        
                
                To unsubscribe from Overlapping area script, click here.

                NAML
                                                

--
View this message in context: 
http://r.789695.n4.nabble.com/Overlapping-area-script-tp4625913p4629916.html
Sent from the R help mailing list archive at Nabble.com.
        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to