When I do anything with my variables, for example: Y<-cbind(bank)or liq <-Liq, the error object not found appears. I guess, something is wrong with reading the excel file. I use library("readxl") and h<-read_xlsx("banks_NA.xlsx")to download the dataset.
Here is info about the session and data:
`>ls(h)
[1] "Da" "Dh_a" "Dh_l1" "Dh_m1" "Dl1" "Dm1"
[7] "K" "La_a" "La_l1" "La_m1" "Lh_a" "Lh_l1"
[13] "Lh_m1" "Liq" "Ll1" "Lm1" "Mac" "Na_Da"
[19] "OtR" "OtR_a" "PrT" "Pro" "S" "S_Bl"
[25] "S_Bo" "S_S" "bank" "date" "dis" "foreign"
[31] "live" "rD" "rL" "rQi" "rS" "rSc"
[37] "rSi" "region" "state" "ta"`
`> sessionInfo()
R version 3.5.0 (2018-04-23)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Sierra 10.12.6
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib
locale:
[1] C
attached base packages:
[1] stats graphics grDevices utils datasets methods
[7] base
other attached packages:
[1] sandwich_2.4-0 readxl_1.1.0 plm_1.6-6
[4] openxlsx_4.0.17 gplots_3.0.1 Formula_1.2-2
[7] foreign_0.8-70 class_7.3-14 caTools_1.17.1
[10] car_3.0-0 carData_3.0-1
loaded via a namespace (and not attached):
[1] Rcpp_0.12.16 cellranger_1.1.0 pillar_1.2.2
[4] compiler_3.5.0 forcats_0.3.0 bitops_1.0-6
[7] miscTools_0.6-22 tools_3.5.0 tibble_1.4.2
[10] nlme_3.1-137 lattice_0.20-35 rlang_0.2.0
[13] cli_1.0.0 maxLik_1.3-4 curl_3.2
[16] haven_1.1.1 rio_0.5.10 gtools_3.5.0
[19] lmtest_0.9-36 grid_3.5.0 data.table_1.10.4-3
[22] bdsmatrix_1.3-3 gdata_2.18.0 magrittr_1.5
[25] MASS_7.3-50 assertthat_0.2.0 abind_1.4-5
[28] KernSmooth_2.23-15 utf8_1.1.3 crayon_1.3.4
[31] zoo_1.8-1`
Yesterday, I did exactly the same operations and everything worked perfectly. Today I decided to update R studio and now everything is corrupted...
Related
I'm working on a windows 10 with local R/RStudio installed.
A few days again I updated R to v3.5.3 and RStudio to v1.2.1330.
I didn't check my app immediately, only a few days later. Meanwhile I had to install many Julia/Atom-Juno packages for a training and now when I run (locally) an app I'm working on, all the images are gone.
https://github.com/phileas-condemine/carto_indicateurs
The app looked like that : https://drees.shinyapps.io/Cartographie_des_indicateurs/ (I didn't try to redeploy, even if, being another OS it might still work)
Here is a simple reprex
within app.R (ran within an RStudio project)
library(shiny)
download.file(url = "https://www.rstudio.com/wp-content/uploads/2019/03/RStudio-Logo-Blue-Gray-125.png",
destfile = "www/rstudio.png",mode = "wb")#I have to add this for windows 10
shinyApp(
ui = fluidPage(
tags$img(src="https://www.rstudio.com/wp-content/uploads/2019/03/RStudio-Logo-Blue-Gray-125.png"),
tags$img(src="rstudio.png")
),
server = function(input, output) { }
)
The LOCAL image doesn't render, instead I have a broken image. (the one I get from URL is OK)
When I open the Chrome inspector and check the JS console I have the following error
Failed to load resource: the server responded with a status of 404 (Not Found) rstudio.png:1
I tried to check the reprex with the latest rocker/rstudio image but I can't reproduce it. Probably because it's a Windows 10 related issue.
Here is my sessionInfo()
R version 3.5.3 (2019-03-11)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 17134)
Matrix products: default
locale:
[1] LC_COLLATE=French_France.1252
[2] LC_CTYPE=French_France.1252
[3] LC_MONETARY=French_France.1252
[4] LC_NUMERIC=C
[5] LC_TIME=French_France.1252
attached base packages:
[1] stats graphics
[3] grDevices utils
[5] datasets methods
[7] base
other attached packages:
[1] shiny_1.3.1
loaded via a namespace (and not attached):
[1] compiler_3.5.3
[2] magrittr_1.5
[3] R6_2.4.0
[4] promises_1.0.1
[5] later_0.8.0
[6] htmltools_0.3.6
[7] tools_3.5.3
[8] Rcpp_1.0.1
[9] jsonlite_1.6
[10] digest_0.6.18
[11] xtable_1.8-3
[12] httpuv_1.5.1
[13] mime_0.6
I tried re-installing R v3.5.3 & latest RStudio v1.2.1335, it doesn't fix it.
What troubles me most is that some of the apps render all the images without any problem.
For example this one works alright : https://github.com/phileas-condemine/trafic_dataviz.drees
Is it because of the dependencies that somehow fix it ?
Back to shiny 1.2.0 & R 3.5.2 fixes the problem, all images are displayed correctly. So the "bug" either comes from shiny 1.3.1 or R 3.5.3
R version 3.5.2 (2018-12-20)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 17134)
Matrix products: default
locale:
[1] LC_COLLATE=French_France.1252
[2] LC_CTYPE=French_France.1252
[3] LC_MONETARY=French_France.1252
[4] LC_NUMERIC=C
[5] LC_TIME=French_France.1252
attached base packages:
[1] stats graphics
[3] grDevices utils
[5] datasets methods
[7] base
other attached packages:
[1] bsplus_0.1.1
[2] shinycssloaders_0.2.0
[3] markdown_0.9
[4] stringr_1.3.1
[5] shinyBS_0.61
[6] shinydashboard_0.7.1
[7] shinyjs_1.0
[8] V8_2.2
[9] shinyWidgets_0.4.4
[10] DT_0.5
[11] data.table_1.12.0
[12] dplyr_0.7.8
[13] shiny_1.2.0
loaded via a namespace (and not attached):
[1] Rcpp_1.0.0
[2] pillar_1.3.1
[3] compiler_3.5.2
[4] later_0.8.0
[5] bindr_0.1.1
[6] tools_3.5.2
[7] digest_0.6.18
[8] packrat_0.5.0
[9] lubridate_1.7.4
[10] jsonlite_1.6
[11] tibble_2.0.1
[12] pkgconfig_2.0.2
[13] rlang_0.3.1
[14] rstudioapi_0.9.0
[15] crosstalk_1.0.0
[16] yaml_2.2.0
[17] curl_3.3
[18] bindrcpp_0.2.2
[19] htmlwidgets_1.3
[20] tidyselect_0.2.5
[21] glue_1.3.0
[22] R6_2.3.0
[23] purrr_0.3.0
[24] magrittr_1.5
[25] scales_1.0.0
[26] promises_1.0.1
[27] htmltools_0.3.6
[28] assertthat_0.2.0
[29] mime_0.6
[30] xtable_1.8-3
[31] colorspace_1.4-0
[32] httpuv_1.5.1
[33] stringi_1.2.4
[34] munsell_0.5.0
[35] crayon_1.3.4
I am trying to install DSUR.noof package from GitHub and followed the instructions accordingly
install.packages("devtools")
library(devtools)
install_github("Frostarella/DSUR.noof")
When I try to run the last command(install_github("Frostarella/DSUR.noof") I am getting the below error in Rstudio
Error: 'setInternet2' is defunct.
what could went wrong ? can some one help me
> sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
locale:
[1] LC_COLLATE=English_Sweden.1252
[2] LC_CTYPE=English_Sweden.1252
[3] LC_MONETARY=English_Sweden.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_Sweden.1252
attached base packages:
[1] stats graphics grDevices utils datasets
[6] methods base
other attached packages:
[1] usethis_1.4.0 devtools_2.0.1 ggplot2_3.1.0
loaded via a namespace (and not attached):
[1] Rcpp_0.12.18 pillar_1.3.0 compiler_3.5.1
[4] plyr_1.8.4 bindr_0.1.1 remotes_2.0.2
[7] prettyunits_1.0.2 tools_3.5.1 digest_0.6.15
[10] pkgbuild_1.0.2 pkgload_1.0.2 memoise_1.1.0
[13] tibble_1.4.2 gtable_0.2.0 pkgconfig_2.0.1
[16] rlang_0.2.1 cli_1.0.0 rstudioapi_0.7
[19] yaml_2.2.0 bindrcpp_0.2.2 withr_2.1.2
[22] dplyr_0.7.6 fs_1.2.6 desc_1.2.0
[25] rprojroot_1.3-2 grid_3.5.1 tidyselect_0.2.4
[28] glue_1.3.0 R6_2.2.2 processx_3.2.1
[31] sessioninfo_1.1.1 purrr_0.2.5 callr_3.1.1
[34] magrittr_1.5 backports_1.1.2 scales_1.0.0
[37] ps_1.3.0 assertthat_0.2.0 colorspace_1.4-0
[40] labeling_0.3 lazyeval_0.2.1 munsell_0.5.0
[43] crayon_1.3.4
I was running on Anaconda Rstudio before, then installed CRAN R problem solved.....
I have a vector of raw text that includes English and French words, so there are French words that have accented characters like this:
1 entretien ménager
2 concepteur réseaux
3 service à la clientèle
4 sécurité
5 infirmière auxiliaire
6 opérateur de machinerie en usine
7 consultant stratégique
8 ménage
9 ingénieur civil, gérant projet
10 éducatrice
The command Encoding(variable) tells me that there's a mix of 'unknown' and UTF-8 encodings. All of the ones above are coded as UTF-8.
This code replicates the problem on my mac:
library(foreign)
vec<-c('sécurité', 'service à la clientèle', 'assembleur', 'labour')
write.csv(data.frame(vec), file='~/Desktop/test.csv')
I have tried the same with write_excel_csv() and I get the same results.
I can only assume this is some kind of problem with the utf-8 encoding, but I can' t see my way to figure this out.
Thank you.
Results of sessionInfo()
R version 3.4.1 (2017-06-30)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS High Sierra 10.13.4
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib
locale:
[1] en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8
attached base packages:
[1] grid stats graphics grDevices utils datasets methods base
other attached packages:
[1] readr_1.1.1 bindrcpp_0.2.2 labelled_1.0.0 haven_1.1.1.9000
[5] survey_3.32-1 survival_2.41-3 Matrix_1.2-10 car_2.1-5
[9] stargazer_5.2 foreign_0.8-69 tidyr_0.8.0 dplyr_0.7.4
[13] ggplot2_2.2.1
loaded via a namespace (and not attached):
[1] Rcpp_0.12.16 pillar_1.2.1 compiler_3.4.1 nloptr_1.0.4
[5] plyr_1.8.4 bindr_0.1.1 forcats_0.3.0 tools_3.4.1
[9] lme4_1.1-13 tibble_1.4.2 gtable_0.2.0 nlme_3.1-131
[13] lattice_0.20-35 mgcv_1.8-17 pkgconfig_2.0.1 rlang_0.2.0
[17] cli_1.0.0 rstudioapi_0.7 yaml_2.1.18 parallel_3.4.1
[21] SparseM_1.77 hms_0.4.1 MatrixModels_0.4-1 nnet_7.3-12
[25] glue_1.2.0 R6_2.2.2 minqa_1.2.4 purrr_0.2.4
[29] magrittr_1.5 scales_0.5.0 MASS_7.3-47 splines_3.4.1
[33] assertthat_0.2.0 pbkrtest_0.4-7 colorspace_1.3-2 quantreg_5.33
[37] utf8_1.1.3 lazyeval_0.2.0 munsell_0.4.3 crayon_1.3.4 `
I should add, I have looked at some of the issues on GitHub and SO such as this, this, this, but have not found my answer.
I am trying to run (in R) this off-the-shelf example from the Resource Map function help page:
library(bupaR)
library(eventdataR)
data(patients)
resource_map(patients)
and somehow it is returning this error:
Error: UQ() can only be used within a quasiquoted argument
Can someone help me understand and propose a fix as well? Is it something with my R/Rstudio, because this example comes straight from the "resource_map" help page.
Here is the sessioninfo:
R version 3.4.3 (2017-11-30) Platform: x86_64-apple-darwin15.6.0
(64-bit) Running under: macOS High Sierra 10.13.3
Matrix products: default BLAS:
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK:
/Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib
locale: [1]
en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages: [1] stats graphics grDevices utils
datasets methods base
other attached packages: [1] bindrcpp_0.2 xesreadR_0.2.2
processmonitR_0.1.0 processmapR_0.2.1 eventdataR_0.1.2
petrinetR_0.1.0 [7] edeaR_0.7.2 bupaR_0.3.2
loaded via a namespace (and not attached): [1] Rook_1.1-1
purrr_0.2.4 ggthemes_3.4.0 colorspace_1.3-2
viridisLite_0.3.0 miniUI_0.1.1 [7] htmltools_0.3.6
yaml_2.1.17 plotly_4.7.1 XML_3.98-1.10
rlang_0.2.0 pillar_1.2.1 [13] glue_1.2.0
RColorBrewer_1.1-2 bindr_0.1 plyr_1.8.4
stringr_1.3.0 munsell_0.4.3 [19] gtable_0.2.0
visNetwork_2.0.3 htmlwidgets_1.0 forcats_0.3.0
httpuv_1.3.6.2 DiagrammeR_0.9.2 [25] Rcpp_0.12.15
xtable_1.8-2 readr_1.1.1 scales_0.5.0
jsonlite_1.5 rgexf_0.15.3 [31] mime_0.5
gridExtra_2.3 brew_1.0-6 ggplot2_2.2.1 hms_0.4.1
digest_0.6.15 [37] stringi_1.1.6 dplyr_0.7.4
shiny_1.0.5 grid_3.4.3 influenceR_0.1.0
tools_3.4.3 [43] magrittr_1.5 lazyeval_0.2.1
tibble_1.4.2 tidyr_0.8.0 pkgconfig_2.0.1 xml2_1.2.0
[49] data.table_1.10.4-3 downloader_0.4 lubridate_1.7.3
httr_1.3.1 assertthat_0.2.0 rstudioapi_0.7 [55]
viridis_0.5.0 R6_2.2.2 igraph_1.1.2
shinyTime_0.2.1 compiler_3.4.3
Thanks!
im exploring the koRpus package in R on macOS, in trying to use the treetag function on the following object:
text
[1] "Because I could not stop for Death -" "He kindly stopped for me -"
[3] "The Carriage held but just Ourselves -" "and Immortality"
using the following syntax
> tagged.text <- treetag(as.vector(paste(text, collapse = '')), format = "obj", debug = TRUE)
i get the following error
file: /var/folders/bt/sdf_vz6d3qbd188c7tkz50gw0000gn/T//RtmpoatWov/tempTextFromObject12d3d169614b6.txt
sys.tt.call: /Applications/treetagger/cmd/tree-tagger-english /var/folders/bt/sdf_vz6d3qbd188c7tkz50gw0000gn/T//RtmpoatWov/tempTextFromObject12d3d169614b6.txt
Error in matrix(unlist(strsplit(tagged.text, "\t")), ncol = 3, byrow = TRUE, :
'data' must be of a vector type, was 'NULL'
when i try the emboldened command above on its equivalent, i get this
matrix(unlist(strsplit(paste(text, collapse = ''), "\t")))
[,1] [1,] "Because I could not stop for Death -He kindly stopped for me
-The Carriage held but just Ourselves -and Immortality"
my workspace is as follows
sessionInfo() R version 3.4.2 (2017-09-28) Platform: x86_64-apple-darwin15.6.0 (64-bit) Running under: macOS High Sierra
10.13.1
Matrix products: default BLAS:
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK:
/Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib
locale: [1]
en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages: [1] stats graphics grDevices utils
datasets methods base
other attached packages: [1] quanteda_0.99.12 koRpus_0.10-2
data.table_1.10.4-3 scales_0.5.0 [5] purrr_0.2.4
readr_1.1.1 tidyr_0.7.2 tibble_1.3.4 [9]
tidyverse_1.1.1 gutenbergr_0.1.3 ggplot2_2.2.1
stringr_1.2.0 [13] dplyr_0.7.4 janeaustenr_0.1.5
tidytext_0.1.4
loaded via a namespace (and not attached): [1] reshape2_1.4.2
haven_1.1.0 lattice_0.20-35 colorspace_1.3-2 [5]
htmltools_0.3.6 SnowballC_0.5.1 yaml_2.1.14
rlang_0.1.2 [9] foreign_0.8-69 glue_1.2.0
modelr_0.1.1 readxl_1.0.0 [13] bindrcpp_0.2
bindr_0.1 plyr_1.8.4 munsell_0.4.3 [17]
gtable_0.2.0 cellranger_1.1.0 rvest_0.3.2
psych_1.7.8 [21] evaluate_0.10.1 knitr_1.17
forcats_0.2.0 parallel_3.4.2 [25] broom_0.4.2
tokenizers_0.1.4 Rcpp_0.12.13 backports_1.1.1 [29]
RcppParallel_4.3.20 jsonlite_1.5 fastmatch_1.1-0
mnormt_1.5-5 [33] hms_0.3 digest_0.6.12
stringi_1.1.5 bookdown_0.5 [37] grid_3.4.2
rprojroot_1.2 tools_3.4.2 magrittr_1.5 [41]
lazyeval_0.2.1 pkgconfig_2.0.1 Matrix_1.2-11 xml2_1.1.1
[45] lubridate_1.7.1 assertthat_0.2.0 rmarkdown_1.6
httr_1.3.1 [49] R6_2.2.2 nlme_3.1-131
compiler_3.4.2