title: “R Homework 1” author: “Gabby Krochmal” date: “Ecology Lab - Summer 2017” output: html_document: fig_caption: yes fig_height: 5 fig_width: 5 highlight: tango theme: default toc: yes toc_float: collapsed: no smooth_scroll: no pdf_document: fig_caption: yes fig_crop: no highlight: tango number_sections: no header-includes: - - geometry: margin=1in fontsize: 11pt —

Q1: What are the differences among R, R Studio, and R Markdown?

R is the programming language and software, R Studio is the actual program we open and has the console which includes a console to see our work, there’s an editor that runs the code, plots graphs, and saves our work history. R Markdown is the formatting syntax to make HTML, PDF and MS word documents in R Studio so its easier to read our homework.

Q2: What are the differences among the R console, R script, and R Markdown file?

R console is the executed commands for R, R script is the pain text file with R commands in it where we can write our assignments, and R markdown file is a moree user friendly way to present our work in a report format.

Q3: What format must your homework be turned-in as to receive full credit?

R Markdown format

Q4: Compute the following two equations and present your answers below.

Note: The below code is math mode. You can see the formula in the HTML or PDF.

\[ \tan(1) - (67.2^{0.5} * 19) \] = -154.1962 \[ \lvert -0.3^{0.82} + \cos(\pi/\sqrt{2}) \rvert - 0.585479 \] = 0.3928179

Q5: Choose one of the math functions above. When you run your code in R, do the number of spaces between the function name, parentheses, and numbers affect the result? Run three different trials. Explain and present your answers below.

tan (1) - (67.2 ^ 0.5 * 19) [1] -154.1962 tan (1) - (67.2 ^ 0.5 * 19) [1] -154.1962 tan (1) - ( 67.2 ^ 0.5 * 19 ) [1] -154.1962 For the each trial I increased the amount of spaces between each number by 1 and the spaces did not change the result.

Q6: Type the following functions into R. Present your output below. If you get an error message, attempt to explain the message using your own words.

Note: The below code is math mode. You can see the formula in the HTML or PDF. \[ tan(0.5) \]= 0.5463025

\[ ton(0.5) \]=Error in ton(0.5) : could not find function “ton” I think that this error is because of a spelling mistake. \[ tan0.5 \]= Error: object ‘tan0.5’ not found I think that this error is because I did not have parentheses

Please turn–in your homework via Sakai by saving and submitting an R Markdown PDF or HTML file from R Pubs!