Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

DATA MINING LAB

EXPERIMENT–3

AIM: Get and Clean data using swirl exercises. (Use „swirl‟ package, library
and install that topic from swirl).

Swirl: swirl is a software package for the R programming language that turns
the R console into an interactive learning environment. Users receive
immediate feedback as they are guided through self-paced lessons in data
science and R programming.

 swirl is a platform for learning (and teaching) statistics and R


simultaneously and interactively. It presents a choice of course lessons
and interactively tutors a user through them.
 A user may be asked to watch a video, to answer a multiple-choice or
fill-in-the blanks question, or to enter a command in the R console
precisely as if he or she were using R in practice. Emphasis is on the last,
interacting with the R console.
 User responses are tested for correctness and hints are given if
appropriate. Progress is automatically saved so that a user may quit at
any time and later resume without losing work.
 swirl leans heavily on exercising a student's use of the R console. A
callback mechanism, suggested and first demonstrated for the purpose
by Hadley Wickham, is used to capture student input and to provide
immediate feedback relevant to the course material at hand.

The program is initiated with swirl().Functions which control


swirl's behavior include bye() to quit, skip() to skip a question, main() to return
to the main menu, play() to allow experimentation in the R console without
interference from swirl, nxt() to resume interacting with swirl, and info() to
display a help menu.

Installing swirl (from CRAN)

The easiest way to install and run swirl is by typing the following from the R
console:

SRK INSTITUTE OF TECHNOLOGY PgNo :


DATA MINING LAB

> install.packages("swirl")

> library(swirl)

> swirl()

| Welcome to swirl! Please sign in.

What shall I call you? Yasaswi

| Thanks, Yasaswi. Let's cover a couple of quick housekeeping items

| select from a list, that means it's your turn to enter a response, then press

| Enter to continue.

Select 1, 2, or 3 and press Enter

1: Continue.

2: Proceed.

3: Let's get going! Selection:1

| You can exit swirl and return to the R prompt (>) at any time by pressing the

| Esc key. If you are already at the prompt, type bye() to exit and save your

| progress. When you exit properly, you'll see a short message letting you
know

| you've done so.

| When you are at the R prompt (>):

| -- Typing skip() allows you to skip the current question.

| -- Typing bye() causes swirl to exit. Your progress will be saved

| -- Typing main() returns you to swirl's main menu.

| -- Typing info() displays these options again.

SRK INSTITUTE OF TECHNOLOGY PgNo :


DATA MINING LAB

| Let's get started!

...

| To begin, you must install a course. I can install a course for you from the

| internet, or I can send you to a web page

| (https://github.com/swirldev/swirl_courses) which will provide course


options

| and directions for installing courses yourself. (If you are not connected to

| the internet, type 0 to exit.)

1: R Programming: The basics of programming in R

2: Regression Models: The basics of regression modeling in R

3: Statistical Inference: The basics of statistical inference in R

4: Exploratory Data Analysis: The basics of exploring data in R

5: Don't install anything for me. I'll do it myself.

Selection: 2

|
================================================================
======| 100%

| Course installed successfully!

| Please choose a course, or type 0 to exit swirl.

1: Regression Models

2: Take me to the swirl course repository!

Selection: 0

| Leaving swirl now. Type swirl() to resume.

SRK INSTITUTE OF TECHNOLOGY PgNo :


DATA MINING LAB

As we continue adding new features and content, we will make new versions
available on CRAN as appropriate (every 1-2 months, most likely).

Installing the latest development version (from GitHub)

To access the most recent features and content, you can install and run the
development version of swirl using the devtools package:

install.packages("devtools")

devtools::install_github("swirldev/swirl")

library(swirl)

swirl()

SRK INSTITUTE OF TECHNOLOGY PgNo :


DATA MINING LAB

SRK INSTITUTE OF TECHNOLOGY PgNo :

You might also like