Question

In: Computer Science

Question 5 0/1 point (graded) The following is the full path to a homework assignment file...

Question 5

0/1 point (graded)

The following is the full path to a homework assignment file called "assignment.txt": /Users/student/Documents/projects/homeworks/assignment.txt.

Which line of code will allow you to move the assignment.txt file from the “homeworks” directory into the parent directory “projects”?

mv assignment.txt

mv assignment.txt .

mv assignment.txt ..

mv assignment.txt /projects incorrect

Answer

Incorrect:

Try again. This code does not provide enough information about where to move the file. You need to specify a relative or full path to the location where you want to move the file to.

Question 9

0/1 point (graded)

The source function reads a script from a url or file and evaluates it. Check ?source in the R console for more information.

Suppose you have an R script at ~/myproject/R/plotfig.R and getwd() shows ~/myproject/result, and you are running your R script with source('~/myproject/R/plotfig.R').

Which R function should you write in plotfig.R in order to correctly produce a plot in ~/myproject/result/fig/barplot.png?

ggsave('fig/barplot.png'), because this is the relative path to the current working directory.

ggsave('../result/fig/barplot.png'), because this is the relative path to the source file ("plotfig.R"). incorrect

ggsave('result/fig/barplot.png'), because this is the relative path to the project directory.

ggsave('barplot.png'), because this is the file name.

Question 12

1 point possible (graded)

Which of the following meanings for options following less are not correct?

(Hint: use man less to check.)

-g: Highlights current match of any searched string

-i: case-insensitive searches

-S: automatically save the search object

-X: leave file contents on screen when less exits.

Question 13

1 point possible (graded)

Which of the following statements is incorrect about preparation for a data science project?

Select ALL that apply.

Always use absolute paths when working on a data science project.

Saving .RData every time you exit R will keep your collaborator informed of what you did.

Use ggsave to save generated files for use in a presentation or a report.

Saving your code in a Word file and inserting output images is a good idea for making a reproducible report.

Solutions

Expert Solution

Question 5

0/1 point (graded)

The following is the full path to a homework assignment file called "assignment.txt": /Users/student/Documents/projects/homeworks/assignment.txt.

Which line of code will allow you to move the assignment.txt file from the “homeworks” directory into the parent directory “projects”?

mv assignment.txt

mv assignment.txt .

mv assignment.txt ..

mv assignment.txt /projects incorrect

Answer is  mv assignment.txt ..

.. represents the parent directory

ex :

Please let me know if anything is required

Question 12

1 point possible (graded)

Which of the following meanings for options following less are not correct?

(Hint: use man less to check.)

-g: Highlights current match of any searched string

-i: case-insensitive searches

-S: automatically save the search object

-X: leave file contents on screen when less exits.

-g : highlight the string which was found by last search command - is correct

-i: case-insensitive searches - is correct

-S: automatically save the search object : is correct
              Save current content (got from another program like grep) in a file.

-X: leave file contents on screen when less exits. : is incorrect

Disables sending the termcap initialization and
              deinitialization strings to the terminal.  This is sometimes
              desirable if the deinitialization string does something
              unnecessary, like clearing the screen.

Related Solutions

Graded Homework Assignment 1​​​​​​​Unit 1 – Lessons 1 and 2 1. Athletes’ salaries. Here is a...
Graded Homework Assignment 1​​​​​​​Unit 1 – Lessons 1 and 2 1. Athletes’ salaries. Here is a small part of a data set that describes Major League Baseball players as of opening day of the 2011 season: (a) What individuals does this data set describe? (b) In addition to the player’s name, how many variables does the data set contain? Which of these variables take numerical values? Which of the variables are not numerical variables? (c) What do you think are...
Question 10 0/1 point (graded) The bash profile in your home directory contains information that the...
Question 10 0/1 point (graded) The bash profile in your home directory contains information that the bash shell runs each time you use it. You can customize the information in your bash profile to tell your system to do different things. For example, you can make an “alias”, which acts like a keyboard shortcut. Which line of code, when added to your bash profile, will let you print “seetop” to view the name, size, and file type of the 10...
Graded Homework Assignment 4 Unit 3, Lessons 1-3 Lesson 1 - Ethics (a light lesson –...
Graded Homework Assignment 4 Unit 3, Lessons 1-3 Lesson 1 - Ethics (a light lesson – know the definitions and principles!) 1. The most complex issues of data ethics can arise when we collect data from A. A census B. Randomized experiments on people C. Observational studies D. Surveys Stat 1350 - Elementary Statistics 2. Some basic standards of data ethics that must be obeyed by any study that gathers information from human subjects are to: A. Have an institutional...
Stat 1350 - Elementary Statistics Graded Homework Assignment 4​​​​​​​​Unit 3, Lessons 1-3 Lesson 1 - Ethics...
Stat 1350 - Elementary Statistics Graded Homework Assignment 4​​​​​​​​Unit 3, Lessons 1-3 Lesson 1 - Ethics (a light lesson – know the definitions and principles!) 1. The most complex issues of data ethics can arise when we collect data from A. A census B. Randomized experiments on people C. Observational studies D. Surveys 2. Some basic standards of data ethics that must be obeyed by any study that gathers information from human subjects are to: A. Have an institutional board...
Question 11 1 point possible (graded) The commands in the pipeline $ cat result.txt | grep...
Question 11 1 point possible (graded) The commands in the pipeline $ cat result.txt | grep "Harvard edX" | tee file2.txt | wc -l perform which of the following actions? From result.txt, select lines containing “Harvard edX”, store them into file2.txt, and print all unique lines from result.txt. From result.txt, select lines containing “Harvard edX”, and store them into file2.txt. From result.txt, select lines containing “Harvard edX”, store them into file2.txt, and print the total number of lines which were...
Problem 3.4 Part A 1 point possible (graded) An isotropic alloy contains 5% by volume of...
Problem 3.4 Part A 1 point possible (graded) An isotropic alloy contains 5% by volume of a precipitate of radius 10nm. Assume the primary metal is in a simple cubic arrangement. The alloy has a Young's modulus E=70GPa and a Poisson's ratio ν=0.35. If Γ=0.9J/m2 (the energy needed to cut through the precipitate lattice per unit surface area), and b=0.25nm, what is the precipitate spacing L in the alloy? L (in nm):   unanswered Submit You have used 0 of 20...
This question set will use the following scenario that we saw on last week’s homework assignment:...
This question set will use the following scenario that we saw on last week’s homework assignment: Scores on the Wechsler Adult Intelligence Scale- Third Edition (WAIS-III) are nationally standardized to be normally distributed with a mean of 100 and standard deviation of 15. A psychologist has a dataset containing the WAIS-III scores from a random sample of 50 adults who are members of a specific organization. They want to know if there is evidence that the mean WAIS-III score in...
Part 1 The questions in this part of the assignment will be graded. The Hay System...
Part 1 The questions in this part of the assignment will be graded. The Hay System is a job performance evaluation method that is widely used by organizations around the world. Corporations use the system to map out their job roles in the context of the organizational structure. One of the key benefits of the method is that it allows for setting competitive, value-based pay policies. The main idea is that for each job evaluation, a number of factors (such...
ok here is my homework This assignment focuses on file streams. Your program will accept the...
ok here is my homework This assignment focuses on file streams. Your program will accept the name of an input file from the user, and the name of an output file from the user. You may assume the input file contains no more than 100 lines. Your program will write the lines of the input file to the output file in reverse line order, i.e. the first line of the input file becomes the last line of the output file,...
This question is in my plant physiology homework and the assignment is on the electron transport...
This question is in my plant physiology homework and the assignment is on the electron transport chain. How is the H+ gradient (potential energy) used? What are the products that the proton gradient made? Where in the chloroplast are they made? (3 points)
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT