I am struggling to add the Kaliningrad Oblast to the EU NUTS-2 map, otherwise it looks like there is sea between Poland and Lithuania. I tried with different shp files, however each time I attempt to add the Russian dataset to the European one, I get a coordinate error.
Here my code:
I downloaded the EU NUTS-2 shp file from: https://ec.europa.eu/eurostat/web/gisco/geodata/reference-data/administrative-units-statistical-units/nuts (File format: GeoJSON; Geometry Type: Polygons (RG); Scale: 20M; CRS: 4326);
I downloaded the Russia shp file from: https://gadm.org/download_country.html (Shapefile)
library(sf)
library(tidyverse)
nuts2 <- read_sf("D:/NUTS_RG_20M_2021_4326.geojson")
russia<- read_sf("D:/gadm36_RUS_shp/gadm36_RUS_1.shp")
russia<-rename(russia, c("CNTR_CODE"="GID_0"), c("NUTS_ID"="GID_1"))
nuts_agg <- nuts2 %>%
filter(!CNTR_CODE %in% c( c( "TR"))) %>%
filter(!NUTS_ID %in% c( "ES70", "PT20", "PT30",
"FRY1", "FRY2","FRY3", "FRY4", "FRY5", "NO0B"))
euru<-st_join(nuts_agg, russia, BY=c("CNTR_CODE", "NUTS_ID", "geometry"))
I also tried with different shp files, but each time I got a different error. The main problem is that the geometry of Russia is not being recognized.
Thank you for any help.
I can see some things that would throw an error on your code:
rename(russia, c("CNTR_CODE"="GID_0"), c("NUTS_ID"="GID_1")) is not working as you may expect.
st_join is performing a spatial join, that would make a join based on the overlapping areas of the shapes, and what you want is really append the information.
I would use giscoR and GADMtools package, that are two API packages that extract the very same shapefiles that you use, in order to provide full reproducibility.
See a reprex here:
library(sf)
library(tidyverse)
# packages for downloading shapes
library(giscoR)
library(GADMTools)
# Same source than your example
nuts2 <- gisco_get_nuts(resolution = 20, year = 2021, epsg = 4326, nuts_level = 2)
names(nuts2)
#> [1] "MOUNT_TYPE" "NAME_LATN" "CNTR_CODE" "NUTS_NAME" "NUTS_ID"
#> [6] "LEVL_CODE" "URBN_TYPE" "COAST_TYPE" "FID" "geometry"
# Same source than your example
russia <- gadm_sf.loadCountries("RUS", level = 1)
# Extract the sf object for Kaliningrad and align CRS with NUTS2
kalin_sf <- russia$sf %>%
filter(NAME_1 == "Kaliningrad") %>%
st_transform(st_crs(st_crs(nuts2)))
#> old-style crs object detected; please recreate object with a recent sf::st_crs()
# Adapt columns and make join
names(kalin_sf)
#> [1] "ISO" "NAME_0" "NAME_1" "TYPE_1" "ENGTYPE_1" "geometry"
kalin_sf <- kalin_sf %>%
rename(
CNTR_CODE = NAME_1,
NUTS_ID = NAME_0
)
# Now we can bind rows (NO SPATIAL JOIN!!) and perform filters
euru <- nuts2 %>%
bind_rows(kalin_sf) %>%
filter(
CNTR_CODE != "TR",
!NUTS_ID %in% c(
"ES70", "PT20", "PT30",
"FRY1", "FRY2", "FRY3", "FRY4", "FRY5", "NO0B"
)
)
# Plot
ggplot(euru) +
geom_sf(aes(fill = TYPE_1)) +
# Represent on EPSG 3035, one of the official CRS of the European Union
coord_sf(crs = 3035) +
labs(title = "NUTS2 with Kaliningrad Oblast")
Created on 2022-02-18 by the reprex package (v2.0.1)
Session info
sessioninfo::session_info()
#> - Session info ---------------------------------------------------------------
#> setting value
#> version R version 4.1.2 (2021-11-01)
#> os Windows 10 x64 (build 22000)
#> system x86_64, mingw32
#> ui RTerm
#> language (EN)
#> collate Spanish_Spain.1252
#> ctype Spanish_Spain.1252
#> tz Europe/Paris
#> date 2022-02-18
#> pandoc 2.14.0.3 # C:/Program Files/RStudio/bin/pandoc/ (via rmarkdown)
#>
#> - Packages -------------------------------------------------------------------
#> package * version date (UTC) lib source
#> assertthat 0.2.1 2019-03-21 [1] CRAN (R 4.1.1)
#> backports 1.4.1 2021-12-13 [1] CRAN (R 4.1.2)
#> bitops 1.0-7 2021-04-24 [1] CRAN (R 4.1.1)
#> broom 0.7.12 2022-01-28 [1] CRAN (R 4.1.2)
#> cellranger 1.1.0 2016-07-27 [1] CRAN (R 4.1.1)
#> class 7.3-19 2021-05-03 [2] CRAN (R 4.1.2)
#> classInt * 0.4-3 2020-04-07 [1] CRAN (R 4.1.1)
#> cli 3.2.0 2022-02-14 [1] CRAN (R 4.1.2)
#> colorspace 2.0-2 2021-06-24 [1] CRAN (R 4.1.1)
#> crayon 1.5.0 2022-02-14 [1] CRAN (R 4.1.2)
#> curl 4.3.2 2021-06-23 [1] CRAN (R 4.1.1)
#> DBI 1.1.2 2021-12-20 [1] CRAN (R 4.1.2)
#> dbplyr 2.1.1 2021-04-06 [1] CRAN (R 4.1.1)
#> digest 0.6.29 2021-12-01 [1] CRAN (R 4.1.2)
#> dplyr * 1.0.8 2022-02-08 [1] CRAN (R 4.1.2)
#> e1071 1.7-9 2021-09-16 [1] CRAN (R 4.1.1)
#> ellipsis 0.3.2 2021-04-29 [1] CRAN (R 4.1.1)
#> evaluate 0.14 2019-05-28 [1] CRAN (R 4.1.1)
#> fansi 1.0.2 2022-01-14 [1] CRAN (R 4.1.2)
#> farver 2.1.0 2021-02-28 [1] CRAN (R 4.1.1)
#> fastmap 1.1.0 2021-01-25 [1] CRAN (R 4.1.1)
#> forcats * 0.5.1 2021-01-27 [1] CRAN (R 4.1.1)
#> foreign 0.8-81 2020-12-22 [2] CRAN (R 4.1.2)
#> fs 1.5.2 2021-12-08 [1] CRAN (R 4.1.2)
#> GADMTools * 3.9-1 2021-08-05 [1] CRAN (R 4.1.1)
#> generics 0.1.2 2022-01-31 [1] CRAN (R 4.1.2)
#> geojsonsf 2.0.1 2020-10-02 [1] CRAN (R 4.1.1)
#> ggmap 3.0.0 2019-02-04 [1] CRAN (R 4.1.1)
#> ggplot2 * 3.3.5 2021-06-25 [1] CRAN (R 4.1.2)
#> ggspatial 1.1.5.9000 2022-01-24 [1] Github (paleolimbot/ggspatial#20a8708)
#> giscoR * 0.3.1 2021-10-06 [1] CRAN (R 4.1.1)
#> glue 1.6.1 2022-01-22 [1] CRAN (R 4.1.2)
#> gridExtra 2.3 2017-09-09 [1] CRAN (R 4.1.1)
#> gtable 0.3.0 2019-03-25 [1] CRAN (R 4.1.1)
#> haven 2.4.3 2021-08-04 [1] CRAN (R 4.1.1)
#> highr 0.9 2021-04-16 [1] CRAN (R 4.1.1)
#> hms 1.1.1 2021-09-26 [1] CRAN (R 4.1.1)
#> htmltools 0.5.2 2021-08-25 [1] CRAN (R 4.1.1)
#> httr 1.4.2 2020-07-20 [1] CRAN (R 4.1.1)
#> jpeg 0.1-9 2021-07-24 [1] CRAN (R 4.1.1)
#> jsonlite 1.7.3 2022-01-17 [1] CRAN (R 4.1.2)
#> KernSmooth 2.23-20 2021-05-03 [2] CRAN (R 4.1.2)
#> knitr 1.37 2021-12-16 [1] CRAN (R 4.1.2)
#> lattice 0.20-45 2021-09-22 [2] CRAN (R 4.1.2)
#> lifecycle 1.0.1 2021-09-24 [1] CRAN (R 4.1.1)
#> lubridate 1.8.0 2021-10-07 [1] CRAN (R 4.1.1)
#> magrittr 2.0.2 2022-01-26 [1] CRAN (R 4.1.2)
#> maptools 1.1-2 2021-09-07 [1] CRAN (R 4.1.1)
#> mime 0.12 2021-09-28 [1] CRAN (R 4.1.1)
#> modelr 0.1.8 2020-05-19 [1] CRAN (R 4.1.1)
#> munsell 0.5.0 2018-06-12 [1] CRAN (R 4.1.1)
#> pillar 1.7.0 2022-02-01 [1] CRAN (R 4.1.2)
#> pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 4.1.1)
#> plyr 1.8.6 2020-03-03 [1] CRAN (R 4.1.1)
#> png 0.1-7 2013-12-03 [1] CRAN (R 4.1.1)
#> proxy 0.4-26 2021-06-07 [1] CRAN (R 4.1.1)
#> purrr * 0.3.4 2020-04-17 [1] CRAN (R 4.1.1)
#> R.cache 0.15.0 2021-04-30 [1] CRAN (R 4.1.1)
#> R.methodsS3 1.8.1 2020-08-26 [1] CRAN (R 4.1.1)
#> R.oo 1.24.0 2020-08-26 [1] CRAN (R 4.1.1)
#> R.utils 2.11.0 2021-09-26 [1] CRAN (R 4.1.1)
#> R6 2.5.1 2021-08-19 [1] CRAN (R 4.1.1)
#> Rcpp 1.0.8 2022-01-13 [1] CRAN (R 4.1.2)
#> readr * 2.1.2 2022-01-30 [1] CRAN (R 4.1.2)
#> readxl 1.3.1 2019-03-13 [1] CRAN (R 4.1.1)
#> reprex 2.0.1 2021-08-05 [1] CRAN (R 4.1.2)
#> rgdal * 1.5-28 2021-12-15 [1] CRAN (R 4.1.2)
#> rgeos 0.5-9 2021-12-15 [1] CRAN (R 4.1.2)
#> RgoogleMaps 1.4.5.3 2020-02-12 [1] CRAN (R 4.1.1)
#> rjson 0.2.21 2022-01-09 [1] CRAN (R 4.1.2)
#> rlang 1.0.1 2022-02-03 [1] CRAN (R 4.1.2)
#> rmarkdown 2.11 2021-09-14 [1] CRAN (R 4.1.1)
#> rosm 0.2.5 2019-07-22 [1] CRAN (R 4.1.1)
#> rstudioapi 0.13 2020-11-12 [1] CRAN (R 4.1.1)
#> rvest 1.0.2 2021-10-16 [1] CRAN (R 4.1.1)
#> s2 1.0.7 2021-09-28 [1] CRAN (R 4.1.1)
#> scales 1.1.1 2020-05-11 [1] CRAN (R 4.1.1)
#> sessioninfo 1.2.2 2021-12-06 [1] CRAN (R 4.1.2)
#> sf * 1.0-6 2022-02-04 [1] CRAN (R 4.1.2)
#> sp * 1.4-6 2021-11-14 [1] CRAN (R 4.1.2)
#> stringi 1.7.6 2021-11-29 [1] CRAN (R 4.1.2)
#> stringr * 1.4.0 2019-02-10 [1] CRAN (R 4.1.1)
#> styler 1.6.2 2021-09-23 [1] CRAN (R 4.1.1)
#> tibble * 3.1.6 2021-11-07 [1] CRAN (R 4.1.2)
#> tidyr * 1.2.0 2022-02-01 [1] CRAN (R 4.1.2)
#> tidyselect 1.1.1 2021-04-30 [1] CRAN (R 4.1.1)
#> tidyverse * 1.3.1 2021-04-15 [1] CRAN (R 4.1.1)
#> tzdb 0.2.0 2021-10-27 [1] CRAN (R 4.1.1)
#> units 0.8-0 2022-02-05 [1] CRAN (R 4.1.2)
#> utf8 1.2.2 2021-07-24 [1] CRAN (R 4.1.1)
#> vctrs 0.3.8 2021-04-29 [1] CRAN (R 4.1.1)
#> withr 2.4.3 2021-11-30 [1] CRAN (R 4.1.2)
#> wk 0.6.0 2022-01-03 [1] CRAN (R 4.1.2)
#> xfun 0.29 2021-12-14 [1] CRAN (R 4.1.2)
#> xml2 1.3.3 2021-11-30 [1] CRAN (R 4.1.2)
#> yaml 2.2.2 2022-01-25 [1] CRAN (R 4.1.2)
#>
#> [1] C:/Users/diego/Documents/R/win-library/4.1
#> [2] C:/Program Files/R/R-4.1.2/library
#>
#> ------------------------------------------------------------------------------
Related
How I am using wrongly label_date_short from scales package?
library(tidyverse)
library(scales)
date_taille <- tibble(
Taille = rep(c("taille_hiver", "taille_ete"), times = 2),
Date_taille = c("2016-08-01", "2016-02-01", "2018-08-01", "2018-02-01") %>% as.Date()
)
ggplot(date_taille) +
aes(x = Date_taille, y = Taille) +
geom_point() +
scale_x_date(date_breaks = "month", date_labels = label_date_short()) #or label_date()
#> Error in format(x, format = format, tz = tz): arguments inutilisés (format = format, tz = tz)
Created on 2022-05-12 by the reprex package (v2.0.1)
Session info
sessioninfo::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────
#> setting value
#> version R version 4.1.3 (2022-03-10)
#> os Manjaro Linux
#> system x86_64, linux-gnu
#> ui X11
#> language (EN)
#> collate C
#> ctype fr_FR.UTF-8
#> tz Indian/Reunion
#> date 2022-05-12
#> pandoc 2.17.1.1 # /usr/bin/ (via rmarkdown)
#>
#> ─ Packages ───────────────────────────────────────────────────────────────────
#> package * version date (UTC) lib source
#> assertthat 0.2.1 2019-03-21 [1] CRAN (R 4.0.3)
#> backports 1.4.1 2021-12-13 [1] CRAN (R 4.1.2)
#> broom 0.8.0 2022-04-13 [1] CRAN (R 4.1.3)
#> cellranger 1.1.0 2016-07-27 [1] CRAN (R 4.0.3)
#> cli 3.2.0 2022-02-14 [1] CRAN (R 4.1.2)
#> colorspace 2.0-3 2022-02-21 [1] CRAN (R 4.1.2)
#> crayon 1.5.1 2022-03-26 [1] CRAN (R 4.1.3)
#> curl 4.3.2 2021-06-23 [1] CRAN (R 4.1.0)
#> DBI 1.1.2 2021-12-20 [1] CRAN (R 4.1.2)
#> dbplyr 2.1.1 2021-04-06 [1] CRAN (R 4.0.4)
#> digest 0.6.29 2021-12-01 [1] CRAN (R 4.1.2)
#> dplyr * 1.0.8 2022-02-08 [1] CRAN (R 4.1.2)
#> ellipsis 0.3.2 2021-04-29 [1] CRAN (R 4.0.5)
#> evaluate 0.15 2022-02-18 [1] CRAN (R 4.1.2)
#> fansi 1.0.3 2022-03-24 [1] CRAN (R 4.1.3)
#> farver 2.1.0 2021-02-28 [1] CRAN (R 4.0.4)
#> fastmap 1.1.0 2021-01-25 [1] CRAN (R 4.0.3)
#> forcats * 0.5.1 2021-01-27 [1] CRAN (R 4.0.3)
#> fs 1.5.2 2021-12-08 [1] CRAN (R 4.1.2)
#> generics 0.1.2 2022-01-31 [1] CRAN (R 4.1.2)
#> ggplot2 * 3.3.5 2021-06-25 [1] CRAN (R 4.1.0)
#> glue * 1.6.2 2022-02-24 [1] CRAN (R 4.1.2)
#> gtable 0.3.0 2019-03-25 [1] CRAN (R 4.0.3)
#> haven 2.5.0 2022-04-15 [1] CRAN (R 4.1.3)
#> highr 0.9 2021-04-16 [1] CRAN (R 4.0.5)
#> hms 1.1.1 2021-09-26 [1] CRAN (R 4.1.1)
#> htmltools 0.5.2 2021-08-25 [1] CRAN (R 4.1.1)
#> httr 1.4.2 2020-07-20 [1] CRAN (R 4.0.3)
#> jsonlite 1.8.0 2022-02-22 [1] CRAN (R 4.1.2)
#> knitr 1.38 2022-03-25 [1] CRAN (R 4.1.3)
#> lifecycle 1.0.1 2021-09-24 [1] CRAN (R 4.1.1)
#> lubridate * 1.8.0 2021-10-07 [1] CRAN (R 4.1.1)
#> magrittr 2.0.3 2022-03-30 [1] CRAN (R 4.1.3)
#> mime 0.12 2021-09-28 [1] CRAN (R 4.1.1)
#> modelr 0.1.8 2020-05-19 [1] CRAN (R 4.0.3)
#> munsell 0.5.0 2018-06-12 [1] CRAN (R 4.0.3)
#> pillar 1.7.0 2022-02-01 [1] CRAN (R 4.1.2)
#> pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 4.0.3)
#> purrr * 0.3.4 2020-04-17 [1] CRAN (R 4.0.3)
#> R.cache 0.15.0 2021-04-30 [1] CRAN (R 4.0.5)
#> R.methodsS3 1.8.1 2020-08-26 [1] CRAN (R 4.0.5)
#> R.oo 1.24.0 2020-08-26 [1] CRAN (R 4.0.5)
#> R.utils 2.11.0 2021-09-26 [1] CRAN (R 4.1.1)
#> R6 2.5.1 2021-08-19 [1] CRAN (R 4.1.1)
#> readr * 2.1.2 2022-01-30 [1] CRAN (R 4.1.2)
#> readxl 1.4.0 2022-03-28 [1] CRAN (R 4.1.3)
#> reprex 2.0.1 2021-08-05 [1] CRAN (R 4.1.0)
#> rlang 1.0.2 2022-03-04 [1] CRAN (R 4.1.2)
#> rmarkdown 2.13 2022-03-10 [1] CRAN (R 4.1.3)
#> rstudioapi 0.13 2020-11-12 [1] CRAN (R 4.0.3)
#> rvest 1.0.2 2021-10-16 [1] CRAN (R 4.1.1)
#> scales * 1.2.0 2022-04-13 [1] CRAN (R 4.1.3)
#> sessioninfo 1.2.2 2021-12-06 [1] CRAN (R 4.1.2)
#> stringi 1.7.6 2021-11-29 [1] CRAN (R 4.1.2)
#> stringr * 1.4.0 2019-02-10 [1] CRAN (R 4.0.3)
#> styler 1.7.0 2022-03-13 [1] CRAN (R 4.1.3)
#> tibble * 3.1.6 2021-11-07 [1] CRAN (R 4.1.1)
#> tidyr * 1.2.0 2022-02-01 [1] CRAN (R 4.1.2)
#> tidyselect 1.1.2 2022-02-21 [1] CRAN (R 4.1.2)
#> tidyverse * 1.3.1 2021-04-15 [1] CRAN (R 4.0.5)
#> tzdb 0.3.0 2022-03-28 [1] CRAN (R 4.1.3)
#> utf8 1.2.2 2021-07-24 [1] CRAN (R 4.1.0)
#> vctrs 0.4.1 2022-04-13 [1] CRAN (R 4.1.3)
#> withr 2.5.0 2022-03-03 [1] CRAN (R 4.1.2)
#> xfun 0.30 2022-03-02 [1] CRAN (R 4.1.2)
#> xml2 1.3.3 2021-11-30 [1] CRAN (R 4.1.2)
#> yaml 2.3.5 2022-02-21 [1] CRAN (R 4.1.2)
#>
#> [1] /home/annadoizy/R/x86_64-pc-linux-gnu-library/4.1
#> [2] /usr/lib/R/library
#>
#> ──────────────────────────────────────────────────────────────────────────────
You are not using it wrongly, but you should use the labels argument instead of the date_labels one:
ggplot(date_taille) +
aes(x = Date_taille, y = Taille) +
geom_point() +
scale_x_date(date_breaks = "month", labels = label_date_short())
I am a beginner on mlr3 and am facing problems while running AutoFSelector learner associated to glmnet on a classification task containing >2000 numeric variables.
I reproduce this error while using the simpler mlr3 predefined task Sonar.
For note, I am using R version 4.1.2 (2021-11-01)on macOS Monterey 12.1. All required packages have been loaded on CRAN.
library(mlr3verse)
#> Loading required package: mlr3
data("Sonar", package = "mlbench")
task <- as_task_classif(Sonar, target = "Class", positive = "R")
fselector <- fs("sequential")
terminator <- trm("evals", n_evals = 10)
afs <- AutoFSelector$new(
learner = lrn("classif.glmnet", predict_type = "prob"),
resampling = rsmp("cv", folds = 3),
measure = msr("classif.ce"),
terminator = terminator,
fselector = fselector
)
rr <- resample(task, afs, resampling = rsmp("cv", folds = 3), store_models = TRUE)
#> INFO [16:18:38.455] [mlr3] Applying learner 'classif.glmnet.fselector' on task 'Sonar' (iter 3/3)
#> INFO [16:18:38.527] [bbotk] Starting to optimize 60 parameter(s) with '<FSelectorSequential>' and '<TerminatorEvals> [n_evals=10, k=0]'
#> INFO [16:18:38.546] [bbotk] Evaluating 60 configuration(s)
#> INFO [16:18:41.674] [mlr3] Running benchmark with 180 resampling iterations
#> INFO [16:18:41.677] [mlr3] Applying learner 'select.classif.glmnet' on task 'Sonar' (iter 3/3)
#> Error in (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, : x should be a matrix with 2 or more columns
#> This happened PipeOp classif.glmnet's $train()
Created on 2022-01-24 by the reprex package (v2.0.1)
Session info
sessioninfo::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────
#> setting value
#> version R version 4.1.2 (2021-11-01)
#> os macOS Monterey 12.1
#> system aarch64, darwin20
#> ui X11
#> language (EN)
#> collate en_US.UTF-8
#> ctype en_US.UTF-8
#> tz Europe/Zurich
#> date 2022-01-24
#> pandoc 2.17.0.1 # /opt/homebrew/bin/ (via rmarkdown)
#>
#> ─ Packages ───────────────────────────────────────────────────────────────────
#> package * version date (UTC) lib source
#> assertthat 0.2.1 2019-03-21 [1] CRAN (R 4.1.2)
#> backports 1.4.1 2021-12-13 [1] CRAN (R 4.1.1)
#> bbotk 0.5.0 2022-01-19 [1] CRAN (R 4.1.2)
#> checkmate 2.0.0 2020-02-06 [1] CRAN (R 4.1.2)
#> cli 3.1.1 2022-01-20 [1] CRAN (R 4.1.2)
#> clue 0.3-60 2021-10-11 [1] CRAN (R 4.1.2)
#> cluster 2.1.2 2021-04-17 [2] CRAN (R 4.1.2)
#> clusterCrit 1.2.8 2018-07-26 [1] CRAN (R 4.1.2)
#> codetools 0.2-18 2020-11-04 [2] CRAN (R 4.1.2)
#> colorspace 2.0-2 2021-06-24 [1] CRAN (R 4.1.2)
#> crayon 1.4.2 2021-10-29 [1] CRAN (R 4.1.2)
#> data.table 1.14.2 2021-09-27 [1] CRAN (R 4.1.2)
#> DBI 1.1.2 2021-12-20 [1] CRAN (R 4.1.2)
#> dictionar6 0.1.3 2021-09-13 [1] CRAN (R 4.1.2)
#> digest 0.6.29 2021-12-01 [1] CRAN (R 4.1.2)
#> distr6 1.6.4 2022-01-17 [1] CRAN (R 4.1.2)
#> dplyr 1.0.7 2021-06-18 [1] CRAN (R 4.1.2)
#> ellipsis 0.3.2 2021-04-29 [1] CRAN (R 4.1.2)
#> evaluate 0.14 2019-05-28 [1] CRAN (R 4.1.2)
#> fansi 1.0.2 2022-01-14 [1] CRAN (R 4.1.2)
#> fastmap 1.1.0 2021-01-25 [1] CRAN (R 4.1.2)
#> foreach 1.5.1 2020-10-15 [1] CRAN (R 4.1.2)
#> fs 1.5.2 2021-12-08 [1] CRAN (R 4.1.1)
#> future 1.23.0 2021-10-31 [1] CRAN (R 4.1.2)
#> future.apply 1.8.1 2021-08-10 [1] CRAN (R 4.1.2)
#> generics 0.1.1 2021-10-25 [1] CRAN (R 4.1.2)
#> ggplot2 3.3.5 2021-06-25 [1] CRAN (R 4.1.2)
#> glmnet 4.1-3 2021-11-02 [1] CRAN (R 4.1.2)
#> globals 0.14.0 2020-11-22 [1] CRAN (R 4.1.2)
#> glue 1.6.1 2022-01-22 [1] CRAN (R 4.1.2)
#> gtable 0.3.0 2019-03-25 [1] CRAN (R 4.1.2)
#> highr 0.9 2021-04-16 [1] CRAN (R 4.1.2)
#> htmltools 0.5.2 2021-08-25 [1] CRAN (R 4.1.2)
#> iterators 1.0.13 2020-10-15 [1] CRAN (R 4.1.2)
#> knitr 1.37 2021-12-16 [1] CRAN (R 4.1.1)
#> lattice 0.20-45 2021-09-22 [2] CRAN (R 4.1.2)
#> lgr 0.4.3 2021-09-16 [1] CRAN (R 4.1.2)
#> lifecycle 1.0.1 2021-09-24 [1] CRAN (R 4.1.2)
#> listenv 0.8.0 2019-12-05 [1] CRAN (R 4.1.2)
#> magrittr 2.0.1 2020-11-17 [1] CRAN (R 4.1.2)
#> Matrix 1.4-0 2021-12-08 [1] CRAN (R 4.1.1)
#> mlr3 * 0.13.1 2022-01-19 [1] CRAN (R 4.1.2)
#> mlr3cluster 0.1.2 2021-09-03 [1] CRAN (R 4.1.2)
#> mlr3data 0.5.0 2021-06-29 [1] CRAN (R 4.1.2)
#> mlr3extralearners 0.5.18 2022-01-23 [1] Github (mlr-org/mlr3extralearners#54fa488)
#> mlr3filters 0.4.2.9000 2021-12-05 [1] local
#> mlr3fselect 0.6.1 2022-01-20 [1] CRAN (R 4.1.2)
#> mlr3learners 0.5.2 2022-01-23 [1] CRAN (R 4.1.2)
#> mlr3measures 0.4.1 2022-01-13 [1] CRAN (R 4.1.2)
#> mlr3misc 0.10.0 2022-01-11 [1] CRAN (R 4.1.2)
#> mlr3pipelines 0.4.0 2021-11-15 [1] CRAN (R 4.1.2)
#> mlr3proba 0.4.3 2022-01-22 [1] CRAN (R 4.1.2)
#> mlr3tuning 0.10.0 2022-01-20 [1] CRAN (R 4.1.2)
#> mlr3verse * 0.2.2 2021-08-11 [1] CRAN (R 4.1.2)
#> mlr3viz 0.5.7 2021-10-14 [1] CRAN (R 4.1.2)
#> munsell 0.5.0 2018-06-12 [1] CRAN (R 4.1.2)
#> ooplah 0.2.0 2022-01-21 [1] CRAN (R 4.1.2)
#> palmerpenguins 0.1.0 2020-07-23 [1] CRAN (R 4.1.2)
#> paradox 0.7.1 2021-03-07 [1] CRAN (R 4.1.2)
#> parallelly 1.30.0 2021-12-17 [1] CRAN (R 4.1.1)
#> param6 0.2.3 2021-10-05 [1] CRAN (R 4.1.2)
#> pillar 1.6.4 2021-10-18 [1] CRAN (R 4.1.2)
#> pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 4.1.2)
#> purrr 0.3.4 2020-04-17 [1] CRAN (R 4.1.2)
#> R.cache 0.15.0 2021-04-30 [1] CRAN (R 4.1.2)
#> R.methodsS3 1.8.1 2020-08-26 [1] CRAN (R 4.1.2)
#> R.oo 1.24.0 2020-08-26 [1] CRAN (R 4.1.2)
#> R.utils 2.11.0 2021-09-26 [1] CRAN (R 4.1.2)
#> R6 2.5.1 2021-08-19 [1] CRAN (R 4.1.2)
#> Rcpp 1.0.8 2022-01-13 [1] CRAN (R 4.1.2)
#> reprex 2.0.1 2021-08-05 [1] CRAN (R 4.1.2)
#> rlang 1.0.0 2022-01-22 [1] Github (r-lib/rlang#f2fbaad)
#> rmarkdown 2.11 2021-09-14 [1] CRAN (R 4.1.2)
#> rstudioapi 0.13 2020-11-12 [1] CRAN (R 4.1.2)
#> scales 1.1.1 2020-05-11 [1] CRAN (R 4.1.2)
#> sessioninfo 1.2.2 2021-12-06 [1] CRAN (R 4.1.2)
#> set6 0.2.4 2021-10-18 [1] CRAN (R 4.1.2)
#> shape 1.4.6 2021-05-19 [1] CRAN (R 4.1.2)
#> stringi 1.7.6 2021-11-29 [1] CRAN (R 4.1.2)
#> stringr 1.4.0 2019-02-10 [1] CRAN (R 4.1.2)
#> styler 1.6.2 2021-09-23 [1] CRAN (R 4.1.1)
#> survival 3.2-13 2021-08-24 [2] CRAN (R 4.1.2)
#> tibble 3.1.6 2021-11-07 [1] CRAN (R 4.1.2)
#> tidyselect 1.1.1 2021-04-30 [1] CRAN (R 4.1.2)
#> utf8 1.2.2 2021-07-24 [1] CRAN (R 4.1.2)
#> uuid 1.0-3 2021-11-01 [1] CRAN (R 4.1.2)
#> vctrs 0.3.8 2021-04-29 [1] CRAN (R 4.1.2)
#> withr 2.4.3 2021-11-30 [1] CRAN (R 4.1.2)
#> xfun 0.29 2021-12-14 [1] CRAN (R 4.1.1)
#> yaml 2.2.1 2020-02-01 [1] CRAN (R 4.1.2)
#>
#> [1] /Users/pjs/Library/R/arm64/4.1/library
#> [2] /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library
#>
#> ──────────────────────────────────────────────────────────────────────────────
The error I am getting is as following and specific to glmnet as I can efficiently run a similar code using alternate learners such as classif.rpart.
Erreur dans (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, :
x should be a matrix with 2 or more columns
This happened PipeOp classif.glmnet's $train()
Anyone would have an idea of how I can fix this?
Thank you very much for your help,
Clémence
This is a problem specific to glmnet. glmnet requires at least two features to fit a model, but in at least one configuration (the first ones in a sequential forward search) you only have one feature.
There are two possibilities to solve this:
Open an issue in mlr3fselect and request a new argument min_features (there already is max_features) to be able to start the search with 2 or more features.
Augment the base learner with a fallback which gets fitted if the base learner fails. Here is fallback to a simple logistic regression:
learner = lrn("classif.glmnet", predict_type = "prob")
learner$encapsulate = c(train = "evaluate", predict = "evaluate")
learner$fallback = lrn("classif.log_reg", predict_type = "prob")
Then pass this learner to AutoFselector.
I get this error in my own code and when I run the documentation example for facet_sample() (shown below) using the brolgar package on its own built in "heights" data. Nothing I've Googled is similar, and appreciate any guidance on what is causing this, and have included SystemInfo below in case it may be caused by something in my installation.
library(brolgar)
#> Warning: package 'brolgar' was built under R version 4.1.2
library(ggplot2)
ggplot(heights,
aes(x = year,
y = height_cm,
group = country)) +
geom_line() +
facet_sample()
#> Error in f(...): 3 arguments passed to .Internal(is.unsorted) which requires 2
Created on 2021-12-19 by the reprex package (v2.0.1)
Session info
sessioninfo::session_info()
#> - Session info ---------------------------------------------------------------
#> setting value
#> version R version 4.1.1 (2021-08-10)
#> os Windows 10 x64 (build 19043)
#> system x86_64, mingw32
#> ui RTerm
#> language (EN)
#> collate English_United States.1252
#> ctype English_United States.1252
#> tz America/New_York
#> date 2021-12-19
#> pandoc 2.14.0.3 # C:/Program Files/RStudio/bin/pandoc/ (via rmarkdown)
#>
#> - Packages -------------------------------------------------------------------
#> package * version date (UTC) lib source
#> anytime 0.3.9 2020-08-27 [1] CRAN (R 4.1.2)
#> assertthat 0.2.1 2019-03-21 [1] CRAN (R 4.1.1)
#> brolgar * 0.1.2 2021-08-25 [1] CRAN (R 4.1.2)
#> cli 3.1.0 2021-10-27 [1] CRAN (R 4.1.1)
#> colorspace 2.0-2 2021-06-24 [1] CRAN (R 4.1.1)
#> crayon 1.4.2 2021-10-29 [1] CRAN (R 4.1.1)
#> curl 4.3.2 2021-06-23 [1] CRAN (R 4.1.1)
#> DBI 1.1.1 2021-01-15 [1] CRAN (R 4.1.1)
#> digest 0.6.29 2021-12-01 [1] CRAN (R 4.1.1)
#> distributional 0.2.2 2021-02-02 [1] CRAN (R 4.1.2)
#> dplyr 1.0.7 2021-06-18 [1] CRAN (R 4.1.1)
#> ellipsis 0.3.2 2021-04-29 [1] CRAN (R 4.1.1)
#> evaluate 0.14 2019-05-28 [1] CRAN (R 4.1.1)
#> fabletools 0.3.2 2021-11-29 [1] CRAN (R 4.1.2)
#> fansi 0.5.0 2021-05-25 [1] CRAN (R 4.1.1)
#> farver 2.1.0 2021-02-28 [1] CRAN (R 4.1.1)
#> fastmap 1.1.0 2021-01-25 [1] CRAN (R 4.1.1)
#> fs 1.5.2 2021-12-08 [1] CRAN (R 4.1.1)
#> generics 0.1.1 2021-10-25 [1] CRAN (R 4.1.1)
#> ggplot2 * 3.3.5 2021-06-25 [1] CRAN (R 4.1.1)
#> glue 1.5.1 2021-11-30 [1] CRAN (R 4.1.2)
#> gtable 0.3.0 2019-03-25 [1] CRAN (R 4.1.1)
#> highr 0.9 2021-04-16 [1] CRAN (R 4.1.1)
#> htmltools 0.5.2 2021-08-25 [1] CRAN (R 4.1.1)
#> httr 1.4.2 2020-07-20 [1] CRAN (R 4.1.1)
#> knitr 1.37 2021-12-16 [1] CRAN (R 4.1.1)
#> lifecycle 1.0.1 2021-09-24 [1] CRAN (R 4.1.1)
#> lubridate 1.8.0 2021-10-07 [1] CRAN (R 4.1.1)
#> magrittr 2.0.1 2020-11-17 [1] CRAN (R 4.1.1)
#> mime 0.12 2021-09-28 [1] CRAN (R 4.1.1)
#> munsell 0.5.0 2018-06-12 [1] CRAN (R 4.1.1)
#> pillar 1.6.4 2021-10-18 [1] CRAN (R 4.1.1)
#> pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 4.1.1)
#> purrr 0.3.4 2020-04-17 [1] CRAN (R 4.1.1)
#> R6 2.5.1 2021-08-19 [1] CRAN (R 4.1.1)
#> Rcpp 1.0.7 2021-07-07 [1] CRAN (R 4.1.1)
#> reprex 2.0.1 2021-08-05 [1] CRAN (R 4.1.1)
#> rlang 0.4.12 2021-10-18 [1] CRAN (R 4.1.1)
#> rmarkdown 2.11 2021-09-14 [1] CRAN (R 4.1.1)
#> rstudioapi 0.13 2020-11-12 [1] CRAN (R 4.1.1)
#> scales 1.1.1 2020-05-11 [1] CRAN (R 4.1.1)
#> sessioninfo 1.2.2 2021-12-06 [1] CRAN (R 4.1.1)
#> stringi 1.7.6 2021-11-29 [1] CRAN (R 4.1.1)
#> stringr 1.4.0 2019-02-10 [1] CRAN (R 4.1.1)
#> tibble 3.1.6 2021-11-07 [1] CRAN (R 4.1.1)
#> tidyr 1.1.4 2021-09-27 [1] CRAN (R 4.1.1)
#> tidyselect 1.1.1 2021-04-30 [1] CRAN (R 4.1.1)
#> tsibble 1.1.1 2021-12-03 [1] CRAN (R 4.1.2)
#> utf8 1.2.2 2021-07-24 [1] CRAN (R 4.1.1)
#> vctrs 0.3.8 2021-04-29 [1] CRAN (R 4.1.1)
#> withr 2.4.3 2021-11-30 [1] CRAN (R 4.1.1)
#> xfun 0.28 2021-11-04 [1] CRAN (R 4.1.2)
#> xml2 1.3.3 2021-11-30 [1] CRAN (R 4.1.1)
#> yaml 2.2.1 2020-02-01 [1] CRAN (R 4.1.1)
#>
#> [1] C:/Users/dlucey/OneDrive - South Bronx Classical Charter School/Documents/R/R-4.1.1/library
#>
#> ------------------------------------------------------------------------------
Since a few months, ggplot2 started to save png files with a transparent background. The code output in Rstudio and when saved as pdf looks great. It happens mainly with the use of themes when I omit the gray panel background. I tested it on my macbook with "Preview" and on a Windows Computer with the "foto viewer" there.
library(ggplot2)
library(dplyr)
mtcars %>%
ggplot(aes(x = mpg, y = cyl)) +
geom_point() +
theme_minimal()
This is how the file should look (with a white background):
ggsave("test.png", dpi = 300)
#> Saving 7 x 5 in image
ggsave("test.pdf")
#> Saving 5.54 x 4.56 in image
devtools::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────
#> setting value
#> version R version 4.1.1 (2021-08-10)
#> os macOS Big Sur 10.16
#> system x86_64, darwin17.0
#> ui X11
#> language (EN)
#> collate de_CH.UTF-8
#> ctype de_CH.UTF-8
#> tz Europe/Zurich
#> date 2021-11-11
#>
#> ─ Packages ───────────────────────────────────────────────────────────────────
#> package * version date lib source
#> assertthat 0.2.1 2019-03-21 [1] CRAN (R 4.1.0)
#> backports 1.2.1 2020-12-09 [1] CRAN (R 4.1.0)
#> cachem 1.0.6 2021-08-19 [1] CRAN (R 4.1.0)
#> callr 3.7.0 2021-04-20 [1] CRAN (R 4.1.0)
#> cli 3.0.1 2021-07-17 [1] CRAN (R 4.1.0)
#> colorspace 2.0-2 2021-06-24 [1] CRAN (R 4.1.0)
#> crayon 1.4.1 2021-02-08 [1] CRAN (R 4.1.0)
#> DBI 1.1.1 2021-01-15 [1] CRAN (R 4.1.0)
#> desc 1.3.0 2021-03-05 [1] CRAN (R 4.1.0)
#> devtools 2.4.2 2021-06-07 [1] CRAN (R 4.1.0)
#> digest 0.6.27 2020-10-24 [1] CRAN (R 4.1.0)
#> dplyr * 1.0.7 2021-06-18 [1] CRAN (R 4.1.0)
#> ellipsis 0.3.2 2021-04-29 [1] CRAN (R 4.1.0)
#> evaluate 0.14 2019-05-28 [1] CRAN (R 4.1.0)
#> fansi 0.5.0 2021-05-25 [1] CRAN (R 4.1.0)
#> farver 2.1.0 2021-02-28 [1] CRAN (R 4.1.0)
#> fastmap 1.1.0 2021-01-25 [1] CRAN (R 4.1.0)
#> fs 1.5.0 2020-07-31 [1] CRAN (R 4.1.0)
#> generics 0.1.0 2020-10-31 [1] CRAN (R 4.1.0)
#> ggplot2 * 3.3.5 2021-06-25 [1] CRAN (R 4.1.0)
#> glue 1.4.2 2020-08-27 [1] CRAN (R 4.1.0)
#> gtable 0.3.0 2019-03-25 [1] CRAN (R 4.1.0)
#> highr 0.9 2021-04-16 [1] CRAN (R 4.1.0)
#> htmltools 0.5.2 2021-08-25 [1] CRAN (R 4.1.0)
#> knitr 1.34 2021-09-09 [1] CRAN (R 4.1.0)
#> labeling 0.4.2 2020-10-20 [1] CRAN (R 4.1.0)
#> lifecycle 1.0.0 2021-02-15 [1] CRAN (R 4.1.0)
#> magrittr 2.0.1 2020-11-17 [1] CRAN (R 4.1.0)
#> memoise 2.0.0 2021-01-26 [1] CRAN (R 4.1.0)
#> munsell 0.5.0 2018-06-12 [1] CRAN (R 4.1.0)
#> pillar 1.6.2 2021-07-29 [1] CRAN (R 4.1.0)
#> pkgbuild 1.2.0 2020-12-15 [1] CRAN (R 4.1.0)
#> pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 4.1.0)
#> pkgload 1.2.2 2021-09-11 [1] CRAN (R 4.1.0)
#> prettyunits 1.1.1 2020-01-24 [1] CRAN (R 4.1.0)
#> processx 3.5.2 2021-04-30 [1] CRAN (R 4.1.0)
#> ps 1.6.0 2021-02-28 [1] CRAN (R 4.1.0)
#> purrr 0.3.4 2020-04-17 [1] CRAN (R 4.1.0)
#> R6 2.5.1 2021-08-19 [1] CRAN (R 4.1.0)
#> ragg 1.1.3 2021-06-09 [1] CRAN (R 4.1.0)
#> remotes 2.4.0 2021-06-02 [1] CRAN (R 4.1.0)
#> reprex 2.0.1 2021-08-05 [1] CRAN (R 4.1.0)
#> rlang 0.4.11 2021-04-30 [1] CRAN (R 4.1.0)
#> rmarkdown 2.11 2021-09-14 [1] CRAN (R 4.1.0)
#> rprojroot 2.0.2 2020-11-15 [1] CRAN (R 4.1.0)
#> rstudioapi 0.13 2020-11-12 [1] CRAN (R 4.1.0)
#> scales 1.1.1 2020-05-11 [1] CRAN (R 4.1.0)
#> sessioninfo 1.1.1 2018-11-05 [1] CRAN (R 4.1.0)
#> stringi 1.7.4 2021-08-25 [1] CRAN (R 4.1.0)
#> stringr 1.4.0 2019-02-10 [1] CRAN (R 4.1.0)
#> styler 1.6.1 2021-09-17 [1] CRAN (R 4.1.0)
#> systemfonts 1.0.2 2021-05-11 [1] CRAN (R 4.1.0)
#> testthat 3.0.4 2021-07-01 [1] CRAN (R 4.1.0)
#> textshaping 0.3.5 2021-06-09 [1] CRAN (R 4.1.0)
#> tibble 3.1.4 2021-08-25 [1] CRAN (R 4.1.0)
#> tidyselect 1.1.1 2021-04-30 [1] CRAN (R 4.1.0)
#> usethis 2.0.1 2021-02-10 [1] CRAN (R 4.1.0)
#> utf8 1.2.2 2021-07-24 [1] CRAN (R 4.1.0)
#> vctrs 0.3.8 2021-04-29 [1] CRAN (R 4.1.0)
#> withr 2.4.2 2021-04-18 [1] CRAN (R 4.1.0)
#> xfun 0.26 2021-09-14 [1] CRAN (R 4.1.0)
#> yaml 2.2.1 2020-02-01 [1] CRAN (R 4.1.0)
#>
#> [1] /Library/Frameworks/R.framework/Versions/4.1/Resources/library
Created on 2021-11-11 by the reprex package (v2.0.1)
This is how the files look side-by-side:
I have tested all graphic devices in the "backend" tab under prefences/general/graphics and I also tested everything in R (not R Studio) with the same result.
set the bg argument to "white", e.g.
ggsave("test.png", dpi = 300, bg = "white")
This argument will be passed to grDevices::png via the ... argument. bg controls the background of the device.
I have downloaded Proteome Profiling data from the TCGA-LGG project with the Bioconductor package TCGAbiolinks.
Then I have the following error when running GDCprepare:
library("TCGAbiolinks")
query_lgg = GDCquery(
project = "TCGA-LGG",
data.category = "Proteome Profiling",
sample.type = "Primary Tumor",
legacy = FALSE)
#> --------------------------------------
#> o GDCquery: Searching in GDC database
#> --------------------------------------
#> Genome of reference: hg38
#> --------------------------------------------
#> oo Accessing GDC. This might take a while...
#> --------------------------------------------
#> ooo Project: TCGA-LGG
#> --------------------
#> oo Filtering results
#> --------------------
#> ooo By sample.type
#> ----------------
#> oo Checking data
#> ----------------
#> ooo Check if there are duplicated cases
#> ooo Check if there results for the query
#> -------------------
#> o Preparing output
#> -------------------
lgg_res <- getResults(query_lgg)
GDCdownload(query = query_lgg)
#> Downloading data for project TCGA-LGG
#> Of the 429 files for download 429 already exist.
#> All samples have been already downloaded
lgg_data <- GDCprepare(query_lgg)
#> Error in (function (classes, fdef, mtable) : unable to find an inherited method for function 'metadata<-' for signature '"function"'
Created on 2021-11-10 by the reprex package (v2.0.1)
Session info
sessioninfo::session_info()
#> ─ Session info ──────────────────────────────────────────────────────────────
#> setting value
#> version R version 4.1.0 (2021-05-18)
#> os Ubuntu 20.04.2 LTS
#> system x86_64, linux-gnu
#> ui X11
#> language (EN)
#> collate it_IT.UTF-8
#> ctype it_IT.UTF-8
#> tz Europe/Rome
#> date 2021-11-10
#> pandoc 2.11.4 # /usr/lib/rstudio/bin/pandoc/ (via rmarkdown)
#>
#> ─ Packages ───────────────────────────────────────────────────────────────────
#> package * version date (UTC) lib source
#> AnnotationDbi 1.54.1 2021-06-08 [1] Bioconductor
#> assertthat 0.2.1 2019-03-21 [1] CRAN (R 4.1.0)
#> backports 1.3.0 2021-10-27 [1] CRAN (R 4.1.0)
#> Biobase 2.52.0 2021-05-19 [1] Bioconductor
#> BiocFileCache 2.0.0 2021-05-19 [1] Bioconductor
#> BiocGenerics 0.38.0 2021-05-19 [1] Bioconductor
#> biomaRt 2.48.3 2021-08-15 [1] Bioconductor
#> Biostrings 2.60.2 2021-08-05 [1] Bioconductor
#> bit 4.0.4 2020-08-04 [1] CRAN (R 4.1.0)
#> bit64 4.0.5 2020-08-30 [1] CRAN (R 4.1.0)
#> bitops 1.0-7 2021-04-24 [1] CRAN (R 4.1.0)
#> blob 1.2.2 2021-07-23 [1] CRAN (R 4.1.0)
#> cachem 1.0.6 2021-08-19 [1] CRAN (R 4.1.0)
#> cli 3.1.0 2021-10-27 [1] CRAN (R 4.1.0)
#> colorspace 2.0-2 2021-06-24 [1] CRAN (R 4.1.0)
#> crayon 1.4.2 2021-10-29 [1] CRAN (R 4.1.0)
#> curl 4.3.2 2021-06-23 [1] CRAN (R 4.1.0)
#> data.table 1.14.2 2021-09-27 [1] CRAN (R 4.1.0)
#> DBI 1.1.1 2021-01-15 [1] CRAN (R 4.1.0)
#> dbplyr 2.1.1 2021-04-06 [1] CRAN (R 4.1.0)
#> DelayedArray 0.18.0 2021-05-19 [1] Bioconductor
#> digest 0.6.28 2021-09-23 [1] CRAN (R 4.1.0)
#> downloader 0.4 2015-07-09 [1] CRAN (R 4.1.0)
#> dplyr 1.0.7 2021-06-18 [1] CRAN (R 4.1.0)
#> ellipsis 0.3.2 2021-04-29 [1] CRAN (R 4.1.0)
#> evaluate 0.14 2019-05-28 [1] CRAN (R 4.1.0)
#> fansi 0.5.0 2021-05-25 [1] CRAN (R 4.1.0)
#> fastmap 1.1.0 2021-01-25 [1] CRAN (R 4.1.0)
#> filelock 1.0.2 2018-10-05 [1] CRAN (R 4.1.0)
#> fs 1.5.0 2020-07-31 [1] CRAN (R 4.1.0)
#> generics 0.1.1 2021-10-25 [1] CRAN (R 4.1.0)
#> GenomeInfoDb 1.28.4 2021-09-05 [1] Bioconductor
#> GenomeInfoDbData 1.2.6 2021-11-10 [1] Bioconductor
#> GenomicRanges 1.44.0 2021-05-19 [1] Bioconductor
#> ggplot2 3.3.5 2021-06-25 [1] CRAN (R 4.1.0)
#> glue 1.5.0 2021-11-07 [1] CRAN (R 4.1.0)
#> gtable 0.3.0 2019-03-25 [1] CRAN (R 4.1.0)
#> highr 0.9 2021-04-16 [1] CRAN (R 4.1.0)
#> hms 1.1.1 2021-09-26 [1] CRAN (R 4.1.0)
#> htmltools 0.5.2 2021-08-25 [1] CRAN (R 4.1.0)
#> httr 1.4.2 2020-07-20 [1] CRAN (R 4.1.0)
#> IRanges 2.26.0 2021-05-19 [1] Bioconductor
#> jsonlite 1.7.2 2020-12-09 [1] CRAN (R 4.1.0)
#> KEGGREST 1.32.0 2021-05-19 [1] Bioconductor
#> knitr 1.36 2021-09-29 [1] CRAN (R 4.1.0)
#> lattice 0.20-44 2021-05-02 [4] CRAN (R 4.1.0)
#> lifecycle 1.0.1 2021-09-24 [1] CRAN (R 4.1.0)
#> magrittr 2.0.1 2020-11-17 [1] CRAN (R 4.1.0)
#> Matrix 1.3-4 2021-06-01 [4] CRAN (R 4.1.0)
#> MatrixGenerics 1.4.3 2021-08-26 [1] Bioconductor
#> matrixStats 0.61.0 2021-09-17 [1] CRAN (R 4.1.0)
#> memoise 2.0.0 2021-01-26 [1] CRAN (R 4.1.0)
#> munsell 0.5.0 2018-06-12 [1] CRAN (R 4.1.0)
#> pillar 1.6.4 2021-10-18 [1] CRAN (R 4.1.0)
#> pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 4.1.0)
#> plyr 1.8.6 2020-03-03 [1] CRAN (R 4.1.0)
#> png 0.1-7 2013-12-03 [1] CRAN (R 4.1.0)
#> prettyunits 1.1.1 2020-01-24 [1] CRAN (R 4.1.0)
#> progress 1.2.2 2019-05-16 [1] CRAN (R 4.1.0)
#> purrr 0.3.4 2020-04-17 [1] CRAN (R 4.1.0)
#> R.cache 0.15.0 2021-04-30 [1] CRAN (R 4.1.0)
#> R.methodsS3 1.8.1 2020-08-26 [1] CRAN (R 4.1.0)
#> R.oo 1.24.0 2020-08-26 [1] CRAN (R 4.1.0)
#> R.utils 2.11.0 2021-09-26 [1] CRAN (R 4.1.0)
#> R6 2.5.1 2021-08-19 [1] CRAN (R 4.1.0)
#> rappdirs 0.3.3 2021-01-31 [1] CRAN (R 4.1.0)
#> Rcpp 1.0.7 2021-07-07 [1] CRAN (R 4.1.0)
#> RCurl 1.98-1.5 2021-09-17 [1] CRAN (R 4.1.0)
#> readr 2.0.2 2021-09-27 [1] CRAN (R 4.1.0)
#> reprex 2.0.1 2021-08-05 [1] CRAN (R 4.1.0)
#> rlang 0.4.12 2021-10-18 [1] CRAN (R 4.1.0)
#> rmarkdown 2.11 2021-09-14 [1] CRAN (R 4.1.0)
#> RSQLite 2.2.8 2021-08-21 [1] CRAN (R 4.1.0)
#> rstudioapi 0.13 2020-11-12 [1] CRAN (R 4.1.0)
#> rvest 1.0.2 2021-10-16 [1] CRAN (R 4.1.0)
#> S4Vectors 0.30.2 2021-10-03 [1] Bioconductor
#> scales 1.1.1 2020-05-11 [1] CRAN (R 4.1.0)
#> sessioninfo 1.2.1 2021-11-02 [1] CRAN (R 4.1.0)
#> stringi 1.7.5 2021-10-04 [1] CRAN (R 4.1.0)
#> stringr 1.4.0 2019-02-10 [1] CRAN (R 4.1.0)
#> styler 1.6.2 2021-09-23 [1] CRAN (R 4.1.0)
#> SummarizedExperiment 1.22.0 2021-05-19 [1] Bioconductor
#> TCGAbiolinks * 2.20.1 2021-10-07 [1] Bioconductor
#> TCGAbiolinksGUI.data 1.12.0 2021-05-20 [1] Bioconductor
#> tibble 3.1.6 2021-11-07 [1] CRAN (R 4.1.0)
#> tidyr 1.1.4 2021-09-27 [1] CRAN (R 4.1.0)
#> tidyselect 1.1.1 2021-04-30 [1] CRAN (R 4.1.0)
#> tzdb 0.2.0 2021-10-27 [1] CRAN (R 4.1.0)
#> utf8 1.2.2 2021-07-24 [1] CRAN (R 4.1.0)
#> vctrs 0.3.8 2021-04-29 [1] CRAN (R 4.1.0)
#> withr 2.4.2 2021-04-18 [1] CRAN (R 4.1.0)
#> xfun 0.28 2021-11-04 [1] CRAN (R 4.1.0)
#> XML 3.99-0.8 2021-09-17 [1] CRAN (R 4.1.0)
#> xml2 1.3.2 2020-04-23 [1] CRAN (R 4.1.0)
#> XVector 0.32.0 2021-05-19 [1] Bioconductor
#> yaml 2.2.1 2020-02-01 [1] CRAN (R 4.1.0)
#> zlibbioc 1.38.0 2021-05-19 [1] Bioconductor
#>
#> [1] /home/matt/R/x86_64-pc-linux-gnu-library/4.1
#> [2] /usr/local/lib/R/site-library
#> [3] /usr/lib/R/site-library
#> [4] /usr/lib/R/library
#>
#> ──────────────────────────────────────────────────────────────────────────────
I tried to investigate the error and it lead me to Issue #198, but with no success.
Also, I understand that this error is related to S4 generic function being applied to an object with no defined S4 method, as discussed here.
Am I missing something? Can somebody please help me?
Thanks in advance!
Support for proteome profiling has been provided in the package. To obtain the newest version the package should be installed from Github with the following command BiocManager::install("BioinformaticsFMRP/TCGAbiolinks") (see here).