Add Papers Marked0
Paper checked off!

Marked works

Viewed0

Viewed works

Shopping Cart0
Paper added to shopping cart!

Shopping Cart

Register Now

internet library
Atlants.lv library
FAQ
4,99 € Add to cart
Add to Wish List
Want cheaper?
ID number:596362
 
Evaluation:
Published: 25.11.2024.
Language: English
Level: College/University
Literature: n/a
References: Not used
Time period viewed: 2021 - 2025 years
Extract

Get the option number from the tutor to complete the tasks. Two data files are given. One is a document
with the extension .doc, the second is an Excel file.
My option is 4.
Import the data from .xlsx file.
Get the structure of the data frame obtained as a result of importing data from Excel (str(data)).
library(readxl)
## Warning: ￿￿￿￿￿ 'readxl' ￿￿￿ ￿￿￿￿￿￿ ￿￿￿ R ￿￿￿￿￿￿ 4.3.3
data1 <- read_excel("D://TSI//3rd course//Data Science Fundamentals//Data_part1_Pr1_Pr2.xlsx", sheet = 'Data4'
str(data1)
## tibble [100 x 2] (S3: tbl_df/tbl/data.frame)
## $ Failed: chr [1:100] "yes" "no" "no" "yes" ...
## $ Rate : chr [1:100] "1/402" "4/1881" "1/1196" "2/109" ...
Divide the rate/total variable into two columns: rate, total (separate()).
library(tidyr)
## Warning: ￿￿￿￿￿ 'tidyr' ￿￿￿ ￿￿￿￿￿￿ ￿￿￿ R ￿￿￿￿￿￿ 4.3.3
data1 <- separate(data1, col="Rate", into=c("Rate", "Total"), sep="/")
str(data1)
## tibble [100 x 3] (S3: tbl_df/tbl/data.frame)
## $ Failed: chr [1:100] "yes" "no" "no" "yes" ...
## $ Rate : chr [1:100] "1" "4" "1" "2" ...
## $ Total : chr [1:100] "402" "1881" "1196" "109" ...
Show the first 10 rows of the data frame (head()).…

Editor's remarks
Load more similar papers

Atlants

Choose Authorization Method

Email & Password

Email & Password

Wrong e-mail adress or password!
Log In

Forgot your password?

Draugiem.pase
Facebook

Not registered yet?

Register and redeem free papers!

To receive free papers from Atlants.com it is necessary to register. It's quick and will only take a few seconds.

If you have already registered, simply to access the free content.

Cancel Register