Question
R Questions You will explore the first 100,000 digits of pi(3.1415....). (a). Using an internet search, locate a text file that contains the first 100,000
R Questions
You will explore the first 100,000 digits of pi(3.1415....).
(a). Using an internet search, locate a text file that contains the first 100,000 digits of pi. If this file includes the decimal point, remove this in a text editor. [List website where you got the file]
(b). Read the file into R and break it into an array of 100,000 elements. The below code should be helpful.[code]
piisfun = readLines("file location", warn = FALSE)
digits = as.numeric(unlist(strsplit(piisfun,"")))
(c).What percent of the first 100,000 digits of pi are 7s? [code, answer]
Step 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