Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Can anyone help ? I keep getting this error. I'm not sure if my code is wrong. Can anyone shed light on where I may
Can anyone help ? I keep getting this error. I'm not sure if my code is wrong. Can anyone shed light on where I may have went wrong ?
R RStudio X File Edit Code View Plots Session Build Debug Profile Tools Help + . PR - H | Go to file/function 1 68 . Addins R Project: (None) Untitled1* x @ lab 2.R x @ Untitled2* * @ Untitled3* x Untitled4* x sp x Environment History Connections Tutorial Source on Save - Run - Source | Import Dataset * 158 MiB List . G . 39 #Answer : 1. 03643 R - Global Environment Q 40 41 #Q2 Data 42 #You are given a dataset called Sparrows. csv. It contains 861 samples of the O sp 861 obs. of 1 variable 43 #weight of sparrows measured during sampling. As an ecologist you must determine Values 44 # the nature of the data collected. 2. 28 45 #(Open the dataset to see the variable name at the top or use the mu 46 #"names" function. Remember R is case sensitive to variable names! ) n 1000 47 p 0. 3 48 #(a) Produce a histogram and comment on its shape. 1mk (code) P num [1:5] 0. 04 0.2 0. 36 0. 24 0. 16 49 setwd ("~/Sparrows") 0. 63 50 sp=read. table("sparrows . csv" , header=T, sep=", ") sigma 1. 0777754868246 51 view (sp) 1. 1616 52 hist (sp$wt) Sigma2 53 X num [1:5] 0 1 2 3 4 54 #Answer (Comment on the shape of the histogram) : 1mk 55 Files Plots Packages Help Viewer 56 #(b) Generate a quantile plot to determine if the sparrow weight data are New Folder * Delete Rename More * 57 #normally distributed. Clearly explain why or why not! 1mk (code) C 58 0 Home > Sparrows ... 59 Name Size Modified 60 #Answer (Comment on the shape of the quantile plot): 61 # 1mk 62 Sparrows.CSV 4.8 KB Oct 25, 2021, 7:08 PM 62 54.1 (Top Level) R Script O .Rhistory 8.3 KB Oct 26, 2021, 3:10 PM R .RData 4.6 KB Oct 26, 2021, 3:10 PM Console Terminal X Jobs x -0 R R 4.1.1 . ~/Sparrows/ Type 'demo () ' for some demos, 'help()' for on-line help, or 'help. start()' for an HTML browser interface to help. Type 'q()' to quit R. [workspace loaded from ~/ . RData] setwd("~/Sparrows") #(a) Produce a histogram and comment on its shape. 1mk (code) setwd("~/Sparrows") > sp=read . table ("sparrows . csv" , header=T, sep=", ") View (sp) > hist (wt) Error in hist(wt) : object 'wt' not found View (sp) > hist (sp$wt) Error in hist. default (sp$wt) : 'x' must be numeric > Windows Ink Workspace Type here to search O NORBORO R 28CADE 3:14 PM 10/26/2021 FAStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started