Trending questions in Data Analytics

0 votes
5 answers

How to remove NA values with dplyr::filter()

Try this: df %>% filter(!is.na(col1)) READ MORE

Mar 26, 2019 in Data Analytics by anonymous
279,373 views
0 votes
5 answers

How to remove NA values from a Vector in R?

Hello team, you can use na.omit x <- c(NA, 3, ...READ MORE

Dec 9, 2020 in Data Analytics by anonymous
• 82,840 points
177,031 views
+4 votes
11 answers

Creating an empty data.frame with only column names - R

Hi, You need to create a data frame ...READ MORE

Dec 11, 2020 in Data Analytics by MD
• 95,440 points
104,357 views
0 votes
4 answers

How to change font size of text and axes on R plots ?

To change the font size of text ...READ MORE

Dec 16, 2020 in Data Analytics by Gitika
• 65,910 points
89,591 views
+5 votes
3 answers

Counting the frequency of unique values - R

Hi, You can use plyr module. It will give ...READ MORE

Dec 14, 2020 in Data Analytics by MD
• 95,440 points
85,858 views
+2 votes
5 answers

Printing a data.frame without index - Python

.tolist() function will remove index READ MORE

Mar 11, 2019 in Data Analytics by nishant thakur
84,871 views
+1 vote
3 answers

Filtering R data-frame with multiple conditions

You can use the 'filter' function from ...READ MORE

Mar 26, 2018 in Data Analytics by Bharani
• 4,660 points
85,000 views
+2 votes
2 answers

Change data type of one column in R

You can change data types using as.* ...READ MORE

Aug 16, 2019 in Data Analytics by anonymous
• 33,050 points
89,691 views
+4 votes
3 answers

How to sum a variable by group in R?

You can also try this way, x_new = ...READ MORE

Aug 1, 2019 in Data Analytics by Cherukuri
• 33,050 points
75,632 views
+2 votes
1 answer

Show a list of all variables in R

Hi Swathi, You can use ls() to list ...READ MORE

Jun 27, 2019 in Data Analytics by Cherukuri
• 33,050 points
72,271 views
+1 vote
2 answers

Which function can I use to clear the console in R and RStudio ?

Description                   Windows & Linux           Mac Clear console                      Ctrl+L ...READ MORE

Apr 17, 2018 in Data Analytics by anonymous
61,905 views
0 votes
1 answer

How to check if a file already exists or not in R?

Check out file.exists() function!! The function file.exists() returns a ...READ MORE

Oct 29, 2019 in Data Analytics by Cherukuri
• 33,050 points
53,929 views
0 votes
2 answers

R function for finding the index of an element in a vector?

The function match works on vectors : x <- sample(1:10) x # ...READ MORE

Dec 12, 2020 in Data Analytics by Rajiv
• 8,910 points
54,917 views
0 votes
0 answers

How to Use rbind and cbind on Single Dataframe

Sorry for framing the question incorrectly. As ...READ MORE

Jul 22, 2022 in Data Analytics by avinash
• 1,840 points
387 views
+6 votes
3 answers

"Error: '\U' used without hex digits in character string starting ""C:\U"" when trying to read a csv file in R

Replace all \ with \\. Its trying ...READ MORE

Nov 26, 2018 in Data Analytics by Maverick
• 10,840 points
41,175 views
0 votes
0 answers

Speed up the loop operation in R

I have a significant R performance issue. ...READ MORE

Jul 20, 2022 in Data Analytics by avinash
• 1,840 points
196 views
0 votes
0 answers

Create data frame from function in R

One function that I designed can produce ...READ MORE

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

All Levels of a Factor in a Model Matrix in R

I have a data.frame that includes factor ...READ MORE

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

Extracting specific columns from a data frame

I want to construct a new dataframe ...READ MORE

Jul 6, 2022 in Data Analytics by avinash
• 1,840 points
232 views
0 votes
0 answers

how to use the Box-Cox power transformation in R

I've read that Box-Cox can help determine ...READ MORE

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

Error: could not find function ... in R

Please be as detailed as you can ...READ MORE

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

R function rep() in Python (replicates elements of a list/vector)

Each element of a vector is duplicated ...READ MORE

Jun 24, 2022 in Data Analytics by Sohail
• 2,960 points
581 views
0 votes
0 answers

Confidence interval calculation in R

When attempting to compute the CI in ...READ MORE

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

How can two strings be concatenated?

cbind = tmp ("GAD", "AB") tmp # [,1] ...READ MORE

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

How can I avoid the transformation into an atomic vector in a matrix (r programming)

I'm scrambling to come up with a ...READ MORE

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

Extracting the last n characters from a string in R

See the code below: library(dslabs) data(gapminder) differenceminder percent > percent filter(year% ...READ MORE

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

Vectorized IF statement in R?

x <- seq(0.1,10,0.1) > x [1] ...READ MORE

Jun 24, 2022 in Data Analytics by Sohail
• 2,960 points
581 views
0 votes
1 answer

What does 'r' mean before a Regex pattern?

Since the string is to be treated ...READ MORE

Jun 24, 2022 in Data Analytics by Sohail
• 2,960 points
404 views
0 votes
1 answer

Why does tidyverse still require plyr to load?

ggplot2 still imports plyr (at least as ...READ MORE

Jun 24, 2022 in Data Analytics by Sohail
• 2,960 points
436 views
0 votes
0 answers

Send str() output to View()

A dataset containing 313 variables is the ...READ MORE

Jun 30, 2022 in Data Analytics by avinash
• 1,840 points
117 views
0 votes
0 answers

Load csv file in R

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

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

Text mining- how to build a term-document matrix

You're not loading the TM library, and ...READ MORE

Jun 24, 2022 in Data Analytics by Sohail
• 2,960 points
328 views
0 votes
1 answer

R numbers from 1 to 100

Your error is seeking for range, which ...READ MORE

Jun 24, 2022 in Data Analytics by Sohail
• 2,960 points
344 views
0 votes
0 answers

what is diffrence between NROW and nrow in r?

If nrow and ncol are already present ...READ MORE

Jun 23, 2022 in Data Analytics by avinash
• 1,840 points
374 views
0 votes
1 answer

How to one hot encode several categorical variables in R

43 I advise employing the caret package's dummyVars ...READ MORE

Jun 24, 2022 in Data Analytics by Sohail
• 2,960 points
365 views
0 votes
0 answers

Extracting the last n characters from a string in R

The final n characters of a string ...READ MORE

Jun 27, 2022 in Data Analytics by avinash
• 1,840 points
122 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 27, 2022 in Data Analytics by avinash
• 1,840 points
114 views
0 votes
1 answer

What does the double percentage sign (%%) mean?

According to the "Arithmetic operators" help page ...READ MORE

Jun 14, 2022 in Data Analytics by Sohail
• 2,960 points
630 views
0 votes
1 answer

why the predict() function does have different rows in R

Alter this sentence: model = lm(train$latitude train$crashes) to lm(crashes ...READ MORE

Jun 24, 2022 in Data Analytics by Sohail
• 2,960 points
215 views
0 votes
0 answers

Why 'nrow()' function doesn't seem to work within 'summarise()' function?

See the code below: library(dslabs) \sdata(gapminder) gapminder percent > ...READ MORE

Jun 27, 2022 in Data Analytics by avinash
• 1,840 points
103 views
0 votes
0 answers

Get row and column indices of matches using `which()`

months and 9 years ago updated ten months ...READ MORE

Jun 27, 2022 in Data Analytics by avinash
• 1,840 points
100 views
0 votes
0 answers

why the predict() function does have different rows in R

I'm using linear regression to attempt and ...READ MORE

Jun 23, 2022 in Data Analytics by avinash
• 1,840 points
256 views
0 votes
0 answers

How can I rbind multiple single-value rows to my data.frame?

0 What follows functions as expected: Data.frame(c(1, 2, 3)) ...READ MORE

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

Polynomials as functions in R

 this will work _polynomial = function(x) { ...READ MORE

Jun 24, 2022 in Data Analytics by Sohail
• 2,960 points
209 views
0 votes
0 answers

pass character strings to ggplot2 within a function

In order to streamline my work process, ...READ MORE

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

StepAIC() stopping point

Square RSS Df Sum AIC 169 61.3 ...READ MORE

Jun 24, 2022 in Data Analytics by Sohail
• 2,960 points
204 views
0 votes
1 answer

Loading ggplot2 package, missing 'munsell' package

You ought to have done this: "ggplot2" is ...READ MORE

Jun 24, 2022 in Data Analytics by Sohail
• 2,960 points
364 views
0 votes
0 answers

Using One Sample Kolmogorov Smirnov Test in R for in-group Variation/ Distribution

0 In order to compare the voice characteristics ...READ MORE

Jun 24, 2022 in Data Analytics by Sohail
• 2,960 points
172 views
0 votes
1 answer

How do I convert a factor into date format?

That was close. The as needs to ...READ MORE

Jun 24, 2022 in Data Analytics by Sohail
• 2,960 points
177 views