In: Computer Science
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.
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 :)