Latest questions in Data Analytics

0 votes
1 answer

Confusion matrix in R

A confusion matrix can be used to ...READ MORE

Jul 5, 2018 in Data Analytics by DataKing99
• 8,240 points
1,025 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,740 points
7,258 views
0 votes
1 answer

How to write a custom function which will replace all the missing values in a vector with the mean of values in R?

Consider this vector: a<-c(1,2,3,NA,4,5,NA,NA) Write the function to impute ...READ MORE

Jul 4, 2018 in Data Analytics by CodingByHeart77
• 3,740 points
4,273 views
0 votes
1 answer

List packages are used for data mining in R?

You can refer to the following packages ...READ MORE

Jul 3, 2018 in Data Analytics by DataKing99
• 8,240 points
1,304 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,060 views
0 votes
1 answer

How to sample random rows in dataframe?

Create data frame and then implement as ...READ MORE

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

How to sample n random rows per group in a dataframe?

You can assign a random ID to ...READ MORE

Jul 3, 2018 in Data Analytics by Sahiti
• 6,370 points
4,767 views
0 votes
1 answer

Create vector matrix of movie ratings using R project?

Why do'nt you try the dcast function, in the reshape2 package. d ...READ MORE

Jun 30, 2018 in Data Analytics by anonymous
907 views
0 votes
1 answer

How to calculate group mean and assign it to new data in R

You can use something like this: df$grp.mean.values <- ...READ MORE

Jun 27, 2018 in Data Analytics by Sahiti
• 6,370 points
1,584 views
0 votes
1 answer

How to find out cluster center mean of DBSCAN in R?

Just index back into the original data ...READ MORE

Jun 27, 2018 in Data Analytics by Sahiti
• 6,370 points
1,212 views
0 votes
1 answer

TwitteR package download of package ‘rjson’ fails in R

If you don't want to upgrade your ...READ MORE

Jun 27, 2018 in Data Analytics by CodingByHeart77
• 3,740 points
1,199 views
0 votes
1 answer

SMOTE-function not working in R

If you convert 'y' to a factor, ...READ MORE

Jun 27, 2018 in Data Analytics by CodingByHeart77
• 3,740 points
2,721 views
0 votes
1 answer

hclust size limit

Classic hierarchical clustering approaches are O(n^3) in runtime and O(n^2) in ...READ MORE

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

How to cluster center mean of DBSCAN in R?

Just index back into the original data ...READ MORE

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

How to convert a sentence to word table in R?

Try the following code: sentence <- c("case sweden", ...READ MORE

Jun 21, 2018 in Data Analytics by Sahiti
• 6,370 points
1,275 views
0 votes
1 answer

Use different distance formula other than euclidean distance in k means

K-means is based on variance minimization. The sum-of-variance formula ...READ MORE

Jun 21, 2018 in Data Analytics by Sahiti
• 6,370 points
1,433 views
0 votes
1 answer

Is there any easy way to fill in missing data?

You can try the following code: First, you ...READ MORE

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

Extract lhs items from rules in R

Try the following code: data("Adult") rules <- apriori(Adult, ...READ MORE

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

How to write rules generated by Apriori?

I found out one solution: Use as() ...READ MORE

Jun 19, 2018 in Data Analytics by Sahiti
• 6,370 points
451 views
0 votes
1 answer

How to cluster a very large dataset in R?

You can initially use kmeans, to calculate ...READ MORE

Jun 19, 2018 in Data Analytics by Sahiti
• 6,370 points
2,809 views
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 19, 2018 in Data Analytics by CodingByHeart77
• 3,740 points
16,031 views
0 votes
1 answer

Randomly subset of data with dplyr

Maybe this is what you want: # sample ...READ MORE

Jun 19, 2018 in Data Analytics by CodingByHeart77
• 3,740 points
684 views
0 votes
1 answer

Do-while loop in R

You can use repeat{} condition and check ...READ MORE

Jun 14, 2018 in Data Analytics by DataKing99
• 8,240 points
518 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,796 views
0 votes
1 answer

Reshape dataframe without “timevar” from long to wide format in R

Assuming that the data is in the ...READ MORE

Jun 14, 2018 in Data Analytics by CodingByHeart77
• 3,740 points
839 views
0 votes
1 answer

Reshape data from long to wide format in R

Use reshape function: reshape(dat1, idvar = "name", timevar = ...READ MORE

Jun 14, 2018 in Data Analytics by CodingByHeart77
• 3,740 points
2,561 views
0 votes
1 answer

How can I read a .csv file in R language?

read.csv () function is used to read ...READ MORE

Jun 12, 2018 in Data Analytics by zombie
• 3,790 points
566 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,824 views
0 votes
1 answer

How to evaluate expression given as a string in R?

The eval() function evaluates an expression, but "5+5" is a string, ...READ MORE

Jun 7, 2018 in Data Analytics by DataKing99
• 8,240 points
4,275 views
+1 vote
1 answer

Identify object in R

Hi,  You can use ? followed by the ...READ MORE

Jul 2, 2019 in Data Analytics by anonymous
• 33,030 points
453 views
+1 vote
2 answers

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,370 points
36,351 views
0 votes
1 answer

How to extract a dplyr tbl column as a vector?

With dplyr 0.7.0, you can use pull to ...READ MORE

Jun 6, 2018 in Data Analytics by Sahiti
• 6,370 points
6,226 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,925 views
0 votes
1 answer

Unable to install the 'devtools' package in R

Run the below command in your Ubuntu/Linux ...READ MORE

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

How many data structures does R language have?

R language has Homogeneous and Heterogeneous data ...READ MORE

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

R language has several packages for solving a problem. How do you make a decision on which one is the best to use?

CRAN package ecosystem has more than 6000 ...READ MORE

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

Loading multiple packages at the same time

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

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

Constructing a new data.frame by giving values row by row - R

Create an empty data.frame first and then  ...READ MORE

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

How to add regression line equation and R2 on graph?

Below is one solution: # GET EQUATION AND ...READ MORE

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

How to order bars in a bar graph using ggplot2?

The key to ordering is to set ...READ MORE

Jun 1, 2018 in Data Analytics by DataKing99
• 8,240 points
932 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,660 points
24,503 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
8,556 views
0 votes
1 answer

Trigger a data refresh in shiny

You're looking for invalidateLater. Put this, with the ...READ MORE

May 31, 2018 in Data Analytics by Sahiti
• 6,370 points
4,361 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,702 views
0 votes
1 answer

Python equivalent to replace function in R

There is actually a replace function in ...READ MORE

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

Adding values of common columns in pandas dataframe

Result = Set1.add(Set2)   x   y 0  70  ...READ MORE

May 30, 2018 in Data Analytics by Bharani
• 4,660 points
946 views
0 votes
1 answer

How can I increase the number of axis ticks in R ?

You can try to override ggplots default ...READ MORE

May 30, 2018 in Data Analytics by zombie
• 3,790 points
6,489 views
0 votes
1 answer

Changing R default library path using .libPaths ?

You should try using one library but ...READ MORE

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

How can I change font size and direction of axes text in ggplot2 ?

You can try theme(): Library(ggplot2) a <- data.frame(x=gl(10, 1, ...READ MORE

May 30, 2018 in Data Analytics by zombie
• 3,790 points
4,054 views
0 votes
1 answer

How can I suppress warnings globally in an R Script ?

You can use: options(warn=-1) // turning off warnings ...READ MORE

May 30, 2018 in Data Analytics by zombie
• 3,790 points
2,087 views