From jduquelazo at gmail.com Mon Jul 1 09:32:02 2013 From: jduquelazo at gmail.com (Joaquin DL) Date: Mon, 1 Jul 2013 09:32:02 +0200 Subject: [Biomod-commits] Export a single raster Message-ID: Dear all, how it is posible to export the result of the ensemble projection funtion into a single raster format? Thanks Joaquin Duque From damien.georges2 at gmail.com Mon Jul 1 10:21:43 2013 From: damien.georges2 at gmail.com (Damien Georges) Date: Mon, 01 Jul 2013 10:21:43 +0200 Subject: [Biomod-commits] Export a single raster In-Reply-To: References: Message-ID: <51D13C17.7060007@gmail.com> Dear Joaquin, With which version of biomod2 do you work with? In the latest version, it is 'automatically done' by BIOMOD_EnsembleForecasting() function which will save on your hard drive a rasterStack (if your explanatory variables are stored under rasterStack format) or a data.frame (in all other cases). If the exported format is not convenient you have to load (stack() or load()) the file produced and resave it under the format you want (writeRaster()). Hope that helps, Damien. On 01/07/2013 09:32, Joaquin DL wrote: > Dear all, > > how it is posible to export the result of the ensemble projection funtion > into a single raster format? > > Thanks > > Joaquin Duque > _______________________________________________ > Biomod-commits mailing list > Biomod-commits at lists.r-forge.r-project.org > https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/biomod-commits From jduquelazo at gmail.com Tue Jul 9 11:26:04 2013 From: jduquelazo at gmail.com (Joaquin DL) Date: Tue, 9 Jul 2013 11:26:04 +0200 Subject: [Biomod-commits] Error GAM Message-ID: Dear all, I am running Biomod2 (version 2.1.15) with diferent species and prevalence. I always got this error for GAM. Error in smooth.construct.tp.smooth.spec(object, dk$data, dk$knots) : A term has fewer unique covariate combinations than specified maximum degrees of freedom Error in predict(model.bm, Data[, expl_var_names, drop = FALSE], on_0_1000 = TRUE) : error in evaluating the argument 'object' in selecting a method for function 'predict': Error: object 'model.bm' not found How can I solve it? Thanks Joaquin From ajcanepa at gmail.com Tue Jul 9 12:01:18 2013 From: ajcanepa at gmail.com (Antonio Canepa) Date: Tue, 9 Jul 2013 12:01:18 +0200 Subject: [Biomod-commits] Error GAM In-Reply-To: References: Message-ID: Hi Joaquin, It seems that you need to specify 'manually' the amount of degrees of freedom s(x1, k=3), if you would like to use a quadratic response (k=3), for instance. Cheers, Antonio On 9 July 2013 11:26, Joaquin DL wrote: > Dear all, > > I am running Biomod2 (version 2.1.15) with diferent species and prevalence. > I always got this error for GAM. > > Error in smooth.construct.tp.smooth.spec(object, dk$data, dk$knots) : > A term has fewer unique covariate combinations than specified maximum > degrees of freedom > Error in predict(model.bm, Data[, expl_var_names, drop = FALSE], on_0_1000 > = TRUE) : > error in evaluating the argument 'object' in selecting a method for > function 'predict': Error: object 'model.bm' not found > > How can I solve it? > > Thanks > > Joaquin > _______________________________________________ > Biomod-commits mailing list > Biomod-commits at lists.r-forge.r-project.org > https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/biomod-commits > -- Antonio Canepa Oneto PhD student Dept. Biologia Marina i Oceanografia Institut de Ciencies Del Mar CMIMA, CSIC Ps. Mar?tim de la Barceloneta,37-49, c.p. 08003 BARCELONA, Catalunya,Spain Phone: +34 932 30 9500 (ext. 6067) Mobile: +34 628 320 778 e-mail: canepa at icm.csic.es ajcanepa at gmail.com From wilfried.thuiller at ujf-grenoble.fr Tue Jul 9 17:18:03 2013 From: wilfried.thuiller at ujf-grenoble.fr (Wilfried Thuiller) Date: Tue, 9 Jul 2013 17:18:03 +0200 Subject: [Biomod-commits] Error GAM In-Reply-To: References: Message-ID: Hi Joaquim, Do you have a categorical data non-specified as factor? These usuals bugs come when you have a variable with one or more different values but not many (typically a factor). GAM tries to make a smoothing function out of that and then crashed. Cheers Wilfried Le 9 juil. 2013 ? 12:01, Antonio Canepa a ?crit : > Hi Joaquin, > It seems that you need to specify 'manually' the amount of degrees of > freedom s(x1, k=3), if you would like to use a quadratic response (k=3), > for instance. > Cheers, > > Antonio > > > > On 9 July 2013 11:26, Joaquin DL wrote: > >> Dear all, >> >> I am running Biomod2 (version 2.1.15) with diferent species and prevalence. >> I always got this error for GAM. >> >> Error in smooth.construct.tp.smooth.spec(object, dk$data, dk$knots) : >> A term has fewer unique covariate combinations than specified maximum >> degrees of freedom >> Error in predict(model.bm, Data[, expl_var_names, drop = FALSE], on_0_1000 >> = TRUE) : >> error in evaluating the argument 'object' in selecting a method for >> function 'predict': Error: object 'model.bm' not found >> >> How can I solve it? >> >> Thanks >> >> Joaquin >> _______________________________________________ >> Biomod-commits mailing list >> Biomod-commits at lists.r-forge.r-project.org >> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/biomod-commits >> > > > > -- > Antonio Canepa Oneto > PhD student > Dept. Biologia Marina i Oceanografia > Institut de Ciencies Del Mar CMIMA, CSIC > Ps. Mar?tim de la Barceloneta,37-49, c.p. 08003 > BARCELONA, Catalunya,Spain > Phone: +34 932 30 9500 (ext. 6067) > Mobile: +34 628 320 778 > e-mail: canepa at icm.csic.es > ajcanepa at gmail.com > _______________________________________________ > Biomod-commits mailing list > Biomod-commits at lists.r-forge.r-project.org > https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/biomod-commits ----------------------------- Dr. Wilfried Thuiller Laboratoire d'Ecologie Alpine, UMR CNRS 5553 Universit? Joseph Fourier BP53, 38041 Grenoble cedex 9, France tel: +33 (0)4 76 51 44 97 fax: +33 (0)4 76 51 42 79 Email: wilfried.thuiller at ujf-grenoble.fr Personal website: http://www.will.chez-alice.fr Team website: http://www-leca.ujf-grenoble.fr/equipes/emabio.htm ERC Starting Grant TEEMBIO project: http://www.will.chez-alice.fr/Research.html From jduquelazo at gmail.com Wed Jul 10 16:15:06 2013 From: jduquelazo at gmail.com (Joaquin DL) Date: Wed, 10 Jul 2013 16:15:06 +0200 Subject: [Biomod-commits] Error: protect(): protection stack overflow. Message-ID: Dear all, I am running biomod2 2.1.15. I got this Error: protect(): protection stack overflow. It might be something related with R environment I tried max(ppsize) but the error still exits. It mainly occurs running Maxent. Any idea? Thanks Joaquin From jduquelazo at gmail.com Thu Jul 25 09:18:29 2013 From: jduquelazo at gmail.com (Joaquin DL) Date: Thu, 25 Jul 2013 09:18:29 +0200 Subject: [Biomod-commits] Strange behaviour Message-ID: Dear all, I am running boimod2 (2.1.15) in R (3.0.1). I am working with 100x100 meters raster resolution in the extend of south of Spain. When running the function BIOMOD_Projection as follow, the software write all the individual raster outputs on the console what it takes too much time. myBiomodProj <- BIOMOD_Projection( modeling.output = myBiomodModelOut, new.env = myExpl, proj.name = 'current', xy.new.env = NULL, selected.models = 'all',## c('GLM','GBM','GAM','CTA','ANN','SRE','FDA','MARS','RF','MAXENT'), binary.meth = NULL,##'all', c('KAPPA', 'TSS', 'ROC','FAR', 'SR', 'ACCURACY', 'BIAS', 'POD', 'CSI', 'ETS') filtered.meth = NULL, compress = 'xy', ##'xy', 'gzip'??, NULL build.clamping.mask = FALSE, clamping.mask = FALSE, silent = TRUE, do.stack = TRUE) ! Results will be saved as individual RasterLayers because of a lack of memory ! > Projecting Pnigra.jul_AllData_RUN1_GBM ... > writting individual projection Could it be related to the store memory? I mean, is the console doing this because my outputs are too heavy? Thanks Joaqui From wilfried.thuiller at ujf-grenoble.fr Thu Jul 25 09:30:12 2013 From: wilfried.thuiller at ujf-grenoble.fr (Wilfried Thuiller) Date: Thu, 25 Jul 2013 09:30:12 +0200 Subject: [Biomod-commits] Strange behaviour In-Reply-To: References: Message-ID: Dear Joaquin Yes, we have implemented a routine using the raster package that test whether your computer has enough RAM to create Stacks. If it does not, it saves the individual rasters. Best Wilfried Le 25 juil. 2013 ? 09:18, Joaquin DL a ?crit : > Dear all, > > I am running boimod2 (2.1.15) in R (3.0.1). I am working with 100x100 > meters raster resolution in the extend of south of Spain. When running the > function BIOMOD_Projection as follow, the software write all the individual > raster outputs on the console what it takes too much time. > > myBiomodProj <- BIOMOD_Projection( > modeling.output = myBiomodModelOut, > new.env = myExpl, > proj.name = 'current', > xy.new.env = NULL, > selected.models = 'all',## > c('GLM','GBM','GAM','CTA','ANN','SRE','FDA','MARS','RF','MAXENT'), > binary.meth = NULL,##'all', c('KAPPA', 'TSS', 'ROC','FAR', 'SR', > 'ACCURACY', 'BIAS', 'POD', 'CSI', 'ETS') > filtered.meth = NULL, > compress = 'xy', ##'xy', 'gzip'??, NULL > build.clamping.mask = FALSE, > clamping.mask = FALSE, > silent = TRUE, > do.stack = TRUE) > > ! Results will be saved as individual RasterLayers because of a lack of memory ! >> Projecting Pnigra.jul_AllData_RUN1_GBM ... > >> writting individual projection > > > > Could it be related to the store memory? I mean, is the console doing this > because my outputs are too heavy? > Thanks > Joaqui > _______________________________________________ > Biomod-commits mailing list > Biomod-commits at lists.r-forge.r-project.org > https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/biomod-commits ----------------------------- Dr. Wilfried Thuiller Laboratoire d'Ecologie Alpine, UMR CNRS 5553 Universit? Joseph Fourier BP53, 38041 Grenoble cedex 9, France tel: +33 (0)4 76 51 44 97 fax: +33 (0)4 76 51 42 79 Email: wilfried.thuiller at ujf-grenoble.fr Personal website: http://www.will.chez-alice.fr Team website: http://www-leca.ujf-grenoble.fr/equipes/emabio.htm ERC Starting Grant TEEMBIO project: http://www.will.chez-alice.fr/Research.html From jenny.williams at kew.org Fri Jul 26 12:34:43 2013 From: jenny.williams at kew.org (Jenny Williams) Date: Fri, 26 Jul 2013 11:34:43 +0100 Subject: [Biomod-commits] Accessing XY coordinated for absence data Message-ID: I am trying to get an XY table of the pseudo-absence data generated in BIOMOD_FormatingData. I understand that the PA's are stored in the hidden folder, but not sure how to source them back to R and therefore extract to *.csv or *.txt I have tried : showClass("BIOMOD.formated.data") BIOMOD.formated.data$PA But only get an error: Error in BIOMOD_FormatingData$PA.table : object of type 'closure' is not subsettable ****************** Jenny Williams Spatial Information Scientist, GIS Unit Herbarium, Library, Art & Archives Directorate Royal Botanic Gardens, Kew Richmond, TW9 3AB, UK Tel: +44 (0)208 332 5277 email: jenny.williams at kew.org ****************** Film: The Forgotten Home of Coffee - Beyond the Gardens Stories: Coffee Expedition - Ethiopia Kew in Harapan Rainforest Sumatra Articles: Seeing the wood for the trees How Kew's GIS team and South East Asia botanists are working to help conserve and restore a rainforest in Sumatra. Download a pdf of this article here. ________________________________ The Royal Botanic Gardens, Kew is a non-departmental public body with exempt charitable status, whose principal place of business is at Royal Botanic Gardens, Kew, Richmond, Surrey TW9 3AB, United Kingdom. The information contained in this email and any attachments is intended solely for the addressee(s) and may contain confidential or legally privileged information. If you have received this message in error, please return it immediately and permanently delete it. Do not use, copy or disclose the information contained in this email or in any attachment. Any views expressed in this email do not necessarily reflect the opinions of RBG Kew. Any files attached to this email have been inspected with virus detection software by RBG Kew before transmission, however you should carry out your own virus checks before opening any attachments. RBG Kew accepts no liability for any loss or damage which may be caused by software viruses. From damien.georges2 at gmail.com Fri Jul 26 13:03:54 2013 From: damien.georges2 at gmail.com (Damien Georges) Date: Fri, 26 Jul 2013 13:03:54 +0200 Subject: [Biomod-commits] Accessing XY coordinated for absence data In-Reply-To: References: Message-ID: <51F2579A.80000@gmail.com> Dear Jenny, To get PA xy coordinates, you have to look within BIOMOD.formated.data object.. Here an example with biomod2 data.. You should be able to adapt it to your own case of study.. ########################################################## library(biomod2) # species occurrences DataSpecies <- read.csv(system.file("external/species/mammals_table.csv", package="biomod2"), row.names = 1) head(DataSpecies) # the name of studied species myRespName <- 'GuloGulo' # the presence only data for our species myResp <- as.numeric(DataSpecies[,myRespName]) myRespXY <- DataSpecies[myResp==1,c("X_WGS84","Y_WGS84")] myResp <- myResp[myResp==1] # Environmental variables extracted from BIOCLIM (bio_3, bio_4, bio_7, bio_11 & bio_12) myExpl = stack( system.file( "external/bioclim/current/bio3.grd", package="biomod2"), system.file( "external/bioclim/current/bio4.grd", package="biomod2"), system.file( "external/bioclim/current/bio7.grd", package="biomod2"), system.file( "external/bioclim/current/bio11.grd", package="biomod2"), system.file( "external/bioclim/current/bio12.grd", package="biomod2")) # 1. Formatting Data myBiomodData <- BIOMOD_FormatingData(resp.var = myResp, expl.var = myExpl, resp.xy = myRespXY, resp.name = myRespName, PA.nb.rep=3, PA.nb.absences=100) PA_coords_table <- cbind(myBiomodData at coord,myBiomodData at data.species,myBiomodData at PA) head(PA_coords_table) ## extract for xy for PA1 (pres, abs and PA) xyPA1_allpts <- PA_coords_table[ PA_coords_table$PA1 ,1:2] ## extract for xy for PA1 only PA xyPA1_onlyPApts <- PA_coords_table[ (PA_coords_table$PA1 & is.na(PA_coords_table[,3])),1:2] ########################################################## Hope that helps, Damien. On 26/07/2013 12:34, Jenny Williams wrote: > I am trying to get an XY table of the pseudo-absence data generated in BIOMOD_FormatingData. > > I understand that the PA's are stored in the hidden folder, but not sure how to source them back to R and therefore extract to *.csv or *.txt > > I have tried : > showClass("BIOMOD.formated.data") > BIOMOD.formated.data$PA > > But only get an error: > Error in BIOMOD_FormatingData$PA.table : > object of type 'closure' is not subsettable > > ****************** > Jenny Williams > Spatial Information Scientist, GIS Unit > Herbarium, Library, Art & Archives Directorate > Royal Botanic Gardens, Kew > Richmond, TW9 3AB, UK > > Tel: +44 (0)208 332 5277 > email: jenny.williams at kew.org > ****************** > > Film: The Forgotten Home of Coffee - Beyond the Gardens > Stories: Coffee Expedition - Ethiopia > Kew in Harapan Rainforest Sumatra > Articles: Seeing the wood for the trees > How Kew's GIS team and South East Asia botanists are working to help conserve and restore a rainforest in Sumatra. Download a pdf of this article here. > > > ________________________________ > The Royal Botanic Gardens, Kew is a non-departmental public body with exempt charitable status, whose principal place of business is at Royal Botanic Gardens, Kew, Richmond, Surrey TW9 3AB, United Kingdom. > > The information contained in this email and any attachments is intended solely for the addressee(s) and may contain confidential or legally privileged information. If you have received this message in error, please return it immediately and permanently delete it. Do not use, copy or disclose the information contained in this email or in any attachment. > > Any views expressed in this email do not necessarily reflect the opinions of RBG Kew. > > Any files attached to this email have been inspected with virus detection software by RBG Kew before transmission, however you should carry out your own virus checks before opening any attachments. RBG Kew accepts no liability for any loss or damage which may be caused by software viruses. > _______________________________________________ > Biomod-commits mailing list > Biomod-commits at lists.r-forge.r-project.org > https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/biomod-commits