Home
Recent Q&A
Java
Cloud
JavaScript
Python
SQL
PHP
HTML
C++
Data Science
DBMS
Devops
Hadoop
Machine Learning
Azure
Blockchain
Devops
Ask a Question
What will the following lines of code return x <- matrix(1:18, 6, 3) apply(x, 2, sum)
Home
Data Handling
What will the following lines of code return x <- matrix(1:18, 6, 3) apply(x, 2, sum)
0
votes
asked
May 27, 2019
in
Data Handling
by
tempuser
What will the following lines of code return
x <- matrix(1:18, 6, 3)
apply(x, 2, sum)
#datahandling
DataHandling-questions-answers
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
May 27, 2019
by
tempuser
vector of 3 elements
Your comment on this answer:
Email me at this address if a comment is added after mine:
Email me if a comment is added after mine
Privacy: Your email address will only be used for sending these notifications.
Related questions
0
votes
Q: what will following lines of code return x<-matrix(1:18,6,3)____-
asked
Jun 7, 2019
in
Data Handling using R
by
tempuser
#datahandling
0
votes
Q: For a given matrix mat, how do you increment every element of the matrix by 3 and return a vector. (I) sapply(mat, function(x,y) sum(x)+y,y=3) (II) sapply(mat, function(x) sum(x)+3)
asked
May 27, 2019
in
Data Handling
by
tempuser
#datahandling
DataHandling-questions-answers
+1
vote
Q: If x and y are two tbls, which of the following joins return all rows from x and y irrespective of matching values?
asked
May 27, 2019
in
Data Handling
by
tempuser
#datahandling
DataHandling-questions-answers
0
votes
Q: Applying lapply function on a matrix returns
asked
May 27, 2019
in
Data Handling
by
tempuser
#datahandling
DataHandling-questions-answers
0
votes
Q: Which function can be used when a vector needs to be split into groups defined by a classifying factor, compute a function on the subsets, and return the results?
asked
May 27, 2019
in
Data Handling
by
tempuser
#datahandling
DataHandling-questions-answers
0
votes
Q: What is the output of print(np.array([1,2,3]) * np.array([[1],[2],[3]]) )?
asked
Jan 28, 2020
in
Data Handling
by
rahuljain1
#print-output
DataHandling-questions-answers
+1
vote
Q: What is the output of print(np.dot([1,2,3],[[1],[2],[3]])?
asked
Jan 28, 2020
in
Data Handling
by
rahuljain1
#output-print
DataHandling-questions-answers
+1
vote
Q: What is the output of print(np.array([1,2,3]) * np.array([1,2,3]) )?
asked
Jan 28, 2020
in
Data Handling
by
rahuljain1
#output-array
DataHandling-questions-answers
+1
vote
Q: What is the output of print(np.array([1,2,3]) +1)?
asked
Jan 28, 2020
in
Data Handling
by
rahuljain1
#output-array
DataHandling-questions-answers
+1
vote
Q: Which of the following functions lists all columns in a dataset with few values from each column?
asked
May 27, 2019
in
Data Handling
by
tempuser
#datahandling
DataHandling-questions-answers
...