Most voted questions in Data Analytics

0 votes
1 answer

Converting a string to title case - R

library(tools) toTitleCase("this is sparta") [1] "this is Sparta" ...READ MORE

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

How to forecast season and trend of data using STL and ARIMA in R?

You can use the forecast.stl function for the ...READ MORE

May 19, 2018 in Data Analytics by DataKing99
• 8,240 points
1,966 views
0 votes
1 answer

R plot arima fitted model with the original series

This question has many ways to answer, ...READ MORE

May 19, 2018 in Data Analytics by DataKing99
• 8,240 points
4,197 views
0 votes
1 answer

How can I rotate axis labels in R ?

library(ggplot2) p <- data.frame(Day=c("2011-04-11", "2014-05-24","2004-01-12","2014-06-20","2010-08-07","2014-05-28"), Impressions=c(24010,15959,16107,21792,24933,21634),Clicks=c(211,106,248,196,160,241)) p       ...READ MORE

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

How can I install R with Homebrew ?

brew tap homebrew/science brew install Caskroom/cask/xquartz brew install r The ...READ MORE

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

Removing all objects from work-space except one - R

You can use the 'keep()' function from ...READ MORE

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

How to filter a data frame with dplyr and tidy evaluation in R?

Requires the use of map_df to run each model, ...READ MORE

May 17, 2018 in Data Analytics by DataKing99
• 8,240 points
1,640 views
0 votes
1 answer

How to extract tidy output from many single-variable models using purrr/broom?

You can try this solution: filter_starwars <- function(...) ...READ MORE

May 17, 2018 in Data Analytics by DataKing99
• 8,240 points
594 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
6,495 views
0 votes
1 answer

How can I add x and y axis labels in ggplot2 ?

# Load a dataset(to work with) # We’ll ...READ MORE

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

Removing all white-spaces from a string

You can use the 'str_replace_all()' function from ...READ MORE

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

Reordering levels of a factor variable

The factor() function provides the 'levels' attribute ...READ MORE

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

Appending values to a vector - R

This is actually quite easy, all you ...READ MORE

May 15, 2018 in Data Analytics by Bharani
• 4,660 points
592 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
10,247 views
0 votes
1 answer

How can I install older version of R package ?

Supposedly you want to install some old ...READ MORE

May 14, 2018 in Data Analytics by zombie
• 3,790 points
1,599 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,487 views
0 votes
1 answer

Any filter based on conditional criteria in r?

Consider a data frame like this: #Create DF ...READ MORE

May 11, 2018 in Data Analytics by Sahiti
• 6,370 points
1,990 views
0 votes
1 answer

R lag irregular time series data

You could try using: library(dplyr) library(zoo) na.locf(ts$value[sapply(ts$time, function(x) min(which(ts$time - ...READ MORE

May 11, 2018 in Data Analytics by Sahiti
• 6,370 points
803 views
0 votes
1 answer

How can I use R to list all files with a specified extension ?

fls <- list.files(pattern = "\\.dbf$") $ at the ...READ MORE

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

How can I left align two graph edges?

By using a modified version of rbind.gtable ...READ MORE

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

How can I print string and variable contents on the same line using R?

There are two options for doing so.  You ...READ MORE

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

How can I select a CRAN mirror in R ?

There are many ways of doing so ...READ MORE

May 9, 2018 in Data Analytics by zombie
• 3,790 points
757 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
10,509 views
0 votes
1 answer

How can I learn R?

As the name signifies it's only an ...READ MORE

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

How to stack scatterplot in ggplot2?

Use melt() to reshape your data with total as a factor ...READ MORE

May 8, 2018 in Data Analytics by Sahiti
• 6,370 points
2,271 views
0 votes
1 answer

Changing the column type from numeric to factor - R

You can use the as.factor() function for ...READ MORE

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

Vector vs List in R

Well, you are right in  saying that ...READ MORE

May 8, 2018 in Data Analytics by anonymous
784 views
0 votes
1 answer

How can I remove plot axis values?

In order to remove numbering on x-axis ...READ MORE

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

How to drop rows of Pandas DataFrame whose value in certain coulmns is NaN

Hi@DataKing99, You can create one function according to ...READ MORE

May 7, 2018 in Data Analytics by DeepCoder786
• 1,720 points

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

Deleting particular objects from workspace - R

You can use the rm() function to ...READ MORE

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

Discarding duplicate rows from a data.frame - R

You can use distinct() function along with ...READ MORE

May 4, 2018 in Data Analytics by Bharani
• 4,660 points
522 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
7,534 views
0 votes
1 answer

How to delete DataFrame row in pandas based upon a column value?

You can use drop function in your ...READ MORE

May 3, 2018 in Data Analytics by DeepCoder786
• 1,720 points

edited Jun 9, 2020 by MD 1,452 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,030 points
13,451 views
0 votes
1 answer

How to print new lines with print() in R?

You can use cat() instead of writeLines(): ...READ MORE

May 3, 2018 in Data Analytics by kappa3010
• 2,090 points
614 views
0 votes
1 answer

How can I label points in geom_point?

Use geom_text , with aes label. You ...READ MORE

May 8, 2018 in Data Analytics by zombie
• 3,790 points
5,336 views
0 votes
1 answer

Grouping rows in a list in pandas (python) groupby

Yes, this possible by using groupby function ...READ MORE

May 3, 2018 in Data Analytics by DeepCoder786
• 1,720 points

edited Jun 8, 2020 by MD 1,134 views
0 votes
1 answer

How can I control the size of points in an R scatterplot?

plot(variable, type='o' , pch=5, cex=.3) The pch argument ...READ MORE

May 3, 2018 in Data Analytics by shams
• 3,670 points
1,083 views
0 votes
7 answers

How to iterate over rows in a Dataframe in pandas (Python)?

You can use IMHO: for ind in df.index: ...READ MORE

Dec 10, 2018 in Data Analytics by Ishaan
5,211 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
6,923 views
0 votes
1 answer

How to add leading zeros in R?

There are several solutions to this. One of ...READ MORE

Apr 30, 2018 in Data Analytics by Sahiti
• 6,370 points
24,032 views
0 votes
1 answer

What is the Difference in Size and Count in pandas (python)?

The major difference is "size" includes NaN values, ...READ MORE

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

edited Jun 8, 2020 by Gitika 2,537 views
0 votes
1 answer

How to rename columns in pandas (Python)?

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

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

edited Jun 8, 2020 by MD 1,689 views
0 votes
1 answer

How to export a graph to .eps file with R?

The easiest way that I could suggest ...READ MORE

Apr 27, 2018 in Data Analytics by Sahiti
• 6,370 points
4,645 views
0 votes
1 answer

Catch integer(0) in R

R's way of printing a zero length ...READ MORE

Apr 27, 2018 in Data Analytics by kappa3010
• 2,090 points
4,021 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,484 views
0 votes
1 answer

data.frame vs matrix

Yes, both matrix and data.frame are multidimensional ...READ MORE

Apr 27, 2018 in Data Analytics by Bharani
• 4,660 points
782 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
5,595 views
0 votes
1 answer

How can I remove duplicated rows in R ?

The function distinct() in the dplyr package ...READ MORE

Apr 27, 2018 in Data Analytics by shams
• 3,670 points
2,732 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
5,984 views