Explain gather() and spread() in R along with an example.
Gather() function is used to collapse multiple columns into key-pair values. The data frame above is considered wide since the time variable…
1 Answer · 1.6K Views · Answered ✓
Browse 123 R questions and answers from learners and industry experts. Find practical fixes, interview prep and step-by-step solutions - or ask your own.
Gather() function is used to collapse multiple columns into key-pair values. The data frame above is considered wide since the time variable…
1 Answer · 1.6K Views · Answered ✓
Question 26. What value is the sum of the residuals of a linear regression close to? Justify The sum of the residuals of a linear regression is 0.…
1 Answer · 4.2K Views · Answered ✓
Using dplyr, we can reorder a dataframe based on any value of a column using arrange() function which can reorder any values in ascending or…
1 Answer · 962 Views · Answered ✓
To perform ROC on a model we need to train a model. bank
1 Answer · 1.4K Views · Answered ✓
For example, is it possible to display the sum of an input attribute at each node, i.e. sum of feature 1 from 'X' data array in the leaves of the…
1 Answer · 870 Views · Answered ✓
Break statement is used to break out of a loop. Let us create a loop and use break to terminate the loop x cat('x is currently: ',x) print(' x is…
1 Answer · 1.4K Views · Answered ✓
To make a stem and leaf plot let us create some vectors x
1 Answer · 1.5K Views · Answered ✓
It is possible to return all the tags for a single word.For that, we need to create a function which will return a tag from a particular corpora a…
1 Answer · 1.4K Views · Answered ✓
Out of all the POS tag, there are both coarse grained and fine grained POS tag. The list of all coarse grained POS tag are.
1 Answer · 1.6K Views · Answered ✓
First we import the dataset # Importing the dataset com_sale dataset = read.csv(file.choose()) Now we encode the target feature as factor # Encoding…
1 Answer · 1.5K Views · Answered ✓
Reading all the lines at a time is possible but can be ricky so to process the line one at a time for reading, we can do the following processFile =…
1 Answer · 1.3K Views · Answered ✓
To iterate over a list, we have to define a list li
1 Answer · 1.5K Views · Answered ✓
Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.
Step-by-step Data Science guides from industry experts
Common Data Science interview questions, answered
Guides, tips and career advice on Data Science from JanBask experts.
Data Science The Best Data Science Projects (Beginner To Advanced)
Discover 15 data science project ideas from beginner to advanced levels. Includes tech stacks, time estimates, & real-use cases.…
Data Science Data Science vs Software Engineering - What you should know?
Compare Data Science vs. Software Engineering - explore skills, tools, roles, salaries, and career scope. Discover which tech…
Data Science Top 15 Deep Learning Algorithms You Must Know in 2025
Discover the top 15 deep learning algorithms powering AI in 2025. Learn how deep learning models, DL models, and deep machine…
Data Science Deep Learning Tutorial Guide for Beginners
Deep Learning, Machine Learning & Artificial Intelligence have become trending words of the IT sector today.
Pick another topic to find answers, interview questions, and real-world tips.