diff --git a/.Rbuildignore b/.Rbuildignore index 883851f..f865e89 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -12,3 +12,5 @@ ^CODE_OF_CONDUCT\.md$ ^CONTRIBUTING\.md$ ^bdtopo_2_2_osm\.csv$ +^compareMultipleLCZ\.R$ +^createIntersect\.R$ diff --git a/DESCRIPTION b/DESCRIPTION index 548a6cd..35ef5fe 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: lczexplore Title: lczexplore -Version: 0.0.1.0003 +Version: 0.0.1.0029 Authors@R: c( person("Matthieu", "Gousseff", , "matthieu.gousseff@univ-ubs.fr", role = c("aut", "cre")), person(, "Centre National de la Recherche Scientifique, Lab-Sticc", role = "cph", comment = c(ORCID = "0000-0002-7106-2677")) @@ -9,7 +9,7 @@ Description: This lczexplore package automatize the comparison of sets of local License: LGPL (>= 3) Encoding: UTF-8 Roxygen: list(markdown = TRUE) -RoxygenNote: 7.2.3 +RoxygenNote: 7.3.2 Imports: RColorBrewer, cowplot, dplyr, @@ -22,16 +22,15 @@ Imports: RColorBrewer, units, rlang, grDevices, - DescTools, methods Suggests: tinytest, knitr, rmarkdown, testthat (>= 3.0.0), - png + png, + markdown Config/testthat/edition: 3 -VignetteBuilder: knitr LazyData: true Depends: R (>= 2.10) diff --git a/GeneralUniquenessSensib.png b/GeneralUniquenessSensib.png new file mode 100644 index 0000000..78d793c Binary files /dev/null and b/GeneralUniquenessSensib.png differ diff --git a/NAMESPACE b/NAMESPACE index ba26ad4..a3ccf73 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,5 +1,6 @@ # Generated by roxygen2: do not edit by hand +export(CohenKappa) export(LCZareas) export(areColors) export(compareLCZ) @@ -28,7 +29,6 @@ import(sf) import(tidyr) import(units) import(utils) -importFrom(DescTools,CohenKappa) importFrom(forcats,fct_recode) importFrom(ggplot2,aes) importFrom(ggplot2,geom_sf) @@ -36,7 +36,9 @@ importFrom(ggplot2,ggtitle) importFrom(ggplot2,guides) importFrom(grDevices,palette.colors) importFrom(magrittr,"%>%") +importFrom(stats,qnorm) importFrom(stats,quantile) importFrom(terra,as.polygons) importFrom(terra,crop) importFrom(terra,rast) +importFrom(tidyr,drop_na) diff --git a/R/CohenKappa.R b/R/CohenKappa.R new file mode 100644 index 0000000..601eb45 --- /dev/null +++ b/R/CohenKappa.R @@ -0,0 +1,126 @@ +#' Compute Cohen's Kappa Coefficient. Taken from descTools, +#' who based it on Kappa from library(vcd) +#' author: David Meyer +#' see also: kappa in library(psych) +#' Integrated here to reduce dependecy to descTools as it is the only function from DescTools we used +#' Computes the agreement rates Cohen's kappa and weighted kappa and their confidence intervals. +#' +#' @param x can either be a numeric vector or a confusion matrix. +#' In the latter case x must be a square matrix, in lczexplore, +#' will take the matrix of agreement weighted by area for all intersected geometries +#' @param y not used here, but allows to compute cross table of x and y as an entry +#' @param weights either one out of \code{"Unweighted"} (default), \code{"Equal-Spacing"}, +#' \code{"Fleiss-Cohen"}, which will calculate the weights accordingly, +#' or a user-specified matrix having the same dimensions as x containing the weights for each cell. +#' @param conf.level confidence level of the interval. +#' If set to \code{NA} (which is the default) no confidence intervals will be calculated. +#' @param \dots further arguments are passed to the function \code{\link{table}}, +#' allowing i.e. to set \code{useNA}. This refers only to the vector interface. +#' @importFrom stats qnorm +#' @details Cohen's kappa is the diagonal sum of the (possibly weighted) relative frequencies, corrected for expected values and standardized by its maximum value. \cr +#' The equal-spacing weights (see Cicchetti and Allison 1971) are defined by \deqn{1 - \frac{|i - j|}{r - 1}} +#' \code{r} being the number of columns/rows, and the Fleiss-Cohen weights by \deqn{1 - \frac{(i - j)^2}{(r - 1)^2}} +#' The latter attaches greater importance to closer disagreements +#' @references Cohen, J. (1960) A coefficient of agreement for nominal scales. \emph{Educational and Psychological Measurement}, 20, 37-46. +#' Everitt, B.S. (1968), Moments of statistics kappa and weighted kappa. \emph{The British Journal of Mathematical and Statistical Psychology}, 21, 97-103. +#' Fleiss, J.L., Cohen, J., and Everitt, B.S. (1969), Large sample standard errors of kappa and weighted kappa. \emph{Psychological Bulletin}, 72, 332-327. +#' Cicchetti, D.V., Allison, T. (1971) A New Procedure for Assessing Reliability +#' of Scoring EEG Sleep Recordings \emph{American Journal of EEG Technology}, 11, 101-109. +#' @author David Meyer , some changes and tweaks Andri Signorell and +#' integrated for areas by Matthieu Gousseff +#' @return the value of this pseudoKappa +#' @export +#' +#' @examples +#' # from Bortz et. al (1990) Verteilungsfreie Methoden in der Biostatistik, Springer, pp. 459 +#' m <- matrix(c(53, 5, 2, +#' 11, 14, 5, +#' 1, 6, 3), nrow=3, byrow=TRUE, +#' dimnames = list(rater1 = c("V","N","P"), rater2 = c("V","N","P")) ) +#' # confusion matrix interface +#' CohenKappa(m, weight="Unweighted") +CohenKappa <- function (x, y = NULL, + weights = c("Unweighted", "Equal-Spacing", "Fleiss-Cohen"), + conf.level = NA, ...) { + + if (is.character(weights)) + weights <- match.arg(weights) + + if (!is.null(y)) { + # we can not ensure a reliable weighted kappa for 2 factors with different levels + # so refuse trying it... (unweighted is no problem) + + if (!identical(weights, "Unweighted")) + stop("Vector interface for weighted Kappa is not supported. Provide confusion matrix.") + + # x and y must have the same levels in order to build a symmetric confusion matrix + x <- factor(x) + y <- factor(y) + lvl <- unique(c(levels(x), levels(y))) + x <- factor(x, levels = lvl) + y <- factor(y, levels = lvl) + x <- table(x, y, ...) + + } else { + d <- dim(x) + if (d[1L] != d[2L]) + stop("x must be square matrix if provided as confusion matrix") + } + + d <- diag(x) + n <- sum(x) + nc <- ncol(x) + colFreqs <- colSums(x)/n + rowFreqs <- rowSums(x)/n + + kappa <- function(po, pc) { + (po - pc)/(1 - pc) + } + + std <- function(p, pc, k, W = diag(1, ncol = nc, nrow = nc)) { + sqrt((sum(p * sweep(sweep(W, 1, W %*% colSums(p) * (1 - k)), + 2, W %*% rowSums(p) * (1 - k))^2) - + (k - pc * (1 - k))^2) / crossprod(1 - pc)/n) + } + + if(identical(weights, "Unweighted")) { + po <- sum(d)/n + pc <- as.vector(crossprod(colFreqs, rowFreqs)) + k <- kappa(po, pc) + s <- as.vector(std(x/n, pc, k)) + + } else { + + # some kind of weights defined + W <- if (is.matrix(weights)) + weights + else if (weights == "Equal-Spacing") + 1 - abs(outer(1:nc, 1:nc, "-"))/(nc - 1) + else # weights == "Fleiss-Cohen" + 1 - (abs(outer(1:nc, 1:nc, "-"))/(nc - 1))^2 + + po <- sum(W * x)/n + pc <- sum(W * colFreqs %o% rowFreqs) + k <- kappa(po, pc) + s <- as.vector(std(x/n, pc, k, W)) + } + + if (is.na(conf.level)) { + res <- k + } else { + ci <- k + c(1, -1) * qnorm((1 - conf.level)/2) * s + res <- c(kappa = k, lwr.ci = ci[1], upr.ci = ci[2]) + } + + return(res) + +} + + + +# KappaTest <- function(x, weights = c("Equal-Spacing", "Fleiss-Cohen"), conf.level = NA) { +# to do, idea is to implement a Kappa test for H0: kappa = 0 as in +# http://support.sas.com/documentation/cdl/en/statugfreq/63124/PDF/default/statugfreq.pdf, pp. 1687 +# print( "still to do...." ) + +# } diff --git a/R/LCZareas.R b/R/LCZareas.R index b3f1c62..fa8b925 100644 --- a/R/LCZareas.R +++ b/R/LCZareas.R @@ -12,8 +12,18 @@ #' #LCZareas is not to be used directly by user. LCZareas<-function(sf,column,LCZlevels){ # Creation of a colum with geometry area - sf<-sf %>% mutate(area=st_area(geometry)) %>% drop_units + + sf<-tryCatch({ + mutate(sf,area=st_area(geometry)) %>% drop_units + }, + error=function(e){ + message("Some geometries don't seem valid, the function will try to make them valid, it may take a bit longer.") + sf %>% st_make_valid %>% mutate(area=st_area(geometry)) %>% drop_units + } + ) + + # area by LCZ LCZ areaLCZ<-sf %>% st_drop_geometry %>% group_by_at(.vars=column) %>% summarize(area=sum(area,na.rm=T))%>% diff --git a/R/compareLCZ.R b/R/compareLCZ.R index 5b6614e..ae56b13 100644 --- a/R/compareLCZ.R +++ b/R/compareLCZ.R @@ -37,7 +37,6 @@ #' The expected arguments are the name of each level of the variables contained #' in column1 and column2, and also a vector called colors. #' @importFrom ggplot2 geom_sf guides ggtitle aes -#' @importFrom DescTools CohenKappa #' @import sf dplyr cowplot forcats units tidyr RColorBrewer utils grDevices rlang #' @return returns graphics of comparison and an object called matConfOut which contains : #' matConfLong, a confusion matrix in a longer form, @@ -386,8 +385,9 @@ matConfLarge<-as.matrix(matConfLarge) # Add pseudo Kappa Statistic to output to PseudoWeightedCross<-matConfLarge*100 -pseudoK<-DescTools::CohenKappa(x=PseudoWeightedCross) -matConfOut$pseudoK<-pseudoK +# pseudoK<-DescTools::CohenKappa(x=PseudoWeightedCross) + pseudoK<-CohenKappa(x=PseudoWeightedCross) + matConfOut$pseudoK<-pseudoK areas<-matConfOut$areas percAgg<-matConfOut$percAgg diff --git a/R/createIntersect.R b/R/createIntersect.R new file mode 100644 index 0000000..aa6f182 --- /dev/null +++ b/R/createIntersect.R @@ -0,0 +1,39 @@ +createIntersec<-function(sfList, columns, refCrs=NULL, sfWf=NULL){ + echInt<-sfList[[1]] %>% select(columns[1]) + if (is.null(refCrs)){refCrs<-st_crs(echInt)} + for (i in 2:length(sfList)){ + sfProv<-sfList[[i]] %>% select(columns[i]) + if (st_crs(sfProv) != refCrs ) {sfProv<-st_transform(sfProv, crs=refCrs)} + echInt<-st_intersection(echInt,sfProv) + } + if (!is.null(sfWf) & length(sfWf) == length(sfList)){ + names(echInt)[1:(ncol(echInt)-1)]<-paste0("LCZ",sfWf) + } else { names(echInt)[1:(ncol(echInt)-1)]<-paste0("LCZ",1:length(sfList)) } + echInt +} + +# sfBDT_11_78030<-importLCZvect(dirPath="/home/gousseff/Documents/0_DocBiblioTutosPublis/0_ArticlesScientEtThèses/ArticleComparaisonLCZGCWUDAPTEXPERTS/BDT/2011/bdtopo_2_78030", +# file="rsu_lcz.fgb", column="LCZ_PRIMARY") +# class(sfBDT_11_78030) +# sfBDT_22_78030<-importLCZvect(dirPath="/home/gousseff/Documents/0_DocBiblioTutosPublis/0_ArticlesScientEtThèses/ArticleComparaisonLCZGCWUDAPTEXPERTS/BDT/2022/bdtopo_3_78030", +# file="rsu_lcz.fgb", column="LCZ_PRIMARY") +# sf_OSM_11_Auffargis<-importLCZvect(dirPath="/home/gousseff/Documents/0_DocBiblioTutosPublis/0_ArticlesScientEtThèses/ArticleComparaisonLCZGCWUDAPTEXPERTS/OSM/2011/osm_Auffargis/", +# file="rsu_lcz.fgb", column="LCZ_PRIMARY") +# sf_OSM_22_Auffargis<-importLCZvect(dirPath="/home/gousseff/Documents/0_DocBiblioTutosPublis/0_ArticlesScientEtThèses/ArticleComparaisonLCZGCWUDAPTEXPERTS/OSM/2022/osm_Auffargis/", +# file="rsu_lcz.fgb", column="LCZ_PRIMARY") +# sf_WUDAPT_78030<-importLCZvect("/home/gousseff/Documents/0_DocBiblioTutosPublis/0_ArticlesScientEtThèses/ArticleComparaisonLCZGCWUDAPTEXPERTS/WUDAPT", +# file ="wudapt_78030.geojson", column="lcz_primary") +# +# sfList<-list(BDT11 = sfBDT_11_78030, BDT22 = sfBDT_22_78030, OSM11= sf_OSM_11_Auffargis, OSM22 = sf_OSM_22_Auffargis, +# WUDAPT = sf_WUDAPT_78030) +# showLCZ(sfList[[1]]) +# +# +# +# intersected<-createIntersec(sfList = sfList, columns = c(rep("LCZ_PRIMARY",4),"lcz_primary"), +# sfWf = c("BDT11","BDT22","OSM11","OSM22","WUDAPT")) +# +# +# test_list<-list(a=c(1,2),b="top",c=TRUE) +# length(test_list) +# for (i in test_list[2:3]) print(str(i)) \ No newline at end of file diff --git a/R/importLCZvect.R b/R/importLCZvect.R index 6d2b443..d134401 100644 --- a/R/importLCZvect.R +++ b/R/importLCZvect.R @@ -18,6 +18,7 @@ #' dropped excepted those specified in previous parameters #' @import dplyr forcats rlang sf #' @importFrom terra crop +#' @importFrom tidyr drop_na #' @importFrom terra rast #' @return returns an sf object containing at least the geoms and the LCZ values, #' and if specified, columns for the IDs of the geoms and the confidence value of the LCZ levels. @@ -36,28 +37,48 @@ importLCZvect<-function(dirPath, file="rsu_lcz.geojson", output="sfFile", column "101"="A","102"="B","103"="C","104"="D","105"="E","106"="F","107"="G"), drop=T, verbose=FALSE){ if (!file.exists(dirPath)){stop(message="The directory set in dirPath doesn't seem to exist")} - - fileName<-paste0(dirPath,"/",file) + if ( substr(dirPath, start=nchar(dirPath), stop = nchar(dirPath)) == "/") { + fileName<-paste0(dirPath,file)} else { + fileName<-paste0(dirPath,"/",file) + } + # select only the needed column, that is the unempty strings among column, geomID and confid colonnes<-c(geomID,column,confid) colonnes<-colonnes[sapply(colonnes,nchar)!=0] # Check if all the desired columns are present in the source file and only loads the file if the columns exist + ### DOESN'T WORK WITH flatgeobuffer nom<-gsub(pattern="(.+?)(\\.[^.]*$|$)",x=file,replacement="\\1") - query<-paste0("select * from ",nom," limit 0") - sourceCol<-st_read(dsn=fileName, query=query, quiet=!verbose) %>% names - inCol<-colonnes%in%sourceCol - badCol<-colonnes[!inCol] - colErr<-c("It seems that some of the columns you try to import do not exist in the source file, - are you sure you meant ", - paste(badCol)," ?") - if (prod(inCol)==0){ stop(colErr) } else { - if (drop== TRUE) {sfFile<-sf::st_read(dsn=fileName,quiet=!verbose)[,colonnes] } else {sfFile<-sf::st_read(dsn=fileName,quiet=!verbose)[,]} + extension<-gsub(pattern="(.+?)(\\.[^.]*$|$)",x=file,replacement="\\2") + if (extension != ".fgb"){ # Some metadata for fgb files do not specify table/layer names + query<-paste0("select * from ",nom," limit 0") # So this query wouldn't work with such fgb files + sourceCol<-st_read(dsn=fileName, query=query, quiet=!verbose) %>% names + inCol<-colonnes%in%sourceCol + badCol<-colonnes[!inCol] + colErr<-c("It seems that some of the columns you try to import do not exist in the source file, + are you sure you meant ", + paste(badCol),"?") + if (prod(inCol)==0){ stop(colErr) } else { + if (drop== TRUE) {sfFile<-sf::st_read(dsn=fileName,quiet=!verbose)[,colonnes] } else { + sfFile<-sf::st_read(dsn=fileName,quiet=!verbose)[,]} + } + } else {if (extension == ".fgb") { + sfFile<-sf::st_read(dsn=fileName,quiet=!verbose)[,] + sourceCol<-names(sfFile) + inCol<-colonnes%in%sourceCol + badCol<-colonnes[!inCol] + colErr<-c("It seems that some of the columns you try to import do not exist in the source file, + are you sure you meant ", + paste(badCol),"?") + if (prod(inCol)==0){ stop(colErr) } + + } + } # if typeLevels is empty if (length(typeLevels)==1){ - typeLevels<-unique(subset(sfFile,select=column,drop=TRUE)) + typeLevels<-unique(subset(sfFile,select=all_of(column),drop=TRUE)) names(typeLevels)<-typeLevels } @@ -102,7 +123,8 @@ if (column!=""){ if(output=="sfFile"){return(sfFile)} else { if(output=="bBox"){ - bBox<-st_bbox(sfFile,crs=st_crs(sfFile)) %>% st_as_sfc + bBox<-st_bbox(sfFile,crs=st_crs(sfFile)) %>% st_as_sfc %>% st_make_valid(geos_keep_collapsed = FALSE) + return(bBox) } else { stop("Output must be sfFile to return geoms and LCZ or bBox to return the bounding box")} diff --git a/R/shinyGC/BDTproduction.R b/R/shinyGC/BDTproduction.R new file mode 100644 index 0000000..a170d1d --- /dev/null +++ b/R/shinyGC/BDTproduction.R @@ -0,0 +1,97 @@ +# Villes à produire +# # 78 +# nom de commune, insee +# Conflans-Sainte-Honorine, 78172 +# Saint-Rémy-lès-Chevreuse, 78575 +# Les Mureaux, 78440 +# Freneuse, 78255 +# Auffargis, 78030 +# Les Essarts-le-Roi, 78220 +# Orgeval, 78466 +# Rosny-sur-Seine, 78531 +# Saint-Léger-en-Yvelines, 78562 +# Poigny-la-Forêt, 78497 +# Blaru, 78068 +# Paray-Douaville, 78478 +# Le Tartre-Gaudran, 78606 + +# Test conflans 2011 : OK + +test<-geoClimateConfigFile(wf = "BDT", + date="2011", + BDTinFolder="/home/gousseff/Documents/3_data/BDTOPO/2011/", + locations="78172", + outConfigFile="", + outConfigDir = "/home/gousseff/Documents/0_DocBiblioTutosPublis/0_ArticlesScientEtThèses/ArticleComparaisonLCZGCWUDAPTEXPERTS", + outFolder = "/home/gousseff/Documents/0_DocBiblioTutosPublis/0_ArticlesScientEtThèses/ArticleComparaisonLCZGCWUDAPTEXPERTS", + rsuIndics = c("LCZ"), + writeNow = TRUE, + forceSRID=TRUE) + +geoClimateCall( + jarFilePath= "/home/gousseff/Documents/2_CodesSources/GeoClimate/Release1.0/geoclimate-1.0.0.jar", + configFilePath="/home/gousseff/Documents/0_DocBiblioTutosPublis/0_ArticlesScientEtThèses/ArticleComparaisonLCZGCWUDAPTEXPERTS/78172BDT2011.json", + wf="BDTOPO_V2") + +# Test conflans 2022 : + +test<-geoClimateConfigFile(wf = "BDT", + date="2022", + BDTinFolder="/home/gousseff/Documents/3_data/BDTOPO/2022/", + locations="78172", + outConfigFile="", + outConfigDir = "/home/gousseff/Documents/0_DocBiblioTutosPublis/0_ArticlesScientEtThèses/ArticleComparaisonLCZGCWUDAPTEXPERTS", + outFolder = "/home/gousseff/Documents/0_DocBiblioTutosPublis/0_ArticlesScientEtThèses/ArticleComparaisonLCZGCWUDAPTEXPERTS", + rsuIndics = c("LCZ"), + writeNow = TRUE, + forceSRID=TRUE) + +geoClimateCall( + jarFilePath= "/home/gousseff/Documents/2_CodesSources/GeoClimate/Release1.0/geoclimate-1.0.0.jar", + configFilePath="/home/gousseff/Documents/0_DocBiblioTutosPublis/0_ArticlesScientEtThèses/ArticleComparaisonLCZGCWUDAPTEXPERTS/78172BDT2022.json", + wf="BDTOPO_V3") + +city_code_78_93<-c("78172", "78575", "78440", "78255", "78030", "78220", "78466", + "78531", "78562", "78497", "78068", "78478", "78606", "93029", "93066", "93048") + +configDir<-"/home/gousseff/Documents/0_DocBiblioTutosPublis/0_ArticlesScientEtThèses/ArticleComparaisonLCZGCWUDAPTEXPERTS" +for (i in city_code_78){ + # 2011 + geoClimateConfigFile(wf = "BDT", + date="2011", + BDTinFolder="/home/gousseff/Documents/3_data/BDTOPO/2011/78/", + locations=i, + outConfigFile="", + outConfigDir = configDir, + outFolder = configDir, + rsuIndics = c("LCZ"), + writeNow = TRUE, + forceSRID=TRUE) + + confFile<-paste0(configDir, "/", i, "BDT2011.json") + + geoClimateCall( + jarFilePath= "/home/gousseff/Documents/2_CodesSources/GeoClimate/Release1.0/geoclimate-1.0.0.jar", + configFilePath=confFile, + wf="BDTOPO_V2") + + + # 2022 + geoClimateConfigFile(wf = "BDT", + date="2022", + BDTinFolder="/home/gousseff/Documents/3_data/BDTOPO/2022/78/", + locations=i, + outConfigFile="", + outConfigDir = configDir, + outFolder = configDir, + rsuIndics = c("LCZ"), + writeNow = TRUE, + forceSRID=TRUE) + + confFile<-paste0(configDir, "/", i, "BDT2022.json") + + geoClimateCall( + jarFilePath= "/home/gousseff/Documents/2_CodesSources/GeoClimate/Release1.0/geoclimate-1.0.0.jar", + configFilePath=confFile, + wf="BDTOPO_V3") + } diff --git a/R/shinyGC/geoClimateCall.R b/R/shinyGC/geoClimateCall.R new file mode 100644 index 0000000..47be5a0 --- /dev/null +++ b/R/shinyGC/geoClimateCall.R @@ -0,0 +1,43 @@ +#' Calls GeoClimate and feeds it a configuration file by building a command an using system (only tested on linux) +#' @param jarFilePath tells where the geoclimate jar file is, default points to the embedded jar file, +#' i.e. the latest snapshot version when the package was built. +#' Versions can be downloaded from https://github.com/orbisgis/geoclimate/wiki/Download +#' @param configFilePath points to the configuration JSON file for GeoClimate, typically a file created with the +#' geoClimateConfigFile function +#' @param wf is the workflow to use with GeoClimate, the default is OSM for OpenStreetMap. +#' The other possible value is "BDTOPO_V2". Other values will be added (e.g. for BDTOPO_V3) when tested. +#' @return returns nothing but files will be created by GeoClimate in the folder specified in the +#' JSON configuration file. +#' @export +#' @examples +#' test<-geoClimateConfigFile(outFile="", wf="osm",outFolder="/tmp",locations="Redon", +#' rsuIndics = c("LCZ","TEB","UTRF"), +#' gridIndics = c("BUILDING_FRACTION","BUILDING_HEIGHT","WATER_FRACTION","VEGETATION_FRACTION","ROAD_FRACTION", +#' "IMPERVIOUS_FRACTION","LCZ_PRIMARY","LCZ_FRACTION","UTRF")) +#' geoClimateCall( +#' jarFilePath= "/home/gousseff/Documents/2_CodesSources/GeoClimate/GeoClimateDefaultCaseV2/geoclimate-0.0.2-SNAPSHOT.jar", +#' configFilePath="/tmp/Redonosm.json",w="osm") +#' test +geoClimateCall<-function(jarFilePath, configFilePath, wf="OSM") { + command<-paste0( + "java -jar ", jarFilePath, " -f ", configFilePath, " -w ", toupper(wf)) + print(command) + system(command) +} + +# test<-geoClimateConfigFile(outFile="", wf="osm",outFolder="/tmp",locations="Allaire", +# rsuIndics = c("LCZ","TEB","UTRF"), +# gridIndics = c("BUILDING_FRACTION", +# "BUILDING_HEIGHT", +# "WATER_FRACTION", +# "VEGETATION_FRACTION", +# "ROAD_FRACTION", +# "IMPERVIOUS_FRACTION", +# "LCZ_PRIMARY", +# "LCZ_FRACTION", +# "UTRF")) +# +# geoClimateCall( +# jarFilePath= "/home/gousseff/Documents/2_CodesSources/GeoClimate/GeoClimateDefaultCaseV2/geoclimate-0.0.2-SNAPSHOT.jar", +# configFilePath="/tmp/Redonosm.json", wf="osm") +# test diff --git a/R/shinyGC/geoClimateConfigFile.R b/R/shinyGC/geoClimateConfigFile.R new file mode 100644 index 0000000..328c4f8 --- /dev/null +++ b/R/shinyGC/geoClimateConfigFile.R @@ -0,0 +1,145 @@ +#' Builds a JSON configuration file for GeoClimate workflow +#' @param locations is either the town or the coordinates of the bounding box of the area on which GeoClimate will run. +#' If a town name, it will be fed to the Nominoe API, through the overpass API of OpenStreetMap. +#' @param wf is the workflow used by GeoClimate. For now, only OSM" is available, for OpenStreetMap, but "BDT" for +#' BDTOPO of IGN should be added when an online database is available. +#' @param date is the date of the data we extract from OpenStreetMap. The format is "yyyy:mm:ddThh:mm:ssZ" +#' (for BDTOPO the version depends from the input data folder) +#' @param outFolder indicates where the results of GeoClimate will be put +#' @param rsuIndics is a vector with the indicators one wants to compute at the RSU scale. The default is c("LCZ","TEB","UTRF"), +#' @param svfSimplified uses the simplified method to calculate skyview factor, default = TRUE +#' @param estimatedHeight uses an algorithm to estimate the missing building height, default = TRUE +#' @param grid_x_size is the x size for the grid if some grid indicators are to be computed, default=100 +#' @param grid_y_size is the x size for the grid if some grid indicators are to be computed, default=100 +#' @param rowCol if grid_x_size and grid_y_size are not set, one cal set the number of rows and cols throug rowCol, +#' but the recommended and default is FALSE +#' @param outputType is the format of GeoClimate outputs, default="geojson", +#' @param gridIndics is a vector containing the indicators to compute at the grid scale. Default is +#' c("BUILDING_FRACTION", +#' "BUILDING_HEIGHT", +#' "WATER_FRACTION", +#' "VEGETATION_FRACTION", +#' "ROAD_FRACTION", +#' "IMPERVIOUS_FRACTION","LCZ_PRIMARY","LCZ_FRACTION","UTRF") +#' @param outConfigDir is the folder were the resulting JSON file will be put, the folder where GeoClimate will read it from +#' (different from out outFolder, where GeoClimates will put its geoJSON ouputs), default is "/tmp" +#' @param outConfigFile is the name of your configuration file, if and empty string, a name will be created from location +#' and workflow parameters. +#' @param forceSRID some BD TOPO input file may not have an srid, this forces srid to be 2154 +#' @importFrom jsonlite unbox toJSON +#' @return returns a JSON configuration file to be fed to GeoClimate +#' @export +#' @examples +#' test<-geoClimateConfigFile(outConfigFile="", wf="osm",outFolder="/tmp",locations="Redon", +#' rsuIndics = c("LCZ","TEB","UTRF"), +#' gridIndics = c("BUILDING_FRACTION","BUILDING_HEIGHT","WATER_FRACTION","VEGETATION_FRACTION","ROAD_FRACTION", +#' "IMPERVIOUS_FRACTION","LCZ_PRIMARY","LCZ_FRACTION","UTRF")) +#' test +geoClimateConfigFile<-function(wf, locations, forceSRID=FALSE, + outFolder="/tmp", + date, + rsuIndics=c("LCZ","TEB","UTRF"), + svfSimplified = TRUE, + estimatedHeight = TRUE, + grid_x_size=0, + grid_y_size=0, + rowCol = FALSE, + outputType = "geojson", + gridIndics="", + outConfigDir = "/tmp", + outConfigFile = "configFile", + BDTinFolder = "", BDTinseeCode=29301, + writeNow = FALSE) { + # description<-"Test de description unique" + + if (wf=="OSM"){description<-"Processing OSM data"} else { + if (wf=="BDTOPO_V2") {description<-"Processing BDTopo v2 data"} else { + if (wf=="BDTOPO_V3") { + description<-"Processing BDTopo v3 data"} + else { description<-paste0("Processing on an unrecognized workflow: ", wf) + } + } + } + + outFolder<-tryCatch( # This hideous tryCatch deals with weird shinyDirChoose behavior + { + list(folder=jsonlite::unbox(paste0(jsonlite::unbox(outFolder), + "/",wf,"/", substr(date,1,4)))) }, + error=function(e){ + list(folder="\tmp") + } + ) + + + if (wf == "OSM"){ + input<-list(locations=locations, date=jsonlite::unbox(date)) + } else { if (grep("BDT",wf)==1) { + if (forceSRID==FALSE){ + input<- + list( + folder= tryCatch( + jsonlite::unbox(BDTinFolder), + error=function(e){ + list(folder="\tmp") + }), + locations=locations + ) + } else { if (forceSRID==TRUE) { + input<- + list( + folder= tryCatch( + jsonlite::unbox(BDTinFolder), + error=function(e){ + list(folder="\tmp") + }) + , + locations=locations, + srid=jsonlite::unbox(2154)) + }} + }} + + +if(grid_x_size!=0 & grid_y_size!=0){ + parameters<-list( + rsu_indicators = list( + indicatorUse = rsuIndics, + svSimplified = jsonlite::unbox(svfSimplified), + estimatedHeight = jsonlite::unbox(estimatedHeight)), + grid_indicators = list( + x_size = jsonlite::unbox(grid_x_size), y_size = jsonlite::unbox(grid_y_size), + rowCol = jsonlite::unbox(rowCol), + output = jsonlite::unbox(outputType), + indicators = gridIndics + ) + ) +} else { + parameters<-list( + rsu_indicators = list( + indicatorUse = rsuIndics, + svSimplified = jsonlite::unbox(svfSimplified), + estimatedHeight = jsonlite::unbox(estimatedHeight))) +} + + listJSON <- list(description=jsonlite::unbox(description), input=input, output=outFolder, parameters=parameters) + + output<-toJSON(x=listJSON, + pretty=TRUE) + + + + if (outConfigFile=="") { outConfigFile<-paste0(locations,wf) } + + if (writeNow == TRUE){ + write(output,file=paste0(outConfigDir,"/",outConfigFile,substr(date,1,4),".json")) + } + + return(output) + +} +# +# library(jsonlite) +# test<-geoClimateConfigFile(outConfigFile="", wf="BDTOPO_V2.2",outFolder=list(folder="/tmp",srid=2154),locations="Allaire", +# rsuIndics = c("LCZ","TEB","UTRF"), +# gridIndics = c("BUILDING_FRACTION","BUILDING_HEIGHT","WATER_FRACTION","VEGETATION_FRACTION","ROAD_FRACTION", +# "IMPERVIOUS_FRACTION","LCZ_PRIMARY","LCZ_FRACTION","UTRF")) +# test diff --git a/R/shinyGC/run_all.R b/R/shinyGC/run_all.R new file mode 100644 index 0000000..860edd5 --- /dev/null +++ b/R/shinyGC/run_all.R @@ -0,0 +1,137 @@ +city_names_78_93<-c("Conflans-Sainte-Honorine", "Saint-Rémy-lès-Chevreuse", "Les Mureaux", "Freneuse", "Auffargis", + "Les Essarts-le-Roi", "Orgeval", "Rosny-sur-Seine", "Saint-Léger-en-Yvelines", "Poigny-la-Forêt", "Blaru", + "Paray-Douaville", "Le Tartre-Gaudran", "Drancy", "Saint-Denis", "Montreuil" ) + +configDir<-"/home/gousseff/Documents/0_DocBiblioTutosPublis/0_ArticlesScientEtThèses/ArticleComparaisonLCZGCWUDAPTEXPERTS" +outFolderRelease<-paste0(configDir,"/geojsonOut") +jarPath<-"/home/gousseff/Documents/2_CodesSources/GeoClimate/GC_2024_05_14/geoclimate-1.0.1-SNAPSHOT.jar" +jarPathRelease<-"/home/gousseff/Documents/2_CodesSources/GeoClimate/Release1.0/geoclimate-1.0.0.jar" + + +for (i in city_names_78_93) { + + # 2011 + geoClimateConfigFile(wf = "OSM", locations = i, + date="2011-01-01T12:00:00Z", + outConfigFile="", + outConfigDir = configDir, + outFolder = outFolderRelease, + rsuIndics = c("LCZ"), + writeNow = TRUE) + + confFile<-paste0(configDir,"/",i,"OSM2011.json") + + + + geoClimateCall( + jarFilePath= jarPathRelease, + configFilePath=confFile, + wf="osm") + + # 2022 + geoClimateConfigFile(wf = "OSM", locations = i, + date="2022-01-01T12:00:00Z", + outConfigFile="", + outConfigDir = configDir, + #outFolder = configDir, + outFolder = outFolderRelease, + rsuIndics = c("LCZ"), + writeNow = TRUE) + + confFile<-paste0(configDir,"/",i,"OSM2022.json") + + geoClimateCall( + jarFilePath= jarPathRelease, + configFilePath=confFile, + wf="osm") +} + +city_code_78<-c("78172", "78575","78440", "78255", "78030", "78220", "78466", "78531", "78562", "78497", "78068", "78478", "78606") + +city_code_93<-c( "93029", "93066", "93048") + + +for (i in city_code_93){ + # 2011 + geoClimateConfigFile(wf = "BDT", + date="2011", + BDTinFolder="/home/gousseff/Documents/3_data/BDTOPO/2011/93", + locations=i, + outConfigFile="", + outConfigDir = configDir, + # outFolder = configDir, + outFolder = outFolderRelease, + rsuIndics = c("LCZ"), + writeNow = TRUE, + forceSRID=TRUE) + + confFile<-paste0(configDir, "/", i, "BDT2011.json") + + geoClimateCall( + jarFilePath= jarPathRelease, + configFilePath=confFile, + wf="BDTOPO_V2") + + + # 2022 + geoClimateConfigFile(wf = "BDT", + date="2022", + BDTinFolder="/home/gousseff/Documents/3_data/BDTOPO/2022/93", + locations=i, + outConfigFile="", + outConfigDir = configDir, + # outFolder = configDir, + outFolder = outFolderRelease, + rsuIndics = c("LCZ"), + writeNow = TRUE, + forceSRID=TRUE) + + confFile<-paste0(configDir, "/", i, "BDT2022.json") + + geoClimateCall( + jarFilePath= jarPathRelease, + configFilePath=confFile, + wf="BDTOPO_V3") +} + +for (i in city_code_78){ + # 2011 + geoClimateConfigFile(wf = "BDT", + date="2011", + BDTinFolder="/home/gousseff/Documents/3_data/BDTOPO/2011/78", + locations=i, + outConfigFile="", + outConfigDir = configDir, + # outFolder = configDir, + outFolder = outFolderRelease, + rsuIndics = c("LCZ"), + writeNow = TRUE, + forceSRID=TRUE) + + confFile<-paste0(configDir, "/", i, "BDT2011.json") + + geoClimateCall( + jarFilePath = jarPathRelease, + configFilePath=confFile, + wf="BDTOPO_V2") + + + # 2022 + geoClimateConfigFile(wf = "BDT", + date="2022", + BDTinFolder="/home/gousseff/Documents/3_data/BDTOPO/2022/78", + locations=i, + outConfigFile="", + outConfigDir = configDir, + outFolder = outFolderRelease, + rsuIndics = c("LCZ"), + writeNow = TRUE, + forceSRID=TRUE) + + confFile<-paste0(configDir, "/", i, "BDT2022.json") + + geoClimateCall( + jarFilePath= jarPathRelease, + configFilePath=confFile, + wf="BDTOPO_V3") +} diff --git a/byLCZUniquenessSensib.png b/byLCZUniquenessSensib.png new file mode 100644 index 0000000..d0e3d03 Binary files /dev/null and b/byLCZUniquenessSensib.png differ diff --git a/comparaison.png b/comparaison.png new file mode 100644 index 0000000..2a0be71 Binary files /dev/null and b/comparaison.png differ diff --git a/comparison.png b/comparison.png new file mode 100644 index 0000000..797143a Binary files /dev/null and b/comparison.png differ diff --git a/inst/extdata/rasterMD.tif.aux.xml b/inst/extdata/rasterMD.tif.aux.xml new file mode 100644 index 0000000..4bfa29f --- /dev/null +++ b/inst/extdata/rasterMD.tif.aux.xml @@ -0,0 +1,65 @@ + + + lcz + + + -0.4722222222222222 + 17.47222222222222 + 18 + 0 + 1 + 0|1|0|32|0|3|76|0|18|63|0|275|113|0|74|7|8|170 + + + + YES + 17 + 11.604166666667 + 0 + 3.7743597891077 + 100 + + + + lczFilter + + + -0.4722222222222222 + 17.47222222222222 + 18 + 0 + 1 + 0|1|0|30|0|0|87|0|16|42|0|281|120|0|83|3|7|170 + + + + YES + 17 + 11.656400966184 + 0 + 3.7269818634172 + 100 + + + + classProbability + + + -0.495049504950495 + 100.4950495049505 + 101 + 0 + 1 + 0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|1|0|0|0|3|0|0|0|7|0|0|0|2|0|0|0|4|0|0|0|19|0|0|0|20|0|0|0|20|0|0|0|16|0|0|0|15|0|0|0|15|0|0|0|18|0|0|0|26|0|0|0|24|0|0|0|30|0|0|0|36|0|0|0|58|0|0|0|526 + + + + YES + 100 + 91.734299516908 + 0 + 14.569405187052 + 100 + + + diff --git a/inst/tinytest/test_compareLCZ.R b/inst/tinytest/test_compareLCZ.R index f5afca3..0bc4de1 100644 --- a/inst/tinytest/test_compareLCZ.R +++ b/inst/tinytest/test_compareLCZ.R @@ -27,7 +27,13 @@ expect_message(compareRedonBDTOSM<- "\\(redonOSM\\)") file.remove("bdtopo_2_2_osm.csv") - +compareLCZ(sf1=redonBDT, column1="LCZ_PRIMARY", geomID1 = "ID_RSU", confid1="LCZ_UNIQUENESS_VALUE", wf1="bdtopo_2_2", + sf2=redonOSM, column2="LCZ_PRIMARY", geomID2 = "ID_RSU", confid2="LCZ_UNIQUENESS_VALUE", wf2="osm", + repr="alter", ref=2, saveG="", exwrite=FALSE, location="Redon", plot=TRUE, urban=c("1","2","3","4","5","6","7","8","9"), + tryGroup=TRUE, industry="10", + vegetation=c("101","102","103","104"), + impervious="105",pervious="106",water="107", + colors=c("orange","black","darkGreen","grey","burlywood","blue")) expect_message(compareRedonBDTsquare<- compareLCZ(sf1=redonBDT, column1="LCZ_PRIMARY", geomID1 = "ID_RSU", confid1="LCZ_UNIQUENESS_VALUE", wf1="bdtopo_2_2", diff --git a/inst/tinytest/test_importLCZvect.R b/inst/tinytest/test_importLCZvect.R index 7598ac9..48b09dc 100644 --- a/inst/tinytest/test_importLCZvect.R +++ b/inst/tinytest/test_importLCZvect.R @@ -105,4 +105,14 @@ expect_warning(importLCZvect(dirPath=paste0(system.file("extdata", package = "lc test<-importLCZvect(dirPath=paste0( system.file("extdata", package = "lczexplore"),"/bdtopo_2_2/Redon"),file="rsu_lcz.geojson", column="LCZ_PRIMARY", geomID="ID_RSU", confid="LCZ_UNIQUENESS_VALUE", drop=FALSE) -expect_equal("LCZ_SECONDARY"%in%names(test),TRUE) \ No newline at end of file +expect_equal("LCZ_SECONDARY"%in%names(test),TRUE) + +# Special test with a flatgeobuffer file. +test<-importLCZvect(dirPath=paste0(system.file("extdata", package = "lczexplore"),"/bdtopo_2_2/Redon"), + column="LCZ_PRIMARY",geomID="ID_RSU",confid="LCZ_UNIQUENESS_VALUE",verbose=T) +if (file.exists("test.fgb")) file.remove("test.fgb") +write_sf(test, "test.fgb") +expect_silent(test<-importLCZvect(dirPath=getwd(),file="test.fgb", + column="LCZ_PRIMARY",geomID="ID_RSU",confid="LCZ_UNIQUENESS_VALUE",verbose=T)) +rm(test) +if (file.exists("test.fgb")) file.remove("test.fgb") diff --git a/inst/tinytest/test_showLCZ.R b/inst/tinytest/test_showLCZ.R index 0a6f4b2..9c819e2 100644 --- a/inst/tinytest/test_showLCZ.R +++ b/inst/tinytest/test_showLCZ.R @@ -12,9 +12,7 @@ expect_silent(showLCZ(redonBDT, drop=TRUE)) testCol <- palette.colors(n=17, palette="Polychrome 36") -# showLCZ(redonBDT, title="Zones climatiques locales à Redon",repr="alter", -# useStandCol=FALSE, -# colors = testCol ) +# showLCZ(redonBDT, title="Zones climatiques locales à Redon",repr="standard") # showLCZ(sf=redonOSM, wf="OSM", column="LCZ_PRIMARY", title="test", repr="alter", colors=testCol, useStandCol=FALSE) # # diff --git a/man/CohenKappa.Rd b/man/CohenKappa.Rd new file mode 100644 index 0000000..e5d2031 --- /dev/null +++ b/man/CohenKappa.Rd @@ -0,0 +1,73 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/CohenKappa.R +\name{CohenKappa} +\alias{CohenKappa} +\title{Compute Cohen's Kappa Coefficient. Taken from descTools, +who based it on Kappa from library(vcd) +author: David Meyer +see also: kappa in library(psych) +Integrated here to reduce dependecy to descTools as it is the only function from DescTools we used +Computes the agreement rates Cohen's kappa and weighted kappa and their confidence intervals.} +\usage{ +CohenKappa( + x, + y = NULL, + weights = c("Unweighted", "Equal-Spacing", "Fleiss-Cohen"), + conf.level = NA, + ... +) +} +\arguments{ +\item{x}{can either be a numeric vector or a confusion matrix. +In the latter case x must be a square matrix, in lczexplore, +will take the matrix of agreement weighted by area for all intersected geometries} + +\item{y}{not used here, but allows to compute cross table of x and y as an entry} + +\item{weights}{either one out of \code{"Unweighted"} (default), \code{"Equal-Spacing"}, +\code{"Fleiss-Cohen"}, which will calculate the weights accordingly, +or a user-specified matrix having the same dimensions as x containing the weights for each cell.} + +\item{conf.level}{confidence level of the interval. +If set to \code{NA} (which is the default) no confidence intervals will be calculated.} + +\item{\dots}{further arguments are passed to the function \code{\link{table}}, +allowing i.e. to set \code{useNA}. This refers only to the vector interface.} +} +\value{ +the value of this pseudoKappa +} +\description{ +Compute Cohen's Kappa Coefficient. Taken from descTools, +who based it on Kappa from library(vcd) +author: David Meyer +see also: kappa in library(psych) +Integrated here to reduce dependecy to descTools as it is the only function from DescTools we used +Computes the agreement rates Cohen's kappa and weighted kappa and their confidence intervals. +} +\details{ +Cohen's kappa is the diagonal sum of the (possibly weighted) relative frequencies, corrected for expected values and standardized by its maximum value. \cr +The equal-spacing weights (see Cicchetti and Allison 1971) are defined by \deqn{1 - \frac{|i - j|}{r - 1}} +\code{r} being the number of columns/rows, and the Fleiss-Cohen weights by \deqn{1 - \frac{(i - j)^2}{(r - 1)^2}} +The latter attaches greater importance to closer disagreements +} +\examples{ +# from Bortz et. al (1990) Verteilungsfreie Methoden in der Biostatistik, Springer, pp. 459 +m <- matrix(c(53, 5, 2, + 11, 14, 5, + 1, 6, 3), nrow=3, byrow=TRUE, + dimnames = list(rater1 = c("V","N","P"), rater2 = c("V","N","P")) ) +# confusion matrix interface +CohenKappa(m, weight="Unweighted") +} +\references{ +Cohen, J. (1960) A coefficient of agreement for nominal scales. \emph{Educational and Psychological Measurement}, 20, 37-46. +Everitt, B.S. (1968), Moments of statistics kappa and weighted kappa. \emph{The British Journal of Mathematical and Statistical Psychology}, 21, 97-103. +Fleiss, J.L., Cohen, J., and Everitt, B.S. (1969), Large sample standard errors of kappa and weighted kappa. \emph{Psychological Bulletin}, 72, 332-327. +Cicchetti, D.V., Allison, T. (1971) A New Procedure for Assessing Reliability +of Scoring EEG Sleep Recordings \emph{American Journal of EEG Technology}, 11, 101-109. +} +\author{ +David Meyer \href{mailto:david.meyer@r-project.org}{david.meyer@r-project.org}, some changes and tweaks Andri Signorell \href{mailto:andri@signorell.net}{andri@signorell.net} and +integrated for areas by Matthieu Gousseff +} diff --git a/man/importLCZraster.Rd b/man/importLCZraster.Rd index babf1c3..e96e5fb 100644 --- a/man/importLCZraster.Rd +++ b/man/importLCZraster.Rd @@ -58,9 +58,9 @@ redonBbox<-importLCZvect(dirPath=paste0(system.file("extdata", package = "lczexp redonWudapt<-importLCZraster(system.file("extdata", package = "lczexplore"), fileName="redonWudapt.tif",bBox=redonBbox) -# another way to get the bounding box when one explores a given city would be the use of the +# Another way to get the bounding box when one explores a given city would be the use of the # getbb() function from the osmdata package. -# This exaample requires the osmdata package and therefore is not executed here +# This example requires the osmdata package and therefore is not executed here # redonBbox<-osmdata::getbb("Redon") # redonWudapt<-importLCZraster(system.file("extdata", package = "lczexplore"), # fileName="redonWudapt.tif",bBox=redonBbox) diff --git a/renv.lock b/renv.lock index 0eee8cf..4add904 100644 --- a/renv.lock +++ b/renv.lock @@ -1,6 +1,6 @@ { "R": { - "Version": "4.3.0", + "Version": "4.4.1", "Repositories": [ { "Name": "CRAN", @@ -11,31 +11,31 @@ "Packages": { "DBI": { "Package": "DBI", - "Version": "1.1.3", + "Version": "1.2.3", "Source": "Repository", - "Repository": "CRAN", + "Repository": "https://packagemanager.posit.co/cran/__linux__/jammy/latest", "Requirements": [ "R", "methods" ], - "Hash": "b2866e62bab9378c3cc9476a1954226b" + "Hash": "065ae649b05f1ff66bb0c793107508f5" }, "KernSmooth": { "Package": "KernSmooth", - "Version": "2.23-20", + "Version": "2.23-24", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R", "stats" ], - "Hash": "8dcfa99b14c296bc9f1fd64d52fd3ce7" + "Hash": "9f33a1ee37bbe8919eb2ec4b9f2473a5" }, "MASS": { "Package": "MASS", - "Version": "7.3-59", + "Version": "7.3-61", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Requirements": [ "R", "grDevices", @@ -44,15 +44,16 @@ "stats", "utils" ], - "Hash": "26570ae748e78cb2b0f56019dd2ba354" + "Hash": "0cafd6f0500e5deba33be22c46bf6055" }, "Matrix": { "Package": "Matrix", - "Version": "1.5-4", + "Version": "1.7-0", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Requirements": [ "R", + "grDevices", "graphics", "grid", "lattice", @@ -60,7 +61,7 @@ "stats", "utils" ], - "Hash": "e779c7d9f35cc364438578f334cffee2" + "Hash": "1920b2f11133b12350024297d8a4ff4a" }, "R6": { "Package": "R6", @@ -84,14 +85,14 @@ }, "Rcpp": { "Package": "Rcpp", - "Version": "1.0.10", + "Version": "1.0.13", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "methods", "utils" ], - "Hash": "e749cae40fa9ef469b6050959517453c" + "Hash": "f27411eb6d9c3dada5edd444b8416675" }, "base64enc": { "Package": "base64enc", @@ -103,60 +104,42 @@ ], "Hash": "543776ae6848fde2f48ff3816d0628bc" }, - "brio": { - "Package": "brio", - "Version": "1.1.3", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "976cf154dfb043c012d87cddd8bca363" - }, "bslib": { "Package": "bslib", - "Version": "0.4.2", + "Version": "0.8.0", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R", "base64enc", "cachem", + "fastmap", "grDevices", "htmltools", "jquerylib", "jsonlite", + "lifecycle", "memoise", "mime", "rlang", "sass" ], - "Hash": "a7fbf03946ad741129dc81098722fca1" + "Hash": "b299c6741ca9746fb227debcb0f9fb6c" }, "cachem": { "Package": "cachem", - "Version": "1.0.8", + "Version": "1.1.0", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "fastmap", "rlang" ], - "Hash": "c35768291560ce302c0a6589f92e837d" - }, - "callr": { - "Package": "callr", - "Version": "3.7.3", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "R6", - "processx", - "utils" - ], - "Hash": "9b2191ede20fa29828139b9900922e51" + "Hash": "cd9a672193789068eb5a2aad65a0dedf" }, "class": { "Package": "class", - "Version": "7.3-21", + "Version": "7.3-22", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -165,13 +148,13 @@ "stats", "utils" ], - "Hash": "8ae0d4328e2eb3a582dfd5391a3663b7" + "Hash": "f91f6b29f38b8c280f2b9477787d4bb2" }, "classInt": { "Package": "classInt", - "Version": "0.4-9", + "Version": "0.4-10", "Source": "Repository", - "Repository": "CRAN", + "Repository": "https://packagemanager.posit.co/cran/__linux__/jammy/latest", "Requirements": [ "KernSmooth", "R", @@ -181,24 +164,24 @@ "graphics", "stats" ], - "Hash": "bee651a42a89633eccb36dca9d9ab413" + "Hash": "f5a40793b1ae463a7ffb3902a95bf864" }, "cli": { "Package": "cli", - "Version": "3.6.1", + "Version": "3.6.3", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R", "utils" ], - "Hash": "89e6d8219950eac806ae0c489052048a" + "Hash": "b21916dd77a27642b447374a5d30ecf3" }, "colorspace": { "Package": "colorspace", - "Version": "2.1-0", + "Version": "2.1-1", "Source": "Repository", - "Repository": "CRAN", + "Repository": "https://packagemanager.posit.co/cran/__linux__/jammy/latest", "Requirements": [ "R", "grDevices", @@ -206,11 +189,18 @@ "methods", "stats" ], - "Hash": "f20c47fd52fae58b4e377c37bb8c335b" + "Hash": "d954cb1c57e8d8b756165d7ba18aa55a" + }, + "commonmark": { + "Package": "commonmark", + "Version": "1.9.1", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "5d8225445acb167abf7797de48b2ee3c" }, "cowplot": { "Package": "cowplot", - "Version": "1.1.1", + "Version": "1.1.3", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -223,18 +213,21 @@ "rlang", "scales" ], - "Hash": "b418e8423699d11c7f2087c2bfd07da2" + "Hash": "8ef2084dd7d28847b374e55440e4f8cb" }, "cpp11": { "Package": "cpp11", - "Version": "0.4.3", + "Version": "0.5.0", "Source": "Repository", - "Repository": "CRAN", - "Hash": "ed588261931ee3be2c700d22e94a29ab" + "Repository": "RSPM", + "Requirements": [ + "R" + ], + "Hash": "91570bba75d0c9d3f1040c835cee8fba" }, "crayon": { "Package": "crayon", - "Version": "1.5.2", + "Version": "1.5.3", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -242,51 +235,22 @@ "methods", "utils" ], - "Hash": "e8a1e41acf02548751f45c718d55aa6a" - }, - "desc": { - "Package": "desc", - "Version": "1.4.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "R6", - "cli", - "rprojroot", - "utils" - ], - "Hash": "6b9602c7ebbe87101a9c8edb6e8b6d21" - }, - "diffobj": { - "Package": "diffobj", - "Version": "0.3.5", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "crayon", - "methods", - "stats", - "tools", - "utils" - ], - "Hash": "bcaa8b95f8d7d01a5dedfd959ce88ab8" + "Hash": "859d96e65ef198fd43e82b9628d593ef" }, "digest": { "Package": "digest", - "Version": "0.6.31", + "Version": "0.6.37", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R", "utils" ], - "Hash": "8b708f296afd9ae69f450f9640be8990" + "Hash": "33698c4b3127fc9f506654607fb73676" }, "dplyr": { "Package": "dplyr", - "Version": "1.1.2", + "Version": "1.1.4", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -305,13 +269,13 @@ "utils", "vctrs" ], - "Hash": "dea6970ff715ca541c387de363ff405e" + "Hash": "fedd9d00c2944ff00a0e2696ccf048ec" }, "e1071": { "Package": "e1071", - "Version": "1.7-13", + "Version": "1.7-14", "Source": "Repository", - "Repository": "CRAN", + "Repository": "https://packagemanager.posit.co/cran/__linux__/jammy/latest", "Requirements": [ "class", "grDevices", @@ -321,33 +285,22 @@ "stats", "utils" ], - "Hash": "1046cb48d06cb40c2900d8878f03a0fe" - }, - "ellipsis": { - "Package": "ellipsis", - "Version": "0.3.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "rlang" - ], - "Hash": "bb0eec2fe32e88d9e2836c2f73ea2077" + "Hash": "4ef372b716824753719a8a38b258442d" }, "evaluate": { "Package": "evaluate", - "Version": "0.21", + "Version": "0.24.0", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R", "methods" ], - "Hash": "d59f3b464e8da1aef82dc04b588b8dfb" + "Hash": "a1066cbc05caee9a4bf6d90f194ff4da" }, "fansi": { "Package": "fansi", - "Version": "1.0.4", + "Version": "1.0.6", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -355,25 +308,25 @@ "grDevices", "utils" ], - "Hash": "1d9e7ad3c8312a192dea7d3db0274fde" + "Hash": "962174cf2aeb5b9eea581522286a911f" }, "farver": { "Package": "farver", - "Version": "2.1.1", + "Version": "2.1.2", "Source": "Repository", - "Repository": "CRAN", - "Hash": "8106d78941f34855c440ddb946b8f7a5" + "Repository": "https://packagemanager.posit.co/cran/__linux__/jammy/latest", + "Hash": "680887028577f3fa2a81e410ed0d6e42" }, "fastmap": { "Package": "fastmap", - "Version": "1.1.1", + "Version": "1.2.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "f7736a18de97dea803bde0a2daaafb27" + "Hash": "aa5e1cd11c2d15497494c5292d7ffcc8" }, "fontawesome": { "Package": "fontawesome", - "Version": "0.5.1", + "Version": "0.5.2", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -381,7 +334,7 @@ "htmltools", "rlang" ], - "Hash": "1e22b8cabbad1eae951a75e9f8b52378" + "Hash": "c2efdd5f0bcd1ea861c2d4e2a883a67d" }, "forcats": { "Package": "forcats", @@ -401,20 +354,20 @@ }, "fs": { "Package": "fs", - "Version": "1.6.2", + "Version": "1.6.4", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R", "methods" ], - "Hash": "94af08e0aa9675a16fadbb3aaaa90d2a" + "Hash": "15aeb8c27f5ea5161f9f6a641fafd93a" }, "generics": { "Package": "generics", "Version": "0.1.3", "Source": "Repository", - "Repository": "CRAN", + "Repository": "https://packagemanager.posit.co/cran/__linux__/jammy/latest", "Requirements": [ "R", "methods" @@ -423,7 +376,7 @@ }, "ggplot2": { "Package": "ggplot2", - "Version": "3.4.2", + "Version": "3.5.1", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -444,24 +397,24 @@ "vctrs", "withr" ], - "Hash": "3a147ee02e85a8941aad9909f1b43b7b" + "Hash": "44c6a2f8202d5b7e878ea274b1092426" }, "glue": { "Package": "glue", - "Version": "1.6.2", + "Version": "1.7.0", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R", "methods" ], - "Hash": "4f2596dfb05dac67b9dc558e5c6fba2e" + "Hash": "e0b3a53876554bd45879e596cdb10a52" }, "gtable": { "Package": "gtable", - "Version": "0.3.3", + "Version": "0.3.5", "Source": "Repository", - "Repository": "CRAN", + "Repository": "https://packagemanager.posit.co/cran/__linux__/jammy/latest", "Requirements": [ "R", "cli", @@ -470,41 +423,55 @@ "lifecycle", "rlang" ], - "Hash": "b44addadb528a0d227794121c00572a0" + "Hash": "e18861963cbc65a27736e02b3cd3c4a0" }, "highr": { "Package": "highr", - "Version": "0.10", + "Version": "0.11", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R", "xfun" ], - "Hash": "06230136b2d2b9ba5805e1963fa6e890" + "Hash": "d65ba49117ca223614f71b60d85b8ab7" }, "htmltools": { "Package": "htmltools", - "Version": "0.5.5", + "Version": "0.5.8.1", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R", "base64enc", "digest", - "ellipsis", "fastmap", "grDevices", "rlang", "utils" ], - "Hash": "ba0240784ad50a62165058a27459304a" + "Hash": "81d371a9cc60640e74e4ab6ac46dcedc" + }, + "httpuv": { + "Package": "httpuv", + "Version": "1.6.15", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R6", + "Rcpp", + "later", + "promises", + "utils" + ], + "Hash": "d55aa087c47a63ead0f6fc10f8fa1ee0" }, "isoband": { "Package": "isoband", "Version": "0.2.7", "Source": "Repository", - "Repository": "CRAN", + "Repository": "https://packagemanager.posit.co/cran/__linux__/jammy/latest", "Requirements": [ "grid", "utils" @@ -523,17 +490,17 @@ }, "jsonlite": { "Package": "jsonlite", - "Version": "1.8.4", + "Version": "1.8.8", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "methods" ], - "Hash": "a4269a09a9b865579b2635c77e572374" + "Hash": "e1b9c55281c5adc4dd113652d9e26768" }, "knitr": { "Package": "knitr", - "Version": "1.42", + "Version": "1.48", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -545,24 +512,35 @@ "xfun", "yaml" ], - "Hash": "8329a9bcc82943c8069104d4be3ee22d" + "Hash": "acf380f300c721da9fde7df115a5f86f" }, "labeling": { "Package": "labeling", - "Version": "0.4.2", + "Version": "0.4.3", "Source": "Repository", - "Repository": "CRAN", + "Repository": "https://packagemanager.posit.co/cran/__linux__/jammy/latest", "Requirements": [ "graphics", "stats" ], - "Hash": "3d5108641f47470611a32d0bdf357a72" + "Hash": "b64ec208ac5bc1852b285f665d6368b3" + }, + "later": { + "Package": "later", + "Version": "1.3.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "Rcpp", + "rlang" + ], + "Hash": "a3e051d405326b8b0012377434c62b37" }, "lattice": { "Package": "lattice", - "Version": "0.21-8", + "Version": "0.22-6", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Requirements": [ "R", "grDevices", @@ -571,11 +549,11 @@ "stats", "utils" ], - "Hash": "0b8a6d63c8770f02a8b5635f3c431e6b" + "Hash": "cc5ac1ba4c238c7ca9fa6a87ca11a7e2" }, "lifecycle": { "Package": "lifecycle", - "Version": "1.0.3", + "Version": "1.0.4", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -584,7 +562,7 @@ "glue", "rlang" ], - "Hash": "001cecbeac1cff9301bdc3775ee46a86" + "Hash": "b8552d117e1b808b09a832f589b79035" }, "magrittr": { "Package": "magrittr", @@ -609,9 +587,9 @@ }, "mgcv": { "Package": "mgcv", - "Version": "1.8-42", + "Version": "1.9-1", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Requirements": [ "Matrix", "R", @@ -622,7 +600,7 @@ "stats", "utils" ], - "Hash": "3460beba7ccc8946249ba35327ba902a" + "Hash": "110ee9d83b496279960e162ac97764ce" }, "mime": { "Package": "mime", @@ -636,20 +614,20 @@ }, "munsell": { "Package": "munsell", - "Version": "0.5.0", + "Version": "0.5.1", "Source": "Repository", - "Repository": "CRAN", + "Repository": "https://packagemanager.posit.co/cran/__linux__/jammy/latest", "Requirements": [ "colorspace", "methods" ], - "Hash": "6dfe8bf774944bd5595785e3229d8771" + "Hash": "4fd8900853b746af55b81fda99da7695" }, "nlme": { "Package": "nlme", - "Version": "3.1-162", + "Version": "3.1-166", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Requirements": [ "R", "graphics", @@ -657,7 +635,7 @@ "stats", "utils" ], - "Hash": "0984ce8da8da9ead8643c5cbbb60f83e" + "Hash": "ccbb8846be320b627e6aa2b4616a2ded" }, "pillar": { "Package": "pillar", @@ -686,26 +664,6 @@ ], "Hash": "01f28d4278f15c76cddbea05899c5d6f" }, - "pkgload": { - "Package": "pkgload", - "Version": "1.3.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "cli", - "crayon", - "desc", - "fs", - "glue", - "methods", - "rlang", - "rprojroot", - "utils", - "withr" - ], - "Hash": "6b0c222c5071efe0f3baf3dae9aa40e2" - }, "png": { "Package": "png", "Version": "0.1-8", @@ -716,31 +674,27 @@ ], "Hash": "bd54ba8a0a5faded999a7aab6e46b374" }, - "praise": { - "Package": "praise", - "Version": "1.0.0", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "a555924add98c99d2f411e37e7d25e9f" - }, - "processx": { - "Package": "processx", - "Version": "3.8.1", + "promises": { + "Package": "promises", + "Version": "1.3.0", "Source": "Repository", "Repository": "CRAN", "Requirements": [ - "R", "R6", - "ps", - "utils" + "Rcpp", + "fastmap", + "later", + "magrittr", + "rlang", + "stats" ], - "Hash": "d75b4059d781336efba24021915902b4" + "Hash": "434cd5388a3979e74be5c219bcd6e77d" }, "proxy": { "Package": "proxy", "Version": "0.4-27", "Source": "Repository", - "Repository": "CRAN", + "Repository": "https://packagemanager.posit.co/cran/__linux__/jammy/latest", "Requirements": [ "R", "stats", @@ -748,22 +702,11 @@ ], "Hash": "e0ef355c12942cf7a6b91a6cfaea8b3e" }, - "ps": { - "Package": "ps", - "Version": "1.7.5", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "utils" - ], - "Hash": "709d852d33178db54b17c722e5b1e594" - }, "purrr": { "Package": "purrr", - "Version": "1.0.1", + "Version": "1.0.2", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Requirements": [ "R", "cli", @@ -772,7 +715,7 @@ "rlang", "vctrs" ], - "Hash": "d71c815267c640f17ddbf7f16144b4bb" + "Hash": "1cba04a4e9414bdefc9dcaa99649a8dc" }, "rappdirs": { "Package": "rappdirs", @@ -784,40 +727,30 @@ ], "Hash": "5e3c5dc0b071b21fa128676560dbe94d" }, - "rematch2": { - "Package": "rematch2", - "Version": "2.1.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "tibble" - ], - "Hash": "76c9e04c712a05848ae7a23d2f170a40" - }, "renv": { "Package": "renv", - "Version": "0.17.3", + "Version": "1.0.7", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "utils" ], - "Hash": "4543b8cd233ae25c6aba8548be9e747e" + "Hash": "397b7b2a265bc5a7a06852524dabae20" }, "rlang": { "Package": "rlang", - "Version": "1.1.1", + "Version": "1.1.4", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R", "utils" ], - "Hash": "a85c767b55f0bf9b7ad16c6d7baee5bb" + "Hash": "3eec01f8b1dee337674b2e34ab1f9bc1" }, "rmarkdown": { "Package": "rmarkdown", - "Version": "2.21", + "Version": "2.28", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -830,40 +763,29 @@ "jsonlite", "knitr", "methods", - "stringr", "tinytex", "tools", "utils", "xfun", "yaml" ], - "Hash": "493df4ae51e2e984952ea4d5c75786a3" - }, - "rprojroot": { - "Package": "rprojroot", - "Version": "2.0.3", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R" - ], - "Hash": "1de7ab598047a87bba48434ba35d497d" + "Hash": "062470668513dcda416927085ee9bdc7" }, "s2": { "Package": "s2", - "Version": "1.1.3", + "Version": "1.1.7", "Source": "Repository", - "Repository": "CRAN", + "Repository": "https://packagemanager.posit.co/cran/__linux__/jammy/latest", "Requirements": [ "R", "Rcpp", "wk" ], - "Hash": "e162ffd6ff4bde5264584be359a06f88" + "Hash": "3c8013cdd7f1d20de5762e3f97e5e274" }, "sass": { "Package": "sass", - "Version": "0.4.6", + "Version": "0.4.9", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -873,29 +795,31 @@ "rappdirs", "rlang" ], - "Hash": "cc3ec7dd33982ef56570229b62d6388e" + "Hash": "d53dbfddf695303ea4ad66f86e99b95d" }, "scales": { "Package": "scales", - "Version": "1.2.1", + "Version": "1.3.0", "Source": "Repository", - "Repository": "CRAN", + "Repository": "https://packagemanager.posit.co/cran/__linux__/jammy/latest", "Requirements": [ "R", "R6", "RColorBrewer", + "cli", "farver", + "glue", "labeling", "lifecycle", "munsell", "rlang", "viridisLite" ], - "Hash": "906cb23d2f1c5680b8ce439b44c6fa63" + "Hash": "c19df082ba346b0ffa6f833e92de34d1" }, "sf": { "Package": "sf", - "Version": "1.0-12", + "Version": "1.0-17", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -914,26 +838,84 @@ "units", "utils" ], - "Hash": "5b41b4f0bd22b38661d82205a87deb4b" + "Hash": "453a7d0263eae87a7831242a74fe9b60" + }, + "shiny": { + "Package": "shiny", + "Version": "1.9.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "R6", + "bslib", + "cachem", + "commonmark", + "crayon", + "fastmap", + "fontawesome", + "glue", + "grDevices", + "htmltools", + "httpuv", + "jsonlite", + "later", + "lifecycle", + "methods", + "mime", + "promises", + "rlang", + "sourcetools", + "tools", + "utils", + "withr", + "xtable" + ], + "Hash": "6a293995a66e12c48d13aa1f957d09c7" + }, + "shinyFiles": { + "Package": "shinyFiles", + "Version": "0.9.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "fs", + "htmltools", + "jsonlite", + "shiny", + "tibble", + "tools" + ], + "Hash": "92c28bcdee44e205a99799f6ea604b82" + }, + "sourcetools": { + "Package": "sourcetools", + "Version": "0.1.7-1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "5f5a7629f956619d519205ec475fe647" }, "stringi": { "Package": "stringi", - "Version": "1.7.12", + "Version": "1.8.4", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Requirements": [ "R", "stats", "tools", "utils" ], - "Hash": "ca8bd84263c77310739d2cf64d84d7c9" + "Hash": "39e1144fd75428983dc3f63aa53dfa91" }, "stringr": { "Package": "stringr", - "Version": "1.5.0", + "Version": "1.5.1", "Source": "Repository", - "Repository": "CRAN", + "Repository": "RSPM", "Requirements": [ "R", "cli", @@ -944,11 +926,11 @@ "stringi", "vctrs" ], - "Hash": "671a4d384ae9d32fc47a14e98bfa3dc8" + "Hash": "960e2ae9e09656611e0b8214ad543207" }, "terra": { "Package": "terra", - "Version": "1.7-29", + "Version": "1.7-78", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -956,37 +938,7 @@ "Rcpp", "methods" ], - "Hash": "89c24bf35c961e047df79dde2eb69224" - }, - "testthat": { - "Package": "testthat", - "Version": "3.1.8", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "R6", - "brio", - "callr", - "cli", - "desc", - "digest", - "ellipsis", - "evaluate", - "jsonlite", - "lifecycle", - "magrittr", - "methods", - "pkgload", - "praise", - "processx", - "ps", - "rlang", - "utils", - "waldo", - "withr" - ], - "Hash": "e0eded5dd915510f8e0d6e6277506203" + "Hash": "8f020def0792119cb98bd8f696dab22d" }, "tibble": { "Package": "tibble", @@ -1009,7 +961,7 @@ }, "tidyr": { "Package": "tidyr", - "Version": "1.3.0", + "Version": "1.3.1", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -1028,13 +980,13 @@ "utils", "vctrs" ], - "Hash": "e47debdc7ce599b070c8e78e8ac0cfcf" + "Hash": "915fb7ce036c22a6a33b5a8adb712eb1" }, "tidyselect": { "Package": "tidyselect", - "Version": "1.2.0", + "Version": "1.2.1", "Source": "Repository", - "Repository": "CRAN", + "Repository": "https://packagemanager.posit.co/cran/__linux__/jammy/latest", "Requirements": [ "R", "cli", @@ -1044,7 +996,7 @@ "vctrs", "withr" ], - "Hash": "79540e5fcd9e0435af547d885f184fd5" + "Hash": "829f27b9c4919c16b593794a6344d6c0" }, "tinytest": { "Package": "tinytest", @@ -1060,38 +1012,38 @@ }, "tinytex": { "Package": "tinytex", - "Version": "0.45", + "Version": "0.53", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "xfun" ], - "Hash": "e4e357f28c2edff493936b6cb30c3d65" + "Hash": "9db859e8aabbb474293dde3097839420" }, "units": { "Package": "units", - "Version": "0.8-2", + "Version": "0.8-5", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R", "Rcpp" ], - "Hash": "422376fe53419adcde4710d43acbcdd0" + "Hash": "119d19da480e873f72241ff6962ffd83" }, "utf8": { "Package": "utf8", - "Version": "1.2.3", + "Version": "1.2.4", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R" ], - "Hash": "1fe17157424bb09c48a8b3b550c753bc" + "Hash": "62b65c52671e6665f803ff02954446e9" }, "vctrs": { "Package": "vctrs", - "Version": "0.6.2", + "Version": "0.6.5", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -1101,75 +1053,71 @@ "lifecycle", "rlang" ], - "Hash": "a745bda7aff4734c17294bb41d4e4607" + "Hash": "c03fa420630029418f7e6da3667aac4a" }, "viridisLite": { "Package": "viridisLite", "Version": "0.4.2", "Source": "Repository", - "Repository": "CRAN", + "Repository": "https://packagemanager.posit.co/cran/__linux__/jammy/latest", "Requirements": [ "R" ], "Hash": "c826c7c4241b6fc89ff55aaea3fa7491" }, - "waldo": { - "Package": "waldo", - "Version": "0.5.1", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "cli", - "diffobj", - "fansi", - "glue", - "methods", - "rematch2", - "rlang", - "tibble" - ], - "Hash": "2c993415154cdb94649d99ae138ff5e5" - }, "withr": { "Package": "withr", - "Version": "2.5.0", + "Version": "3.0.1", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R", "grDevices", - "graphics", - "stats" + "graphics" ], - "Hash": "c0e49a9760983e81e55cdd9be92e7182" + "Hash": "07909200e8bbe90426fbfeb73e1e27aa" }, "wk": { "Package": "wk", - "Version": "0.7.3", + "Version": "0.9.2", "Source": "Repository", - "Repository": "CRAN", + "Repository": "https://packagemanager.posit.co/cran/__linux__/jammy/latest", "Requirements": [ "R" ], - "Hash": "68a7ab6ec1afb5f076172b983c069313" + "Hash": "877644b9b942d429f3708e12c98d1a22" }, "xfun": { "Package": "xfun", - "Version": "0.39", + "Version": "0.47", "Source": "Repository", "Repository": "CRAN", "Requirements": [ + "R", + "grDevices", "stats", "tools" ], - "Hash": "8f56e9acb54fb525e66464d57ab58bcb" + "Hash": "36ab21660e2d095fef0d83f689e0477c" + }, + "xtable": { + "Package": "xtable", + "Version": "1.8-4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "stats", + "utils" + ], + "Hash": "b8acdf8af494d9ec19ccb2481a9b11c2" }, "yaml": { "Package": "yaml", - "Version": "2.3.7", + "Version": "2.3.10", "Source": "Repository", "Repository": "CRAN", - "Hash": "0d0056cc5383fbc240ccd0cb584bf436" + "Hash": "51dab85c6c98e50a18d7551e9d49f76c" } } } diff --git a/renv/activate.R b/renv/activate.R index a8fdc32..d13f993 100644 --- a/renv/activate.R +++ b/renv/activate.R @@ -2,10 +2,28 @@ local({ # the requested version of renv - version <- "0.17.3" + version <- "1.0.7" + attr(version, "sha") <- NULL # the project directory - project <- getwd() + project <- Sys.getenv("RENV_PROJECT") + if (!nzchar(project)) + project <- getwd() + + # use start-up diagnostics if enabled + diagnostics <- Sys.getenv("RENV_STARTUP_DIAGNOSTICS", unset = "FALSE") + if (diagnostics) { + start <- Sys.time() + profile <- tempfile("renv-startup-", fileext = ".Rprof") + utils::Rprof(profile) + on.exit({ + utils::Rprof(NULL) + elapsed <- signif(difftime(Sys.time(), start, units = "auto"), digits = 2L) + writeLines(sprintf("- renv took %s to run the autoloader.", format(elapsed))) + writeLines(sprintf("- Profile: %s", profile)) + print(utils::summaryRprof(profile)) + }, add = TRUE) + } # figure out whether the autoloader is enabled enabled <- local({ @@ -15,6 +33,14 @@ local({ if (!is.null(override)) return(override) + # if we're being run in a context where R_LIBS is already set, + # don't load -- presumably we're being run as a sub-process and + # the parent process has already set up library paths for us + rcmd <- Sys.getenv("R_CMD", unset = NA) + rlibs <- Sys.getenv("R_LIBS", unset = NA) + if (!is.na(rlibs) && !is.na(rcmd)) + return(FALSE) + # next, check environment variables # TODO: prefer using the configuration one in the future envvars <- c( @@ -34,9 +60,22 @@ local({ }) - if (!enabled) + # bail if we're not enabled + if (!enabled) { + + # if we're not enabled, we might still need to manually load + # the user profile here + profile <- Sys.getenv("R_PROFILE_USER", unset = "~/.Rprofile") + if (file.exists(profile)) { + cfg <- Sys.getenv("RENV_CONFIG_USER_PROFILE", unset = "TRUE") + if (tolower(cfg) %in% c("true", "t", "1")) + sys.source(profile, envir = globalenv()) + } + return(FALSE) + } + # avoid recursion if (identical(getOption("renv.autoloader.running"), TRUE)) { warning("ignoring recursive attempt to run renv autoloader") @@ -60,25 +99,90 @@ local({ # load bootstrap tools `%||%` <- function(x, y) { - if (is.environment(x) || length(x)) x else y + if (is.null(x)) y else x } - `%??%` <- function(x, y) { - if (is.null(x)) y else x + catf <- function(fmt, ..., appendLF = TRUE) { + + quiet <- getOption("renv.bootstrap.quiet", default = FALSE) + if (quiet) + return(invisible()) + + msg <- sprintf(fmt, ...) + cat(msg, file = stdout(), sep = if (appendLF) "\n" else "") + + invisible(msg) + + } + + header <- function(label, + ..., + prefix = "#", + suffix = "-", + n = min(getOption("width"), 78)) + { + label <- sprintf(label, ...) + n <- max(n - nchar(label) - nchar(prefix) - 2L, 8L) + if (n <= 0) + return(paste(prefix, label)) + + tail <- paste(rep.int(suffix, n), collapse = "") + paste0(prefix, " ", label, " ", tail) + + } + + heredoc <- function(text, leave = 0) { + + # remove leading, trailing whitespace + trimmed <- gsub("^\\s*\\n|\\n\\s*$", "", text) + + # split into lines + lines <- strsplit(trimmed, "\n", fixed = TRUE)[[1L]] + + # compute common indent + indent <- regexpr("[^[:space:]]", lines) + common <- min(setdiff(indent, -1L)) - leave + paste(substring(lines, common), collapse = "\n") + + } + + startswith <- function(string, prefix) { + substring(string, 1, nchar(prefix)) == prefix } bootstrap <- function(version, library) { + friendly <- renv_bootstrap_version_friendly(version) + section <- header(sprintf("Bootstrapping renv %s", friendly)) + catf(section) + # attempt to download renv - tarball <- tryCatch(renv_bootstrap_download(version), error = identity) - if (inherits(tarball, "error")) - stop("failed to download renv ", version) + catf("- Downloading renv ... ", appendLF = FALSE) + withCallingHandlers( + tarball <- renv_bootstrap_download(version), + error = function(err) { + catf("FAILED") + stop("failed to download:\n", conditionMessage(err)) + } + ) + catf("OK") + on.exit(unlink(tarball), add = TRUE) # now attempt to install - status <- tryCatch(renv_bootstrap_install(version, tarball, library), error = identity) - if (inherits(status, "error")) - stop("failed to install renv ", version) + catf("- Installing renv ... ", appendLF = FALSE) + withCallingHandlers( + status <- renv_bootstrap_install(version, tarball, library), + error = function(err) { + catf("FAILED") + stop("failed to install:\n", conditionMessage(err)) + } + ) + catf("OK") + + # add empty line to break up bootstrapping from normal output + catf("") + return(invisible()) } renv_bootstrap_tests_running <- function() { @@ -108,13 +212,6 @@ local({ if (!inherits(repos, "error") && length(repos)) return(repos) - # if we're testing, re-use the test repositories - if (renv_bootstrap_tests_running()) { - repos <- getOption("renv.tests.repos") - if (!is.null(repos)) - return(repos) - } - # retrieve current repos repos <- getOption("repos") @@ -158,33 +255,34 @@ local({ renv_bootstrap_download <- function(version) { - # if the renv version number has 4 components, assume it must - # be retrieved via github - nv <- numeric_version(version) - components <- unclass(nv)[[1]] - - # if this appears to be a development version of 'renv', we'll - # try to restore from github - dev <- length(components) == 4L - - # begin collecting different methods for finding renv - methods <- c( - renv_bootstrap_download_tarball, - if (dev) - renv_bootstrap_download_github - else c( - renv_bootstrap_download_cran_latest, - renv_bootstrap_download_cran_archive + sha <- attr(version, "sha", exact = TRUE) + + methods <- if (!is.null(sha)) { + + # attempting to bootstrap a development version of renv + c( + function() renv_bootstrap_download_tarball(sha), + function() renv_bootstrap_download_github(sha) ) - ) + + } else { + + # attempting to bootstrap a release version of renv + c( + function() renv_bootstrap_download_tarball(version), + function() renv_bootstrap_download_cran_latest(version), + function() renv_bootstrap_download_cran_archive(version) + ) + + } for (method in methods) { - path <- tryCatch(method(version), error = identity) + path <- tryCatch(method(), error = identity) if (is.character(path) && file.exists(path)) return(path) } - stop("failed to download renv ", version) + stop("All download methods failed") } @@ -248,8 +346,6 @@ local({ type <- spec$type repos <- spec$repos - message("* Downloading renv ", version, " ... ", appendLF = FALSE) - baseurl <- utils::contrib.url(repos = repos, type = type) ext <- if (identical(type, "source")) ".tar.gz" @@ -266,13 +362,10 @@ local({ condition = identity ) - if (inherits(status, "condition")) { - message("FAILED") + if (inherits(status, "condition")) return(FALSE) - } # report success and return - message("OK (downloaded ", type, ")") destfile } @@ -329,8 +422,6 @@ local({ urls <- file.path(repos, "src/contrib/Archive/renv", name) destfile <- file.path(tempdir(), name) - message("* Downloading renv ", version, " ... ", appendLF = FALSE) - for (url in urls) { status <- tryCatch( @@ -338,14 +429,11 @@ local({ condition = identity ) - if (identical(status, 0L)) { - message("OK") + if (identical(status, 0L)) return(destfile) - } } - message("FAILED") return(FALSE) } @@ -368,7 +456,7 @@ local({ if (!file.exists(tarball)) { # let the user know we weren't able to honour their request - fmt <- "* RENV_BOOTSTRAP_TARBALL is set (%s) but does not exist." + fmt <- "- RENV_BOOTSTRAP_TARBALL is set (%s) but does not exist." msg <- sprintf(fmt, tarball) warning(msg) @@ -377,10 +465,7 @@ local({ } - fmt <- "* Bootstrapping with tarball at path '%s'." - msg <- sprintf(fmt, tarball) - message(msg) - + catf("- Using local tarball '%s'.", tarball) tarball } @@ -407,8 +492,6 @@ local({ on.exit(do.call(base::options, saved), add = TRUE) } - message("* Downloading renv ", version, " from GitHub ... ", appendLF = FALSE) - url <- file.path("https://api.github.com/repos/rstudio/renv/tarball", version) name <- sprintf("renv_%s.tar.gz", version) destfile <- file.path(tempdir(), name) @@ -418,26 +501,105 @@ local({ condition = identity ) - if (!identical(status, 0L)) { - message("FAILED") + if (!identical(status, 0L)) return(FALSE) - } - message("OK") + renv_bootstrap_download_augment(destfile) + return(destfile) } + # Add Sha to DESCRIPTION. This is stop gap until #890, after which we + # can use renv::install() to fully capture metadata. + renv_bootstrap_download_augment <- function(destfile) { + sha <- renv_bootstrap_git_extract_sha1_tar(destfile) + if (is.null(sha)) { + return() + } + + # Untar + tempdir <- tempfile("renv-github-") + on.exit(unlink(tempdir, recursive = TRUE), add = TRUE) + untar(destfile, exdir = tempdir) + pkgdir <- dir(tempdir, full.names = TRUE)[[1]] + + # Modify description + desc_path <- file.path(pkgdir, "DESCRIPTION") + desc_lines <- readLines(desc_path) + remotes_fields <- c( + "RemoteType: github", + "RemoteHost: api.github.com", + "RemoteRepo: renv", + "RemoteUsername: rstudio", + "RemotePkgRef: rstudio/renv", + paste("RemoteRef: ", sha), + paste("RemoteSha: ", sha) + ) + writeLines(c(desc_lines[desc_lines != ""], remotes_fields), con = desc_path) + + # Re-tar + local({ + old <- setwd(tempdir) + on.exit(setwd(old), add = TRUE) + + tar(destfile, compression = "gzip") + }) + invisible() + } + + # Extract the commit hash from a git archive. Git archives include the SHA1 + # hash as the comment field of the tarball pax extended header + # (see https://www.kernel.org/pub/software/scm/git/docs/git-archive.html) + # For GitHub archives this should be the first header after the default one + # (512 byte) header. + renv_bootstrap_git_extract_sha1_tar <- function(bundle) { + + # open the bundle for reading + # We use gzcon for everything because (from ?gzcon) + # > Reading from a connection which does not supply a 'gzip' magic + # > header is equivalent to reading from the original connection + conn <- gzcon(file(bundle, open = "rb", raw = TRUE)) + on.exit(close(conn)) + + # The default pax header is 512 bytes long and the first pax extended header + # with the comment should be 51 bytes long + # `52 comment=` (11 chars) + 40 byte SHA1 hash + len <- 0x200 + 0x33 + res <- rawToChar(readBin(conn, "raw", n = len)[0x201:len]) + + if (grepl("^52 comment=", res)) { + sub("52 comment=", "", res) + } else { + NULL + } + } + renv_bootstrap_install <- function(version, tarball, library) { # attempt to install it into project library - message("* Installing renv ", version, " ... ", appendLF = FALSE) dir.create(library, showWarnings = FALSE, recursive = TRUE) + output <- renv_bootstrap_install_impl(library, tarball) + + # check for successful install + status <- attr(output, "status") + if (is.null(status) || identical(status, 0L)) + return(status) + + # an error occurred; report it + header <- "installation of renv failed" + lines <- paste(rep.int("=", nchar(header)), collapse = "") + text <- paste(c(header, lines, output), collapse = "\n") + stop(text) + + } + + renv_bootstrap_install_impl <- function(library, tarball) { # invoke using system2 so we can capture and report output bin <- R.home("bin") exe <- if (Sys.info()[["sysname"]] == "Windows") "R.exe" else "R" - r <- file.path(bin, exe) + R <- file.path(bin, exe) args <- c( "--vanilla", "CMD", "INSTALL", "--no-multiarch", @@ -445,19 +607,7 @@ local({ shQuote(path.expand(tarball)) ) - output <- system2(r, args, stdout = TRUE, stderr = TRUE) - message("Done!") - - # check for successful install - status <- attr(output, "status") - if (is.numeric(status) && !identical(status, 0L)) { - header <- "Error installing renv:" - lines <- paste(rep.int("=", nchar(header)), collapse = "") - text <- c(header, lines, output) - writeLines(text, con = stderr()) - } - - status + system2(R, args, stdout = TRUE, stderr = TRUE) } @@ -498,6 +648,9 @@ local({ # if the user has requested an automatic prefix, generate it auto <- Sys.getenv("RENV_PATHS_PREFIX_AUTO", unset = NA) + if (is.na(auto) && getRversion() >= "4.4.0") + auto <- "TRUE" + if (auto %in% c("TRUE", "True", "true", "1")) return(renv_bootstrap_platform_prefix_auto()) @@ -667,34 +820,61 @@ local({ } - renv_bootstrap_validate_version <- function(version) { + renv_bootstrap_validate_version <- function(version, description = NULL) { + + # resolve description file + # + # avoid passing lib.loc to `packageDescription()` below, since R will + # use the loaded version of the package by default anyhow. note that + # this function should only be called after 'renv' is loaded + # https://github.com/rstudio/renv/issues/1625 + description <- description %||% packageDescription("renv") - loadedversion <- utils::packageDescription("renv", fields = "Version") - if (version == loadedversion) + # check whether requested version 'version' matches loaded version of renv + sha <- attr(version, "sha", exact = TRUE) + valid <- if (!is.null(sha)) + renv_bootstrap_validate_version_dev(sha, description) + else + renv_bootstrap_validate_version_release(version, description) + + if (valid) return(TRUE) - # assume four-component versions are from GitHub; - # three-component versions are from CRAN - components <- strsplit(loadedversion, "[.-]")[[1]] - remote <- if (length(components) == 4L) - paste("rstudio/renv", loadedversion, sep = "@") + # the loaded version of renv doesn't match the requested version; + # give the user instructions on how to proceed + dev <- identical(description[["RemoteType"]], "github") + remote <- if (dev) + paste("rstudio/renv", description[["RemoteSha"]], sep = "@") else - paste("renv", loadedversion, sep = "@") + paste("renv", description[["Version"]], sep = "@") - fmt <- paste( - "renv %1$s was loaded from project library, but this project is configured to use renv %2$s.", - "Use `renv::record(\"%3$s\")` to record renv %1$s in the lockfile.", - "Use `renv::restore(packages = \"renv\")` to install renv %2$s into the project library.", - sep = "\n" + # display both loaded version + sha if available + friendly <- renv_bootstrap_version_friendly( + version = description[["Version"]], + sha = if (dev) description[["RemoteSha"]] ) - msg <- sprintf(fmt, loadedversion, version, remote) - warning(msg, call. = FALSE) + fmt <- heredoc(" + renv %1$s was loaded from project library, but this project is configured to use renv %2$s. + - Use `renv::record(\"%3$s\")` to record renv %1$s in the lockfile. + - Use `renv::restore(packages = \"renv\")` to install renv %2$s into the project library. + ") + catf(fmt, friendly, renv_bootstrap_version_friendly(version), remote) FALSE } + renv_bootstrap_validate_version_dev <- function(version, description) { + expected <- description[["RemoteSha"]] + is.character(expected) && startswith(expected, version) + } + + renv_bootstrap_validate_version_release <- function(version, description) { + expected <- description[["Version"]] + is.character(expected) && identical(expected, version) + } + renv_bootstrap_hash_text <- function(text) { hashfile <- tempfile("renv-hash-") @@ -718,7 +898,7 @@ local({ hooks <- getHook("renv::autoload") for (hook in hooks) if (is.function(hook)) - tryCatch(hook(), error = warning) + tryCatch(hook(), error = warnify) # load the project renv::load(project) @@ -859,6 +1039,40 @@ local({ } + renv_bootstrap_version_friendly <- function(version, shafmt = NULL, sha = NULL) { + sha <- sha %||% attr(version, "sha", exact = TRUE) + parts <- c(version, sprintf(shafmt %||% " [sha: %s]", substring(sha, 1L, 7L))) + paste(parts, collapse = "") + } + + renv_bootstrap_exec <- function(project, libpath, version) { + if (!renv_bootstrap_load(project, libpath, version)) + renv_bootstrap_run(version, libpath) + } + + renv_bootstrap_run <- function(version, libpath) { + + # perform bootstrap + bootstrap(version, libpath) + + # exit early if we're just testing bootstrap + if (!is.na(Sys.getenv("RENV_BOOTSTRAP_INSTALL_ONLY", unset = NA))) + return(TRUE) + + # try again to load + if (requireNamespace("renv", lib.loc = libpath, quietly = TRUE)) { + return(renv::load(project = getwd())) + } + + # failed to download or load renv; warn the user + msg <- c( + "Failed to find an renv installation: the project will not be loaded.", + "Use `renv::activate()` to re-initialize the project." + ) + + warning(paste(msg, collapse = "\n"), call. = FALSE) + + } renv_json_read <- function(file = NULL, text = NULL) { @@ -867,7 +1081,7 @@ local({ # if jsonlite is loaded, use that instead if ("jsonlite" %in% loadedNamespaces()) { - json <- catch(renv_json_read_jsonlite(file, text)) + json <- tryCatch(renv_json_read_jsonlite(file, text), error = identity) if (!inherits(json, "error")) return(json) @@ -876,7 +1090,7 @@ local({ } # otherwise, fall back to the default JSON reader - json <- catch(renv_json_read_default(file, text)) + json <- tryCatch(renv_json_read_default(file, text), error = identity) if (!inherits(json, "error")) return(json) @@ -889,14 +1103,14 @@ local({ } renv_json_read_jsonlite <- function(file = NULL, text = NULL) { - text <- paste(text %||% read(file), collapse = "\n") + text <- paste(text %||% readLines(file, warn = FALSE), collapse = "\n") jsonlite::fromJSON(txt = text, simplifyVector = FALSE) } renv_json_read_default <- function(file = NULL, text = NULL) { # find strings in the JSON - text <- paste(text %||% read(file), collapse = "\n") + text <- paste(text %||% readLines(file, warn = FALSE), collapse = "\n") pattern <- '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' locs <- gregexpr(pattern, text, perl = TRUE)[[1]] @@ -944,14 +1158,14 @@ local({ map <- as.list(map) # remap strings in object - remapped <- renv_json_remap(json, map) + remapped <- renv_json_read_remap(json, map) # evaluate eval(remapped, envir = baseenv()) } - renv_json_remap <- function(json, map) { + renv_json_read_remap <- function(json, map) { # fix names if (!is.null(names(json))) { @@ -978,7 +1192,7 @@ local({ # recurse if (is.recursive(json)) { for (i in seq_along(json)) { - json[i] <- list(renv_json_remap(json[[i]], map)) + json[i] <- list(renv_json_read_remap(json[[i]], map)) } } @@ -998,35 +1212,9 @@ local({ # construct full libpath libpath <- file.path(root, prefix) - # attempt to load - if (renv_bootstrap_load(project, libpath, version)) - return(TRUE) - - # load failed; inform user we're about to bootstrap - prefix <- paste("# Bootstrapping renv", version) - postfix <- paste(rep.int("-", 77L - nchar(prefix)), collapse = "") - header <- paste(prefix, postfix) - message(header) - - # perform bootstrap - bootstrap(version, libpath) - - # exit early if we're just testing bootstrap - if (!is.na(Sys.getenv("RENV_BOOTSTRAP_INSTALL_ONLY", unset = NA))) - return(TRUE) - - # try again to load - if (requireNamespace("renv", lib.loc = libpath, quietly = TRUE)) { - message("* Successfully installed and loaded renv ", version, ".") - return(renv::load()) - } - - # failed to download or load renv; warn the user - msg <- c( - "Failed to find an renv installation: the project will not be loaded.", - "Use `renv::activate()` to re-initialize the project." - ) + # run bootstrap code + renv_bootstrap_exec(project, libpath, version) - warning(paste(msg, collapse = "\n"), call. = FALSE) + invisible() }) diff --git a/renv/settings.json b/renv/settings.json index 1a06760..ffdbb32 100644 --- a/renv/settings.json +++ b/renv/settings.json @@ -7,6 +7,8 @@ "Depends", "LinkingTo" ], + "ppm.enabled": null, + "ppm.ignored.urls": [], "r.version": null, "snapshot.type": "implicit", "use.cache": true, diff --git a/vignettes/.gitignore b/vignettes/.gitignore index 097b241..9e2bd63 100644 --- a/vignettes/.gitignore +++ b/vignettes/.gitignore @@ -1,2 +1,4 @@ *.html *.R + +/.quarto/ diff --git a/vignettes/ComparisonGroupedR.png b/vignettes/ComparisonGroupedR.png deleted file mode 100644 index 148f553..0000000 Binary files a/vignettes/ComparisonGroupedR.png and /dev/null differ diff --git a/vignettes/GeneralUniquenessSensib.png b/vignettes/GeneralUniquenessSensib.png new file mode 100644 index 0000000..92c5687 Binary files /dev/null and b/vignettes/GeneralUniquenessSensib.png differ diff --git a/vignettes/byLCZUniquenessSensib.png b/vignettes/byLCZUniquenessSensib.png new file mode 100644 index 0000000..56feda2 Binary files /dev/null and b/vignettes/byLCZUniquenessSensib.png differ diff --git a/vignettes/comparaison.png b/vignettes/comparaison.png index 1e1ac2a..2a0be71 100644 Binary files a/vignettes/comparaison.png and b/vignettes/comparaison.png differ diff --git a/vignettes/comparison.png b/vignettes/comparison.png index 737da0d..797143a 100644 Binary files a/vignettes/comparison.png and b/vignettes/comparison.png differ diff --git a/vignettes/comparisonGrouped.png b/vignettes/comparisonGrouped.png index bc8fbc8..24b8327 100644 Binary files a/vignettes/comparisonGrouped.png and b/vignettes/comparisonGrouped.png differ diff --git a/vignettes/comparisonGroupedR.png b/vignettes/comparisonGroupedR.png index 148f553..2b1997b 100644 Binary files a/vignettes/comparisonGroupedR.png and b/vignettes/comparisonGroupedR.png differ diff --git a/vignettes/comparisonR.png b/vignettes/comparisonR.png index e8479e9..4994f99 100644 Binary files a/vignettes/comparisonR.png and b/vignettes/comparisonR.png differ