Summary Data Mining introduction into R + solutions exercices (introduction)
8 views 0 purchase
Course
Data Mining (FOOO759A)
Institution
Universiteit Gent (UGent)
Book
An Introduction to Statistical Learning
This document contains a brief summary of all codes covered in the introduction. In addition, this document contains the solutions to the exercises in this “introchapter”.
Readings for Analytics in Accounting & Financial Management
All for this textbook (7)
Written for
Universiteit Gent (UGent)
Handelsingenieur
Data Mining (FOOO759A)
All documents for this subject (7)
Seller
Follow
Worstje2021
Reviews received
Content preview
RStudio: functions and definitions
Introduction in R
<-: assign values to variables
print(a): shows us the value stored in a
ls (): you can see all the variables saved in your workspace
rm (): you can delete any variable that you don’t want
rm (list=ls ()): remove all objects at once
#: commenting your code
install. Packages (): are installed in R not RStudio.
installed. Packages (): to see which packages you already have installed.
library (): loading a package.
data (): you can see all the available datasets.
seq (): creates a vector of numbers
seq (1, 10) or 1:10 1 defines start, 10 defines end
seq (1, 10, 2) 1 defines start, 10 defines end, 2 how much to jump by
1 3 5 7 9
seq (1, 15, length = 5) sequences of 5 numbers equally spaced between 1 and 15
1.0 4.5 8.0 11.5 15.0
sum (): adds numbers up
c (): concatenate: it will join the numbers 1,3,2,5 and save them as a vector named x
when type x, it gives us back the vector
> x <- c (1, 3, 2, 5)
>x
[1] 1 3 2 5
abs (): absolute value
class (): helps determine what type of object we have (vb. numeric, character, data. frame…)
str (): finding out more about the structure of an object
head (): the first n rows present in the input data frame
$: accessor: to access different variables represented by columns included in this data frame
Record$student_id or record [[“student_id”]]
Murders$population
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller Worstje2021. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $3.79. You're not tied to anything after your purchase.