here() and ggsave "I will set your computer on fire" - Why?

  Рет қаралды 1,309

CradleToGraveR

CradleToGraveR

Күн бұрын

Пікірлер: 10
@DM-py7pj
@DM-py7pj 7 ай бұрын
Your use of zoom is fantastic. What software are you using, please?
@CradleToGraveR
@CradleToGraveR 5 ай бұрын
Final Cot Pro. I use the YT Zoom plugin a lot. That’s probably it.
@mphandejohn
@mphandejohn 2 жыл бұрын
Very helpful
@mikegherbal2260
@mikegherbal2260 3 жыл бұрын
I am having this error "Error in here("Data Analyst/R") : could not find function "here" is there any specific package to install to use the function "here"?
@eduardozanette9236
@eduardozanette9236 2 жыл бұрын
What is the answer to the video title, after all?
@CradleToGraveR
@CradleToGraveR 2 жыл бұрын
That's funny that I forgot to answer this. Check out this blog post here: malco.io/2018/11/05/why-should-i-use-the-here-package-when-i-m-already-using-projects/ Basically: If the first line of your R script is setwd("C:\Users\jenny\path\that\only\I\have") "I will come into your office and SET YOUR COMPUTER ON FIRE 🔥." If the first line of your R script is rm(list = ls()) "I will come into your office and SET YOUR COMPUTER ON FIRE 🔥." Source 2: twitter.com/hadleywickham/status/940021008764846080
@CanDoSo_org
@CanDoSo_org 2 жыл бұрын
Hi, I really don't get why here("data". "raw", "my_data.csv") is better than "data/raw/blah.csv". As for me, the latter is much simpler and more intuitive.
@MarkGingrass
@MarkGingrass 2 жыл бұрын
Works fine for a Unix based system. Try that code on Windows and it won't work. Your forward slashes would need to be back slashes. Does that make sense?
@CradleToGraveR
@CradleToGraveR 2 жыл бұрын
Sometimes you may change your working directory using setwd(). The here() package doesn't care that you changed it. It knows the projects path and maintains it. One goal of most programming languages is to have consistency across platforms. The other comment I made about "/" vs "\" is yet another example of how here() is useful. If you share your code with a Windows user and you don't use the here() methods, the Windows user will have to replace you path "data/raw/blah.csv" with "data aw\blah.csv." It doesn't seem like much, but multiply that by hundreds of lines of code. Or, if a beginner tries to run your code they may give up quickly because it simply won't run because the forward/backwards slash issue. It's just a pain.
@CanDoSo_org
@CanDoSo_org 2 жыл бұрын
@@CradleToGraveR Thanks, man. That makes sense.
Who am I? Why do I teach R?
46:59
CradleToGraveR
Рет қаралды 747
Add Comments to Excel with RStudio and openxlsx package [4k]
10:47
Каха и дочка
00:28
К-Media
Рет қаралды 3,2 МЛН
Three approaches to organize your R project (CC178)
16:59
Riffomonas Project
Рет қаралды 8 М.
Windows Task Scheduler R Script Automate
12:40
CradleToGraveR
Рет қаралды 10 М.
Now I Know Why Most People Don’t Use gRPC
19:11
ArjanCodes
Рет қаралды 57 М.
Split Data R Caret Training and Test
14:15
CradleToGraveR
Рет қаралды 9 М.
tidyverse - tidy data - Tibble Tribble Data Frame - Differences? R!
8:29
Cross Validation Overview with R
11:24
CradleToGraveR
Рет қаралды 1,8 М.
Unite using the Tidyverse  & Separate Data R
8:17
CradleToGraveR
Рет қаралды 1,6 М.
Load Excel File with Formatting with R and openxlsx
8:05
CradleToGraveR
Рет қаралды 2,8 М.
R Project and Here Package
15:55
Ashwin Malshe
Рет қаралды 2,7 М.