Nothing
knitr::opts_chunk$set(comment = NA)
# Style asis chunks codechunk <- function(text, style=list(color="white")){ cat( sprintf('<pre><code class="r" style="%s">%s</code></pre>', do.call(function(...) sprintf(paste(c(names(style), ""), collapse = ":%s;"), ...), unname(style)), code)) }
if (exists("eval")) eval_code <- eval else eval_code <- FALSE
# Import required libraries
import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
from scipy import stats
import math
import statsmodels.api as sm
from tabulate import tabulate
# Set console printing options pd.set_option('display.max_rows', 500) pd.set_option('display.max_columns', 20) pd.set_option('display.width', 1000)
code1 <- "# Define the path to your data (remark the forward slash) filepath = " code <- paste0(code1, paste0("\"C:/",params$filename[1],"\"")) codechunk(code, style=list("background-color"="#FFFFFF"))
text1 <- "# Upload the data df = " if (params$decimal == "auto"){ # First read with dot datainput1 <- fread(params$filename$datapath, header = "auto", sep = "auto", dec=".", encoding = "unknown", data.table = FALSE, na.strings = "") # Define colnames to finally decide for decimal character colnames <- sapply(datainput1, function(col) is.numeric(col) & Negate(is.integer)(col)) if (sum(colnames) == 0L){ # Probably comma as decimal text2 <- paste0("pd.read_csv(filepath, sep = None, decimal =\",\", keep_default_na = False, na_values = \'\')") } else { # Probably dot as decimal text2 <- paste0("pd.read_csv(filepath, sep = None, decimal =\".\", keep_default_na = False, na_values = \'\')") } } else { # User selection for decimal text2 <- paste0("pd.read_csv(filepath, sep = None, decimal = \"", params$decimal,"\", keep_default_na = False, na_values = \'\')") } code <- paste0(text1,text2) codechunk(code, style=list("background-color"="#FFFFFF"))
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.