Title: | Data Insights Through Inbuilt R Shiny App |
---|---|
Description: | It builds dynamic R shiny based dashboards to analyze any CSV files. It provides simple dashboard design to subset the data, perform exploratory data analysis and preliminary machine learning (supervised and unsupervised). It also provides filters based on columns of interest. |
Authors: | Jayachandra N [aut, cre], Pushker Ravindra [aut] |
Maintainer: | Jayachandra N <[email protected]> |
License: | GPL-3 |
Version: | 0.4.2 |
Built: | 2025-03-07 05:36:35 UTC |
Source: | https://github.com/cran/shinyr |
Calculates a cross-tabulation of observed and predicted classes with associated statistics.
confmatrix(actuals, preds)
confmatrix(actuals, preds)
actuals |
a numeric vector |
preds |
a numeric vector |
confmatrix
A table same as caret::ConfusionMatrix
Jayachandra N
confmatrix(c(1,1,1,0), c(1,1,0,0))
confmatrix(c(1,1,1,0), c(1,1,0,0))
Partition data for training and test
dataPartition(df, train_data_perc)
dataPartition(df, train_data_perc)
df |
data.frame which need to be devided into train and test subset |
train_data_perc |
numeric value between 1 to 100 |
dataPartition
list of length 2 which contains Train data and Test data
Jayachandra N
dataPartition(iris, 80)
dataPartition(iris, 80)
Detects class of given objects
detectClass(x)
detectClass(x)
x |
a vector |
detectClass
type of the vector
Jayachandra N
detectClass(c(1,2,3)) detectClass(c("a","b")) detectClass(iris$Species)
detectClass(c(1,2,3)) detectClass(c("a","b")) detectClass(iris$Species)
Exclude an item from a set of items
excludeThese(set, items_to_exclude)
excludeThese(set, items_to_exclude)
set |
vector |
items_to_exclude |
vector to exclude from the whole set |
excludeThese
vector
Jayachandra N
excludeThese(1:10, 1)
excludeThese(1:10, 1)
Get character columns.
getcharacterCols(dat)
getcharacterCols(dat)
dat |
data frame |
getcharacterCols
A Character vector of names of numeric columns of a given data frame
Jayachandra N
getcharacterCols(iris) getcharacterCols(mtcars)
getcharacterCols(iris) getcharacterCols(mtcars)
Get coefficients from the model summary
getCoefficients(model)
getCoefficients(model)
model |
lm model |
getCoefficients
data.frame of coeffcients
Jayachandra N
model <- lm(Sepal.Length ~ ., iris) # A linear regression model getCoefficients(model)
model <- lm(Sepal.Length ~ ., iris) # A linear regression model getCoefficients(model)
Get detailed insights about the data like number of rows, columns and some basic statistics such as mean
getDataInsight(temp)
getDataInsight(temp)
temp |
data frame |
getDataInsight
list of details of data
Jayachandra N
getDataInsight(mtcars) getDataInsight(iris)
getDataInsight(mtcars) getDataInsight(iris)
Get frequency table for a given text
getFeqTable(text)
getFeqTable(text)
text |
plain text or a paragraph |
getFeqTable
data frame of word and it's frequency.
Jayachandra N
getFeqTable("shinyr is Incredible!")
getFeqTable("shinyr is Incredible!")
Get report on whether the given packages are installed on not
getLibraryReport(packages)
getLibraryReport(packages)
packages |
Vector of package names |
getLibraryReport
data.frame, status of required packages and their installation status
Jayachandra N
getLibraryReport(c('dplyr', 'data.table'))
getLibraryReport(c('dplyr', 'data.table'))
get most repeated value in a given vector.
getMostRepeatedValue(vec)
getMostRepeatedValue(vec)
vec |
Vector to calculate most repeated values |
getMostRepeatedValue
most repeated values in the given set of values
Jayachandra N
getMostRepeatedValue(c(1,2,3,3,3,2)) getMostRepeatedValue(c("R", "R", "Python", "Python", "R"))
getMostRepeatedValue(c(1,2,3,3,3,2)) getMostRepeatedValue(c("R", "R", "Python", "Python", "R"))
Get all columns which are numeric.
getnumericCols(dat)
getnumericCols(dat)
dat |
data frame |
getnumericCols
Character vector of names of numeric columns of given data frame
Jayachandra N
getnumericCols(iris) getnumericCols(mtcars)
getnumericCols(iris) getnumericCols(mtcars)
getType
getType(vec)
getType(vec)
vec |
A vector of any choice, to detect between numeric or character |
type of the given vector
Jayachandra N
getType(iris$Species) getType(as.factor(c(1,0,1,1,0,NA,1, NULL))) getType(as.factor(c(1, NULL,0,1,1,0,1,'a'))) getType(c(1,2,3,4, NA)) getType(letters[1:4])
getType(iris$Species) getType(as.factor(c(1,0,1,1,0,NA,1, NULL))) getType(as.factor(c(1, NULL,0,1,1,0,1,'a'))) getType(c(1,2,3,4, NA)) getType(letters[1:4])
getTypeOfColumns
getTypeOfColumns(df)
getTypeOfColumns(df)
df |
data frame |
Data frame of column name and it's type
Jayachandra N
getTypeOfColumns(mtcars) getTypeOfColumns(iris)
getTypeOfColumns(mtcars) getTypeOfColumns(iris)
Get word cloud for given table of words' frequencies
getWordCloud(d)
getWordCloud(d)
d |
table of word's frequency |
getWordCloud
Word cloud plot
x <- getFeqTable("Hello! R is Great") getWordCloud(x)
x <- getFeqTable("Hello! R is Great") getWordCloud(x)
Group by columns and summarize given data.
groupByandSumarize(df, grp_col, summarise_col, FUN = mean)
groupByandSumarize(df, grp_col, summarise_col, FUN = mean)
df |
data frame |
grp_col |
column name to group |
summarise_col |
column name to summarize |
FUN |
function to summarize |
groupByandSumarize
summarized table
Jayachandra N
groupByandSumarize(mtcars, grp_col = c("am"), summarise_col = "hp", FUN = "mean")
groupByandSumarize(mtcars, grp_col = c("am"), summarise_col = "hp", FUN = "mean")
Impute for missing values in given column in a given data by given method.
imputeMyData(df, col, FUN)
imputeMyData(df, col, FUN)
df |
data frame to impute |
col |
a column name of data frame to impute |
FUN |
a function to be used for imputing values one of(mean, median, sum, min, max) |
imputeMyData
data frame after imputing the values
Jayachandra N
x <- head(iris) x$Sepal.Length[1] <- NA imputeMyData(x, "Sepal.Length", "mean")
x <- head(iris) x$Sepal.Length[1] <- NA imputeMyData(x, "Sepal.Length", "mean")
Make a variable from a given character vector.
make_var(prefix, var, suffix)
make_var(prefix, var, suffix)
prefix |
prefix character |
var |
character to convert |
suffix |
suffix character |
make_var
variable
Jayachandra N
make_var("", "Jay", "") make_var("", "Incredible_India", "")
make_var("", "Jay", "") make_var("", "Incredible_India", "")
Count the number of missing values in a vector.
missing_count(x)
missing_count(x)
x |
vector |
missing_count
Number of missing values in the given set of values
Jayachandra N
missing_count(c(1,2,3)) missing_count(c(NA, 1, NA, "NULL", ""))
missing_count(c(1,2,3)) missing_count(c(NA, 1, NA, "NULL", ""))
Fit Multinomial Log-linear Models.
multinomial(eqn, df)
multinomial(eqn, df)
eqn |
formula to build model |
df |
data frame |
multinomial
model
Jayachandra N
multinomial( Species ~ ., iris)
multinomial( Species ~ ., iris)
Plot correlation plot
plotCor(cor_dat, my_method)
plotCor(cor_dat, my_method)
cor_dat |
Corelation matrix |
my_method |
method to plot, for example: circle |
plotCor
Corelation plot
Jayachandra N
cor_dat <- cor(mtcars) plotCor(cor_dat, "circle")
cor_dat <- cor(mtcars) plotCor(cor_dat, "circle")
Build Random Forest Model.
randomForestModel(eqn, df)
randomForestModel(eqn, df)
eqn |
formula |
df |
data.frame |
randoMForestModel
rf model
Jayachandra N
randomForestModel( Species ~ ., iris)
randomForestModel( Species ~ ., iris)
Generate regression model metrics such as R-squared and MAPE.
regressionModelMetrics(actuals, predictions, model)
regressionModelMetrics(actuals, predictions, model)
actuals |
numeric vector of actual values |
predictions |
numeric vector of predictions |
model |
lm model object |
regressionModelMetrics
list
Jayachandra N
mod <- lm(formula = wt ~ ., data = mtcars) predictions <- predict(mod, mtcars[,-6]) actuals <- mtcars[,6] regressionModelMetrics(actuals = actuals, predictions = predictions, model = mod)
mod <- lm(formula = wt ~ ., data = mtcars) predictions <- predict(mod, mtcars[,-6]) actuals <- mtcars[,6] regressionModelMetrics(actuals = actuals, predictions = predictions, model = mod)
An R shiny app for shinyr UI.
shineMe()
shineMe()
shineMe
shiny UI page
Jayachandra N
shineMe()
shineMe()
Split a string by space and get
splitAndGet(x)
splitAndGet(x)
x |
string to split into words |
splitAndGet
List of worrds
Jayachandra N
splitAndGet("R programming is awesome!")
splitAndGet("R programming is awesome!")
Get a list of all datasets available as data.frame in R
valid_sets(package = NULL, cols = NULL)
valid_sets(package = NULL, cols = NULL)
package |
package name to fetch inbuilt data sets example: "datasets" |
cols |
numeric to specify condition on how many columns should data frame have |
valid_sets
data frame all available datasets of class data frame
Pushker Ravindra
Jayachandra N
valid_sets()
valid_sets()