Categories
5G Network
Agile
Amazon EC2
Android
Angular
Ansible
Arduino
Artificial Intelligence
Augmented Reality
AWS
Azure
Big Data
Blockchain
BootStrap
Cache Teachniques
Cassandra
Commercial Insurance
C#
C++
Cloud
CD
CI
Cyber Security
Data Handling
Data using R
Data Science
DBMS
Design-Pattern
DevOps
ECMAScript
Fortify
Ethical Hacking
Framework
GIT
GIT Slack
Gradle
Hadoop
HBase
HDFS
Hibernate
Hive
HTML
Image Processing
IOT
JavaScript
Java
Jenkins
Jira
JUnit
Kibana
Linux
Machine Learning
MangoDB
MVC
NGINX
Onsen UI
Oracle
PHP
Python
QTP
R Language
Regression Analysis
React JS
Robotic
Salesforce
SAP
Selenium
Service Discovery
Service Now
SOAP UI
Spark SQL
Testing
TOGAF
Research Method
Virtual Reality
Vue.js
Home
Recent Q&A
Feedback
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 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
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
Answer
1
Answer
0
votes
answered
May 27, 2019
by
tempuser
answer is I & II
Click here to read more about Loan/Mortgage
Click here to read more about Insurance
Many hands make light work, Share it here
Facebook
Twitter
LinkedIn
Reddit
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
+2
votes
Q: Two vectors X and Y are defined as follows – X <- c(3, 2, 4) and Y <- c(1, 2). What will be output of vector Z that is defined as Z <- X*Y.
asked
Jul 28, 2019
in
R Language
by
Aarav2017
#r-language
#r-programming
#r-course
#r-tutorial
#r-question-answer
#r-interview-question
#r-basics
#r-test
#what-is-r
#learn-r
+1
vote
Q: The function write.csv() exports data into a file. However, this function by default adds rownames to the file. Which argument can be used to turn off addition of rownames?
asked
May 27, 2019
in
Data Handling
by
tempuser
#datahandling
+1
vote
Q: A hospital data contains patient's age and treatment they are undergoing. Which function can be used to find average of patients undergoing each of the treatments?
asked
May 27, 2019
in
Data Handling
by
tempuser
#datahandling
0
votes
Q: What is true about functions? I) Functions are objects; II) Can be assigned to a variable; III) Can be anonymous; IV) Return value type has to be defined in function declaration
asked
Feb 6, 2020
in
JavaScript
by
rajeshsharma
#functions-java
0
votes
Q: which function can be used wheb a vector needs to be split into groups_
asked
Jun 6, 2019
in
Data Handling using R
by
tempuser
#datahandling
+2
votes
Q: How can you verify if a given object “X” is a matrix data object?
asked
Jul 28, 2019
in
R Language
by
Aarav2017
#r-language
#r-programming
#r-course
#r-tutorial
#r-question-answer
#r-interview-question
#r-basics
#r-test
#what-is-r
#learn-r
0
votes
Q: What do you mean by the X and Y-axis of the burndown chart?
asked
Sep 17, 2020
in
Agile
by
SakshiSharma
#x-y-burndown-chart
0
votes
Q: Which function do you use to print the names of all columns in a data frame?
asked
Jun 6, 2019
in
Data Handling using R
by
tempuser
#datahandling
0
votes
Q: What do you understand by Type I and Type II errors in machine learning?
asked
Jan 18, 2020
in
Machine Learning
by
sharadyadav1986
#machine-learning-types
0
votes
Q: Which function is used over the margins of an array
asked
May 27, 2019
in
Data Handling
by
tempuser
#datahandling
+1
vote
Q: Which Semantic element is best suitable for content like blog post that is self contained, independent and can be republished
asked
Jun 6, 2019
in
Data Handling using R
by
tempuser
#datahandling
0
votes
Q: The function read.csv() imports data into
asked
May 27, 2019
in
Data Handling
by
tempuser
#datahandling
0
votes
Q: Which function is very similar to lapply?
asked
May 27, 2019
in
Data Handling
by
tempuser
#datahandling
+2
votes
Q: In the mtcars dataset, how many cars provide a mileage of less than 20 mpg?
asked
May 27, 2019
in
Data Handling
by
tempuser
#datahandling
+1
vote
Q: Which of the following functions can be used to find the number or rows and columns in a dataset?
asked
May 27, 2019
in
Data Handling
by
tempuser
#datahandling
+1
vote
Q: If layer_dims = [3,9,9,1], then the shape of weight vector for third layer is _____________.
asked
Jan 28, 2020
in
Data Handling
by
rahuljain1
#vector-weight
0
votes
Q: For a given vector \vec{v}v⃗ in 2D space, stretching it by a value of 2 is called ____________.
asked
Jan 23, 2020
in
Data Science
by
AdilsonLima
+1
vote
Q: For a given vector \vec{v} v ⃗ in 2D space, stretching it by a value of 2 is called ____
asked
Jan 20, 2020
in
Mathematics
by
rahuljain1
#scalability
0
votes
Q: What will be the output of the following code snippet in ES6? const func= ( x, y ) => { return x + y; }; func(11,12);
asked
Jan 21, 2020
in
ECMAScript
by
GeorgeBell
0
votes
Q: onformchange How do you embed a video player using
asked
Jun 6, 2019
in
Data Handling using R
by
tempuser
#datahandling
...