Trending questions in Data Science

0 votes
0 answers

Calculate correlation with cor(), only for numerical columns

I have a dataframe and would like ...READ MORE

Jun 24, 2022 in Data Science by Sohail
• 3,040 points
460 views
0 votes
0 answers

Load csv file in R

Is it possible to import a csv ...READ MORE

Jun 27, 2022 in Data Science by avinash
• 1,840 points
333 views
0 votes
1 answer

Problem with sample function in R

The first time works, but after that, ...READ MORE

Jun 24, 2022 in Data Science by Sohail
• 3,040 points
508 views
0 votes
0 answers

Stepwise AIC using forward selection in R

In R, I'm attempting to perform a ...READ MORE

Jun 24, 2022 in Data Science by Sohail
• 3,040 points
445 views
0 votes
1 answer

How to implement Knn-algorithm without using k-nn function in r?

I created an example that demonstrates the ...READ MORE

Jun 24, 2022 in Data Science by Sohail
• 3,040 points
497 views
0 votes
0 answers

Create a sequence of sequences of numbers

The following sequence should be created in ...READ MORE

Jun 24, 2022 in Data Science by Avinash
• 1,260 points
435 views
0 votes
1 answer

Add two lines on graph using abline in R

I am using "y 0+x" to fit ...READ MORE

Jun 24, 2022 in Data Science by Sohail
• 3,040 points
617 views
0 votes
1 answer

Using dcast to widen a data frame

> dcast(z, id ~ item, value.var="freq") ...READ MORE

Jun 24, 2022 in Data Science by Sohail
• 3,040 points
468 views
0 votes
0 answers

To speed up the tapply function in R, or another function to convert data frame into a matrix

I must turn a sizable dataset into ...READ MORE

Jun 24, 2022 in Data Science by Sohail
• 3,040 points
373 views
0 votes
1 answer

Changing column names of a data frame

import pandas as pd #define DataFrame df = pd.DataFrame({'team':['A', ...READ MORE

Jun 24, 2022 in Data Science by Sohail
• 3,040 points
551 views
0 votes
1 answer

unique() for more than one variable

df <- data.frame(yad = c("BARBIE", "BARBIE", "BAKUGAN", ...READ MORE

Jun 24, 2022 in Data Science by Sohail
• 3,040 points
338 views
0 votes
1 answer

How to join (merge) data frames (inner, outer, left, right)

The merge function and its optional parameters ...READ MORE

Jun 24, 2022 in Data Science by Sohail
• 3,040 points
453 views
0 votes
1 answer

How To Create Vector of Vector In R

Create a list: List() on x returns x[[1]] ...READ MORE

Jun 24, 2022 in Data Science by Sohail
• 3,040 points
497 views
0 votes
1 answer

Why is it not advisable to use attach() in R, and what should I use instead?

There is one more option that applies ...READ MORE

Jun 24, 2022 in Data Science by Sohail
• 3,040 points
483 views
0 votes
1 answer

Difference between the == and %in% operators in R

percent in percent "returns a vector of ...READ MORE

Jun 20, 2022 in Data Science by Sohail
• 3,040 points
750 views
0 votes
1 answer

The difference between Map() and map () from Purrr package in R

The tilde just indicates to the map ...READ MORE

Jun 14, 2022 in Data Science by Sohail
• 3,040 points
499 views
0 votes
1 answer

plotting in different shapes using pch= argument

plot(Sepal.Length ~ Petal.Length, ...READ MORE

Jun 23, 2022 in Data Science by Sohail
• 3,040 points
492 views
0 votes
1 answer

Difference between the == and %in% operators in R

According to help('percent in percent'), percent in ...READ MORE

Jun 23, 2022 in Data Science by Sohail
• 3,040 points
515 views
0 votes
1 answer

Test if a vector contains a given element

1. Making use of the std::count function Counting ...READ MORE

Jun 20, 2022 in Data Science by Sohail
• 3,040 points
522 views
0 votes
1 answer

Reasons for using the set.seed function

The requirement is a desire for repeatable ...READ MORE

Jun 20, 2022 in Data Science by Sohail
• 3,040 points
421 views
0 votes
0 answers

how to make 2 separate substrings from strsplit in R

When it comes to accessing the elements ...READ MORE

Jun 13, 2022 in Data Science by Avinash
• 1,260 points
321 views
0 votes
1 answer

R cbind with get paste

This is how we use column names x ...READ MORE

Jun 1, 2022 in Data Science by Sohail
• 3,040 points
762 views
0 votes
1 answer

do-while loop in R

Unlike for and while loops, which test the loop condition at ...READ MORE

Jun 1, 2022 in Data Science by Sohail
• 3,040 points
690 views
0 votes
1 answer

R package dplyr reinstall every instance

In R, there are two steps of ...READ MORE

Jun 1, 2022 in Data Science by Sohail
• 3,040 points
636 views
0 votes
1 answer

Creating new Functions with Linear Regression in R :

When we want to create a model ...READ MORE

Jun 1, 2022 in Data Science by Sohail
• 3,040 points
580 views
0 votes
0 answers

Introduction to Statistical Learning with Applications in R Figure Codes

I recently bought the following book: An Introduction ...READ MORE

Jun 1, 2022 in Data Science by avinash
• 1,840 points
579 views
0 votes
0 answers

Determine the data types of a data frame's columns

I'm using R and have loaded data ...READ MORE

Jun 1, 2022 in Data Science by avinash
• 1,840 points
418 views
0 votes
1 answer

Converting xlsx to xls using Microsoft Office Compitablity Pack's excelcnv

Simply rearranging the positions of the parameters ...READ MORE

Mar 25, 2022 in Data Science by gaurav
• 23,260 points
1,330 views