Most viewed questions in Data Analytics

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 6, 2019 in Data Analytics by anonymous
14,583 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
• 33,050 points
14,554 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
14,370 views
0 votes
1 answer

Random Forest Error : Error in y - ymean : non-numeric argument to binary operator

Hey, Convert the Class.variable to factor then it might work. random_forest ...READ MORE

Oct 9, 2019 in Data Analytics by Cherukuri
• 33,050 points
14,265 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,490 points

edited Dec 12, 2018 by Shubham 13,860 views
0 votes
1 answer

R Error in matrix(if (is.null(value)) logical() else value, nrow = nr, dimnames = list(rn, : length of 'dimnames' [2] not equal to array extent

Hi Shiva, You need to provide a matrix ...READ MORE

Aug 21, 2019 in Data Analytics by anonymous
• 33,050 points
13,570 views
+1 vote
2 answers

Locating row index of a column which has the maximum value - R

Hi, Nirvana You can also try this. which(iris$Sepal.Length == ...READ MORE

Aug 21, 2019 in Data Analytics by anonymous
• 33,050 points
13,449 views
0 votes
1 answer

How can I measuring running time of R Code ?

5 ways to measure running time of ...READ MORE

Apr 17, 2018 in Data Analytics by anonymous
13,122 views
+1 vote
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 21, 2018 in Data Analytics by Maverick
• 10,840 points
13,045 views
0 votes
2 answers

How to add an image to shiny application?

Hi Prachi. To include an image in the ...READ MORE

Aug 30, 2019 in Data Analytics by anonymous
• 33,050 points
12,730 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,250 points
12,059 views
0 votes
1 answer

What is the difference between NULL and NA?

In simple words, NULL represents the null or an empty object ...READ MORE

Oct 14, 2019 in Data Analytics by anonymous
• 33,050 points
11,940 views
0 votes
1 answer

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

Hi@akhtar, You need to install the library in ...READ MORE

Oct 6, 2020 in Data Analytics by MD
• 95,460 points
11,704 views
0 votes
1 answer

Assigning global variables from inside a function - R

You can assign global variables from inside ...READ MORE

May 15, 2018 in Data Analytics by Bharani
• 4,660 points
11,688 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
• 11,380 points
11,568 views
0 votes
1 answer

fetch all rows with null values in dataframe or dataset - R

Use below code -  which(is.na(air)) is.na() will return a boolean ...READ MORE

Jul 4, 2019 in Data Analytics by anonymous
• 33,050 points
11,537 views
0 votes
1 answer

How do I ignore errors in R

With the try function you can handle errors to ...READ MORE

Nov 6, 2018 in Data Analytics by Kalgi
• 52,340 points
11,381 views
0 votes
1 answer

Slicing a list using an index vector in r

Use index within [] and provide an ...READ MORE

Nov 2, 2019 in Data Analytics by Cherukuri
• 33,050 points
11,169 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 9, 2018 in Data Analytics by zombie
• 3,790 points
11,164 views
0 votes
2 answers

How to subset rows containing NA in a chosen column of a data frame?

You can give this a try. subset(dataframe, is.na(dataframe$col2)) ...READ MORE

Aug 21, 2019 in Data Analytics by anonymous
• 33,050 points
11,164 views
0 votes
1 answer

How to rename a file using R?

I just found there are 2 functions file.rename() ...READ MORE

Oct 29, 2019 in Data Analytics by Cherukuri
• 33,050 points
10,733 views
+1 vote
2 answers

How can we count TRUE values in a logical vector?

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

Aug 21, 2019 in Data Analytics by anonymous
• 33,050 points
10,586 views
0 votes
1 answer

Difference between Eigenvectors and Eigenvalues

Eigenvectors are used for understanding linear transformations. In data ...READ MORE

Jul 17, 2018 in Data Analytics by CodingByHeart77
• 3,750 points
10,439 views
0 votes
1 answer

resize the image in R

Hi,  You can read the image using Magick ...READ MORE

Aug 7, 2019 in Data Analytics by anonymous
• 33,050 points
10,429 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
• 33,050 points
10,427 views
0 votes
1 answer

Convert character to integer type - R

Use substring() function to extract value from ...READ MORE

Nov 3, 2019 in Data Analytics by Cherukuri
• 33,050 points
10,334 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,660 points
10,006 views
+2 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
• 52,340 points
9,897 views
+1 vote
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
9,867 views
0 votes
1 answer

R Shiny Error: no applicable method for 'filter_' applied to an object of class "c('reactiveExpr','reactive')"

The error could be because of using reactive ...READ MORE

Aug 21, 2019 in Data Analytics by Cherukuri
• 33,050 points
9,865 views
0 votes
1 answer

Error saying " cannot open the connection" when trying to install a package in R

Try install.packages(“package_name”, repos="http://cr ...READ MORE

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

Difference between summarise() and summarize() in R

summarise() and summarize() are synonyms. READ MORE

Sep 24, 2019 in Data Analytics by anonymous
9,619 views
0 votes
1 answer

Error saying "Error in map(.x, .f, ...) : argument ".x" is missing, with no default" in R

There is small mistake in your code. ...READ MORE

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

Tibble vs Dataframe

Hi Shilpa, The differences are - 1. Tibble ...READ MORE

Aug 26, 2019 in Data Analytics by anonymous
• 33,050 points
9,391 views
0 votes
1 answer

How to add legend or any text on the map in leaflet?

See below example, > p = colorFactor(palette = ...READ MORE

Oct 28, 2019 in Data Analytics by anonymous
• 33,050 points
9,362 views
0 votes
1 answer

Check Distribution of Categorical Variable in R

Consider the iris dataset use the table() function ...READ MORE

Jul 30, 2018 in Data Analytics by CodingByHeart77
• 3,750 points
9,273 views
0 votes
1 answer

How to plot side-by-side Plots with ggplot2 in R?

By Using gridExtra library we can easily ...READ MORE

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

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

Reverse the stack order in a stacked bar chart

Hi kriti, Use below code inside geom_bar function. position ...READ MORE

Aug 26, 2019 in Data Analytics by anonymous
• 33,050 points
9,227 views
0 votes
1 answer

Finding the nth highest value in a vector or a data-frame column

sort(x,T)[n] Here, 'x' is the data-frame/vector and 'n' ...READ MORE

May 31, 2018 in Data Analytics by Bharani
• 4,660 points
9,195 views
0 votes
1 answer

R vs Tableau data visualization.

@Yash, This is a requirement based question. ...READ MORE

Oct 28, 2019 in Data Analytics by anonymous
• 33,050 points
9,053 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
9,002 views
0 votes
1 answer

Calculating accuracy of prediction of rpart model

Your first task would be to build ...READ MORE

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

How to pass command line arguments to run a Rscript

1. For taking an argument from the ...READ MORE

Aug 6, 2018 in Data Analytics by Anmol
• 1,780 points
8,763 views
0 votes
1 answer

How to create a date variable in R?

Create a string with date notation as ...READ MORE

Jul 16, 2019 in Data Analytics by anonymous
8,731 views
0 votes
1 answer

Sample random rows in DataFrame in R

First we should have some data: df1<-data.frame(matrix(rnorm(20), nrow=10)) > ...READ MORE

Apr 13, 2018 in Data Analytics by DeepCoder786
• 1,720 points
8,518 views
+1 vote
1 answer

Error saying cannot open file 'file.pdf' when trying to save a plot in ggplot

You could try adding the following line ...READ MORE

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

How to create a box-plot using “plotly” in R?

You can use this command to create ...READ MORE

Jul 4, 2018 in Data Analytics by CodingByHeart77
• 3,750 points
8,486 views
0 votes
1 answer

How to convert continuous variable to categorical variable and vice versa?

Use discretize function to convert a continuous variable ...READ MORE

Oct 29, 2019 in Data Analytics by Cherukuri
• 33,050 points
8,385 views
0 votes
1 answer

What is the difference between merge and bind in R?

Merge function merges an arbitrarily large series ...READ MORE

Oct 29, 2019 in Data Analytics by Cherukuri
• 33,050 points
8,272 views
0 votes
1 answer

How to order data frame rows according to vector with specific order using R?

You can try using match: data <- data.frame(alphabets=letters[1:4], ...READ MORE

Apr 30, 2018 in Data Analytics by Sahiti
• 6,370 points
8,153 views