In R’s built-in datasets library is the data frame quakes. Make sure you can access this object. Use the command head(quakes).
Then, do the following:
Select only those records that correspond to a magnitude (mag) of greater than or equal to 5 and write them to a file called Lab4-Q2.txt
You can use the command
dput(x=YourDataVariable, file="fileName.txt")
Herethe library tidyerse is used.
library(tidyverse)
mag_quakes<-quakes %>% He
filter(mag >= 5.0)
load(mag_quakes)
" Here the dput is used and the output can be on R-studio console with the first 5 rows"
dput(mag_quakes[1:5,c(1:5)])
structure(list(lat = c(-26.00, -20.70, -13.64, -19.66,
-16.46),
long = c(184.10, 169.92, 165.96, 180.28, 180.79),
depth = c(42, 139, 50, 431, 498),
mag = c(5.4, 6.1, 6.0, 5.4, 5.2),
stations = c(43, 94, 83, 57, 79)), .Names =
c("lat","long","depth","mag","stations"), row.names = c(NA, 5L),
class = "data.frame")
"Here the output is send to a file"
dput(mag_quakes,"Lab4-Q2.txt")
In R’s built-in datasets library is the data frame quakes. Make sure you can access this...
Use one of R’s datasets(trees). Using descriptive statistics, visualize this data numerically and graphically. You can use the following resource as a guide: Section 2.5 (p. 15) and 3.5 (P. 25) from “Using R for Data Analysis and Graphics ”. Make sure to look into: a) the summary of the data, b) display it in the histogram, c) boxplot, d) qqnorm e) other plots and functions.
Lab Exercise #15 Assignment Overview This lab exercise provides practice with Pandas data analysis library. Data Files We provide three comma-separated-value file, scores.csv , college_scorecard.csv, and mpg.csv. The first file is list of a few students and their exam grades. The second file includes data from 1996 through 2016 for all undergraduate degree-granting institutions of higher education. The data about the institution will help the students to make decision about the institution for their higher education such as student completion,...
I can't attach the data due to the file being real large i can email it to you so i can have your help on it # Assignment 1 # R Programming Language # ---- Why do Exploratory Data Analysis (EDA)? ---- # We will be looking at ## identifying outliers ## null values ## generating plots ## examining correlations # -------------------------------------------------------------- # In this video we will cover: ## univariate plots for continuous variables (boxlots, historgrams) ## bivariate plots...
LINUX C programming Please make sure the output is correct Please do read data from file, the example below is just a example Third: Hash table (20 points) In this part, you will implement a hash table containing integers. The hash table has 10,000 buckets. An important part of a hash table is collision resolution. In this assignment, we want you to use chaining with a linked list to handle a collision. This means that if there is a collision...
Queues and Stacks Purpose: To review queues and stacks in Java, and to use the built-in Stack class and Queue interface. The Stack class is a generic class containing these methods: public void push(E value) - pushes a new value onto the Stack public E pop() - pops the next value off of the stack and returns it; throws EmptyStackExceptionl if stack is empty public E peek() - returns the next value on the Stack but does not pop it...
19. UNIX/Linux normally include two editors: vi and (choose the single best answer). 20. You can use thecommand to create empty a create b. make c touch d mu 21. Which command can be used to leave vi temporarily to access the command line? 22 If you execute the contents of filel are sorted and the results are stored in file2. a sort file1 -ofile2 b. sort file1 >file2 c sort filel -d file2 d sort filel filez field or...
A. File I/O using C library functions File I/O in C is achieved using a file pointer to access or modify files. Processing files in C is a four-step process: o Declare a file pointer. o Open the desired file using the pointer. o Read from or write to the file and finally, o Close the file. FILE is a structure defined in <stdio.h>. Files can be opened using the fopen() function. This function takes two arguments, the filename and...
In this project, you will construct an Object-Oriented framework for a library system. The library must have books, and it must have patrons. The patrons can check books out and check them back in. Patrons can have at most 3 books checked out at any given time, and can only check out at most one copy of a given book. Books are due to be checked back in by the fourth day after checking them out. For every 5 days...
1. Suppose you wrote a program that reads data from cin. You are now required to reimplement it so that you can read data from a file. You are considering the following changes. I. Declare an ifstream variable in_file II. Replace all occurrences of cin with in_file III. Replace all occurrences of > > and get_line with the appropriate operations for ifstream objects What changes do you need to make? I, II, and III II and III I and III...