Home
Recent Q&A
Java
Cloud
JavaScript
Python
SQL
PHP
HTML
C++
Data Science
DBMS
Devops
Hadoop
Machine Learning
Ask a Question
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)
Home
Data Handling
For a given matrix mat, how do you increment every element of the...
asked
May 27, 2019
in
Data Handling
by
tempuser
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)
#datahandling
1
Answer
0
votes
answered
May 27, 2019
by
tempuser
answer is I & II
Related questions
0
votes
Q: What will the following lines of code return x <- matrix(1:18, 6, 3) apply(x, 2, sum)
asked
May 27, 2019
in
Data Handling
by
tempuser
#datahandling
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
+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
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: If x and y are two tbls, which of the following joins return all rows from x where there are not matching values in y, keeping just columns from x?
asked
Jun 7, 2019
in
Data Handling using R
by
tempuser
#datahandling
0
votes
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
Jun 7, 2019
in
Data Handling using R
by
tempuser
#datahandling
0
votes
Q: If x and y are two tbls, which of the following joins return all rows from y, and all columns from x and y?
asked
Jun 7, 2019
in
Data Handling using R
by
tempuser
#datahandling
0
votes
Q: If x and y are two tbls, which of the following joins return all rows from x where there are matching values in y, and all columns from x and y?
asked
Jun 7, 2019
in
Data Handling using R
by
tempuser
#datahandling
0
votes
Q: If x and y are two tbls, which of the following joins return all rows from x where there are matching values in y, keeping just columns from x?
asked
Jun 7, 2019
in
Data Handling using R
by
tempuser
#datahandling
0
votes
Q: Applying lapply function on a matrix returns
asked
May 27, 2019
in
Data Handling
by
tempuser
#datahandling
...