Most viewed questions in Data Analytics

0 votes
1 answer

Define a matrix, vector and determinent in rmarkdown html document

Hi Riya, I have given some examples below ...READ MORE

Sep 17, 2019 in Data Analytics by rahul

edited Sep 17, 2019 8,245 views
0 votes
1 answer

Extracting numeric columns from a data.frame - R

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

May 4, 2018 in Data Analytics by Bharani
• 4,660 points
8,182 views
0 votes
2 answers

How to call Rmarkdown from another R script?

render() is used to call external Rmarkdown ...READ MORE

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

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

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

Sep 7, 2020 in Data Analytics by MD
• 95,460 points
8,115 views
0 votes
1 answer

Error saying "no applicable method for 'meta' applied to an object of class" when trying to create TermDocumentMatrix

Heyy @Hannah, the following line of code ...READ MORE

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

How to convert tables to a data frame in R ?

> trial.table.df <- as.data.frame(trial.table) //assuming that trial.table ...READ MORE

Apr 20, 2018 in Data Analytics by zombie
• 3,790 points
8,017 views
0 votes
1 answer

How can I print to stdout in R?

Hi@akhtar, Sometimes we need to print to stdout ...READ MORE

Oct 30, 2020 in Data Analytics by MD
• 95,460 points
7,983 views
+1 vote
1 answer

How to convert a list of dataframes in to a single dataframe using R?

You can use the plyr function: data <- ...READ MORE

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

Add variable size and color of circle marker depending on condition

Hey, Give conditions for color or radius within ...READ MORE

Sep 23, 2019 in Data Analytics by Cherukuri
• 33,050 points
7,943 views
+5 votes
2 answers

Predict weight when height is given using linear regression in R

You can try something like this: # The ...READ MORE

Dec 12, 2018 in Data Analytics by Purva
7,874 views
+1 vote
1 answer

How can I use which() function in R ?

which() function determines the position of elements ...READ MORE

Sep 25, 2018 in Data Analytics by Daisy
• 8,140 points
7,849 views
0 votes
1 answer

Error saying "Error in xy.coords(x, y, xlabel, ylabel, log) : 'x' and 'y' lengths differ"

Make sure is a factor time <- as.factor(c("pm", ...READ MORE

Nov 9, 2018 in Data Analytics by Maverick
• 10,840 points
7,829 views
+1 vote
1 answer

Error saying "Error in map_df(1, function(i) { : could not find function "map_df"" in R

Make sure you’ve installed the package purr ...READ MORE

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

Check palindrome or not in R

library(stringi) palindrome<-function(x) {   if(string_re ...READ MORE

Jan 14, 2022 in Data Analytics by Eshita Saha

edited Mar 5 7,699 views
0 votes
1 answer

.SD in data.table in R

.SD stands for "Subset of Data.table". The ...READ MORE

Apr 13, 2018 in Data Analytics by nirvana
• 3,090 points
7,520 views
0 votes
1 answer

How can I save grid.arrange() plot to file ?

grid.arrange() directly draws on our device. However, ...READ MORE

May 16, 2018 in Data Analytics by zombie
• 3,790 points
7,509 views
0 votes
1 answer

How to convert JSON into CSV in R programming?

Use the jsonlite::fromJSON to read the data into ...READ MORE

Jan 24, 2019 in Data Analytics by Sophie may
• 10,620 points
7,414 views
0 votes
1 answer

Difference between [[1]] and [1] in R Programming

Hey Latha, The difference between them is that ...READ MORE

Jun 29, 2019 in Data Analytics by anonymous
• 33,050 points
7,409 views
0 votes
1 answer

Convert data.frame object into character vector/list

Hi, it is possible to store them ...READ MORE

Jul 9, 2019 in Data Analytics by anonymous
• 33,050 points
7,385 views
0 votes
1 answer

How to hide/show tabs in shiny app in R?

Hi, Radha One way is to use hidetab ...READ MORE

Aug 22, 2019 in Data Analytics by anonymous
• 33,050 points
7,291 views
0 votes
1 answer

Error saying "Error in parse(file, keep.source = FALSE, srcfile = src, encoding = enc) : " in shiny R

The error means you’re missing out on ...READ MORE

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

reverse a list or vector in R

@ch, Use rev function to reverse R objects ...READ MORE

Oct 14, 2019 in Data Analytics by Cherukuri
• 33,050 points
7,195 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
7,174 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
7,167 views
0 votes
1 answer

R programming: Naming the output file using a variable

Use the paste command: write.csv(max.hsi, paste0("Index_", i,".csv ...READ MORE

Mar 26, 2019 in Data Analytics by Sophie may
• 10,620 points
7,146 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,250 points
7,138 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
7,137 views
0 votes
1 answer

What is grob and how to create grobs in ggplot?

A grid graphical object (“grob”) is a ...READ MORE

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

How to apply loops to multiply across various columns in a dataframe?

I am assuming that your columns are ...READ MORE

Apr 6, 2018 in Data Analytics by kappa3010
• 2,090 points
7,086 views
+7 votes
4 answers

How can I include javascript code into my shiny R dashboard?

There are multiple ways doing this. One ...READ MORE

Dec 5, 2018 in Data Analytics by Maverick
• 10,840 points
7,046 views
+1 vote
1 answer

R error: Unused arguments

 invoke REBMIX by trying this: REBMIX[[i, j, k]] ...READ MORE

Dec 14, 2018 in Data Analytics by Sophie may
• 10,620 points
7,028 views
0 votes
1 answer

How to import and clean a text file into dataframe in R?

You can use readLines() or read.table() depending ...READ MORE

Jul 16, 2019 in Data Analytics by anonymous
6,992 views
0 votes
1 answer

R Shiny Error: Object of type 'closure' is not subsettable

The error you mentioned happens when you ...READ MORE

Aug 20, 2019 in Data Analytics by anonymous
• 33,050 points
6,897 views
0 votes
1 answer

How to subset data so that it contains only columns whose names match a condition

You can use grepl on the names ...READ MORE

Apr 27, 2018 in Data Analytics by Sahiti
• 6,370 points
6,878 views
+2 votes
1 answer

Error saying object not found in R

Change your link_addr to linkAddr and it ...READ MORE

Dec 11, 2018 in Data Analytics by Maverick
• 10,840 points
6,824 views
+1 vote
1 answer

Error saying "ERROR: Error sourcing C:\Users\ali\AppData\Local\Temp\Rtmp8iTRBM\file54f8276958b3"

Seems like there is a problem with ...READ MORE

Nov 29, 2018 in Data Analytics by Maverick
• 10,840 points
6,799 views
+1 vote
1 answer

Installing JQ on Mac by command-line

On a mac, any application can be ...READ MORE

Dec 6, 2018 in Data Analytics by Shubham
• 13,490 points

edited Dec 12, 2018 by Shubham 6,721 views
+1 vote
2 answers

Splitting the data into training and testing sets - R

Hi, Try like this. train = sample(x = ...READ MORE

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

How can I delete multiple values from a vector in R?

The %in% operator tells  which elements are ...READ MORE

Apr 27, 2018 in Data Analytics by shams
• 3,670 points
6,642 views
0 votes
1 answer

R - Bar chart (bivariate/multivariate Analysis)

The bivariate analysis could be shown in ...READ MORE

Aug 22, 2019 in Data Analytics by anonymous
• 33,050 points
6,629 views
0 votes
1 answer

How can I import multiple .csv files into R ?

## import_multiple_csv_files_to_R # Purpose: Import multiple csv files ...READ MORE

Apr 20, 2018 in Data Analytics by zombie
• 3,790 points
6,620 views
+2 votes
2 answers

Error when executing write.csv function in R

row.names = F READ MORE

Mar 5, 2019 in Data Analytics by anonymous
6,525 views
0 votes
1 answer

Setting up checkpoint dir: PySpark Data Science

You can follow the below steps: Change the ...READ MORE

Aug 2, 2019 in Data Analytics by Zulaikha
• 910 points
6,470 views
0 votes
1 answer

How can I define Global Variables in R?

The variables declared inside a function are ...READ MORE

Apr 25, 2018 in Data Analytics by shams
• 3,670 points
6,467 views
+1 vote
1 answer

difference between plyr and dplyr

@Kunal, Both are similar package used for ...READ MORE

Oct 29, 2019 in Data Analytics by Cherukuri
• 33,050 points
6,450 views
+1 vote
1 answer

Binding rows of 2 data-frames which have non-identical columns

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

May 22, 2018 in Data Analytics by Bharani
• 4,660 points
6,370 views
0 votes
1 answer

Python : Cannot Import Data using Pandas

So< if your error says: ...READ MORE

Dec 7, 2018 in Data Analytics by Upasana
• 8,620 points
6,360 views
0 votes
1 answer

Download file from website using web scraping

Hi, Follow the below steps: 1. Use rvest package ...READ MORE

Sep 20, 2019 in Data Analytics by rishabh
6,348 views
0 votes
1 answer

Finding frequency of observations in R

You can use the "dplyr" package to ...READ MORE

Mar 26, 2018 in Data Analytics by Bharani
• 4,660 points
6,338 views
0 votes
1 answer

How to find common elements from multiple vectors in R?

Reduce(intersect, list(a,b,c)) READ MORE

Apr 27, 2018 in Data Analytics by DeepCoder786
• 1,720 points
6,283 views