Skip to content

NCSU-Libraries/intro-to-prog-r

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NC State University Libraries Logo

NC State University Libraries Python Workshops

NC State Libraries Workshops Data Science Services GetDataHelp Email: getdatahelp@ncsu.edu


Introduction to Programming with R

Running in Google Colab

Basic Syntax and Operators Open in Colab — Basic Syntax and Operators

Control Flow and Functions Open in Colab — Control Flow and Functions

These materials are used in NC State University Libraries' Data Science Services workshops covering practical data skills (Python, R, visualization, and analysis).


🚀 Quick start

  1. Click a workshop badge above to open in Colab.
  2. Run the install cell when prompted (section below).
  3. Runtime → Restart runtime.
  4. Runtime → Run all. ✅

📘 Included notebooks

  • 🧱 Basic Syntax and Operators — variables, types, lists, dicts, and more.
  • 🔁 Control Flow and Functions — conditionals, loops, functions, and scope.

🧩 Solutions

  • Basic Syntax and Operators — Solutions Open in Colab — Solutions: Basic Syntax and Operators

  • Control Flow and Functions — Solutions Open in Colab — Solutions: Control Flow and Functions

💻 Use on Google Colab

This folder contains Python/Jupyter equivalents of the R workshop notebooks. You can run them directly in Google Colab without installing anything locally.

🔗 Open in Colab

  1. Click a badge above to open directly in Colab.

Alternatively, in Colab: File → Open Notebook → GitHub tab → paste the repo URL https://github.com/NCSU-Libraries/intro-to-prog-r and select the notebooks in the repository root.

💾 Save outputs to Google Drive (optional)

GET INSTRUCTIONS FOR ADDING GOOGLE DRIVE WHEN USING R INTERPRETER If you want to persist outputs or datasets:

from google.colab import drive
drive.mount('/content/drive')
# e.g., save under /content/drive/MyDrive/intro-to-prog-r/
# e.g., save under /content/drive/MyDrive/intro-to-prog-py/

▶️ Run the notebooks

After installs finish:

  1. Runtime → Restart runtime (recommended) so freshly installed packages are active.
  2. Runtime → Run all.

🛠️ Troubleshooting

  • If a package fails to install, re-run the install cell; transient network issues are common.
  • For large installs, ensure you restarted the runtime before executing the rest of the notebook.
  • If you see import errors, verify the requirements.txt URL matches the branch you want.

About

Introduction to Programming with R

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •