Comments (5)
re: 2, I believe (though haven't confirmed) that you can use forward slashes on Windows, it's just not how system commands return file paths 😄 (Update around 12:30 Eastern time -- I got a friend to run file.exists(gsub("\\\\", "/", list.files(full.names = TRUE)[[1]]))
for me to confirm that, yes, forward slashes are at least fine on their Windows machine)
As for the main conversation, I'm going to tag in @datacarpentry/curriculum-advisors-geospatial for some additional opinions! It's worth noting that we use relative paths throughout the workshop (for instance, https://preview.carpentries.org/r-raster-vector-geospatial/01-raster-structure.html ) and not just in this lesson, so if we made this change I think it'd ideally be applied across lessons.
from r-intro-geospatial.
Sorry for the delay on this issue! After talking with the rest of the CAC, we decided:
- We currently don't want to switch the workshop (both this lesson as well as the other lessons) over to using
here
; while we use and love the package, we worry that introducing the package at the start of the project management lesson will confuse learners. We'd rather keep focusing on using R projects and relative paths for filesystem management. - That said, we think it's worth adding an instructor note both to mention "if you want to introduce
here
, this is a good place to do it" and to have instructors ensure all learners are using a new project.
from r-intro-geospatial.
@mikemahoney218 Thanks for the reply. I had forgotten about this to be honest 😅 I think based on what you said that's a good compromise. I hope it was a useful conversation. I love here
and find that my students find it easy to understand for managing paths within a project so just thought it was a suggestion worth raising 😊
from r-intro-geospatial.
Howdy @lquayle88 ! I'm one of the maintainers for this lesson 😄
Would you be able to show me where in the lesson you'd like to change to use here
? I see getwd()
in the episode 2 intro, but not anywhere else in the project. I agree that using here
is a good practice, but would be a bit worried about losing focus if we went into the details of the here
package, especially if the rest of the lesson is using relative paths and not moving the working directory around.
from r-intro-geospatial.
Hi @mikemahoney218. Thanks for the speedy reply!
Yes, getwd()
is used in the introduction of the project so I was suggesting replacing that with a brief introduction to here
for two reasons:
-
getwd()
works in the manner suggested when the working directory has defaulted to the project top level upon opening a project but will not work if this changes for some reason (nor will any relative path used later in the lesson) buthere()
will always find the path to the top level of an open project; in essence it is just more robust -
later in the lesson relative paths are built (to read the data for example) and using
here
will not only ensure these paths are robust in the event that the working directory becomes altered (this can happen), but also means that the paths can be built in a system agnostic manner; some users may be using windows machines on which backslashes are used rather than forward slashes and the relative paths in the later episodes all show forward slashes.
I understand the balancing act when it comes to focus but given that using here
appears to be creeping in as the "best practice" when it comes to writing portable R code and how quickly it could be covered to a sufficient level, it is my opinion that an episode called "Project Management in RStudio" would be the ideal place to lay this foundation for novice users.
All of this is just a suggestion of course 😊
from r-intro-geospatial.
Related Issues (20)
- Episode 3 Data Structures: Challenge 1 solution: factor is now character
- Episode 3 Data Structures: reword section under Factors
- Episode 3 Data Structures: Adjust Challenge 3 for factors/strings HOT 5
- Episode 3 Data Structures: Revise Solution to Challenge 4
- Episode 4: Data Structures: Exploring Data Frames - Solution to Challenge 2
- Episode 4: Data Structures: Exploring Data Frames - `rbind` and factors
- Lesson Contribution - Moving paragraphs to clarify R vs RStudio HOT 1
- Need jump lists (anchors) for headings HOT 1
- Keypoints and objectives don't match for Exploring Data Frames episode
- Removing factors HOT 3
- Suggestions for Exploring Data Frames Challenge 3 HOT 2
- ggsave isntead of pdf in writing data HOT 5
- datacarpentry/r-intro-geospatial HOT 1
- Transition To Workbench in May HOT 12
- Link in reference page returns a 404
- Links need to be fixed in CONTRIBUTING.md
- sandpaper: unknown div text-center
- ggplot2 package HOT 1
- PR run failed: Build and Deploy Website HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from r-intro-geospatial.