Most answered questions in Data Analytics

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,030 points
13,493 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,030 points
9,941 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,030 points
9,801 views
+1 vote
2 answers

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
75,057 views
+1 vote
2 answers

How can I drop columns by name in a data frame ?

We can Drop Columns by name in ...READ MORE

Apr 14, 2018 in Data Analytics by zombie
• 3,790 points
28,111 views
0 votes
2 answers

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

The function match works on vectors : x <- sample(1:10) x # ...READ MORE

Dec 12, 2020 in Data Analytics by Rajiv
• 8,910 points
56,090 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
• 33,030 points
14,468 views
+1 vote
2 answers

How to count the number of elements with the values in a vector?

Use dplyr function group_by(). > n = as.data.frame(num) > ...READ MORE

Aug 21, 2019 in Data Analytics by anonymous
• 33,030 points
4,627 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 6, 2019 in Data Analytics by anonymous
13,718 views
+1 vote
2 answers

How to sort a data frame by columns in R?

You can use dplyr function arrange() like ...READ MORE

Aug 21, 2019 in Data Analytics by anonymous
• 33,030 points
1,492 views
0 votes
2 answers

How to count unique values in R?

You can try this way, as.data.frame(v) %>% count(v) READ MORE

Aug 8, 2019 in Data Analytics by anonymous
6,309 views
0 votes
2 answers

In data frame how to spilt strings into values?

You can do this using dplyr and ...READ MORE

Dec 5, 2018 in Data Analytics by Kalgi
• 52,360 points
825 views
0 votes
2 answers

Integration of R with Java

there is a package called rjava that ...READ MORE

Dec 5, 2018 in Data Analytics by Kalgi
• 52,360 points
827 views
+1 vote
2 answers

Finding number of missing values and removing those missing values from a data-frame

To find number of missing values for ...READ MORE

Aug 14, 2019 in Data Analytics by anonymous
895 views
+1 vote
2 answers

Custom Function to replace missing values in a vector with the mean of values

Try this. lapply(a,function(x){ifelse(is.na(x),mean(a,na.rm = TRUE ...READ MORE

Aug 14, 2019 in Data Analytics by anonymous
1,685 views
0 votes
2 answers

Transforming a key/value string into distinct rows in R

We would start off by loading the ...READ MORE

Mar 26, 2018 in Data Analytics by Bharani
• 4,660 points
880 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,976 views
0 votes
2 answers

"Train" and "Test" sets in Data Science

Normally to perform supervised learning you need ...READ MORE

Aug 3, 2018 in Data Analytics by Abhi
• 3,720 points
1,016 views
0 votes
2 answers

why we need beeline?

Remote we are connecting to hive with ...READ MORE

Jul 24, 2020 in Data Analytics by K. Raja Yasodhar
15,869 views
0 votes
2 answers

What is difference between Distributed search head and Search head cluster?

 A distributed environment describes the separation of ...READ MORE

Dec 4, 2018 in Data Analytics by Ali
• 11,360 points
2,127 views
0 votes
1 answer

How to Use rbind and cbind on Single Dataframe

To obtain the desired output, you can ...READ MORE

Jun 22, 2023 in Data Analytics by anonymous
• 1,380 points
825 views
0 votes
1 answer

Speed up the loop operation in R

To improve the performance of your code, ...READ MORE

Jun 22, 2023 in Data Analytics by anonymous
• 1,380 points
481 views
0 votes
1 answer

All Levels of a Factor in a Model Matrix in R

Yes, you can modify the model.matrix() function ...READ MORE

Jun 22, 2023 in Data Analytics by anonymous
• 1,380 points
607 views
0 votes
1 answer

Extracting specific columns from a data frame

Yes, there is a more efficient method ...READ MORE

Jun 22, 2023 in Data Analytics by anonymous
• 1,380 points
573 views
0 votes
1 answer

how to use the Box-Cox power transformation in R

Yes, you are on the right track ...READ MORE

Jun 22, 2023 in Data Analytics by anonymous
• 1,380 points
723 views
0 votes
1 answer

What is the difference between rm() and rm(list=ls())?

Yes, you can clear all variables in ...READ MORE

Jun 22, 2023 in Data Analytics by anonymous
• 1,380 points
363 views
0 votes
1 answer

Error: could not find function ... in R

If you encounter an error stating "'some.function' ...READ MORE

Jun 22, 2023 in Data Analytics by anonymous
• 1,380 points
386 views
0 votes
1 answer

what is diffrence between NROW and nrow in r?

5 In R, you may always check ...READ MORE

Jun 24, 2022 in Data Analytics by Sohail
• 3,040 points
845 views
0 votes
1 answer

why the predict() function does have different rows in R

Alter this sentence: model = lm(train$latitude train$crashes) to lm(crashes ...READ MORE

Jun 24, 2022 in Data Analytics by Sohail
• 3,040 points
593 views
0 votes
1 answer

Text mining- how to build a term-document matrix

You're not loading the TM library, and ...READ MORE

Jun 24, 2022 in Data Analytics by Sohail
• 3,040 points
562 views
0 votes
1 answer

why the predict() function does have different rows in R

Alter this sentence: model = lm(train$latitude train$crashes) to lm(crashes ...READ MORE

Jun 24, 2022 in Data Analytics by Sohail
• 3,040 points
583 views
0 votes
1 answer

R numbers from 1 to 100

Your error is seeking for range, which ...READ MORE

Jun 24, 2022 in Data Analytics by Sohail
• 3,040 points
1,041 views
0 votes
1 answer

StepAIC() stopping point

Square RSS Df Sum AIC 169 61.3 ...READ MORE

Jun 24, 2022 in Data Analytics by Sohail
• 3,040 points
424 views
0 votes
1 answer

What does 'r' mean before a Regex pattern?

Since the string is to be treated ...READ MORE

Jun 24, 2022 in Data Analytics by Sohail
• 3,040 points
1,106 views
0 votes
1 answer

Polynomials as functions in R

 this will work _polynomial = function(x) { ...READ MORE

Jun 24, 2022 in Data Analytics by Sohail
• 3,040 points
494 views
0 votes
1 answer

How do I convert a factor into date format?

That was close. The as needs to ...READ MORE

Jun 24, 2022 in Data Analytics by Sohail
• 3,040 points
397 views
0 votes
1 answer

How to one hot encode several categorical variables in R

43 I advise employing the caret package's dummyVars ...READ MORE

Jun 24, 2022 in Data Analytics by Sohail
• 3,040 points
641 views
0 votes
1 answer

Why does tidyverse still require plyr to load?

ggplot2 still imports plyr (at least as ...READ MORE

Jun 24, 2022 in Data Analytics by Sohail
• 3,040 points
859 views
0 votes
1 answer

setwd() in the current working dir

# set the working directory to the ...READ MORE

Jun 24, 2022 in Data Analytics by Sohail
• 3,040 points
270 views
0 votes
1 answer

How can I make a list of lists in R?

Lists of lists are simple to create. list1 ...READ MORE

Jun 24, 2022 in Data Analytics by Sohail
• 3,040 points
379 views
0 votes
1 answer

understanding sapply function in r

Do you read 2? sapply. Either a ...READ MORE

Jun 24, 2022 in Data Analytics by Sohail
• 3,040 points
360 views
0 votes
1 answer

Create line graph with multiple lines in R

You must first restructure your dataset into ...READ MORE

Jun 24, 2022 in Data Analytics by Sohail
• 3,040 points
322 views
0 votes
1 answer

Vectorized IF statement in R?

x <- seq(0.1,10,0.1) > x [1] ...READ MORE

Jun 24, 2022 in Data Analytics by Sohail
• 3,040 points
1,224 views
0 votes
1 answer

Mean of categorical variables from plyr package

df<-data.frame(risk= rep(c("ADV","HHM","POV"),10), ...READ MORE

Jun 24, 2022 in Data Analytics by Sohail
• 3,040 points
329 views
0 votes
1 answer

What happens when prob argument in sample sums to less/greater than 1?

Excellent query. The documentation is ambiguous on ...READ MORE

Jun 24, 2022 in Data Analytics by Sohail
• 3,040 points
372 views
0 votes
1 answer

Why variance in R is different? [duplicate]

There are usually two methods for calculating ...READ MORE

Jun 14, 2022 in Data Analytics by Sohail
• 3,040 points
396 views
0 votes
1 answer

if - else if - else statement and brackets

When the first if is followed by ...READ MORE

Jun 14, 2022 in Data Analytics by Sohail
• 3,040 points
759 views
0 votes
1 answer

How to use the switch statement in R functions?

Switch definitely wasn't intended to operate this ...READ MORE

Jun 24, 2022 in Data Analytics by Sohail
• 3,040 points
372 views
0 votes
1 answer

R: Comment out block of code [duplicate]

The majority of editors use a short ...READ MORE

Jun 24, 2022 in Data Analytics by Sohail
• 3,040 points
253 views
0 votes
1 answer

Counting the number of elements with the values of x in a vector

You may simply use the table() method: > ...READ MORE

Jun 14, 2022 in Data Analytics by Sohail
• 3,040 points
330 views