Package: fuzzySim Check: examples New result: ERROR Running examples in ‘fuzzySim-Ex.R’ failed The error most likely occurred in: > base::assign(".ptime", proc.time(), pos = "CheckExEnv") > ### Name: fuzzyRangeChange > ### Title: Range change based on continuous (fuzzy) values > ### Aliases: fuzzyRangeChange > > ### ** Examples > > # get an environmental favourability model for a rotifer species: > > data(rotif.env) > > names(rotif.env) [1] "TDWG4" "LEVEL_NAME" [3] "REGION_NAME" "CONTINENT" [5] "Area" "Altitude" [7] "AltitudeRange" "HabitatDiversity" [9] "HumanPopulation" "Latitude" [11] "Longitude" "Precipitation" [13] "PrecipitationSeasonality" "TemperatureAnnualRange" [15] "Temperature" "TemperatureSeasonality" [17] "UrbanArea" "Abrigh" [19] "Afissa" "Apriod" [21] "Bangul" "Bcalyc" [23] "Bplica" "Bquadr" [25] "Burceo" "Cgibba" [27] "Edilat" "Flongi" [29] "Kcochl" "Kquadr" [31] "Ktropi" "Lbulla" [33] "Lclost" "Lhamat" [35] "Lluna" "Llunar" [37] "Lovali" "Lpatel" [39] "Lquadr" "Mventr" [41] "Ppatul" "Pquadr" [43] "Pvulga" "Specti" [45] "Tpatin" "Tsimil" [47] "Ttetra" > > fav_current <- multGLM(rotif.env, sp.cols = 18, var.cols = 5:17, + step = TRUE, FDR = TRUE, trim = TRUE, P = FALSE, Fav = TRUE) $ + predictions All 291 observations used for model training; none reserved for model testing. => Building model 1 of 1 (Abrigh)... 13 input predictor variable(s) 10 variable(s) excluded by 'FDR' function TemperatureSeasonality, UrbanArea, AltitudeRange, Temperature, Longitude, TemperatureAnnualRange, Precipitation, Altitude, Latitude, PrecipitationSeasonality 0 variable(s) excluded by 'step' function 1 variable(s) excluded by 'modelTrim' function Area 2 variable(s) INCLUDED IN THE FINAL MODEL HabitatDiversity, HumanPopulation Finished! It took 0.1 secs. > > > # imagine you have a model prediction for this species in a future time > # (here we will create one by randomly jittering the current predictions) > > fav_imag <- jitter(fav_current, amount = 0.2) > fav_imag[fav_imag < 0] <- 0 > fav_imag[fav_imag > 1] <- 1 > > > # calculate range change given by current and imaginary future predictions: > > fuzzyRangeChange(fav_current, fav_imag) Error in plot.default(x = if (length(x) == 2) c(0.5, 2.5) else c(1, length(x)), : formal argument "ylab" matched by multiple actual arguments Calls: fuzzyRangeChange -> -> plot Execution halted