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,340 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,960 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,184 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,676 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
338 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,056 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,635 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
588 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,484 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
907 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
399 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
611 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
586 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,229 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,595 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,479 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,983 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
798 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
680 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
360 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,664 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
750 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,500 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
309 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,263 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
957 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
773 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
433 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,484 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
567 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
517 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,529 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,445 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,443 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
603 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,329 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,130 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,079 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,204 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,905 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,017 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,524 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,680 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,636 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,015 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,476 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
773 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,586 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,727 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,974 views