set_tutorialdir()
has been removed as it is not used anywhere
within the package and the usefulness is limited.testthat
was happily passing the tests,
but checks failed. This has now been fixed.zonator
does not behave well with staged install because of some of the
hardcoded paths in the package. Disabling staged install is a stopgap measure
and ideally the path definition should be handled more gracefully.testthat
2.0.check_zonation()
was failing on Solaris. This patch-release tries to
fix that issue by using Sys.which()
as suggested by BDR, but it
cannot be tested before submitting to CRAN.zdat
. This is not true.zdat
package needed for development and building the vignettes is now
installed from Github using drat
. Accordingly, various checks are done to
condition some code to run only if zdat
is installed.zonator
website now generated using pkgdown
cost()
can be used to extract cost data from results.
Implemented for Zresults
and Zvariant
.file_path_relative_to()
can be used to
dynamically construct relative paths for spp data.copy_zvariant()
can be used to create a copy of an
existing variant with a new name.zonator
and placed to a separate data
package zdat
. This package is required for developing zonator
.XXX.features_info.txt
is now parsed into Zresults
objects. This way,
e.g. species distribution sum information becomes readilly available.zonator
in dir
inst/extdata/tutorial
have been truncated to avoid unportable long
paths strings.sppweights()<-
.plot_curves()
dynamically between ColorBrewer's
Set1
and Set2
. Where the former has better colors, the latter has more.create_spp()
accepts new argument recursive = TRUE
which will look for
rasters in target directory recursively.spp_file_dir
for create_spp()
accepsts multiple directories (in
vector) instead of just one.decimalplaces()
can figure out how many decimal places a number
has.save_zvariant()
now dynamically decides how to format weight
and alpha
column values based on max(decimalplaces(x))
in the vector.create_zproject()
now actually checkst if template dat-file exists.spp_file_pattern
in create_spp()
. Previous
version did find .tif and .img file, but also some directories.groupnames()<-
. This doesn't make much sense, so now there can be extra groups
in the value being assigned as long as as all group codes are found in the keys.regroup_curves()
always return a
ZGroupCurvesDataFrame
object.leaf_tags()
is a new utility function that can get leaf (outermost) tags
and their values in a nested list (used for dat-parsing).get_dat_param()
can be used to get values of a (valid) Zonation run
configuration parameter (i.e. the content of a dat-file) from a Zvariant
object.set_dat_param()
can be used to set values of a (valid) Zonation run
configuration parameter (i.e. the content of a dat-file) for a Zvariant
object.zparameters()
is used to fetch all accepted Zonation run configuration
parameters (i.e. parameters in the dat file). Can return just the parameter
names or a list of [[parameter_name]][[section]]
".show()
for Zvariant
now prints run configuration parameters as well.set_dat_param()
can be used to set run configuration parameters (i.e. dat
file parameters). Only valid parameters are accepted.get_dat_param()
can be used to get run configuration parameters (i.e. dat
file parameters).sppdata()<-
allows spp data to be modified. This is mostly needed in
creating/cpoying variants as editing spp data in place is not probably a good
idea.save_zvarint()
saves the current state of a Zvariant
object on the file
system. Saving can overwrite exisiting configuration files or create new.create_zproject()
now stops if spp_template_dir
doesn't exist. tools::file_path_sans_ext()
that can handle periods
(".") just before file extension.Zvariant
object when no groups were used initially
failed before (see issue #45.),
fixed now.read_ini()
renamed to read_dat()
.create_zproject()
no longer uses "do_" prefix when generating bat files.plyr
from the dependencies.ggplot2
>= 2.0.0. This way aes_()
can be used and CHECK
doesn't complain about "undefined global variables" anymore.create_zproject()
functionality has been split into two. create_zproject()
now handles the creation of a completely new Zonation project (also on the file
system) whereas load_zproject()
can be used to load existing Zonation
projects. This change creates a cleaner and more intuitice API. NOTE The
API for create_zproject()
has changed, so check your code.zonator
classes.dir.exists()
replaced with file.exists()
in spp-creation.plot_curves()
accepts new argument fix.y
which can be used to fix the
y-axis to [0, 1]. Useful e.g. plotting runs with condition layers.modified
slot of a zresults
object is now parsed from the run info file.
Not ideal, but couldn't figure out a way how to do this reliably on Linux.print()
and show()
methods are now implemented for objects of class
Zvariant
. Makes printing basic data a bit easier.RdYlBu
added. This ColorBrewer's 7-level RdYlBu palette.create_spp()
can be used to create spp files based on a
directory of input raster files.create_zproject()
now works by giving it a directory containing input
rasters based on which the spp files are created. read_ini()
.BrBG
added. This a slight variation from
ColorBrewer's 7-level BrBG scheme with the lowest value replaced with grey.Fix imports in roxygen2 docs
Generic group names assigned at initiation. If Zvariant object has groups enabled, assign generic group names "group1", "group2" to groups automatically.
Generic group ID larger than 10 would not get mapped right because of a sloppy
gsub-replacement. Regex fixed and groupnames()<-
should work correctly when
one has more than 10 groups.
get_variant()
for Zproject
objects now checks the input index properly
(~~issue34~~)
Trying to get rank rasters from a set of variants with no rank rasters available caused and error, now produces warnings and returns a NA.
ds_alpha()
that can be used to calculate alpha value for
distribution smoothing.weights
to sppweights
so that it doesn't overwrite base generic.Assigning group names now works correctly with generic default values and whenever groups (ids) are changed. (~~issue29~~)
Generic group naming now works, i.e. if group ids are changed group names get a generic value "group1", "group2" etc. (~~issue22~~)
Assigning group ids with groups()<-
now recalculates group specific
stats (min, mean, max, weighted mean) for defined groups. In other words,
it is now possible to define groups other than those defined in Zonation
groups file and have the group curves data calculated for the new groups.
cross_jaccard()
now returns a dataframe with correct RasterLayer names
colnames and rownames.
cross_jaccard()
now accpets a numeric vector of threshold values for
comparison.
jaccard()
now has additional parameters for controlling the thresholds for
rasters x
and y
being compared. Arguments xmin
, xmax
, ymin
, and
ymax
can be used to control which ranges of the raster values are compared.
New methods for class Zproject
:
Method rank_rasters()
accepts a new argument variants
which can be
either a character of numeric vector of variant names / IDs defining which
rank rasters are included in the RasterStack that is returned. Default is
to return all.
New methods for class Zvariant
:
weights()
returns a numeric vector of weights assigned to a
variant.Creating new Zproject object based on an existing Zonation project involves
reading in a lot of files and it can be useful to know the sequence of reading
in case something goes wront. create_zproject()
now accepts a new argument
debug=TRUE
which enables logging of file reading sequence. (~~issue28~~)
New methods for class Zvariant
:
groups()<-
nfeatures()
returns the number of features in a variantcheck_zonation()
fixed on Windows (~~issue26~~)ZCurvesDataFrame
:featurenames()
check_path()
works on Windows (~~issue23~~)Results vignette has bee updated.
Post-processign (PPA) LSM results are now handled by Zresults
. Results,
if present, are read in from the output folder. More specifically:
Class Zresults
now defines a new slot ppa.lsm
tha holds the content
of PPA LSM results
zlegend()
can be used to fetch Zonation rank raster map legend schemes. So
far only one scheme ("spectral") is implemented.
New methods for class Zproject
:
rank_rasters()
: returns a RasterStack
of all priority rank rasters
of all variants within a project
New methods for class Zvariant
:
Implented curves()
New methods for class Zvariant
and Zresults
:
rank_raster()
: returns RasterLayer
of priority rank raster of a given
variant or its resultsZproject
:variants()
: returns a list containing all the variants within a project
New methods for class Zvariant
and Zresults
:
outdir()
: returns the path to location of output dirctoryMaintance update, R CMD check and TravisCI test passes after few minor fixes.
Zcurves
has been refactored to 2 classes: ZCurvesDataFrame
and
ZGroupCurvesDataFrame
. Change was introduced mostly to handle performance
curves plotting more sensibly.Generic groupnames()
now returns a character vector instead of a named
character vector (with names being the original group numbers)
plot()
now works for ZCurvesDataFrame
and ZGroupCurvesDataFrame
objecs.
New methods for class Zresults
:
groupnames()
check_paths()
now deals with relative path components has_results()
now returns a list of logicals instead of a single logical
New methods for class Zresults
:
has_results()
: returns a list of TRUE/FALSE depending on whether the
particular results items (curves, grp.curves, rank, wrscr, prop) are available
or notNew classes Zresults
and Zcurves
. See docs for methods and structure.
New methods for class Zvariant
:
groupnames()<-
: assign human readable group namesgroupnames()
: get assigned unique groupnames and codeshas_results()
: returns TRUE/FALSE depending on whether the variant has
results or notresults()
: returns a Zresults
object specific to a Zvariant
objectZvariant
:featurenames()<-
: assign human readable feature namesfeaturenames()
: get assigned unique featurenamessppdata()
: return the whole spp data frame of a variantZvariant
. Groups are read in from the actual
Zonation input file and can be used (eventually) in many operations.Zvariant
:groups()
: returns a numeric vector containing group codes for featuresgroupnames()<-
: assign human readable group names to groupsgroupnames()
: get assigned unique groupnames with associated group codes
New utlity functions:
read_groups()
: read in Zonation groups fileZpoject
:names()
: returns a character vector of the names of variants in a project
New methods for class Zvariant
:
has_results()
: boolean indicating whether the variant already has associated
results
New utlity functions:
read.spp()
: read in spp filesAny scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.