tidyverse / stringr

A fresh approach to string manipulation in R

Home Page:https://stringr.tidyverse.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[error] ! Input must be a vector, not an environment.

MarcinKosinski opened this issue · comments

commented
> library(stringr)
Warning message:
package ‘stringr’ was built under R version 4.1.3 
> str_squish("  String with trailing,  middle, and leading white space\t")
Error in `stop_vctrs()`:
! Input must be a vector, not an environment.
Run `rlang::last_error()` to see where the error occurred.
> sessionInfo()
R version 4.1.0 (2021-05-18)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19044)

Matrix products: default

locale:
[1] LC_COLLATE=English_Europe.1252 
[2] LC_CTYPE=English_Europe.1252   
[3] LC_MONETARY=English_Europe.1252
[4] LC_NUMERIC=C                   
[5] LC_TIME=English_Europe.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods  
[7] base     

other attached packages:
[1] stringr_1.5.0

loaded via a namespace (and not attached):
 [1] compiler_4.1.0  ellipsis_0.3.2  magrittr_2.0.1 
 [4] cli_3.0.1       tools_4.1.0     pillar_1.6.2   
 [7] glue_1.6.1      rstudioapi_0.14 crayon_1.4.1   
[10] utf8_1.2.2      fansi_0.5.0     vctrs_0.3.8    
[13] stringi_1.7.3   lifecycle_1.0.3 rlang_1.0.6 
commented

Needed to update vctrs to never version:

> renv::remove('vctrs')
* Removing package(s) from library '~/R/win-library/4.1' ...
Removing package 'vctrs' ... Done!

Restarting R session...

> renv::install('vctrs@0.5.2')
The following package(s) are missing their DESCRIPTION files:

	vctrs [C:/Users/MKosinski/Documents/R/win-library/4.1/vctrs]

These may be left over from a prior, failed installation attempt.
Consider removing or reinstalling these packages.

Installing vctrs [0.5.2] ...
	OK [copied cache in 0.36 seconds]
* Installed 1 package in 0.39 seconds.
> library(stringr)
Warning message:
package ‘stringr’ was built under R version 4.1.3 
> str_squish("  String with trailing,  middle, and leading white space\t")
[1] "String with trailing, middle, and leading white space"

I see the requirement for vctrs >= 0.4.0 in the DESCRIPTION file. Why does it not propagate to the CRAN index page? (https://cran.r-project.org/web/packages/stringr/index.html)

commented