100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Summary

Programming R/ Datacamp - Summary - Tilburg university - Economics

Rating
-
Sold
3
Pages
14
Uploaded on
19-10-2020
Written in
2019/2020

Instagram: ECOsummaries DM me for 20% discount! Summary for the course ''Programming R / Datacamp''. This summary was written in order to study for the midterm as well as for the final. Everything you need to know is available in this summary. Advice: this summary alone will not be enough, the tutorials are as important and maybe even more important than this summary! So make sure to do both! My rounded grade: 7.0 Instagram: ECOsummaries DM me for 20% discount!

Show more Read less
Institution
Course









Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
Study
Course

Document information

Uploaded on
October 19, 2020
File latest updated on
March 18, 2021
Number of pages
14
Written in
2019/2020
Type
Summary

Subjects

Content preview

PROGRAMMING:
PYTHON
SUMMARY +
ASSIGNMENTS

@ECOsummaries
→ 20% discount




1

, Introduction to R
Chapter 1
Math:
Addition: +
Subtraction: -
Multiplication: *
Division: /
Exponentiation: ^
Modulo: %%
Variable assignment:
my_var <- 4
my_fruit <- my_oranges + my_apples
Data types:
Numerics: decimal values 4.5
Integers: natural numbers 4
Logical: boolean values (TRUE or FALSE)
Characters: text / string
Class(‘something’) = gives data type of variable

Chapter 2
Vectors:
Combine function: c(1, 10, 49) or c(‘a’, ‘b’, ‘c’)
Assign names: names(roulette_vector) <- (‘Monday’, etc.)
Adding vectors: A_vector = c(1, 2, 3) and B_vector = c(4, 5, 6) → total_vector = c(5, 7, 9)
Sum: total_poker <- sum(poker_vector) → sums all values inside of the vector
Comparing: total_poker > total_roulette → TRUE
Vector selection: poker_vector <- c(140, -50, 20) with names ‘Mon’, ‘Tue’, ‘Wed’
poker_vector[1] = 140
poker_vector[c(1,3)] = (140, 20)
poker_vector[1:3] = (140, -50, 20)
poker_vector[c(‘Monday’, ‘Wednesday’)] = (140, 20)
Comparison:
Comparison operators: <, >, <=, >=, ==, !=
selection vector <- poker_vector > 0 → will give TRUE or FALSE for each day
poker_vector[selection_vector] → will give only the amounts on TRUE days




2

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
ecosummaries Tilburg University
Follow You need to be logged in order to follow users or courses
Sold
218
Member since
5 year
Number of followers
113
Documents
31
Last sold
2 weeks ago
ECO/IBA/EBE summaries - Tilburg University

Instagram: ECOsummaries DM me for 20% discount! Summaries for Bachelor ECO / EBE / IBA at Tilburg university. No more endless searching in the slides, now you have everything compact at your disposal. For more information, DM our instagram! @ECOsummaries Instagram: ECOsummaries DM me for 20% discount!

4.1

17 reviews

5
8
4
6
3
1
2
1
1
1

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions