Most viewed questions in Data Analytics

0 votes
10 answers

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

fruit_Frame<-data.frame(Fruit=NA, Cost=NA, Quantity=NA)[-1,]; ...READ MORE

May 7 in Data Analytics by yxcv

edited May 8 by Gitika 51,404 views
0 votes
4 answers

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

Can we create a alist as below ...READ MORE

Aug 5, 2019 in Data Analytics by anonymous
40,314 views
0 votes
4 answers

Printing a data.frame without index - Python

.tolist() function will remove index READ MORE

Mar 11, 2019 in Data Analytics by nishant thakur
39,578 views
0 votes
4 answers

How to remove NA values from a Vector in R?

You can try na.omit() or na.exclude() too. ...READ MORE

Jul 31, 2019 in Data Analytics by anonymous
• 32,460 points
36,220 views
0 votes
2 answers

How to sum a variable by group in R?

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

Jul 31, 2019 in Data Analytics by Cherukuri
• 32,460 points
31,904 views
0 votes
2 answers

Filtering R data-frame with multiple conditions

librarry(dplyr) dataset >%> filter((a ==1,b>15 ) | (a==2,b&g ...READ MORE

Aug 8, 2019 in Data Analytics by anonymous
24,022 views
0 votes
2 answers

Counting the frequency of unique values - R

Try this, lapply(mtcars,function(x){ length(unique(x))}) READ MORE

Aug 20, 2019 in Data Analytics by anonymous
• 32,460 points
16,432 views
0 votes
1 answer

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

Yes, we can find the index of ...READ MORE

Apr 13, 2018 in Data Analytics by zombie
• 3,750 points
15,465 views
0 votes
2 answers

Error: could not find function - R Programming

Yes, Just like @Maverik said, It happens ...READ MORE

Aug 22, 2019 in Data Analytics by anonymous
• 32,460 points
15,309 views
0 votes
1 answer

How to replace a value in a data frame based on a conditional 'If' statement?

It's easier to convert alpha to characters ...READ MORE

Jun 6, 2018 in Data Analytics by Sahiti
• 6,290 points
13,044 views
0 votes
1 answer

How to extract every nth element of a vector using R?

m <- 1:50 n<- m[seq(1, length(m), 6)] The above ...READ MORE

May 14, 2018 in Data Analytics by zombie
• 3,750 points
12,334 views
0 votes
1 answer

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
12,031 views
0 votes
1 answer

How to convert a list to data frame in R?

Let's assume your list of lists is ...READ MORE

Apr 12, 2018 in Data Analytics by nirvana
• 3,060 points

edited Apr 12, 2018 by nirvana 11,520 views
0 votes
1 answer

Removing outliers from a box-plot - ggplot2 - R

You just have to add 'outlier.shape=NA' inside ...READ MORE

May 31, 2018 in Data Analytics by Bharani
• 4,560 points
10,777 views
0 votes
11 answers

Changing the legend title in ggplot

Hi, you can also try guides() to ...READ MORE

Jul 30, 2019 in Data Analytics by Cherukuri
• 32,460 points
10,774 views
+1 vote
2 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,820 points
10,756 views
0 votes
2 answers

How to remove rows with missing values (NAs) in a data frame?

Hi, The below code returns rows without ...READ MORE

Aug 20, 2019 in Data Analytics by anonymous
• 32,460 points
10,485 views
0 votes
1 answer

How to convert dataframe columns from factors to characters?

To replace all the variables to character ...READ MORE

Apr 13, 2018 in Data Analytics by BHARANI
• 410 points
9,387 views
0 votes
2 answers

How to change the value of a variable using R programming in a data frame?

You are getting this error since the ...READ MORE

Aug 16, 2019 in Data Analytics by anonymous
• 32,460 points
8,682 views
0 votes
3 answers

How to write lines to a text file in R?

sink("outfile.txt") cat("hello") cat("\n" ...READ MORE

May 24, 2019 in Data Analytics by anonymous
8,584 views
0 votes
1 answer

How to change fill color in each facet using ggplot2?

You can map the facetting variable to ...READ MORE

May 8, 2018 in Data Analytics by kappa3010
• 2,080 points
8,577 views
0 votes
2 answers

What are the differences between overfitting and underfitting?

Overfitting is a modeling error which occurs when ...READ MORE

Aug 8, 2019 in Data Analytics by anonymous
8,189 views
0 votes
1 answer

How to add leading zeros in R?

There are several solutions to this. One of ...READ MORE

Apr 30, 2018 in Data Analytics by Sahiti
• 6,290 points
8,085 views
0 votes
1 answer

why we need beeline?

Hey Learner, Hope you're doing great. Would you please ...READ MORE

Dec 18, 2017 in Data Analytics by Sudhir
• 1,610 points
7,995 views
0 votes
1 answer

change the color for bars in geom_bar in ggplot

Hi @radha, You can have 2 types of ...READ MORE

Jul 24, 2019 in Data Analytics by Cherukuri
• 32,460 points
7,904 views
0 votes
1 answer

R programming error: { : missing value where TRUE/FALSE needed "

This should work: for ( i in 1:dim(m)[[1]] ...READ MORE

May 28, 2019 in Data Analytics by Zulaikha
• 890 points
7,790 views
+1 vote
3 answers

Problem with installation of Wordcloud in anaconda

Using Anaconda Python 3.6 version For Windows ...READ MORE

Aug 7, 2018 in Data Analytics by Priyaj
• 57,530 points
7,605 views
0 votes
2 answers

How to set working directory to source file location in R?

Hi,  I'm not sure about the command but you ...READ MORE

Aug 20, 2019 in Data Analytics by Cherukuri
• 32,460 points
7,461 views
0 votes
1 answer

What is the difference between list and vector in R?

The difference are - A list holds different ...READ MORE

Oct 28, 2019 in Data Analytics by Cherukuri
• 32,460 points
6,856 views
0 votes
2 answers

How to use group by for multiple columns in dplyr, using string vector input in R?

data = data.frame(   zzz11def = sample(LETTERS[1:3], 100, replace=TRUE),   zbc123qws1 ...READ MORE

Aug 5, 2019 in Data Analytics by anonymous
6,831 views
0 votes
1 answer

Changing the order of bars in a bar-plot - ggplot2 - R

You can use the scale_x_discrete() function with ...READ MORE

May 28, 2018 in Data Analytics by Bharani
• 4,560 points
6,328 views
0 votes
1 answer
0 votes
1 answer

Extract a subset of a data frame based on a condition involving a field

Here are the two main approaches. I ...READ MORE

Jun 18, 2018 in Data Analytics by CodingByHeart77
• 3,710 points
6,094 views
0 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
• 32,460 points
5,898 views
0 votes
2 answers

Replacing a row in pandas data.frame

key error. I love python READ MORE

Feb 18, 2019 in Data Analytics by anonymous
5,522 views
0 votes
2 answers

Message saying "would you like to use a private library instead?" when trying to install a package

This question appears if your user environment ...READ MORE

Nov 4, 2019 in Data Analytics by Goose
• 140 points
5,477 views
0 votes
1 answer

Turn values into scientific notation in R

Consider the below vector: a<-c(0.1324,0.0001234,234.21341324,09.324324) You can convert it ...READ MORE

Jul 19, 2018 in Data Analytics by DataKing99
• 8,150 points
5,448 views
0 votes
1 answer

“subscript out of bounds” Error in r programming

This error is likely to occur when ...READ MORE

Oct 31, 2018 in Data Analytics by Kalgi
• 51,890 points
5,361 views
+1 vote
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,920 points
5,278 views
0 votes
2 answers

How can we count TRUE values in a logical vector?

Hi, You can get a count of all ...READ MORE

Aug 20, 2019 in Data Analytics by anonymous
• 32,460 points
5,155 views
0 votes
1 answer

How can I append rows to an R data frame?

Consider a dataSet i.e cicar(present under library ...READ MORE

May 8, 2018 in Data Analytics by zombie
• 3,750 points
4,682 views
0 votes
1 answer

Extracting numeric columns from a data.frame - R

You can use the select_if() function from ...READ MORE

May 4, 2018 in Data Analytics by Bharani
• 4,560 points
4,548 views
+1 vote
1 answer

Jupyter Notebook : superscripts and subscripts

You can use the markdown cell to do this. ...READ MORE

Dec 6, 2018 in Data Analytics by Shubham
• 13,380 points

edited Dec 12, 2018 by Shubham 4,446 views
0 votes
1 answer

How to replace all occurrences of a character in a character column in a data frame in R

If you used sub() to replace the ...READ MORE

Jun 28, 2019 in Data Analytics by anonymous
• 32,460 points
4,207 views
0 votes
1 answer

Error saying "Error in file(out, "wt") : cannot open the connection" when execute help command in r

Hey @Ali, change working dir, exit r ...READ MORE

Nov 20, 2018 in Data Analytics by Maverick
• 10,820 points
4,174 views
0 votes
3 answers

How can I add YAML current date in rmarkdown ?

<$today:MM/dd/yyyy> READ MORE

Mar 25, 2019 in Data Analytics by Anupam Das
4,060 views
0 votes
1 answer

Error: stat_count() must not be used with a y aesthetic.

Hi Rayan, This error comes due to the ...READ MORE

Aug 19, 2019 in Data Analytics by anonymous
• 32,460 points
3,981 views
0 votes
1 answer

How to extract specific columns from a DataFrame ?

Yes there are so many ways: df[,c(V2,V4)] and another ...READ MORE

Apr 11, 2018 in Data Analytics by DeepCoder786
• 1,720 points
3,827 views
0 votes
7 answers

How to iterate over rows in a Dataframe in pandas (Python)?

You can use IMHO: for ind in df.index: ...READ MORE

Dec 10, 2018 in Data Analytics by Ishaan
3,758 views
0 votes
1 answer

Change font size of valueBox - shiny R

Try writing your valueBox with this syntax: valueBox( ...READ MORE

Dec 4, 2018 in Data Analytics by Haseeb
3,663 views