knitr::opts_knit$set(root.dir = rprojroot::find_rstudio_root_file()) # Set WD to Root here::i_am("dev/hrv-wf-raw.Rmd") library(here) library(tidyverse)
Using readtext::readtext()
, Must read with UTF-16LE
encoding
hrv_sim_raw <- readtext::readtext(sipsANS_example("HRV"), encoding = "UTF-16LE") typeof(hrv_sim_raw) class(hrv_sim_raw) hrv_sim_raw
See text as character vector
hrv_sim_raw$text[1]
This would fail
readLines(here("my_data/HRV-sim/File1.txt"), encoding = "UTF-16LE") readr::read_lines(here("my_data/HRV-sim/File1.txt")) readr::read_file(here("my_data/HRV-sim/File1.txt"))
hrv_sim_raw %>% tibble::tibble() %>% pull(text)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.