Question

In: Computer Science

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 most recently added visible files?

alias seetop=’ls -lt’

alias seetop=’ls -lt | head’

alias seetop=’ls -t | head’ incorrect

alias seetop=’head | ls -l’

Answer

Incorrect:

Try again. You want to see the size and file type too. This command will only show the name.

Question 1

0/1 point (graded)

Why might you want to create a report using R Markdown?

R Markdown has better spell-checking tools than other word processors.

R Markdown allows you to automatically add figures to the final document.

R Markdown final reports have smaller file sizes than Word documents.

R Markdown documents look identical to the final report. incorrect

Answer

Incorrect:

Try again. The final report looks different than the working R Markdown document. For example, plots called in the R Markdown document do not show up until the final report is compiled.

You have used 1 of 2 attempts Some problems have options such as save, reset, hints, or show answer. These options follow the Submit button.

Incorrect (0/1 point)

Question 2

0/1 point (graded)

You have a vector of student heights called heights. You want to generate a histogram of these heights in a final report, but you don’t want the code to show up in the final report. You want to name the R chunk “histogram” so that you can easily find the chunk later.

Which of the following R chunks does everything you want it to do?

```{r, histogram, message=FALSE}

hist(heights)

```

incorrect

```{r histogram, warning=FALSE}

hist(heights)

```

```{r, echo=FALSE}

hist(heights)

```

```{r histogram, echo=FALSE}

hist(heights)

```

Answer

Incorrect:

Try again. message=FALSE and the similar warning=FALSE stop R from printing non-code text, but the code will still be echoed.

You have used 1 of 2 attempts Some problems have options such as save, reset, hints, or show answer. These options follow the Submit button.

Incorrect (0/1 point)

Question 5

0/1 point (graded)

```{r, echo=F}

n <- nrow(mtcars)

```

Here `r n` cars are compared

What will be the output for the above Rmarkdown file?

The only output is the text: Here 32 cars are compared.

Since we have echo=F, the code chunk is not evaluated, therefore we will have both the code and the text: Here `r n` cars are compared. incorrect

The code will be displayed as well as Here 32 cars are compared.

R cannot comprehend the value of n, we will get an error.

You have used 1 of 2 attempts Some problems have options such as save, reset, hints, or show answer. These options follow the Submit button.

Solutions

Expert Solution

Answer 10
**********
alias seetop=’ls -lt | head’

Answer 1
*********
R Markdown final reports have smaller file sizes than Word documents.

Answer 2
*********
```{r, echo=FALSE}

hist(heights)

```

Answer 5
********
R cannot comprehend the value of n, we will get an error.

if you have any doubt then please ask me without any hesitation in the comment section below , if you like my answer then please thumbs up for the answer , before giving thumbs down please discuss the question it may possible that we may understand the question different way and we can edit and change the answers if you argue, thanks :)


Related Solutions

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...
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...
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...
Given the directory /home/Kitty which contains the files timer.exe and bags.txt. Set the protection but such...
Given the directory /home/Kitty which contains the files timer.exe and bags.txt. Set the protection but such that; Give the commands that would change the permissions. It will be a Linux system Only the owner Kitty can execute timer.exe. Kitty’s default group can write to the directory, but no one can delete or move any file except Kitty.
Short Essay Question​ - GDP​ (10 pts)   ​Note: This question on the test will be graded...
Short Essay Question​ - GDP​ (10 pts)   ​Note: This question on the test will be graded manually. One of the key macroeconomic variables that you have studied in this course is gross domestic product ​(GDP). This macroeconomic variable has been in the economic news headlines frequently here in the US and around the world during this current global​ COVID-19 pandemic. As data are collected and early estimates of GDP​ released, we do not yet know the full extent to which...
What are the permissions for your home directory set by your system administrator? What command did...
What are the permissions for your home directory set by your system administrator? What command did you use to answer the question? Show your session.
Using an interneuron as your point of reference, describe the difference between excitatory graded potentials and...
Using an interneuron as your point of reference, describe the difference between excitatory graded potentials and action potentials. Include the following in your answer for EACH type of potential. A) WHERE the potential is generated in the neuron B) WHAT triggers the generation of the potential (“kind of stimulus” and type of ion channels that open/close) C) DISTANCE traveled (short/long) and INTENSITY over that distance (constant/decremental)
A proton (charge 1:6 x 10^-19 C) is stationary at the point (2:0 mm; 0; 0)...
A proton (charge 1:6 x 10^-19 C) is stationary at the point (2:0 mm; 0; 0) of a chosen (x; y; z)- coordinate system. An electron (charge ?1:6 10?19 C) travels with a speed v = 100 m/s along the z-axis. What is the magnetic force on the proton due to the passing electron?
In a UNIX-like file system, a directory typically contains: A. filenames and i-nodes B. permission information,...
In a UNIX-like file system, a directory typically contains: A. filenames and i-nodes B. permission information, pointers to direct blocks C. filenames and ownership information D. filenames, i-nodes, major device numbers and minor device numbers
Consider the following cash flow profile and assume MARR is 10%/year. EOY NCF 0 $-95 1...
Consider the following cash flow profile and assume MARR is 10%/year. EOY NCF 0 $-95 1 $20 2 $20 3 $50 4 $-50 5 $50 6 $20 Determine the IRR for this project.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT