Question: RStudio question O .O . Go to file/function . Addins - Environ Glol Homework01.Rmd makeWordFigures.Rx recover SampleInfo.R * >> - H ARQ Knit - -

RStudio question

RStudio question O .O . Go to file/function . Addins - EnvironGlol Homework01.Rmd makeWordFigures.Rx recover SampleInfo.R * >> - H ARQ Knit -

O .O . Go to file/function . Addins - Environ Glol Homework01.Rmd makeWordFigures.Rx recover SampleInfo.R * >> - H ARQ Knit - - Insert B - Run. 37 - # Problem 1: Byte the decimal 38 39>write a function that will convert a vector of booleans to a (decimal) numeric. 40 > 41 >The first bit will be true if the number is positive and false otherwise. The next eight bits (1 byte) will correspond to the binary representation of the number. The final eight bits will represent the 10's expodential. For example c(TRUE, rep(FALSE, times=7), TRUE, rep (FALSE, times=8)) would correspond to +1E0 or 1. Note that this is how all real numbers in a computer are actually represented (only your computer generally uses 16-bits not 8-bit). Files Ney O> 42 43 >The function must be named "byte_to_decimal and accept a vector of logical values of length 17 as an argument. It should throw a warning if a vector of 1 and o are passed to it, it should error out if nonvalid arguments are passed to the function. Problem 1: Byte the decimal : R Markdown 000000 44:179 Console - OR H B O Go to file/function 16 - Addins - Homework 1.Rmd @makeWordFigures.Rx recoverSampleInfo.R* >> ABCQ Knit - in C Insert - Run- 44 >*Do not use built in functions, I'm looking for the underlaying arithmatic. You may find useful: stop, ifelse, multiplication, expodentials, sum and other arithmatic functions." 45 46 47 *'{r problemlCode, echo=FALSE, comment=''} > cat(readLines ('R/byte_to_decimal.R'), sep = ' ') > 48 49 50 - {r probleml, results='hold'} 51 resultstr > - H ARQ Knit - - Insert B - Run. 37 - # Problem 1: Byte the decimal 38 39>write a function that will convert a vector of booleans to a (decimal) numeric. 40 > 41 >The first bit will be true if the number is positive and false otherwise. The next eight bits (1 byte) will correspond to the binary representation of the number. The final eight bits will represent the 10's expodential. For example c(TRUE, rep(FALSE, times=7), TRUE, rep (FALSE, times=8)) would correspond to +1E0 or 1. Note that this is how all real numbers in a computer are actually represented (only your computer generally uses 16-bits not 8-bit). Files Ney O> 42 43 >The function must be named "byte_to_decimal and accept a vector of logical values of length 17 as an argument. It should throw a warning if a vector of 1 and o are passed to it, it should error out if nonvalid arguments are passed to the function. Problem 1: Byte the decimal : R Markdown 000000 44:179 Console - OR H B O Go to file/function 16 - Addins - Homework 1.Rmd @makeWordFigures.Rx recoverSampleInfo.R* >> ABCQ Knit - in C Insert - Run- 44 >*Do not use built in functions, I'm looking for the underlaying arithmatic. You may find useful: stop, ifelse, multiplication, expodentials, sum and other arithmatic functions." 45 46 47 *'{r problemlCode, echo=FALSE, comment=''} > cat(readLines ('R/byte_to_decimal.R'), sep = ' ') > 48 49 50 - {r probleml, results='hold'} 51 resultstr

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!