{"id":31154,"date":"2018-02-20T23:50:30","date_gmt":"2018-02-20T23:50:30","guid":{"rendered":"https:\/\/writemyessayfree.com\/biostatistics-4"},"modified":"2017-08-16T06:03:03","modified_gmt":"2017-08-16T06:03:03","slug":"biostatistics-4","status":"publish","type":"post","link":"https:\/\/www.benedictsol.com\/blogs\/biostatistics-4\/","title":{"rendered":"biostatistics"},"content":{"rendered":"<div class=\"the_content_wrapper\">\n<p>biostatistics<\/p>\n<p>The goal of this lab is to introduce you to R and RStudio, which you\u2019ll be using throughout BIOL 3000 both to learn the statistical concepts discussed in the textbook <\/p>\n<p>and also to analyze real data and come to informed conclusions.<\/p>\n<p>Instructions: For all of the problems below, copy the R commands and the results of the R commands into the green boxes.<\/p>\n<p>1. Show that the mathematical quantity e \u03c0 i = -1 + 0i. Copy your R statement and result into the box below. (Hint: the imaginary number i can be created using <\/p>\n<p>(0+1i) in R. (1 points).<\/p>\n<p>2. The Fibonacci sequence appears in many biological structures. It is formed by starting with the number 0, 1 and then adding the last two numbers to get the next <\/p>\n<p>number: 0, 1, 1, 2, 3, 5, 8, etc. Create variable called fib that is a numeric vector with the first 10 values of the Fibonacci sequence. Type the name of the variable <\/p>\n<p>fib so that it is displayed. (1 points).<\/p>\n<p>3. Create a character vector gtypes that contains three text strings \u201cAA\u201d, \u201cAa\u201d, and \u201caa\u201d representing three diploid genotypes. Type the name of the variable <\/p>\n<p>gtypes so that it is displayed. Then use the paste() function to create a single text string displaying all three genotypes. (1 points).<\/p>\n<p>4. Use R to create the following a variable mymat that contains numeric matrix with 0.1, 2, 4 in the first column, 7, 3, 100 in the second column, and -1, -0.9, 8, <\/p>\n<p>in the third column. Type the name of the variable mymat so that it is displayed. Then use the transpose function to display the transpose of the matrix mymat. (1 <\/p>\n<p>points).<\/p>\n<p>5. Create a list myvars with elements fib, gtypes, and mymat. Type the name of the variable myvars so that it is displayed. Multiply the third element of the list <\/p>\n<p>by the number p. (1 points).<\/p>\n<p>6. Consider the following data:<\/p>\n<p>Age Height Gender Smoker<\/p>\n<p> 22 66 F FALSE<\/p>\n<p> 25 71 M TRUE<\/p>\n<p> 28 64 F TRUE<\/p>\n<p>Use the function data.frame() to create a data frame object called mydata for these data with the column names and values above. Type the name of the variable mydata <\/p>\n<p>so that the data set is displayed. (1 points).<\/p>\n<p>7. Import the data set in the Excel file Lab2AssignmentData.xlsx into an R data frame variable called mussels. This data set contains the shell length and gonad <\/p>\n<p>weights of marine mussels. Create a scatter plot with shell length on the x-axis and gonad weight on the y-axis. Above the plot, click on the Export button and select <\/p>\n<p>Copy to Clipboard\u2026 from the menu. On the panel that appears, click the Copy Plot button and paste the plot into the green box below after your R commands. (2 points).<\/p>\n<p>8. If it is not currently in your workspace, use the following url to import the birth data into an R data file: http:\/\/www.openintro.org\/stat\/data\/present.R you <\/p>\n<p>have. Create a line plot of the total number of children (y-axis) versus the year (x-axis) and copy\/paste the plot into the green box below after your R commands. <\/p>\n<p>(Hints: the y-variable can be entered as present$boys + present$girls. A line plot can be produced by adding a lower case L, \u201cl\u201d, as an additional parameter in the <\/p>\n<p>plot function.) (2 points).<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>biostatistics The goal of this lab is to introduce you to R and RStudio, which you\u2019ll be using throughout BIOL 3000 both to learn the statistical concepts discussed in the textbook and also to analyze real data and come to <a href=\"https:\/\/www.benedictsol.com\/blogs\/biostatistics-4\/\" class=\"read-more\">Read More &#8230;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-31154","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/posts\/31154","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/comments?post=31154"}],"version-history":[{"count":0,"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/posts\/31154\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/media?parent=31154"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/categories?post=31154"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/tags?post=31154"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}