Most viewed questions in Data Science

0 votes
1 answer

What does c do in R?

The c function in R programming usually stands ...READ MORE

Jun 1, 2022 in Data Science by Sohail
• 3,040 points

edited Nov 28, 2023 by Soumya 20,993 views
0 votes
1 answer

grepl in R to find matches to any of a list of character strings

Inside of a grepl regular expression, you ...READ MORE

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

What does |> (pipe greater than) mean in R?

The "pipe" operator in R is |>. ...READ MORE

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

What does R assume regarding order in paired t-test?

I'm assuming that the data are assumed ...READ MORE

Jul 22, 2022 in Data Science by avinash
• 1,840 points
832 views
0 votes
1 answer

Filter multiple values on a string column in dplyr

The filter() function is used to select ...READ MORE

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

How to overlay density plots in R?

The second one has 104 usage lines: plot(density(MyData$Column1)) ...READ MORE

Jun 24, 2022 in Data Science by Sohail
• 3,040 points
813 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
790 views
0 votes
1 answer

How to make loop for one-at-a time logistic regression in R?

You're probably looking for something similar to ...READ MORE

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

Import CSV file using R

If there are quotes ("), by using ...READ MORE

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

Unexpected behavior for setdiff() function in R

Asymmetric difference is provided by 18 setdiff. ...READ MORE

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

What's the difference between "*" and "+" in lm() in R?

Lm is a fitting method for linear ...READ MORE

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

The difference of na.rm and na.omit in R

I've just started with R and I've ...READ MORE

Jul 22, 2022 in Data Science by avinash
• 1,840 points
548 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
451 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
441 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
437 views
0 votes
1 answer

How to use plotly in R shiny

Here's a corrected version of your code: # ...READ MORE

Sep 8, 2023 in Data Science by anonymous
• 1,180 points
433 views
0 votes
1 answer

sample function in R

It seems like you are experiencing an ...READ MORE

Sep 8, 2023 in Data Science by anonymous
• 1,180 points
431 views
0 votes
1 answer

Using group by on multiple columns

Group By X means to put all those with ...READ MORE

Sep 3, 2022 in Data Science by narikkadan
• 63,420 points
429 views
0 votes
1 answer

R: Generate Random Numbers with "floor" and "runif"

It looks like there's a small issue ...READ MORE

Sep 8, 2023 in Data Science by anonymous
• 1,180 points
428 views
0 votes
0 answers

Getting "NA" when I run a standard deviation

a quick query I read the variable ...READ MORE

Jul 5, 2022 in Data Science by avinash
• 1,840 points
412 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
398 views
0 votes
1 answer

How to establish a connection to a remote Redash database using R?

To connect to a Redash database using ...READ MORE

Feb 17, 2023 in Data Science by anonymous
396 views
0 votes
1 answer

Forecast Package from R in Python

Yes, you can use the R forecast ...READ MORE

Sep 8, 2023 in Data Science by anonymous
• 1,180 points
396 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
392 views
0 votes
0 answers

How to read a csv-file from an url in R?

I'm not very experienced with R, so ...READ MORE

Jul 22, 2022 in Data Science by avinash
• 1,840 points
383 views
0 votes
1 answer

R command for setting working directory to source file location in Rstudio

Yes, you can specify your working directory ...READ MORE

Sep 8, 2023 in Data Science by anonymous
• 1,180 points
383 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
372 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
371 views
0 votes
0 answers

Standard Deviation in R Seems to be Returning the Wrong Answer - Am I Doing Something Wrong?

An easy illustration of standard deviation calculation: The ...READ MORE

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

Finding duplicate rows in SQL Server

Use this : select o.orgName, oc.dupeCount, o.id from organizations ...READ MORE

Aug 14, 2022 in Data Science by narikkadan
• 63,420 points
337 views
0 votes
0 answers

How does cut with breaks work in R

I've tried using?cut but haven't been able ...READ MORE

Jul 6, 2022 in Data Science by avinash
• 1,840 points
333 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
325 views
0 votes
0 answers

Difference between ls() and objects()

What distinguishes the ls() and objects() functions? The ...READ MORE

Jul 9, 2022 in Data Science by avinash
• 1,840 points
305 views
0 votes
0 answers

How to manually find the minors of a matrix in R programming?

I have to write a function that ...READ MORE

Jul 5, 2022 in Data Science by avinash
• 1,840 points
305 views
0 votes
1 answer

rnorm function in R - Usage

y = rnorm(12, rep(c(1,2,1), each=4, 0.2)) I can ...READ MORE

Jun 24, 2022 in Data Science by Sohail
• 3,040 points
304 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
302 views
0 votes
0 answers

What is the difference between rm() and rm(list=ls())?

The majority of items I've read. They ...READ MORE

Jul 5, 2022 in Data Science by avinash
• 1,840 points
301 views
0 votes
0 answers

How does cut with breaks work in R

I've tried using?cut but haven't been able ...READ MORE

Jul 9, 2022 in Data Science by avinash
• 1,840 points
294 views
0 votes
0 answers

Understanding `scale` in R

I'm attempting to comprehend R's definition of ...READ MORE

Jul 6, 2022 in Data Science by avinash
• 1,840 points
291 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
290 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
288 views
0 votes
0 answers

How to plot two histograms together in R?

I have two data frames, one each ...READ MORE

Jul 22, 2022 in Data Science by avinash
• 1,840 points
286 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
281 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
277 views
0 votes
0 answers

Fibonacci Sequence in R

Due of my inexperience with programming and ...READ MORE

Jul 5, 2022 in Data Science by avinash
• 1,840 points
273 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
270 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
269 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
269 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
265 views
0 votes
0 answers

Understanding of minbucket function in CART model using R

Let's say that the training data is ...READ MORE

Jul 20, 2022 in Data Science by avinash
• 1,840 points
262 views