Most viewed questions in Data Analytics

0 votes
1 answer

Any filter based on conditional criteria in r?

Consider a data frame like this: #Create DF ...READ MORE

May 11, 2018 in Data Analytics by Sahiti
• 6,370 points
1,982 views
0 votes
1 answer

How to add 2 ggplots side by side?

Hi, Use ggarrange() function to show multiple ggplot in ...READ MORE

Aug 19, 2019 in Data Analytics by anonymous
• 33,030 points
1,967 views
0 votes
1 answer

How to forecast season and trend of data using STL and ARIMA in R?

You can use the forecast.stl function for the ...READ MORE

May 19, 2018 in Data Analytics by DataKing99
• 8,240 points
1,959 views
0 votes
1 answer

Sunburst charts using plotly

See below example library(plotly) p <- plot_ly( labels ...READ MORE

Nov 3, 2019 in Data Analytics by Cherukuri
• 33,030 points
1,956 views
0 votes
1 answer

How to include css code in shiny r app?

To include a CSS file, use includeCSS(), ...READ MORE

Aug 30, 2019 in Data Analytics by anonymous
• 33,030 points
1,955 views
0 votes
1 answer

Difference between label and popup in addmarkers() in leaflet

Hey, its quite simple. Label in leaflet displays ...READ MORE

Sep 20, 2019 in Data Analytics by rajitha
1,943 views
0 votes
1 answer

How to make points transparent using plot function in R?

There is no attribute to set the ...READ MORE

Oct 14, 2019 in Data Analytics by Cherukuri
• 33,030 points
1,933 views
0 votes
1 answer

Display labels within pie chart

See below example- df <- data.frame( name ...READ MORE

Nov 2, 2019 in Data Analytics by Cherukuri
• 33,030 points
1,932 views
0 votes
1 answer

Removing unimportant variables before building Random Forest

Build the randomForest model on top of ...READ MORE

Apr 4, 2018 in Data Analytics by Bharani
• 4,660 points
1,931 views
0 votes
1 answer

How to remove NA values from a column, and the corresponding values from an adjacent column, in R?

Hi@Marcelo, You can use the filter keyword to ...READ MORE

Aug 4, 2020 in Data Analytics by MD
• 95,440 points
1,923 views
0 votes
1 answer

Differences between html_nodes( ) and html_node( )?

Pallava, both the functions return nodes from ...READ MORE

Sep 17, 2019 in Data Analytics by rajeev
1,921 views
0 votes
2 answers

Installing MXNet for R in Windows System

You can install it for python in ...READ MORE

Dec 4, 2018 in Data Analytics by Kalgi
• 52,360 points
1,919 views
0 votes
1 answer

Using dplyr package to summarise multiple columns - R

'dplyr' package provides 'summarise_all()' function to apply ...READ MORE

Jun 6, 2018 in Data Analytics by Bharani
• 4,660 points
1,911 views
0 votes
1 answer

How can I pause, sleep, wait, execution for X seconds in R?

You can try the following piece of ...READ MORE

May 25, 2018 in Data Analytics by zombie
• 3,790 points
1,896 views
0 votes
1 answer

What is the difference between random forest and decision trees?

The basic difference is that Random Forest ...READ MORE

Jul 30, 2018 in Data Analytics by Abhi
• 3,720 points
1,886 views
+5 votes
0 answers

"Error in tagAssert: argument "body" is missing, with no default" when trying to create a dashboard using shiny R

I'm trying to create a dashboard using ...READ MORE

Dec 11, 2018 in Data Analytics by Ali
• 11,360 points

edited Dec 11, 2018 by Ali 1,883 views
0 votes
1 answer

Check if a website permits web scraping - R

Vinutha, While doing web scraping its necessary ...READ MORE

Sep 17, 2019 in Data Analytics by aditya
1,880 views
0 votes
1 answer

Error saying "Error in x$children[[1]] : subscript out of bounds" while web scrapping

You could try the httr library: library(XML) library(httr) url <- 'http://www.sainsburys.co.uk/shop/gb/groceries/fruit-veg/all-fruit#langId=44&storeId=10151&catalogId=10122&categoryId=12545&parent_category_rn=12518&top_category=12518&pageSize=30&orderBy=FAVOURITES_FIRST&searchTerm' doc <- ...READ MORE

Nov 9, 2018 in Data Analytics by Maverick
• 10,840 points
1,861 views
0 votes
1 answer

Save a plot as image on the disk using R

Consider for both the situations: 1. Image will ...READ MORE

Apr 14, 2018 in Data Analytics by Sahiti
• 6,370 points
1,848 views
0 votes
1 answer

Rename a single column in dataframe using R

colnames(Samp)[2] <- "newname2" This sets the name of ...READ MORE

Apr 13, 2018 in Data Analytics by kappa3010
• 2,090 points
1,848 views
0 votes
1 answer

How to replace NA values in a dataframe with Zero's ?

It is simple and easy: df1<-as.data.frame(matrix(sample(c(NA, 1:10), 100, ...READ MORE

Apr 10, 2018 in Data Analytics by CodingByHeart77
• 3,740 points
1,843 views
0 votes
1 answer

19) Analytics can be classified as

Option a) Exploratory data analysis is an approach ...READ MORE

Dec 3, 2020 in Data Analytics by Gitika
• 65,910 points
1,837 views
0 votes
1 answer

How can we trim leading and trailing whitespaces in R?

trimws {base} //Remove Leading/Trailing Whitespace Removes leading and/or ...READ MORE

Apr 18, 2018 in Data Analytics by zombie
• 3,790 points
1,823 views
0 votes
1 answer

R Shiny: Select input choice inside server function.

Use renderUI function within the server function ...READ MORE

Oct 29, 2019 in Data Analytics by Cherukuri
• 33,030 points
1,818 views
0 votes
1 answer

Reduce markers overlapping in maps

Hey, You can either reduce the font size ...READ MORE

Sep 23, 2019 in Data Analytics by anonymous
• 3,450 points
1,815 views
+1 vote
1 answer

What does “Error: object '<myvariable>' not found” mean?

The error means that R could not ...READ MORE

Oct 29, 2018 in Data Analytics by Ali
• 11,360 points
1,811 views
0 votes
1 answer

Show SQL equivalent code of dplyr code in R

show_query() translated dplyr code into sql equivalent ...READ MORE

Oct 14, 2019 in Data Analytics by Cherukuri
• 33,030 points
1,806 views
0 votes
1 answer

Show count of unique values for each value in the field in dataframe

Hi, Use below r code. For one field, you ...READ MORE

Aug 21, 2019 in Data Analytics by anonymous
• 33,030 points
1,793 views
0 votes
1 answer

Add secondary axis as a dual axis in R plot

You can add a secondary axis in ...READ MORE

Nov 4, 2019 in Data Analytics by keerthi
1,791 views
0 votes
1 answer

Change the order of legend values in a plot in R

@prardhana, Use scale_fill/color/size_discrete/contin....(labels = c()). compare both to see ...READ MORE

Nov 4, 2019 in Data Analytics by payal
1,789 views
0 votes
1 answer

Drop unused levels from a data frame in R

You can use this command droplevels() y <- ...READ MORE

Jun 14, 2018 in Data Analytics by DataKing99
• 8,240 points
1,776 views
0 votes
1 answer

Error saying "duplicate 'row.names' are not allowed" when trying to setup my data for the mlogit-package

Take out the chid.var argument in your call to mlogit.data, ...READ MORE

Nov 12, 2018 in Data Analytics by Maverick
• 10,840 points
1,770 views
0 votes
0 answers

Error in xy.coords(x, y, xlabel, ylabel, log) : argument "x" is missing, with no default

Hi, my code is showing this, what's ...READ MORE

Sep 7, 2020 in Data Analytics by Nurdiana
• 120 points

recategorized Sep 7, 2020 by Gitika 1,769 views
+1 vote
1 answer

How to add create a box plot with categorical columns?

One way is to convert to factor ...READ MORE

Jul 4, 2019 in Data Analytics by anonymous
• 33,030 points
1,755 views
0 votes
1 answer

Difference between List(list1,list2) and c(list1,list2) in R

Hi Deepa, It's quite simple, let me explain ...READ MORE

Jun 26, 2019 in Data Analytics by Cherukuri
• 33,030 points
1,750 views
0 votes
1 answer

How can I Split code over multiple lines in an R script?

You can do this as follows: setwd(paste("~/a/very/long/path/here ...READ MORE

May 22, 2018 in Data Analytics by zombie
• 3,790 points
1,749 views
+1 vote
1 answer

R & MySQl : Error connecting to Database

Check the dbConnect's documentation, you must pass values ...READ MORE

Dec 14, 2018 in Data Analytics by Sophie may
• 10,610 points
1,748 views
0 votes
1 answer

Remove characters from field in dataframe

Use the below code to update the ...READ MORE

Oct 14, 2019 in Data Analytics by anonymous
• 33,030 points
1,728 views
0 votes
1 answer

How to use mailR package?

Hi Prarthana, Install mailR and load the package. install.packages("mailR", ...READ MORE

Sep 4, 2019 in Data Analytics by anonymous
• 33,030 points
1,708 views
0 votes
1 answer

How to crop white space around image(Magick) in R?

@sreenivas, Use image_trim to crop the extra part of ...READ MORE

Oct 28, 2019 in Data Analytics by Cherukuri
• 33,030 points
1,707 views
0 votes
1 answer

Changing Pandas data-frame to JSON type

abc.to_json(orient='records') This command will give you the desired ...READ MORE

May 22, 2018 in Data Analytics by anonymous
1,701 views
0 votes
0 answers

Warning: Error in UseMethod: no applicable method for 'spread_' applied to an object of class "table" in shiny Apps in R

Warning: Error in UseMethod: no applicable method ...READ MORE

Jul 19, 2019 in Data Analytics by pragyat
1,700 views
0 votes
1 answer

Add multiple sub plots within same panel.

Hi, Karthi The subplot() function in plotly provides ...READ MORE

Aug 26, 2019 in Data Analytics by anonymous
• 33,030 points
1,689 views
+1 vote
1 answer

Error saying "Error in .jfindClass(as.character(driverClass)[1]) : class not found " in R

Cassandra drivers seem to have dependencies that ...READ MORE

Dec 12, 2018 in Data Analytics by Maverick
• 10,840 points
1,682 views
0 votes
1 answer

How to rename columns in pandas (Python)?

You can use the rename function in ...READ MORE

Apr 30, 2018 in Data Analytics by DeepCoder786
• 1,720 points

edited Jun 8, 2020 by MD 1,679 views
0 votes
1 answer

How will you define the number of clusters in a clustering algorithm?

Though the Clustering Algorithm is not specified, ...READ MORE

Aug 21, 2018 in Data Analytics by Abhi
• 3,720 points
1,678 views
0 votes
1 answer

How can I rotate axis labels in R ?

library(ggplot2) p <- data.frame(Day=c("2011-04-11", "2014-05-24","2004-01-12","2014-06-20","2010-08-07","2014-05-28"), Impressions=c(24010,15959,16107,21792,24933,21634),Clicks=c(211,106,248,196,160,241)) p       ...READ MORE

May 18, 2018 in Data Analytics by zombie
• 3,790 points
1,676 views
0 votes
1 answer

How to refresh shiny dataset?

When you refresh the page in the ...READ MORE

May 31, 2018 in Data Analytics by Sahiti
• 6,370 points
1,675 views
0 votes
1 answer

Change IP address on RStudio

The default is 0.0.0.0, but if you ...READ MORE

Nov 2, 2018 in Data Analytics by Maverick
• 10,840 points
1,664 views