Skip to content

Instantly share code, notes, and snippets.

@maurolepore
Last active November 12, 2021 16:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maurolepore/45df0c5658b81fe2a8cd38309e865927 to your computer and use it in GitHub Desktop.
Save maurolepore/45df0c5658b81fe2a8cd38309e865927 to your computer and use it in GitHub Desktop.

Here: https://git.io/JXbat

--

library(fs)

path <- fs::path_home("tmp", "inputs", "Loans_results_company.rda")
file_exists(path)
#> /home/mauro/tmp/inputs/Loans_results_company.rda 
#>                                             TRUE

readr::read_rds(path)
#> # A tibble: 24,156 × 16
#>    investor_name portfolio_name scenario     allocation          id company_name
#>    <chr>         <chr>          <chr>        <chr>            <dbl> <chr>       
#>  1 Meta Investor Meta Investor  ETP2017_SDS  portfolio_weight    NA honda motor…
#>  2 Meta Investor Meta Investor  ETP2017_B2DS portfolio_weight    NA honda motor…
#>  3 Meta Investor Meta Investor  ETP2017_NPS  portfolio_weight    NA honda motor…
#>  4 Meta Investor Meta Investor  ETP2017_SDS  portfolio_weight    NA mazda motor…
#>  5 Meta Investor Meta Investor  ETP2017_B2DS portfolio_weight    NA mazda motor…
#>  6 Meta Investor Meta Investor  ETP2017_NPS  portfolio_weight    NA mazda motor…
#>  7 Meta Investor Meta Investor  ETP2017_SDS  portfolio_weight    NA mitsubishi …
#>  8 Meta Investor Meta Investor  ETP2017_B2DS portfolio_weight    NA mitsubishi …
#>  9 Meta Investor Meta Investor  ETP2017_NPS  portfolio_weight    NA mitsubishi …
#> 10 Meta Investor Meta Investor  ETP2017_SDS  portfolio_weight    NA suzuki moto…
#> # … with 24,146 more rows, and 10 more variables: equity_market <chr>,
#> #   scenario_geography <chr>, year <dbl>, ald_sector <chr>, technology <chr>,
#> #   plan_tech_prod <dbl>, plan_carsten <dbl>, scen_tech_prod <dbl>,
#> #   plan_sec_prod <dbl>, plan_sec_carsten <dbl>

readRDS(path)
#> # A tibble: 24,156 × 16
#>    investor_name portfolio_name scenario     allocation          id company_name
#>    <chr>         <chr>          <chr>        <chr>            <dbl> <chr>       
#>  1 Meta Investor Meta Investor  ETP2017_SDS  portfolio_weight    NA honda motor…
#>  2 Meta Investor Meta Investor  ETP2017_B2DS portfolio_weight    NA honda motor…
#>  3 Meta Investor Meta Investor  ETP2017_NPS  portfolio_weight    NA honda motor…
#>  4 Meta Investor Meta Investor  ETP2017_SDS  portfolio_weight    NA mazda motor…
#>  5 Meta Investor Meta Investor  ETP2017_B2DS portfolio_weight    NA mazda motor…
#>  6 Meta Investor Meta Investor  ETP2017_NPS  portfolio_weight    NA mazda motor…
#>  7 Meta Investor Meta Investor  ETP2017_SDS  portfolio_weight    NA mitsubishi …
#>  8 Meta Investor Meta Investor  ETP2017_B2DS portfolio_weight    NA mitsubishi …
#>  9 Meta Investor Meta Investor  ETP2017_NPS  portfolio_weight    NA mitsubishi …
#> 10 Meta Investor Meta Investor  ETP2017_SDS  portfolio_weight    NA suzuki moto…
#> # … with 24,146 more rows, and 10 more variables: equity_market <chr>,
#> #   scenario_geography <chr>, year <dbl>, ald_sector <chr>, technology <chr>,
#> #   plan_tech_prod <dbl>, plan_carsten <dbl>, scen_tech_prod <dbl>,
#> #   plan_sec_prod <dbl>, plan_sec_carsten <dbl>

Created on 2021-11-12 by the reprex package (v2.0.1)

@fariiaakh
Copy link

``library(tidyverse)
library(r2dii.utils)
path_dropbox_2dii(read_rds("PortCheck_v2/10_Projects/ST_TESTING_LOANS/inputs/Loans_results_company.rda"))
#> Warning in readRDS(con, refhook = refhook): cannot open file
#> 'PortCheck_v2/10_Projects/ST_TESTING_LOANS/inputs/Loans_results_company.rda': No
#> such file or directory
#> Error in readRDS(con, refhook = refhook): cannot open the connection

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment