makeValid: Make valid R code

Description Usage Arguments Value Examples

View source: R/makeValidCode.R

Description

Make valid R code

Usage

1
makeValid(temp)

Arguments

temp

A character vector to make a valid code

Value

A valid R codes

Examples

1
2
3
4
5
6
7
require(tidyverse)
temp <- "iris %>%
group_by(Species) %>%
summarize_all(mean)

table1"
makeValid(temp)

Example output

Loading required package: tidyverse
Loading tidyverse: ggplot2
Loading tidyverse: tibble
Loading tidyverse: tidyr
Loading tidyverse: readr
Loading tidyverse: purrr
Loading tidyverse: dplyr
Conflicts with tidy packages ---------------------------------------------------
filter(): dplyr, stats
lag():    dplyr, stats
[1] "iris %>%\ngroup_by(Species) %>%\nsummarize_all(mean)\n\ntable1"

dplyrAssist documentation built on May 2, 2019, 4:04 p.m.