oblarquez / paleofire

paleofire package
13 stars 2 forks source link

cannot run pfTransform function "Error in method" #11

Open yw637 opened 1 year ago

yw637 commented 1 year ago

Hi,

I am using paleofire v1.2.4 | GCD v4.0.7 in R version 4.3.0 in Win 10.

I am running my own data file with following code:

setwd("") myfile<-c("#1.csv","#2.csv") data_myfile=pfAddData(files=myfile) TR_myfile=pfTransform(add=data_myfile, method=c("MinMax","Box-Cox","Z-Score"),BasePeriod = c(0,12000))

and it came out with the last code

Error in method == "RunMean" || method == "RunMin" : 
  'length = 3' in coercion to 'logical(1)'

I noticed there is warning when I loadded the paleofire package

Loading required package: GCD
Please note that rgdal will be retired during October 2023,
plan transition to sf/stars/terra functions using GDAL and PROJ
at your earliest convenience.
See https://r-spatial.org/r/2023/05/15/evolution4.html and https://github.com/r-spatial/evolution
rgdal: version: 1.6-7, (SVN revision 1203)
Geospatial Data Abstraction Library extensions to R successfully loaded
Loaded GDAL runtime: GDAL 3.6.2, released 2023/01/02
Path to GDAL shared files: C:/Users/yw637/AppData/Local/R/win-library/4.3/rgdal/gdal
 GDAL does not use iconv for recoding strings.
GDAL binary built with GEOS: TRUE 
Loaded PROJ runtime: Rel. 9.2.0, March 1st, 2023, [PJ_VERSION: 920]
Path to PROJ shared files: C:/Users/yw637/AppData/Local/R/win-library/4.3/rgdal/proj
PROJ CDN enabled: FALSE
Linking to sp version:2.0-0
To mute warnings of possible GDAL/OSR exportToProj4() degradation,
use options("rgdal_show_exportToProj4_warnings"="none") before loading sp or rgdal.
This is paleofire v1.2.4 | GCD v4.0.7

I am wondering if there is a way to slove the problem.

Many thanks

rglueckler commented 7 months ago

Same issue here with the pfTransform() function, thanks for pointing it out here!