Git Product home page Git Product logo

109-1-econdv's People

Contributors

tpemartin avatar

Stargazers

 avatar

Watchers

 avatar  avatar

109-1-econdv's Issues

ggsave時的路徑注意事項

原始

save_gg_unemploymentrate = {
  ggsave(
    ggTwbunemploymentrate,
    file=file.path(root(),"20201021practice/unemploymentrate.svg"),
    width=8,
    height=5
  )
}

對方的root並沒有"20201021practice" folder, 比較保險做法:

save_gg_unemploymentrate = {
  destfile = file.path(root(),"20201021practice/unemploymentrate.svg")
  destDir = dirname(destfile)
  if(!dir.exists(destDir)) dir.create(destDir)
  
  ggsave(
    ggTwbunemploymentrate,
    file=destfile,
    width=8,
    height=5
  )
  
}

init_courseSetup問題

.ghToken="To be announced in Google classroom"
install.packages("devtools")
install.packages("remotes")
remotes::install_github(
"tpemartin/econDV",
auth_token = .ghToken
)

library(econDV)
init_courseSetup() 我複製這串,執行
我的路徑沒有中文耶
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ��C:/Users/money/Documents/R/win-library/3.6��
(as ��lib�� is unspecified)
嘗試 URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/devtools_2.3.2.zip'
Content type 'application/zip' length 339348 bytes (331 KB)
downloaded 331 KB

package ‘devtools’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
C:\Users\money\AppData\Local\Temp\Rtmpe4my5M\downloaded_packages
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ��C:/Users/money/Documents/R/win-library/3.6��
(as ��lib�� is unspecified)
嘗試 URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/remotes_2.2.0.zip'
Content type 'application/zip' length 388462 bytes (379 KB)
downloaded 379 KB

package ‘remotes’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
C:\Users\money\AppData\Local\Temp\Rtmpe4my5M\downloaded_packages
錯誤: Failed to install 'unknown package' from GitHub: HTTP error 401. Bad credentials Rate limit remaining: 59/60 Rate limit reset at: 2020-09-25 04:55:57 UTC


請參見gitter 討論串

addin rmd2drake plan with error in taiwanXMGDPRatio.Rmd


addin -> RMD2DRAKE -> Active Rmd ->Drake Plan -> Make時是否會遇到與我相同的狀況

Error in substr(val, 1, 1) : 無效的多位元組字串於 '<e9><99><b3>?舀'
Loading required package: dplyr

Attaching package: ‘dplyr’

The following objects are masked from ‘package:stats’:

    filter, lag

The following objects are masked from ‘package:base’:

    intersect, setdiff, setequal, union

Loading required package: purrr

Attaching package: ‘lubridate’

The following objects are masked from ‘package:base’:

    date, intersect, setdiff, union

Executing mk_plan_test()
i Consider drake::r_make() to improve robustness.
> target df_taiwanXMGDPratio
`summarise()` ungrouping output (override with `.groups` argument)
> target chosenYear
> target world_import
None of the indicators your requested could be downloaded. Please verify the arguments of the `WDI()` function. You can also type a URL of this form in your browser to check if the World Bank web API is currently serving the indicator(s) of interest: https://api.worldbank.org/v2/country/all/indicator/NE.IMP.GNFS.ZS?format=json&date=1960:2020&per_page=32500&page=1
> target world_export
None of the indicators your requested could be downloaded. Please verify the arguments of the `WDI()` function. You can also type a URL of this form in your browser to check if the World Bank web API is currently serving the indicator(s) of interest: https://api.worldbank.org/v2/country/all/indicator/NE.EXP.GNFS.ZS?format=json&date=1960:2020&per_page=32500&page=1
> target worldTrade
x fail worldTrade
錯誤: target worldTrade failed.
diagnose(worldTrade)$error$message:
  沒有適用的方法可將 'inner_join' 套用到 "NULL" 類別的物件
diagnose(worldTrade)$error$calls:
  world_import %>% inner_join(world_export %>% select(-country), 
    by = c("iso2c", "year")) %>% select(year, iso2c, country, 
    contains("indicator")) %>% rename_with(.fn = function(x) {
    case_when(x == "indicator.x" ~ "M", x == "indicator.y" ~ 
        "X", TRUE ~ x)
})
  base::withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  base::eval(quote(`_fseq`(`_lhs`)), env, env)
  base::eval(quote(`_fseq`(`_lhs`)), env, env)
  `_fseq`(`_lhs`)
  magrittr::freduce(value, `_function_list`)
  function_list[[i]](value)
  dplyr::inner_join(., world_export %>% select(-country), by = c("iso2c", 
    "year"))
此外: Warning message:
package ‘drake’ was built under R version 4.0.3 
> version
               _                           
platform       x86_64-w64-mingw32          
arch           x86_64                      
os             mingw32                     
system         x86_64, mingw32             
status                                     
major          4                           
minor          0.2                         
year           2020                        
month          06                          
day            22                          
svn rev        78730                       
language       R                           
version.string R version 4.0.2 (2020-06-22)
nickname       Taking Off Again  

R版本升級後,套件如何移過去

除了重安裝。同學很熱心查到以下方法,大家有需要也可以試試

重裝pakage的方法是先copy舊版R底下所有套件過去新版R底下然後執行

update.packages(ask = FALSE,
                checkBuilt = TRUE)

讓套件全部重裝到最新版的

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.