Most viewed questions in Data Analytics

0 votes
1 answer

How to convert a continuous variable to discrete variable and vice versa in R?

Discretize function convert a continuous variable into ...READ MORE

Nov 4, 2019 in Data Analytics by rajeev
3,899 views
0 votes
1 answer

I'm trying to start rattle on R Studio and end up with an error

You need the package RGtk2 for rattle to ...READ MORE

Nov 26, 2018 in Data Analytics by Maverick
• 10,840 points
3,865 views
+1 vote
3 answers

Number of missing values in dataset

Try this, lapply(airquality, function(x) { sum(is.na(x)) }) READ MORE

Aug 7, 2019 in Data Analytics by anonymous
3,859 views
+1 vote
2 answers

web scraping on Tripadvisor's review

Hi, I used the below code to ...READ MORE

Sep 16, 2019 in Data Analytics by Cherukuri
• 33,030 points
3,857 views
0 votes
1 answer

Summarize with a condition

You can provide condition to summarize using ...READ MORE

Aug 7, 2019 in Data Analytics by anonymous
• 33,030 points
3,834 views
+1 vote
1 answer

Error saying "'names' attribute [27] must be the same length as the vector [21]"

When you end up with this error ...READ MORE

Nov 12, 2018 in Data Analytics by Maverick
• 10,840 points
3,828 views
0 votes
2 answers

R: Error in sort.int(x, na.last = na.last, decreasing = decreasing, ...)

Use unlist function to convert the list ...READ MORE

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

How can I differentiate between lapply and sapply ?

If the programmers want the output to ...READ MORE

Jun 12, 2018 in Data Analytics by zombie
• 3,790 points
3,786 views
0 votes
1 answer

How can I calculate mean per group in a data.frame?

You can use aggregate function for calculating ...READ MORE

May 24, 2018 in Data Analytics by zombie
• 3,790 points
3,764 views
+1 vote
2 answers

What is the difference between correlation and covariance?

Correlation and Co-variance both are used as ...READ MORE

Jul 24, 2018 in Data Analytics by Abhi
• 3,720 points
3,741 views
0 votes
1 answer

What is Selection Bias?

Selection bias is the bias introduced by the ...READ MORE

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

Change ggplot2 default color palette

If the scale is continuous, then you can ...READ MORE

Aug 20, 2019 in Data Analytics by anonymous
• 33,030 points
3,677 views
+1 vote
1 answer

How to add videos in a shiny R dashboard?

Its pretty simple, try this: server.r library(shiny) shinyServer(function(input, output, session) ...READ MORE

Dec 4, 2018 in Data Analytics by Haseeb
3,672 views
0 votes
1 answer

How to remove all variables except functions in R?

One line that removes all objects except for functions: rm(list ...READ MORE

Apr 25, 2018 in Data Analytics by DeepCoder786
• 1,720 points
3,661 views
0 votes
1 answer

Error in library(Metrics) : there is no package called ‘Metrics’

Hi@akhtar, The matrics library is not available in ...READ MORE

Oct 6, 2020 in Data Analytics by MD
• 95,440 points
3,647 views
0 votes
1 answer

How to reduce the height of valueBox in shiny R?

Add this line before using your vlaueBoxes tags$head(tags$style(HTML(".small-box ...READ MORE

Dec 4, 2018 in Data Analytics by Haseeb
3,614 views
0 votes
1 answer

How to add labels on bars in bar chart in ggplot?

Use geom_text() to add labels on the ...READ MORE

Aug 20, 2019 in Data Analytics by anonymous
• 33,030 points
3,608 views
0 votes
1 answer

Unload a package without restarting R

Try the below option: detach("package:vegan", unload=TRUE) NOTE: You can ...READ MORE

Apr 17, 2018 in Data Analytics by DataKing99
• 8,240 points
3,601 views
0 votes
1 answer

Element wise multiplication in R

In R the simple vector multiplication gives ...READ MORE

Oct 30, 2018 in Data Analytics by Maverick
• 10,840 points
3,590 views
0 votes
1 answer

Showing percentage instead of counts in a bar plot - ggplot2 - R

Load the 'scales' package first, which gives ...READ MORE

May 29, 2018 in Data Analytics by Bharani
• 4,660 points
3,559 views
0 votes
1 answer

How to change y axis max in time series using R?

The axis limits are being set using ...READ MORE

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

Dynamically select element from a list and work with it - Shiny R

Follow these steps: Import the data into R Check ...READ MORE

Dec 5, 2018 in Data Analytics by Maverick
• 10,840 points
3,485 views
0 votes
1 answer

Remove messages from R markdown report

All you have to do is, set ...READ MORE

May 14, 2018 in Data Analytics by Bharani
• 4,660 points
3,477 views
0 votes
1 answer

Aligning title in ggplot2

You can use the theme layer to ...READ MORE

Apr 27, 2018 in Data Analytics by Bharani
• 4,660 points

edited Jun 9, 2020 by MD 3,474 views
0 votes
1 answer

Error: package or namespace load failed for ‘ggplot2’ - R

Radha, Try restarting the session. the same ...READ MORE

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

Convert java code to R code

You can rjava package for this purpose. rJava is ...READ MORE

Nov 16, 2018 in Data Analytics by Maverick
• 10,840 points
3,424 views
0 votes
1 answer

How to connect to mysql database from rstudio?

Connect to the database as below. install.packages("odbc") db = ...READ MORE

Oct 7, 2019 in Data Analytics by anonymous
• 33,030 points
3,402 views
0 votes
1 answer

How to find out the sum/mean for multiple variables per group in R?

You can use the reshape2 package for ...READ MORE

Apr 12, 2018 in Data Analytics by DataKing99
• 8,240 points
3,393 views
0 votes
1 answer

Read command line parameters from an R script

Here's an example to explain : Two files ...READ MORE

Apr 17, 2018 in Data Analytics by kappa3010
• 2,090 points
3,377 views
0 votes
1 answer

How ‘breaks’ and ‘ cut’ works in R?

@ch, Cut divides the range of x into ...READ MORE

Oct 14, 2019 in Data Analytics by rohan
3,336 views
0 votes
1 answer

Replace comma with a period in data cleaning using R

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

Nov 13, 2018 in Data Analytics by Maverick
• 10,840 points
3,322 views
+1 vote
1 answer

Error saying "EXPR must be a length 1 vector" when trying to use the switch functionality

You can use the ifelse function: df$Value <- ifelse(d ...READ MORE

Nov 16, 2018 in Data Analytics by Maverick
• 10,840 points
3,286 views
0 votes
1 answer

How to use hclust function?

hclust performs hierarchical cluster analysis on a ...READ MORE

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

How to group all columns exculding a single column?

You can either use group_by or group_by_at Using ...READ MORE

Apr 12, 2018 in Data Analytics by Sahiti
• 6,370 points
3,216 views
0 votes
1 answer

9) Subscriber Data analysis includes __________ (select all applicable)

Option d)  Subscriber profiling, upselling and innovative tariffs Master ...READ MORE

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

Extract text from image in R

Try below code to fetch the image ...READ MORE

Aug 7, 2019 in Data Analytics by anonymous
• 33,030 points
3,207 views
0 votes
3 answers

2) Which of the following are applicable to Bigdata technologies(Select all applicable)

Replication, transaction processing READ MORE

Nov 25, 2021 in Data Analytics by anonymous
3,185 views
+1 vote
1 answer

Error saying "could not find function dashboardPage" in shiny R

Include this line in the code: Library(shinydashboard) READ MORE

Nov 29, 2018 in Data Analytics by Maverick
• 10,840 points
3,163 views
0 votes
1 answer

Error with rbind

Hey, rbind needs the number of columns ...READ MORE

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

Add radio buttons on shiny R dashboard

Yess of course that's possible. ShinyR provides ...READ MORE

Dec 5, 2018 in Data Analytics by Maverick
• 10,840 points
3,129 views
0 votes
1 answer

Error saying "Error in rnorm() : argument "n" is missing, with no default" in R

Hey @ali, rnorm() function requires an argument, ...READ MORE

Oct 30, 2018 in Data Analytics by Maverick
• 10,840 points
3,046 views
0 votes
1 answer

What is a Random Walk model and how can you simulate it using R?

A random walk is a simple example ...READ MORE

Jul 3, 2018 in Data Analytics by DataKing99
• 8,240 points
3,037 views
0 votes
1 answer

Create 3D Pie Chart in R.

Hi@akhtar, A pie chart with 3 dimensions can ...READ MORE

Oct 30, 2020 in Data Analytics by MD
• 95,440 points
3,027 views
0 votes
2 answers

Tensorflow installation error

Hi there, If you are trying to install ...READ MORE

Jul 16, 2020 in Data Analytics by Suhana
• 340 points
3,002 views
+1 vote
2 answers

Keras TypeError: 'int' not iterable

Long Short Term Memory networks are implemented ...READ MORE

Jun 17, 2019 in Data Analytics by Sophie may
• 10,610 points
3,001 views
0 votes
1 answer

List all dataframes in R session.

Try this. for(x in ls()){   if("data.frame" %in% ...READ MORE

Nov 4, 2019 in Data Analytics by anonymous
• 33,030 points
2,995 views
0 votes
1 answer

How to create a new table in database from R?

Use dbGetQuery to create a table by ...READ MORE

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

Create train and test data from dataset in R

Hi, Use sample or sample.split function to create ...READ MORE

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

How to select columns containing specific text in R?

Hi, You can use the select method to extract ...READ MORE

Aug 7, 2020 in Data Analytics by MD
• 95,440 points
2,951 views