R programming

Đang Thực Hiện Đã đăng vào 3 năm trước Thanh toán khi bàn giao
Đang Thực Hiện Thanh toán khi bàn giao

1. library(nycflights13)

data(flights)

(a) Find all the flights that departs in July.

(b) Find all the flights that flew to Houston (IAH or HOU).

(c) Find all the flights that flew to Hou or Originated from “JFK”.

2. Examine the R expression pairs(iris[1:4], main="Andersen's Iris Data -- 3 species", pch=20,

col=unclass(iris$Species)+2)

Use a similar expression to produce a scatter plot matrix of the variable mpg, disp, hp, drat, and qsec in the data frame mtcars. Use different colors to identify cars belonging to each of the categories defined by the carsize variable.

[login to view URL] on simulated dataset.

(a) Generate a random sample of size 10, 000 from gamma distribution with scale parameter equal

to 1 and shape parameter equal to 2.

(b) Form it into a 1000 x 10 matrix.

(c) Use the apply() function on this matrix to compute the means of the 1000 rows. Note that the

resulting vector comprises the mean of 1000 random samples of size 10 from the above matrix.

(d) Examine the distribution of the sample mean random variable graphically using the vector of

simulated sample means and the R function hist(), plot(), boxplot(), and qqnorm(). As an argument

to the plot() function, use the object created by using density() function on the mean vector.

Note: If you execute the R command par(mfrow = c(2, 2)) before you execute any of the plot

commands, the 4 plots will appear in a single page.

4. Stock Prices:

• Check out the yahoo webpage of historical stock price data for Netflix (NFLX):

[login to view URL]).

• Change the range of Date from 01/01/2021 to 03/15/2021. Click on “Apply” before

“Download”. Save the .csv file to your computer.

• Go to “File” – “Import Dataset” – “From CSV” (If “From CSV does not work, try other

available options then”)

• Paste the path of file into top blank, then click on “update” on top right, and “import” on

bottom right.

• View(yourdata)

(a) Examine the data, then create a line plot of the “Close” price by “Date”. Color the line darkgreen.

(b) Label the graph properly by adding a title, a label on the x-axis, and a label on the y-axis.

5. Tidy Tornadoes.

(a) Import the tornado data from [login to view URL]

(b) Create a data frame with columns year (`yr`), month (`mo`), state (`st`), and Fujita score (`f`).

(c) Count the number of tornadoes for each month.

(d) Count the number of tornadoes for each Fujita score.

(e) Do a bar chart to show the number of tornadoes for each month. The height of the bars represents

the count of tornadoes. Title and label the bar chart properly.

6. Old Faithfull:

• The “geyser” data from the “MASS” package gives duration and waiting times for the Old

Faithful Geyser in Yellowstone National Park, Wyoming. Read the description about the

dataset. Notice the description for two variables.

(a) Load the “geyser” data by function data(). Remember to install package if you don’t have

“MASS” loaded.

(b) Construct a histogram for “duration” with a histogram. Choose proper binwidth, and/or origin

and/or bins. Check out the R document for the function hist().

(c) Construct a proper graph to show “waiting” and “duration”.

7. Parking Birmingham Dataset:

(a) Import the Birmingham Parking data from [login to view URL]

• There are four variables in the dataset: SystemCodeNumber, Capacity, Occupancy, and

LastUpdated. Browse the variables and values. Think of a question that is interested to you.

(b) Generate a proper graph to visualize the information and answer to your questions.

(c) Choose proper color, size, shape, and labels on the graph.

corrections

carsize variable is defined as :

> carsize <- cut(mtcars[, "wt"], c(0, 2.5, 3.5, 5.5), labels=c("Compact", "Midsize", "Large"))

Ngôn ngữ lập trình R

ID dự án: #29688887

Về dự án

6 đề xuất Dự án từ xa 3 năm trước đang mở

Được trao cho:

ringku740

Hello, I am currently pursuing a PhD at CAS, Beijing. I completed both bachelor's and master’s degrees in Statistics. Having 10+ years of experience in the area of statistical and machine learning algorithms and models Thêm

$30 USD trong 2 ngày
(28 Đánh Giá)
4.8

6 freelancer chào giá trung bình$33 cho công việc này

shish1992

hey there I'm an expert in data science with over 5 years working experience I'm ready to begin now ..........................

$20 USD trong 7 ngày
(8 Nhận xét)
4.1
anthobio23

hi, I'm data scientist and expert in R and Python i can help you in this projet. write me and we talk about the project

$20 USD trong 2 ngày
(9 Nhận xét)
3.3