content large_stringlengths 0 6.46M | path large_stringlengths 3 331 | license_type large_stringclasses 2
values | repo_name large_stringlengths 5 125 | language large_stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 4 6.46M | extension large_stringclasses 75
values | text stringlengths 0 6.46M |
|---|---|---|---|---|---|---|---|---|---|
#' @title Controls Function for the Computation of Standard Errors for Risk and Performance estimators
#'
#' @description \code{RPESE.controls} sets the different control parameters used in
#' the compuation of standard errors for risk and performance estimators.
#'
#' @param estimator Risk or performance estimator us... | /R/RPESE.control.R | no_license | ZhangSR-kolar/PerformanceAnalytics | R | false | false | 4,371 | r | #' @title Controls Function for the Computation of Standard Errors for Risk and Performance estimators
#'
#' @description \code{RPESE.controls} sets the different control parameters used in
#' the compuation of standard errors for risk and performance estimators.
#'
#' @param estimator Risk or performance estimator us... |
if(getRversion() >= '2.15.1') globalVariables("gIndex")
mcoptions <- list(preschedule=FALSE, set.seed=TRUE)
# Create (new) factors out of factor and character columns
reFactorData <- function(data){
if(is.data.frame(data)){
indChar <- sapply(data, is.character)
indFac <- sapply(data, is.factor)
... | /R/common.R | no_license | cran/BayesFactor | R | false | false | 13,837 | r | if(getRversion() >= '2.15.1') globalVariables("gIndex")
mcoptions <- list(preschedule=FALSE, set.seed=TRUE)
# Create (new) factors out of factor and character columns
reFactorData <- function(data){
if(is.data.frame(data)){
indChar <- sapply(data, is.character)
indFac <- sapply(data, is.factor)
... |
## Exploratory Data Analysis Assignment 1: Plot1
# This script assumes the household power consumption file is in the parent directory,
# to avoid downloading it again or including it in the git repository!
setwd("..")
hpc <- read.csv("household_power_consumption.txt", header=TRUE, sep=";", na.strings = "?")
hpc <- s... | /plot1.R | no_license | drtimsloan/ExData_Plotting1 | R | false | false | 779 | r | ## Exploratory Data Analysis Assignment 1: Plot1
# This script assumes the household power consumption file is in the parent directory,
# to avoid downloading it again or including it in the git repository!
setwd("..")
hpc <- read.csv("household_power_consumption.txt", header=TRUE, sep=";", na.strings = "?")
hpc <- s... |
library(UpSetR)
input <- Transfac_DC2_June2020
upset(input,
order.by = c("degree"),
mb.ratio = c(0.6, 0.4),
number.angles = 0,
text.scale = 1.1,
point.size = 2.8,
line.size = 1
)
| /Fig1h_Upset plot for DC2 TRANSFAC August 2020.R | no_license | SameOldSamOld/RNA-Seq_OG4953 | R | false | false | 227 | r | library(UpSetR)
input <- Transfac_DC2_June2020
upset(input,
order.by = c("degree"),
mb.ratio = c(0.6, 0.4),
number.angles = 0,
text.scale = 1.1,
point.size = 2.8,
line.size = 1
)
|
## set he appropriate working directory
setwd("/cloud/project/coursera/04 Exploratory Data Analysis/Project 1")
t <- read.table("household_power_consumption.txt", header=TRUE, sep=";", na.strings = "?", colClasses = c('character','character','numeric','numeric','numeric','numeric','numeric','numeric','numeric'))
## F... | /plot1.R | no_license | nellycattaneorocchi/ExData_Plotting1 | R | false | false | 1,139 | r | ## set he appropriate working directory
setwd("/cloud/project/coursera/04 Exploratory Data Analysis/Project 1")
t <- read.table("household_power_consumption.txt", header=TRUE, sep=";", na.strings = "?", colClasses = c('character','character','numeric','numeric','numeric','numeric','numeric','numeric','numeric'))
## F... |
data 'LPic' (5000) {
// Default language
$"0002"
$"0011"
$"0003 0001 0000"
$"0000 0002 0000"
$"0008 0003 0000"
$"0001 0004 0000"
$"0004 0005 0000"
$"000E 0006 0001"
$"0005 0007 0000"
$"0007 0008 0000"
$"0047 0009 0000"
$"0034 000A 0001"
$"0035 000B 0001"
$"002... | /ports/darwin_dmg/SLA_rakudo_star.template.r | permissive | rba/star | R | false | false | 14,594 | r | data 'LPic' (5000) {
// Default language
$"0002"
$"0011"
$"0003 0001 0000"
$"0000 0002 0000"
$"0008 0003 0000"
$"0001 0004 0000"
$"0004 0005 0000"
$"000E 0006 0001"
$"0005 0007 0000"
$"0007 0008 0000"
$"0047 0009 0000"
$"0034 000A 0001"
$"0035 000B 0001"
$"002... |
#' Submits the results of the analytic workflow for the ards project
#'
#' @keywords 4CE
#' @export
submitAnalysis <- function ()
{
workDirectory = FourCePhase2.1Data::getContainerScratchDirectory()
projectOutputFiles = list.files(getProjectOutputDirectory(),
full.names = TRUE)
if (length(projec... | /FourCePhase2.1ards/R/submitAnalysis.R | no_license | covidclinical/Phase2.1ardsRPackage | R | false | false | 2,715 | r |
#' Submits the results of the analytic workflow for the ards project
#'
#' @keywords 4CE
#' @export
submitAnalysis <- function ()
{
workDirectory = FourCePhase2.1Data::getContainerScratchDirectory()
projectOutputFiles = list.files(getProjectOutputDirectory(),
full.names = TRUE)
if (length(projec... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/naming.R
\name{naming}
\alias{naming}
\title{Name an operation}
\usage{
naming(
start = NULL,
sets1,
middle = NULL,
sets2 = NULL,
collapse_symbol = "union"
)
}
\arguments{
\item{start, middle}{Character used as a start symbol or to ... | /man/naming.Rd | permissive | ropensci/BaseSet | R | false | true | 1,016 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/naming.R
\name{naming}
\alias{naming}
\title{Name an operation}
\usage{
naming(
start = NULL,
sets1,
middle = NULL,
sets2 = NULL,
collapse_symbol = "union"
)
}
\arguments{
\item{start, middle}{Character used as a start symbol or to ... |
testlist <- list(ExpressionSet = structure(c(3.10503529562433e+231, 1.23181983389617e+58, 9.99281274046587e+249, 6.36967296041789e+178, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)), Phylostratum = numeric(0))
result <- do.call(myTAI:::cpp_TAI,testlis... | /myTAI/inst/testfiles/cpp_TAI/AFL_cpp_TAI/cpp_TAI_valgrind_files/1615762151-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 334 | r | testlist <- list(ExpressionSet = structure(c(3.10503529562433e+231, 1.23181983389617e+58, 9.99281274046587e+249, 6.36967296041789e+178, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)), Phylostratum = numeric(0))
result <- do.call(myTAI:::cpp_TAI,testlis... |
#function for convert ts in df
convert_ts_to_df <- function(df){
if(!is.ts(df)) stop('\"df\" must be class ts', call. = T)
data.frame(Date = as.numeric(time(df)), value = as.numeric(df))
}
df <- convert_ts_to_df(AirPassengers)
plot(df$Date, df$value, type = 'l', xlab = "Time")
#function for book Advanced R by Hadl... | /weekday/Day_11_ts.R | no_license | makarevichy/Week_2_100DaysOfCode | R | false | false | 581 | r | #function for convert ts in df
convert_ts_to_df <- function(df){
if(!is.ts(df)) stop('\"df\" must be class ts', call. = T)
data.frame(Date = as.numeric(time(df)), value = as.numeric(df))
}
df <- convert_ts_to_df(AirPassengers)
plot(df$Date, df$value, type = 'l', xlab = "Time")
#function for book Advanced R by Hadl... |
library(MASS)
data(Boston)
str(Boston)
summary(Boston)
# splitting into testing and training data
set.seed(06119969)
index <- sample(nrow(Boston),nrow(Boston)*0.75)
boston.train <- Boston[index,]
boston.test <- Boston[-index,]
# linear regression -------------------------------------------------------
model_lm <- ... | /Regression Models.R | no_license | ashwitasaxena/Regression-And-Classification-Models | R | false | false | 7,104 | r | library(MASS)
data(Boston)
str(Boston)
summary(Boston)
# splitting into testing and training data
set.seed(06119969)
index <- sample(nrow(Boston),nrow(Boston)*0.75)
boston.train <- Boston[index,]
boston.test <- Boston[-index,]
# linear regression -------------------------------------------------------
model_lm <- ... |
####### Function for retrieving files
File_Retrieval <- function(LAS_folder, DTM_folder) {
source("Weiner_capstone_project.R")
las_files <- list.files(LAS_folder)
DTM_files <- list.files(DTM_folder)
for (i in 1:length(las_files)) {
LiDAR_file <- las_files[i]
site_info <- Kmisc::strip_extension(LiD... | /function_to_run_datasets.R | no_license | jweiner2010/Neon_Project | R | false | false | 908 | r | ####### Function for retrieving files
File_Retrieval <- function(LAS_folder, DTM_folder) {
source("Weiner_capstone_project.R")
las_files <- list.files(LAS_folder)
DTM_files <- list.files(DTM_folder)
for (i in 1:length(las_files)) {
LiDAR_file <- las_files[i]
site_info <- Kmisc::strip_extension(LiD... |
library(ggplot2)
library(base)
library(car)
#re-ordered columns to make the for loop easy to write
data <- read.csv('../data/clean_num_sorted.csv')
#correlation between amount a resource was used and getting an offer from that resource
for (i in 31:38){
print(ggplot(data, aes(x = data[[i + 10]], y = data[[i]])) +
... | /explorations/sarah_explores!.R | no_license | euiyulsong/ES3 | R | false | false | 1,979 | r | library(ggplot2)
library(base)
library(car)
#re-ordered columns to make the for loop easy to write
data <- read.csv('../data/clean_num_sorted.csv')
#correlation between amount a resource was used and getting an offer from that resource
for (i in 31:38){
print(ggplot(data, aes(x = data[[i + 10]], y = data[[i]])) +
... |
distanceFunction_using_vectors_infra_working_list <- function(
m3,
dmax = 10000.00,
tmax = 30,
var_count = 0,
infra_count = 0,
fun = distHaversine,
weight_spatiotemporal = 0.33,
weight_socioeconomic = 0.33,
spatialORsocioORinfra = 'all') {
require("geosphere")
... | /documentation/scripts/analysis/distanceFunction_listCreation.R | no_license | UNLSurge/distanceFunctionR | R | false | false | 3,903 | r | distanceFunction_using_vectors_infra_working_list <- function(
m3,
dmax = 10000.00,
tmax = 30,
var_count = 0,
infra_count = 0,
fun = distHaversine,
weight_spatiotemporal = 0.33,
weight_socioeconomic = 0.33,
spatialORsocioORinfra = 'all') {
require("geosphere")
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/read-tables.R
\name{read_fert_table}
\alias{read_fert_table}
\title{Read fertility table from plhdb.org csv export.}
\usage{
read_fert_table(f)
}
\arguments{
\item{f}{Name of the csv file containing fertility data. Do not edit the file manual... | /man/read_fert_table.Rd | no_license | camposfa/plhdbR | R | false | true | 501 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/read-tables.R
\name{read_fert_table}
\alias{read_fert_table}
\title{Read fertility table from plhdb.org csv export.}
\usage{
read_fert_table(f)
}
\arguments{
\item{f}{Name of the csv file containing fertility data. Do not edit the file manual... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/graphs.R
\name{graphs}
\alias{graphs}
\alias{graph_cdf}
\alias{graph_delta_area}
\alias{graph_heatmap}
\alias{graph_tracking}
\alias{graph_all}
\title{Graphical Displays}
\usage{
graph_cdf(mat)
graph_delta_area(mat)
graph_heatmap(mat, main ... | /man/graphs.Rd | permissive | AlineTalhouk/diceR | R | false | true | 2,481 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/graphs.R
\name{graphs}
\alias{graphs}
\alias{graph_cdf}
\alias{graph_delta_area}
\alias{graph_heatmap}
\alias{graph_tracking}
\alias{graph_all}
\title{Graphical Displays}
\usage{
graph_cdf(mat)
graph_delta_area(mat)
graph_heatmap(mat, main ... |
## makeCacheMatrix() and cacheSolve() are employed to efficiently calculate the
## inverse of a defined matrix. This inverse is 'cached' so that it can be
## rapidly returned upon further calls of cacheSolve() without employing
## significant CPU resources.
# makeCacheMatrix:
# matrix -> list
# Outputs 4 functions... | /cachematrix.R | no_license | thriptic/ProgrammingAssignment2 | R | false | false | 1,542 | r | ## makeCacheMatrix() and cacheSolve() are employed to efficiently calculate the
## inverse of a defined matrix. This inverse is 'cached' so that it can be
## rapidly returned upon further calls of cacheSolve() without employing
## significant CPU resources.
# makeCacheMatrix:
# matrix -> list
# Outputs 4 functions... |
############# Calculate log prob with kneser ney ########################
addKNUnigram <- function(df, df2, df3, D1=D){
# modify df. we operate for each term in df
bigrams <- nrow(df2)
# CDotWord <- function(word) nrow(df2[df2$start==word,])
CDotWord <- function(word) sum(df2$start==wo... | /NLP R/KneserNey.R | no_license | JDeanThomas/wikimine | R | false | false | 4,329 | r | ############# Calculate log prob with kneser ney ########################
addKNUnigram <- function(df, df2, df3, D1=D){
# modify df. we operate for each term in df
bigrams <- nrow(df2)
# CDotWord <- function(word) nrow(df2[df2$start==word,])
CDotWord <- function(word) sum(df2$start==wo... |
#
# CS 424 Spring 2018 UIC
# Project 3 - You Spin Me Round
#
# Aaron Struck - Undergraduate
# Chris Janowski - Undergraduate
# Steve Stranczek - Undergraduate
#
# Import libraries
library(shiny)
library(shinydashboard)
library(DT)
library(plotly)
library(dplyr)
library(leaflet)
Mode <- function(x) {... | /app.R | no_license | wisdafu/YouSpinMeRound | R | false | false | 69,108 | r | #
# CS 424 Spring 2018 UIC
# Project 3 - You Spin Me Round
#
# Aaron Struck - Undergraduate
# Chris Janowski - Undergraduate
# Steve Stranczek - Undergraduate
#
# Import libraries
library(shiny)
library(shinydashboard)
library(DT)
library(plotly)
library(dplyr)
library(leaflet)
Mode <- function(x) {... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AllMethods.R
\name{plot}
\alias{plot}
\alias{plot,bayesGAMfit,missing-method}
\alias{plot,predictPlotObject,missing-method}
\alias{plot,posteriorPredictObject,missing-method}
\title{Additional plotting for MCMC visualization and diagnostics.}... | /fuzzedpackages/bayesGAM/man/plot.Rd | no_license | akhikolla/testpackages | R | false | true | 1,316 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AllMethods.R
\name{plot}
\alias{plot}
\alias{plot,bayesGAMfit,missing-method}
\alias{plot,predictPlotObject,missing-method}
\alias{plot,posteriorPredictObject,missing-method}
\title{Additional plotting for MCMC visualization and diagnostics.}... |
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/clustomit.r
\name{clustomit}
\alias{clustomit}
\alias{plot.clustomit}
\alias{print.clustomit}
\title{ClustOmit - Cluster Stability Evaluation via Cluster Omission}
\usage{
clustomit(x, K, cluster_method, similarity = "adjusted_rand",
... | /man/clustomit.Rd | no_license | khughitt/clusteval | R | false | false | 7,761 | rd | % Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/clustomit.r
\name{clustomit}
\alias{clustomit}
\alias{plot.clustomit}
\alias{print.clustomit}
\title{ClustOmit - Cluster Stability Evaluation via Cluster Omission}
\usage{
clustomit(x, K, cluster_method, similarity = "adjusted_rand",
... |
file_path <- "C:/Users/dhoevers/Documents/03. Knowledge/01. Data Science/09.Capstone/Capstone_Project/00_Preparation_Functions/"
x <- paste0(file_path, "quiz.txt")
quiz <- read.table(x, sep="\t", header = TRUE, stringsAsFactors = FALSE)
a <- quiz$phrase
b <- sapply(a, cleanData)
c <- sapply(b, FUN = word_pred)
d <- ... | /00_Preparation_Functions/test.R | no_license | DaanHoevers/Capstone_Project | R | false | false | 707 | r | file_path <- "C:/Users/dhoevers/Documents/03. Knowledge/01. Data Science/09.Capstone/Capstone_Project/00_Preparation_Functions/"
x <- paste0(file_path, "quiz.txt")
quiz <- read.table(x, sep="\t", header = TRUE, stringsAsFactors = FALSE)
a <- quiz$phrase
b <- sapply(a, cleanData)
c <- sapply(b, FUN = word_pred)
d <- ... |
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 9.53818252027586e+295, 1.22810536108214e+146, 4.12396251261199e-221, 0), .Dim = c(5L, 1L)))
result <- do.call(CNull:::communities_individual_based_sampling_beta,testlist)
str(result) | /CNull/inst/testfiles/communities_individual_based_sampling_beta/AFL_communities_individual_based_sampling_beta/communities_individual_based_sampling_beta_valgrind_files/1615833095-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 270 | r | testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 9.53818252027586e+295, 1.22810536108214e+146, 4.12396251261199e-221, 0), .Dim = c(5L, 1L)))
result <- do.call(CNull:::communities_individual_based_sampling_beta,testlist)
str(result) |
library(shiny)
library(dplyr)
library(shinydashboard)
library(leaflet)
library(ggplot2)
library(plotly)
library(matlab)
# To remove the rows with null values in specific columns
completeFun <- function(data, desiredCols) {
completeVec <- complete.cases(data[, desiredCols])
return(data[completeVec, ])
}... | /Alex Project/app_alex.R | no_license | lucascott/terroristattacksvisualization | R | false | false | 16,366 | r | library(shiny)
library(dplyr)
library(shinydashboard)
library(leaflet)
library(ggplot2)
library(plotly)
library(matlab)
# To remove the rows with null values in specific columns
completeFun <- function(data, desiredCols) {
completeVec <- complete.cases(data[, desiredCols])
return(data[completeVec, ])
}... |
#* @apiTitle Billionaire Internal Services
#* Backtest the strategies
#* @param Stg detail of Strategies
#* @param StgID ID of Strategy
#* @param UID User ID
#* @param Share Instrument ID
#* @param Timeframe time frame that strategy should be run
#* @param StartDate start date of backtest
#* @param EndDate end date of... | /rest_controller.R | no_license | pooya1991/Billionaire_API | R | false | false | 2,076 | r | #* @apiTitle Billionaire Internal Services
#* Backtest the strategies
#* @param Stg detail of Strategies
#* @param StgID ID of Strategy
#* @param UID User ID
#* @param Share Instrument ID
#* @param Timeframe time frame that strategy should be run
#* @param StartDate start date of backtest
#* @param EndDate end date of... |
test_minSNPthreshold <- function(x, gapChar, minT, maxT) {
x <- setSiteNumbering(x, gapChar = gapChar)
if (attr(x, "seqType") == "AA") {
unambiguous <- setdiff(sitePath:::AA_UNAMBIGUOUS, gapChar)
} else {
unambiguous <- setdiff(sitePath:::NT_UNAMBIGUOUS, gapChar)
}
align <- attr(x, "... | /tests/testthat/test-SNPsites.R | permissive | wuaipinglab/sitePath | R | false | false | 2,808 | r | test_minSNPthreshold <- function(x, gapChar, minT, maxT) {
x <- setSiteNumbering(x, gapChar = gapChar)
if (attr(x, "seqType") == "AA") {
unambiguous <- setdiff(sitePath:::AA_UNAMBIGUOUS, gapChar)
} else {
unambiguous <- setdiff(sitePath:::NT_UNAMBIGUOUS, gapChar)
}
align <- attr(x, "... |
library(testthat)
## Sys.setenv(NOT_CRAN = "true")
test_check("RefManageR", filter = "^(?!readPDF)[A-Za-z0-9]+$", perl = TRUE)
| /RefManageR/tests/test-all.R | no_license | ingted/R-Examples | R | false | false | 127 | r | library(testthat)
## Sys.setenv(NOT_CRAN = "true")
test_check("RefManageR", filter = "^(?!readPDF)[A-Za-z0-9]+$", perl = TRUE)
|
#read file
house <- read.table("household_power_consumption.txt" , header=T , sep=";")
#get target data
house$Date <- strptime(house$Date,"%d/%m/%Y")
house$Date <- as.Date(house$Date)
houseTg <- subset(mydf, Date >= "2007-02-01" & Date <= "2007-02-02")
#print
head(houseTg)
ncol(houseTg)
nrow(houseTg)
#to num
house... | /plot4.R | no_license | fukazawa/ExData_Plotting1-1 | R | false | false | 1,437 | r | #read file
house <- read.table("household_power_consumption.txt" , header=T , sep=";")
#get target data
house$Date <- strptime(house$Date,"%d/%m/%Y")
house$Date <- as.Date(house$Date)
houseTg <- subset(mydf, Date >= "2007-02-01" & Date <= "2007-02-02")
#print
head(houseTg)
ncol(houseTg)
nrow(houseTg)
#to num
house... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/powit1.R
\name{powit1}
\alias{powit1}
\title{Power iteration engine, without orthogonality constraints}
\usage{
powit1(X, U0, V0, au, av, Gu, Gv, eps.pi, itermax.pi)
}
\arguments{
\item{X}{Matrix to decompose}
\item{itermax.pi}{}
}
\descript... | /man/powit1.Rd | no_license | vguillemot/sparseMCA | R | false | true | 385 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/powit1.R
\name{powit1}
\alias{powit1}
\title{Power iteration engine, without orthogonality constraints}
\usage{
powit1(X, U0, V0, au, av, Gu, Gv, eps.pi, itermax.pi)
}
\arguments{
\item{X}{Matrix to decompose}
\item{itermax.pi}{}
}
\descript... |
daccum <- function(i,k) {
p <- c(0, 1/36, 2/36, 3/36, 4/36, 5/36, 6/36, 5/36, 4/36, 3/36, 2/36, 1/36)
if(i > 0 && k <= 0) return(0)
if(i == 0) {
if(k > 0) return(0)
else return(1)
}
total <- 0
for (j in 2:12) {
total <- total + p[j] * daccum(i-1, k-j)
}
return(tot... | /code/codeD.r | no_license | aadila6/Probability-R | R | false | false | 847 | r | daccum <- function(i,k) {
p <- c(0, 1/36, 2/36, 3/36, 4/36, 5/36, 6/36, 5/36, 4/36, 3/36, 2/36, 1/36)
if(i > 0 && k <= 0) return(0)
if(i == 0) {
if(k > 0) return(0)
else return(1)
}
total <- 0
for (j in 2:12) {
total <- total + p[j] * daccum(i-1, k-j)
}
return(tot... |
data = read.table("household_power_consumption.txt", sep=";", dec = ".", header=T)
data = data[data$Date %in% c("1/2/2007", "2/2/2007"),]
dTime = as.POSIXlt(paste(as.Date(data$Date, format = "%d/%m/%Y"), data$Time, sep=" "))
data$Sub_metering_1 = as.character(data$Sub_metering_1)
data$Sub_metering_1 = as.numeric(data$S... | /Plot3.R | no_license | kejickle/ExData_Plotting1 | R | false | false | 907 | r | data = read.table("household_power_consumption.txt", sep=";", dec = ".", header=T)
data = data[data$Date %in% c("1/2/2007", "2/2/2007"),]
dTime = as.POSIXlt(paste(as.Date(data$Date, format = "%d/%m/%Y"), data$Time, sep=" "))
data$Sub_metering_1 = as.character(data$Sub_metering_1)
data$Sub_metering_1 = as.numeric(data$S... |
testlist <- list(Rext = numeric(0), Rs = numeric(0), Z = numeric(0), alpha = numeric(0), atmp = numeric(0), relh = numeric(0), temp = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,... | /meteor/inst/testfiles/E_Penman/libFuzzer_E_Penman/E_Penman_valgrind_files/1612737971-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 418 | r | testlist <- list(Rext = numeric(0), Rs = numeric(0), Z = numeric(0), alpha = numeric(0), atmp = numeric(0), relh = numeric(0), temp = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,... |
acreg = function(y,x,R){
#
#
# purpose: compute AR(1) errors linear regression using default
# relatively uninformative normal-gamma prior
#
# usage: out = acreg(y,x,R)
# This creates data list out with coeff estimates, etc.,
# type str(out) to see its structure
#
# arguments: y = vector of dep var
# ... | /6_MCMC_general_linear_models/acreg.R | no_license | Jmaihuire/Econ_8013_BayesianEconometrics | R | false | false | 2,426 | r | acreg = function(y,x,R){
#
#
# purpose: compute AR(1) errors linear regression using default
# relatively uninformative normal-gamma prior
#
# usage: out = acreg(y,x,R)
# This creates data list out with coeff estimates, etc.,
# type str(out) to see its structure
#
# arguments: y = vector of dep var
# ... |
library(mlr3learners.pycox)
test_that("surv.loghaz prepare_train_data", {
learner = lrn("surv.loghaz")
fun = prepare_train_data
exclude = c(
"task", # handled internally
"model", # handled internally
"discretise", # handled internally
"standardize_time", # handled internally
"log_duration", #... | /inst/paramtest/test_paramtest_surv.loghaz.R | no_license | SimonWiegrebe/mlr3learners.pycox | R | false | false | 1,552 | r | library(mlr3learners.pycox)
test_that("surv.loghaz prepare_train_data", {
learner = lrn("surv.loghaz")
fun = prepare_train_data
exclude = c(
"task", # handled internally
"model", # handled internally
"discretise", # handled internally
"standardize_time", # handled internally
"log_duration", #... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/NAs.R
\name{is.na.uts_vector}
\alias{is.na.uts_vector}
\alias{is.na.uts_matrix}
\title{Not Available / Missing Values}
\usage{
\method{is.na}{uts_vector}(x)
}
\arguments{
\item{x}{a \code{"uts_vector"} or \code{"uts_matrix"} object.}
}
\value... | /man/is.na.uts_vector.Rd | no_license | andreas50/utsMultivariate | R | false | true | 885 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/NAs.R
\name{is.na.uts_vector}
\alias{is.na.uts_vector}
\alias{is.na.uts_matrix}
\title{Not Available / Missing Values}
\usage{
\method{is.na}{uts_vector}(x)
}
\arguments{
\item{x}{a \code{"uts_vector"} or \code{"uts_matrix"} object.}
}
\value... |
\alias{cairoCurveTo}
\name{cairoCurveTo}
\title{cairoCurveTo}
\description{Adds a cubic Bézier spline to the path from the current point to
position (\code{x3}, \code{y3}) in user-space coordinates, using (\code{x1}, \code{y1}) and
(\code{x2}, \code{y2}) as the control points. After this call the current point
will be ... | /man/cairoCurveTo.Rd | no_license | cran/RGtk2.10 | R | false | false | 1,163 | rd | \alias{cairoCurveTo}
\name{cairoCurveTo}
\title{cairoCurveTo}
\description{Adds a cubic Bézier spline to the path from the current point to
position (\code{x3}, \code{y3}) in user-space coordinates, using (\code{x1}, \code{y1}) and
(\code{x2}, \code{y2}) as the control points. After this call the current point
will be ... |
"
Are participants' score and number of incompleted tasks independent?
Did participants with lower score quit earlier?
Did participants quit mostly at the begining or at the end of the experiment
"
install.packages('reshape')
library(reshape2)
library(ufs)
library(userfriendlyscience)
library(farff)
library(ggplot2)
l... | /analysis/descriptive/quit_rate/multicomparison_posthoc_score_quit_rate.R | permissive | christianadriano/ML_FaultUnderstanding | R | false | false | 6,100 | r | "
Are participants' score and number of incompleted tasks independent?
Did participants with lower score quit earlier?
Did participants quit mostly at the begining or at the end of the experiment
"
install.packages('reshape')
library(reshape2)
library(ufs)
library(userfriendlyscience)
library(farff)
library(ggplot2)
l... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/checkCoercion.R
\name{checkCoercion}
\alias{checkCoercion}
\title{Check if values can be safely coerced without introduction of
missing values}
\usage{
checkCoercion(value, targetclass, na.strings = c("\\\\.", "", "\\\\s+", "N/A"))
}
\argumen... | /man/checkCoercion.Rd | no_license | cran/kutils | R | false | true | 1,273 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/checkCoercion.R
\name{checkCoercion}
\alias{checkCoercion}
\title{Check if values can be safely coerced without introduction of
missing values}
\usage{
checkCoercion(value, targetclass, na.strings = c("\\\\.", "", "\\\\s+", "N/A"))
}
\argumen... |
# Association Rule - Simple Example Case
# read this pdf for help
#https://cran.r-project.org/web/packages/arules/arules.pdf
#libraries
library(arules)
library(arulesViz)
#Create Data
#Method3 Use: ----
#Data in the form of list
itemlist = list(c('I1','I2','I5'), c('I2','I4'), c('I2','I3'),c('I1','I2','I4'),c('I1','... | /date21_08_AR_1_samplecase.R | no_license | suphil183k/analytics1 | R | false | false | 2,766 | r | # Association Rule - Simple Example Case
# read this pdf for help
#https://cran.r-project.org/web/packages/arules/arules.pdf
#libraries
library(arules)
library(arulesViz)
#Create Data
#Method3 Use: ----
#Data in the form of list
itemlist = list(c('I1','I2','I5'), c('I2','I4'), c('I2','I3'),c('I1','I2','I4'),c('I1','... |
#' Clear Legend
#'
#' Clears the legend for a given layer_id
#'
#' @param map_id the id of the map you want to clear the legend from.
#' @param layer_id single value specifying an id for the layer. Use this value to
#' distinguish between shape layers of the same type. Layers with the same id are likely
#' to conflict ... | /fuzzedpackages/mapdeck/R/legend.R | no_license | akhikolla/testpackages | R | false | false | 3,322 | r | #' Clear Legend
#'
#' Clears the legend for a given layer_id
#'
#' @param map_id the id of the map you want to clear the legend from.
#' @param layer_id single value specifying an id for the layer. Use this value to
#' distinguish between shape layers of the same type. Layers with the same id are likely
#' to conflict ... |
library(shiny)
library(plotly)
#library(shinydashboard)
ui <- fluidPage(
tags$h1("Predicción de Accidentes de Tránsito en Medellín"),
tags$hr(),
tags$p(strong("Edwin Villarraga-Jorge Montoya-Juan David Arango")),
tags$p(em("Con datos de accidentalidad en Medellín historí... | /Shiny_Final/Shiny_prediccion.R | permissive | efvillar/Prediccion_Accidentalidad_Transito_Medellin | R | false | false | 30,608 | r | library(shiny)
library(plotly)
#library(shinydashboard)
ui <- fluidPage(
tags$h1("Predicción de Accidentes de Tránsito en Medellín"),
tags$hr(),
tags$p(strong("Edwin Villarraga-Jorge Montoya-Juan David Arango")),
tags$p(em("Con datos de accidentalidad en Medellín historí... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/conf.R
\docType{data}
\name{min.mismatch.size}
\alias{min.mismatch.size}
\title{at least 3 amino acids must be different from the annotation}
\format{An object of class \code{numeric} of length 1.}
\usage{
min.mismatch.size
}
\value{
at least... | /man/min.mismatch.size.Rd | no_license | anu-bioinfo/neoantigenR | R | false | true | 504 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/conf.R
\docType{data}
\name{min.mismatch.size}
\alias{min.mismatch.size}
\title{at least 3 amino acids must be different from the annotation}
\format{An object of class \code{numeric} of length 1.}
\usage{
min.mismatch.size
}
\value{
at least... |
## purpose: remove data above and below threshold percentiles and summarize stats by reach
# options(echo=TRUE)
library(foreign)
library(dplyr)
library(pastecs)
### summarize channel metrics from bank pixel method and floodplain metrics from 2D calculation
### 1) filter metrics >95th/<5th and >75th/<25th
### 2) group... | /FACET/facet-master/facet-master/post_processing/QAQC_7525_and_9505_ch_bankpix_2dfp.R | permissive | arhwiegman/SpatialTools | R | false | false | 31,963 | r | ## purpose: remove data above and below threshold percentiles and summarize stats by reach
# options(echo=TRUE)
library(foreign)
library(dplyr)
library(pastecs)
### summarize channel metrics from bank pixel method and floodplain metrics from 2D calculation
### 1) filter metrics >95th/<5th and >75th/<25th
### 2) group... |
ui <- fluidPage(
tags$h1("Search Input"),
br(),
searchInput(
inputId = "search", label = "Enter your text",
placeholder = "A placeholder",
btnSearch = icon("search"),
btnReset = icon("remove"),
width = "450px"
),
br(),
verbatimTextOutput(outputId = "res")
)
... | /Templates/test.R | no_license | ardeeshany/Visualization-on-Educational-Data-Shiny- | R | false | false | 469 | r |
ui <- fluidPage(
tags$h1("Search Input"),
br(),
searchInput(
inputId = "search", label = "Enter your text",
placeholder = "A placeholder",
btnSearch = icon("search"),
btnReset = icon("remove"),
width = "450px"
),
br(),
verbatimTextOutput(outputId = "res")
)
... |
### 0414 methylation data preprocessing ###
# shell script #
shuang@rna-garmire:~/integration/ov/tcga/tcga_ov_methylation/DNA_Methylation/JHU_USC__HumanMethylation27/Level_3$ find * -maxdepth 1 -name "jhu-usc.edu_OV.HumanMethylation27.*" -print -exec cp {} ../../data \;
shuang@rna-garmire:~/integration/ov/tcga/tcga_ov... | /0413_preprocess_methylation.r | no_license | scarlettcanny/tcga_workflow_expr | R | false | false | 1,913 | r | ### 0414 methylation data preprocessing ###
# shell script #
shuang@rna-garmire:~/integration/ov/tcga/tcga_ov_methylation/DNA_Methylation/JHU_USC__HumanMethylation27/Level_3$ find * -maxdepth 1 -name "jhu-usc.edu_OV.HumanMethylation27.*" -print -exec cp {} ../../data \;
shuang@rna-garmire:~/integration/ov/tcga/tcga_ov... |
##############################################################
# DMB_analyze_results.R
#
# Analyze actual results compared to real results
##############################################################
## Calculate the rate of SNG, DBL, TRI, and HR based on real life
stats_rates <- stats %>%
mutate(PA = calcPA(AB, U... | /DMB_analyze_results.R | no_license | numb3rcruncher52/PFBL | R | false | false | 895 | r | ##############################################################
# DMB_analyze_results.R
#
# Analyze actual results compared to real results
##############################################################
## Calculate the rate of SNG, DBL, TRI, and HR based on real life
stats_rates <- stats %>%
mutate(PA = calcPA(AB, U... |
testlist <- list(A = structure(c(2.17107980818534e+205, 9.2909276592884e-310 ), .Dim = 1:2), B = structure(c(2.19477802979261e+294, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)))
result <- do.call(multivariance:::match_rows,testlist)
str(resul... | /multivariance/inst/testfiles/match_rows/AFL_match_rows/match_rows_valgrind_files/1613125061-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 322 | r | testlist <- list(A = structure(c(2.17107980818534e+205, 9.2909276592884e-310 ), .Dim = 1:2), B = structure(c(2.19477802979261e+294, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)))
result <- do.call(multivariance:::match_rows,testlist)
str(resul... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/binomial.R
\name{bin_variance}
\alias{bin_variance}
\title{binomial variance}
\usage{
bin_variance(n, p)
}
\arguments{
\item{n}{number of trials}
\item{p}{probability of success}
}
\value{
computed variance
}
\description{
to compute the var... | /binomial/man/bin_variance.Rd | no_license | stat133-sp19/hw-stat133-kiraguostat | R | false | true | 406 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/binomial.R
\name{bin_variance}
\alias{bin_variance}
\title{binomial variance}
\usage{
bin_variance(n, p)
}
\arguments{
\item{n}{number of trials}
\item{p}{probability of success}
}
\value{
computed variance
}
\description{
to compute the var... |
handeval <-
function(num1,suit1){
a1 = strflsh1(num1,suit1)
if(a1>0.5) return(8000000+a1)
a1 = four1(num1)
if(a1>0.5) return(7000000+a1)
a1 = full1(num1)
if(a1>0.5) return(6000000+a1)
a1 = flush1(num1,suit1)
if(a1>0.5) return(5000000+a1)
a1 = straight1(num1)
if(a1>0.5) return(40... | /Codigo R/holdem/R/handeval.R | no_license | Aokaen/Poker_Simu | R | false | false | 562 | r | handeval <-
function(num1,suit1){
a1 = strflsh1(num1,suit1)
if(a1>0.5) return(8000000+a1)
a1 = four1(num1)
if(a1>0.5) return(7000000+a1)
a1 = full1(num1)
if(a1>0.5) return(6000000+a1)
a1 = flush1(num1,suit1)
if(a1>0.5) return(5000000+a1)
a1 = straight1(num1)
if(a1>0.5) return(40... |
#going to look for functional modules using the mutual information method
#from Fisher, Kryazhimskiy, and Lang. Looking for networks of deletions
#that are together more often than we expect by chance. Maybe first I caluclate MI?
#I have to turn the df into a binary matrix. I'm only going to use genes that show up... | /scripts/chem_gen_df_to_binary.R | no_license | KatieFish/Sato_lab_chemical_genomics | R | false | false | 1,180 | r |
#going to look for functional modules using the mutual information method
#from Fisher, Kryazhimskiy, and Lang. Looking for networks of deletions
#that are together more often than we expect by chance. Maybe first I caluclate MI?
#I have to turn the df into a binary matrix. I'm only going to use genes that show up... |
library(mvtnorm)
library(mvnmle)
library(MASS)
library(MHadaptive)
library(coda)
y=c() #response vector
dose=c() #dose vector
J=11 #number of doses
first_stage_patients=33
patient=1000#number of patients
true_sigma=100 #true deviation of responses
updated_thetas=matrix(NA, nrow=patient, ncol=2)
updated... | /Dose finding - MCMC(Hill curve)-v1.0.r | no_license | AmirAli-N/DynamicProgramming-DoseFinding | R | false | false | 3,757 | r | library(mvtnorm)
library(mvnmle)
library(MASS)
library(MHadaptive)
library(coda)
y=c() #response vector
dose=c() #dose vector
J=11 #number of doses
first_stage_patients=33
patient=1000#number of patients
true_sigma=100 #true deviation of responses
updated_thetas=matrix(NA, nrow=patient, ncol=2)
updated... |
# f03
source("~/SparkleShare/Rprofile/R/Rsettings/phdRsettings.R")
hkdBH <- readRDS("~/Dropbox/2data/dataProduct/hkd/hkd_profiles_140806_164333.Rds")
hkd100 <- subset(hkdBH, (Depths >=100 ))
hkdxyz <- unique(hkdBH[,c(1:3,13)])
hkdBox1 <-
ggplot(hkdxyz, aes(factor(0),TD)) +
geom_boxplot(fill = "green",o... | /RSpaper/RSf04_BoxplotBySingle.R | permissive | bwtian/TIR | R | false | false | 991 | r | # f03
source("~/SparkleShare/Rprofile/R/Rsettings/phdRsettings.R")
hkdBH <- readRDS("~/Dropbox/2data/dataProduct/hkd/hkd_profiles_140806_164333.Rds")
hkd100 <- subset(hkdBH, (Depths >=100 ))
hkdxyz <- unique(hkdBH[,c(1:3,13)])
hkdBox1 <-
ggplot(hkdxyz, aes(factor(0),TD)) +
geom_boxplot(fill = "green",o... |
fft_components <- function(series){
#returns the individual amplitude, phase and frequency components of the domain
fourier <- fft(series)
L <- length(fourier)
f0 <- 1 / L
a0 = Mod(fourier[1]) / L
fourier <- fourier[seq(2, L)] / L
list(
f0 = f0,
a0 = a0,
len = L,
... | /fourier_functions/fft_components.R | no_license | iceiony/customer_flow_snippets | R | false | false | 448 | r | fft_components <- function(series){
#returns the individual amplitude, phase and frequency components of the domain
fourier <- fft(series)
L <- length(fourier)
f0 <- 1 / L
a0 = Mod(fourier[1]) / L
fourier <- fourier[seq(2, L)] / L
list(
f0 = f0,
a0 = a0,
len = L,
... |
#
# objects to load
#
sorry<-"Sorry, no pandoc > 2.11, or no rmarkdown, try in Rstudio, or installing pandoc and rmarkdown"
emptydata.frame <- data.frame()
# setwd("/home/fernando/GoogleDrive/gitlab/idiogramFISH/inst/shinyApps/iBoard")
paramVec <- readRDS("www/paramVec.rds")
paramValues <- readRDS("www/paramValue... | /inst/shinyApps/iBoard/presetVals.R | no_license | NailouZhang/idiogramFISH | R | false | false | 19,306 | r | #
# objects to load
#
sorry<-"Sorry, no pandoc > 2.11, or no rmarkdown, try in Rstudio, or installing pandoc and rmarkdown"
emptydata.frame <- data.frame()
# setwd("/home/fernando/GoogleDrive/gitlab/idiogramFISH/inst/shinyApps/iBoard")
paramVec <- readRDS("www/paramVec.rds")
paramValues <- readRDS("www/paramValue... |
#' ---
#' title: Network
#' author: A Calatroni & J Wildfire
#' date: "`r format(Sys.time(), '%d %B, %Y')`"
#' output:
#' github_document:
#' toc: true
#' ---
#' ### set defaults
knitr::opts_knit$set(root.dir = '../..')
knitr::opts_chunk$set(warning = FALSE, message = FALSE, comment = NA)
#' ### packages
pa... | /figures/SupplementalFigure11_Network/NetworkCyto.R | permissive | GenomicsNX/JACI-BioinformaticsGraphics | R | false | false | 1,539 | r | #' ---
#' title: Network
#' author: A Calatroni & J Wildfire
#' date: "`r format(Sys.time(), '%d %B, %Y')`"
#' output:
#' github_document:
#' toc: true
#' ---
#' ### set defaults
knitr::opts_knit$set(root.dir = '../..')
knitr::opts_chunk$set(warning = FALSE, message = FALSE, comment = NA)
#' ### packages
pa... |
### REMINDER. Set working directory.
library(tidyverse)
library(lubridate)
library(agricolae)
library(drc)
library(nlme)
collect_data <- function(data_name, experiment_names = dates$Experiment, plot_info = plots){
data_name_tag <- paste0(".*", data_name, ".csv")
for (experiment in experiment_names){
plot_var... | /planting-date-summary.R | no_license | TREC-Agroecology/hemp | R | false | false | 16,651 | r | ### REMINDER. Set working directory.
library(tidyverse)
library(lubridate)
library(agricolae)
library(drc)
library(nlme)
collect_data <- function(data_name, experiment_names = dates$Experiment, plot_info = plots){
data_name_tag <- paste0(".*", data_name, ".csv")
for (experiment in experiment_names){
plot_var... |
plot4 <- function() {
## Aim of this function is to
## 1. read the household_power_consumption.txt file
## 2. subset for data taken from 2 days: 2007-02-01 and 2007-02-02
## 3. generate 4 plots in 1 space (GAP vs. time, Vol vs. time, submetering vs. time and GRP vs. time)
## read data
powerdata <- read.... | /plot4.R | no_license | dmroserom/Exploratory-Data-Analysis-Project-1 | R | false | false | 2,276 | r | plot4 <- function() {
## Aim of this function is to
## 1. read the household_power_consumption.txt file
## 2. subset for data taken from 2 days: 2007-02-01 and 2007-02-02
## 3. generate 4 plots in 1 space (GAP vs. time, Vol vs. time, submetering vs. time and GRP vs. time)
## read data
powerdata <- read.... |
library(ape)
testtree <- read.tree("8779_4.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="8779_4_unrooted.txt") | /codeml_files/newick_trees_processed/8779_4/rinput.R | no_license | DaniBoo/cyanobacteria_project | R | false | false | 135 | r | library(ape)
testtree <- read.tree("8779_4.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="8779_4_unrooted.txt") |
% Copyright 2003-6 by Roger S. Bivand
\name{EBest}
\alias{EBest}
\title{Global Empirical Bayes estimator}
\description{
The function computes global empirical Bayes estimates for rates "shrunk" to the overall mean.
}
\usage{
EBest(n, x, family="poisson")
}
\arguments{
\item{n}{a numeric vector of counts of cases}
... | /man/EBest.Rd | no_license | jsjae2000/spdep-1 | R | false | false | 2,123 | rd | % Copyright 2003-6 by Roger S. Bivand
\name{EBest}
\alias{EBest}
\title{Global Empirical Bayes estimator}
\description{
The function computes global empirical Bayes estimates for rates "shrunk" to the overall mean.
}
\usage{
EBest(n, x, family="poisson")
}
\arguments{
\item{n}{a numeric vector of counts of cases}
... |
#' Create a treemap
#'
#' A treemap is a space-filling visualization of hierarchical structures. This function offers great flexibility to draw treemaps. Required is a data.frame (\code{dtf}) that contains one or more hierarchical index columns given by \code{index}, a column that determines the rectangle area sizes (\... | /pkg/R/treemap.R | no_license | mgacc0/treemap | R | false | false | 34,936 | r | #' Create a treemap
#'
#' A treemap is a space-filling visualization of hierarchical structures. This function offers great flexibility to draw treemaps. Required is a data.frame (\code{dtf}) that contains one or more hierarchical index columns given by \code{index}, a column that determines the rectangle area sizes (\... |
library(plyr)
library(dplyr)
library(tidyr)
library(ggplot2)
library(ggthemes)
library(grid)
library(gridExtra)
library(cluster)
library(clustertend)
library(factoextra)
# load the data
udc.chunks <- read.csv("~/udc/udc.chunks.csv", stringsAsFactors = FALSE)
udc.chunkcenters <- read.csv("~/udc/udc.chunkscenters.csv", ... | /8-mining&vis.R | no_license | luisc29/ide-usage-data | R | false | false | 9,705 | r | library(plyr)
library(dplyr)
library(tidyr)
library(ggplot2)
library(ggthemes)
library(grid)
library(gridExtra)
library(cluster)
library(clustertend)
library(factoextra)
# load the data
udc.chunks <- read.csv("~/udc/udc.chunks.csv", stringsAsFactors = FALSE)
udc.chunkcenters <- read.csv("~/udc/udc.chunkscenters.csv", ... |
#' Extracts cells elements
#'
#' @param cells a list of cell nodes
#' @param tag a character vector that provides information used in the XPath expression to extract the correct elements
#' @param elFun a function that is executed over the body cell nodes
#' @param rm_escape a character vector that, if specified, is us... | /R/get_table_info.R | no_license | fototo/htmltab | R | false | false | 2,526 | r | #' Extracts cells elements
#'
#' @param cells a list of cell nodes
#' @param tag a character vector that provides information used in the XPath expression to extract the correct elements
#' @param elFun a function that is executed over the body cell nodes
#' @param rm_escape a character vector that, if specified, is us... |
###########################################################
### Train a classification model with training features ###
###########################################################
train.xgb <- function(train_data, nrounds = 100, max_depth = 6){
model <- xgb.train(data = train_data,
nrounds = ... | /lib/train_xgb.R | no_license | LindsaySun/Fall2020-Project3-group2 | R | false | false | 571 | r | ###########################################################
### Train a classification model with training features ###
###########################################################
train.xgb <- function(train_data, nrounds = 100, max_depth = 6){
model <- xgb.train(data = train_data,
nrounds = ... |
testlist <- list(lims = structure(0, .Dim = c(1L, 1L)), points = structure(c(0, 0, 0, 0, 0, 0), .Dim = c(1L, 6L)))
result <- do.call(palm:::pbc_distances,testlist)
str(result) | /palm/inst/testfiles/pbc_distances/libFuzzer_pbc_distances/pbc_distances_valgrind_files/1612988734-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 176 | r | testlist <- list(lims = structure(0, .Dim = c(1L, 1L)), points = structure(c(0, 0, 0, 0, 0, 0), .Dim = c(1L, 6L)))
result <- do.call(palm:::pbc_distances,testlist)
str(result) |
library(shiny)
## min needed for shiny app
# shinyServer(function(input, output){
#
# })
shinyServer(function(input, output){
}) | /sh_ex2/server.R | no_license | kramer102/econ510 | R | false | false | 136 | r | library(shiny)
## min needed for shiny app
# shinyServer(function(input, output){
#
# })
shinyServer(function(input, output){
}) |
library(ggbiplot)
library(tidyverse)
library(readxl)
# Set WD
getwd()
setwd("C:\\Users\\optim\\Downloads")
getwd()
# Read in data and store in pizza vector
pizza <- read.csv("Pizza.csv", header = T)
# Check the data
head(pizza, n=10)
str(pizza)
summary(pizza)
# Perform PCA transform
pizza.pca <- prcomp(pizza[,-c(1,... | /Analytical Methods/Code/pizza.r | no_license | sfiene/Master-Data-Science | R | false | false | 571 | r | library(ggbiplot)
library(tidyverse)
library(readxl)
# Set WD
getwd()
setwd("C:\\Users\\optim\\Downloads")
getwd()
# Read in data and store in pizza vector
pizza <- read.csv("Pizza.csv", header = T)
# Check the data
head(pizza, n=10)
str(pizza)
summary(pizza)
# Perform PCA transform
pizza.pca <- prcomp(pizza[,-c(1,... |
library(fmbasics)
### Name: as_DiscountFactor
### Title: Coerce to DiscountFactor
### Aliases: as_DiscountFactor as_DiscountFactor.InterestRate
### ** Examples
library("lubridate")
as_DiscountFactor(InterestRate(c(0.04, 0.05), c(2, 4), 'act/365'),
ymd(20140101), ymd(20150101))
| /data/genthat_extracted_code/fmbasics/examples/as_DiscountFactor.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 287 | r | library(fmbasics)
### Name: as_DiscountFactor
### Title: Coerce to DiscountFactor
### Aliases: as_DiscountFactor as_DiscountFactor.InterestRate
### ** Examples
library("lubridate")
as_DiscountFactor(InterestRate(c(0.04, 0.05), c(2, 4), 'act/365'),
ymd(20140101), ymd(20150101))
|
#' Clean all data files in a folder
#'
#' @param path_in A character vector. Path to data folder
#' @param path_out A character vector. Path to output folder: Where cleaned data files will be saved as .csv
#' @export
#' @examples
#' library(rWorkshop1Demo)
#' clean_data_files(path_in = './data/', path_out = './output/'... | /R/clean_data_files.R | no_license | tonyfujs/rWorkshopDemo | R | false | false | 837 | r | #' Clean all data files in a folder
#'
#' @param path_in A character vector. Path to data folder
#' @param path_out A character vector. Path to output folder: Where cleaned data files will be saved as .csv
#' @export
#' @examples
#' library(rWorkshop1Demo)
#' clean_data_files(path_in = './data/', path_out = './output/'... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utilities.R
\name{check_if_any_NA}
\alias{check_if_any_NA}
\title{Check if NA}
\usage{
check_if_any_NA(
.data,
.sample,
.transcript,
.abundance,
.significance,
.do_check,
formula_columns
)
}
\arguments{
\item{.data}{A tibble inc... | /man/check_if_any_NA.Rd | no_license | shulp2211/ppcseq | R | false | true | 650 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utilities.R
\name{check_if_any_NA}
\alias{check_if_any_NA}
\title{Check if NA}
\usage{
check_if_any_NA(
.data,
.sample,
.transcript,
.abundance,
.significance,
.do_check,
formula_columns
)
}
\arguments{
\item{.data}{A tibble inc... |
# growth function: calculates the population change from one year to the next
#
# Takes the following parameters
# Nt: the previous year's population size of a roost
# mu.r: the mean growth rate
# se.r: the standard deviation of the growth rate
#
# It returns Ntplus1: The current population size of a roost
growth <- f... | /01_Simulation/Functions/growth.R | no_license | LeaDambly/bat_observer | R | false | false | 527 | r | # growth function: calculates the population change from one year to the next
#
# Takes the following parameters
# Nt: the previous year's population size of a roost
# mu.r: the mean growth rate
# se.r: the standard deviation of the growth rate
#
# It returns Ntplus1: The current population size of a roost
growth <- f... |
# Configure logger (suppress all logs in testing)
loggerOptions <- futile.logger::logger.options()
if (!identical(loggerOptions, list())){
origLogThreshold <- loggerOptions[[1]][['threshold']]
} else {
origLogThreshold <- futile.logger::INFO
}
futile.logger::flog.threshold(0)
context("parse_date_time")
# Cor... | /r-pkg/tests/testthat/test-parse_date_time.R | permissive | geraudster/uptasticsearch | R | false | false | 7,112 | r | # Configure logger (suppress all logs in testing)
loggerOptions <- futile.logger::logger.options()
if (!identical(loggerOptions, list())){
origLogThreshold <- loggerOptions[[1]][['threshold']]
} else {
origLogThreshold <- futile.logger::INFO
}
futile.logger::flog.threshold(0)
context("parse_date_time")
# Cor... |
###########################################################################################
###########################################################################################
## MS210 : Analyse probabiliste des structures ##
## Projet ... | /optimisation.R | no_license | mathildtrh/MS210_projet_helico | R | false | false | 5,217 | r | ###########################################################################################
###########################################################################################
## MS210 : Analyse probabiliste des structures ##
## Projet ... |
#load and subset the data from 2007-02-01 to 2007-02-02
data <- read.table("household_power_consumption.txt", header=T, sep=";", na.strings="?")
subdata <- data[data$Date %in% c("1/2/2007","2/2/2007"), ]
#plot figure 1 and send into a PNG file
png(file="plot1.png", width=480, height=480)
hist(subdata$Global_acti... | /plot1.R | no_license | packliu/ExData_Plotting1 | R | false | false | 444 | r | #load and subset the data from 2007-02-01 to 2007-02-02
data <- read.table("household_power_consumption.txt", header=T, sep=";", na.strings="?")
subdata <- data[data$Date %in% c("1/2/2007","2/2/2007"), ]
#plot figure 1 and send into a PNG file
png(file="plot1.png", width=480, height=480)
hist(subdata$Global_acti... |
library(httr)
library(rjson)
library(DiagrammeR)
.api <- R6Class(
classname="api",
private = list(
.key = NULL,
.url = "https://www.elabjournal.com",
.user = NULL,
.version = packageVersion("elabjournal"),
check_and_set_key = function (key, throw_error, store_valid_key) {
if(is.null(key))... | /elabjournal/R/api.R | no_license | matthijsbrouwer/elabjournal-r | R | false | false | 5,760 | r | library(httr)
library(rjson)
library(DiagrammeR)
.api <- R6Class(
classname="api",
private = list(
.key = NULL,
.url = "https://www.elabjournal.com",
.user = NULL,
.version = packageVersion("elabjournal"),
check_and_set_key = function (key, throw_error, store_valid_key) {
if(is.null(key))... |
disqus.timeline$time<-as.POSIXct(disqus.timeline$time)
tumblr.timeline$time<-as.POSIXct(tumblr.timeline$time)
wp.com.timeline$time<-as.POSIXct(wp.com.timeline$time)
## joining data sets for ggplot use later
df.new<-rbind(disqus.timeline,tumblr.timeline,wp.com.timeline,stocktwit.timeline3,df2[601:750,])
df.new<-rbind(... | /src/animation/orig/2013-06-17-timeline.R | no_license | DrSkippy/Gnip-Realtime-Social-Data-Sampling | R | false | false | 16,626 | r | disqus.timeline$time<-as.POSIXct(disqus.timeline$time)
tumblr.timeline$time<-as.POSIXct(tumblr.timeline$time)
wp.com.timeline$time<-as.POSIXct(wp.com.timeline$time)
## joining data sets for ggplot use later
df.new<-rbind(disqus.timeline,tumblr.timeline,wp.com.timeline,stocktwit.timeline3,df2[601:750,])
df.new<-rbind(... |
#' ---
#' title: "Data: Simple Mediation Model - Multivariate Normal Distribution - Data Missing Completely at Random - Fit Structural Equation Modeling with Full Information Maximum Likelihood"
#' author: "Ivan Jacob Agaloos Pesigan"
#' date: "`r Sys.Date()`"
#' output:
#' rmarkdown::html_vignette:
#' toc: true
... | /data_raw/results_mvn_mcar_fit.sem.R | permissive | jeksterslabds/jeksterslabRmedsimple | R | false | false | 1,400 | r | #' ---
#' title: "Data: Simple Mediation Model - Multivariate Normal Distribution - Data Missing Completely at Random - Fit Structural Equation Modeling with Full Information Maximum Likelihood"
#' author: "Ivan Jacob Agaloos Pesigan"
#' date: "`r Sys.Date()`"
#' output:
#' rmarkdown::html_vignette:
#' toc: true
... |
/scripts/Tema1/07-missingdata.R | no_license | mgpadron/R | R | false | false | 812 | r | ||
setwd("C:/Users/jmaburto/Documents/GitHub/Sex-Differences-Lifespan/R/SexDiff_App/")
library(ggplot2)
library(data.table)
library(DemoDecomp)
load('ResultsSexDiff.RData')
#get the coefficient of variation
Data <- data.table(HMDL)
Data$Sex2 <- Data$Sex
head(Data)
Data[Data$Sex2 == 'f',]$Sex2 <- 'Females'
Data[Data$Se... | /R/SexDiff_App/Figure_Newton_Fellowship.R | permissive | jmaburto/Sex-Differences-Lifespan | R | false | false | 2,358 | r | setwd("C:/Users/jmaburto/Documents/GitHub/Sex-Differences-Lifespan/R/SexDiff_App/")
library(ggplot2)
library(data.table)
library(DemoDecomp)
load('ResultsSexDiff.RData')
#get the coefficient of variation
Data <- data.table(HMDL)
Data$Sex2 <- Data$Sex
head(Data)
Data[Data$Sex2 == 'f',]$Sex2 <- 'Females'
Data[Data$Se... |
x <-
structure(list(a = 1, b = structure(1L, .Label = "b", class = "factor")), .Names = c("a",
"b"), row.names = c(NA, -1L), class = "data.frame")
y <-
"foo"
| /Introduction-to-R/Week 1/dump.R | no_license | MMerryweather/Coursera | R | false | false | 159 | r | x <-
structure(list(a = 1, b = structure(1L, .Label = "b", class = "factor")), .Names = c("a",
"b"), row.names = c(NA, -1L), class = "data.frame")
y <-
"foo"
|
## code to prepare `fuentes_unidas` dataset goes here
fuentes_unidas <- readRDS("./data-raw/fuentes_unidas.rds")
usethis::use_data(fuentes_unidas, overwrite = TRUE)
| /data-raw/fuentes_unidas.R | permissive | CentroGeo/visualizadorIncidentesViales | R | false | false | 165 | r | ## code to prepare `fuentes_unidas` dataset goes here
fuentes_unidas <- readRDS("./data-raw/fuentes_unidas.rds")
usethis::use_data(fuentes_unidas, overwrite = TRUE)
|
#!/usr/bin/env Rscript
args = commandArgs(trailingOnly = TRUE)
# This program enquires how many species are produced over time.
summary_table = read.table(args[1])
library(plyr)
names(summary_table) = c("Taxid", "Freq")
summary_table_count = count(summary_table, vars="Taxid")
total_alignments = sum(summary_table... | /detection_over_time.R | no_license | alexiswl/MSc_Thesis_Methods | R | false | false | 447 | r | #!/usr/bin/env Rscript
args = commandArgs(trailingOnly = TRUE)
# This program enquires how many species are produced over time.
summary_table = read.table(args[1])
library(plyr)
names(summary_table) = c("Taxid", "Freq")
summary_table_count = count(summary_table, vars="Taxid")
total_alignments = sum(summary_table... |
library(tidyverse)
# Columns
sarah <- c(1.95, 1.58, 1.7, 2.46, 2.27, 2.62, 3.32, 3.51, 3.89, 3.41)
mother <- c(3.21, 4.04, 3.3, 3.85, 4.13, 4.59, 4.11, 4.29, 5.82, 5.14)
# Data frame
df <- data.frame(sarah, mother)
df$error_sarah <- df$sarah - mean(df$sarah)
df$error_mother <- df$mother - mean(df$mother)
# Cross
df$... | /Classes/covariance testing.R | permissive | esbenkc/Experimental-Methods-1 | R | false | false | 603 | r | library(tidyverse)
# Columns
sarah <- c(1.95, 1.58, 1.7, 2.46, 2.27, 2.62, 3.32, 3.51, 3.89, 3.41)
mother <- c(3.21, 4.04, 3.3, 3.85, 4.13, 4.59, 4.11, 4.29, 5.82, 5.14)
# Data frame
df <- data.frame(sarah, mother)
df$error_sarah <- df$sarah - mean(df$sarah)
df$error_mother <- df$mother - mean(df$mother)
# Cross
df$... |
## Functions to cache the inverse of a matrix
## Make a matrix that can cache its inverse
makeCacheMatrix <- function(x = matrix()) {
m <- NULL
set <- function(y) {
x <<- y
m <<- NULL
}
get <- function() x
setmatrix <- function(solve) m <<- solve
getmatrix <- function() m
list(... | /cachematrix.R | no_license | Bouguin/ProgrammingAssignment2 | R | false | false | 675 | r | ## Functions to cache the inverse of a matrix
## Make a matrix that can cache its inverse
makeCacheMatrix <- function(x = matrix()) {
m <- NULL
set <- function(y) {
x <<- y
m <<- NULL
}
get <- function() x
setmatrix <- function(solve) m <<- solve
getmatrix <- function() m
list(... |
#' Thicken with a custom spanning
#'
#' Like \code{thicken}, it will find the datetime variable in \code{x}
#' and add a variable of a higher periodicity to it. However, the variable to
#' which to map the observation is provided by the user. This enables mapping to
#' time points that are unequally spaced.
#'
#' @para... | /R/thicken_cust.R | no_license | foundinblank/padr | R | false | false | 2,883 | r | #' Thicken with a custom spanning
#'
#' Like \code{thicken}, it will find the datetime variable in \code{x}
#' and add a variable of a higher periodicity to it. However, the variable to
#' which to map the observation is provided by the user. This enables mapping to
#' time points that are unequally spaced.
#'
#' @para... |
#--------------------------
# Load libraries and data
#--------------------------
library(dplyr)
library(ggplot2)
library(gridExtra)
library(grid)
library(scales)
library(Cairo)
load("data/cs_auth_clean.RData")
source("general_functions.R")
#---------------------
# Dependent variable
#---------------------
# Freedom... | /visualize_variables.R | no_license | andrewheiss/civil-society-authoritarian-survival | R | false | false | 5,200 | r | #--------------------------
# Load libraries and data
#--------------------------
library(dplyr)
library(ggplot2)
library(gridExtra)
library(grid)
library(scales)
library(Cairo)
load("data/cs_auth_clean.RData")
source("general_functions.R")
#---------------------
# Dependent variable
#---------------------
# Freedom... |
#Variable Importance for RQ1
########################
# Set up workspace
########################
#Working Directory
setwd("/Volumes/Linnen Lab/MSU Engineering/PROJECTS/Emily Dissertation/*May 2019 Party*")
#Libraries
library(MultivariateRandomForest)
library(tidyverse)
library(doParallel)
library(foreach)
library(b... | /Variable Importance_Imp5_5.15.19.R | no_license | efreer20/dissertation | R | false | false | 31,008 | r | #Variable Importance for RQ1
########################
# Set up workspace
########################
#Working Directory
setwd("/Volumes/Linnen Lab/MSU Engineering/PROJECTS/Emily Dissertation/*May 2019 Party*")
#Libraries
library(MultivariateRandomForest)
library(tidyverse)
library(doParallel)
library(foreach)
library(b... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/est_cor.R
\name{estimate_null_correlation_simple}
\alias{estimate_null_correlation_simple}
\title{Estimate null correlations (simple)}
\usage{
estimate_null_correlation_simple(data, z_thresh = 2, est_cor = TRUE)
}
\arguments{
\item{data}{a ma... | /man/estimate_null_correlation_simple.Rd | permissive | surbut/mashr | R | false | true | 941 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/est_cor.R
\name{estimate_null_correlation_simple}
\alias{estimate_null_correlation_simple}
\title{Estimate null correlations (simple)}
\usage{
estimate_null_correlation_simple(data, z_thresh = 2, est_cor = TRUE)
}
\arguments{
\item{data}{a ma... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/aiplatform_functions.R
\name{projects.locations.featurestores.entityTypes.operations.wait}
\alias{projects.locations.featurestores.entityTypes.operations.wait}
\title{Waits until the specified long-running operation is done or reaches at most... | /googleaiplatformv1.auto/man/projects.locations.featurestores.entityTypes.operations.wait.Rd | no_license | justinjm/autoGoogleAPI | R | false | true | 1,588 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/aiplatform_functions.R
\name{projects.locations.featurestores.entityTypes.operations.wait}
\alias{projects.locations.featurestores.entityTypes.operations.wait}
\title{Waits until the specified long-running operation is done or reaches at most... |
#Read data
worldwide_cites = read.csv("./Data/parrot_csv/parrot_cites_summary.csv")
get_year_range <- function(species){
TrimData <- worldwide_cites %>%
filter(Taxon == species)
if(nrow(TrimData) > 0){
MinYear = as.numeric(min(TrimData$Year))
MaxYear = as.numeric(max(TrimData$Year))
return(sort(c... | /ConMineShinyApp/MapTrade.R | permissive | ConMine/ConMine | R | false | false | 1,482 | r | #Read data
worldwide_cites = read.csv("./Data/parrot_csv/parrot_cites_summary.csv")
get_year_range <- function(species){
TrimData <- worldwide_cites %>%
filter(Taxon == species)
if(nrow(TrimData) > 0){
MinYear = as.numeric(min(TrimData$Year))
MaxYear = as.numeric(max(TrimData$Year))
return(sort(c... |
# submission 4: Logistic + Clustering
## libraries
library(ggplot2)
library(caTools)
library(rpart)
library(rpart.plot)
library(randomForest)
library(reshape)
library(data.table)
library(cluster)
library(fpc)
Sys.setlocale("LC_ALL", "C")
blogsTrain = read.csv("NYTimesBlogTrain.csv")
blogsTest = read.csv("NYTimesBl... | /analytics-edge/kaggle/NyTimesBlog4.R | no_license | 1ambda/data-analysis | R | false | false | 2,568 | r |
# submission 4: Logistic + Clustering
## libraries
library(ggplot2)
library(caTools)
library(rpart)
library(rpart.plot)
library(randomForest)
library(reshape)
library(data.table)
library(cluster)
library(fpc)
Sys.setlocale("LC_ALL", "C")
blogsTrain = read.csv("NYTimesBlogTrain.csv")
blogsTest = read.csv("NYTimesBl... |
## Loads the sqldf library items.
## Be sure to install the package first by using install.package("sqldf").
library(sqldf)
## Our working directory
dir <- "UCI HAR Dataset"
## Gets the names of the columns
drawColumnNames <- function(){
columns <- read.table(paste(dir, "\\", "features.txt", sep=""), stringsAsFac... | /run_analysis.R | no_license | JET1212/Getting_and_Cleaning_Data_Assignment_1 | R | false | false | 2,795 | r | ## Loads the sqldf library items.
## Be sure to install the package first by using install.package("sqldf").
library(sqldf)
## Our working directory
dir <- "UCI HAR Dataset"
## Gets the names of the columns
drawColumnNames <- function(){
columns <- read.table(paste(dir, "\\", "features.txt", sep=""), stringsAsFac... |
mysq <- function(x){
y <- x^2
plot(y ~ x)
list(x = x, y = y, ysum = summary(y))
}
| /mysq.R | no_license | ChrisPham00/myfirsthub | R | false | false | 92 | r | mysq <- function(x){
y <- x^2
plot(y ~ x)
list(x = x, y = y, ysum = summary(y))
}
|
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/single.MA.R
\name{single.MA}
\alias{single.MA}
\title{Single MA}
\usage{
single.MA(data, j.chains, j.iter, tauA, tauB, prior, jag.model.file,
overdispersed = TRUE)
}
\arguments{
\item{data}{}
\item{j.chains}{number of chains in met... | /modules/meta.analysis/man/single.MA.Rd | permissive | davidjpmoore/pecan | R | false | false | 1,141 | rd | % Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/single.MA.R
\name{single.MA}
\alias{single.MA}
\title{Single MA}
\usage{
single.MA(data, j.chains, j.iter, tauA, tauB, prior, jag.model.file,
overdispersed = TRUE)
}
\arguments{
\item{data}{}
\item{j.chains}{number of chains in met... |
# Plantilla para el Pre Procesado de Datos
# Importar el dataset
dataset = read.csv('Data.csv')
#dataset = dataset[, 2:3]
# Dividir los datos en conjunto de entrenamiento y conjunto de test
# install.packages("caTools")
library(caTools)
set.seed(123)
split = sample.split(dataset$Purchased, SplitRatio = 0.8)
training_s... | /datasets/Part 1 - Data Preprocessing/Section 2 -------------------- Part 1 - Data Preprocessing --------------------/data_preprocessing_template.R | permissive | Raquel-HG/machinelearning-az | R | false | false | 517 | r | # Plantilla para el Pre Procesado de Datos
# Importar el dataset
dataset = read.csv('Data.csv')
#dataset = dataset[, 2:3]
# Dividir los datos en conjunto de entrenamiento y conjunto de test
# install.packages("caTools")
library(caTools)
set.seed(123)
split = sample.split(dataset$Purchased, SplitRatio = 0.8)
training_s... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/od-funs.R
\name{points2flow}
\alias{points2flow}
\title{Convert a series of points into geographical flows}
\usage{
points2flow(p)
}
\arguments{
\item{p}{A spatial (point) object}
}
\description{
Takes a series of geographical points and conv... | /man/points2flow.Rd | permissive | mem48/stplanr | R | false | true | 1,093 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/od-funs.R
\name{points2flow}
\alias{points2flow}
\title{Convert a series of points into geographical flows}
\usage{
points2flow(p)
}
\arguments{
\item{p}{A spatial (point) object}
}
\description{
Takes a series of geographical points and conv... |
#' ---
#' title: "Class05"
#' output: github_document
#' ---
#Section 2 Customizing plots
#2A Line Plot------------------------
#reading from flile
weight<-read.table('bimm143_05_rstats/weight_chart.txt', header=TRUE)
#plotting weight
plot(weight,type="o",pch=15,cex=1.5,lwd=2,ylim=c(2,10),xlab="Age(months)",y... | /class05/class05.R | no_license | Pacheco85629/bimm143 | R | false | false | 2,446 | r |
#' ---
#' title: "Class05"
#' output: github_document
#' ---
#Section 2 Customizing plots
#2A Line Plot------------------------
#reading from flile
weight<-read.table('bimm143_05_rstats/weight_chart.txt', header=TRUE)
#plotting weight
plot(weight,type="o",pch=15,cex=1.5,lwd=2,ylim=c(2,10),xlab="Age(months)",y... |
pdf(file="histograms.pdf")
data.set <- read.csv("histogram.csv", stringsAsFactors=FALSE)
data.set <- data.set[data.set$YRDATA==2013,]
data.1 <- data.set[data.set$STATE=="Connecticut",]
data.1 <- data.1[data.1$ENROLL>0,]
data.1 <- data.1[,c(1,2,3,4,9)]
expn_student <- data.1$TOTALEXP/data.1$ENROLL
data.1 <- cbind.da... | /Lab Week 9-2.R | no_license | LouisJBooth/R | R | false | false | 1,273 | r | pdf(file="histograms.pdf")
data.set <- read.csv("histogram.csv", stringsAsFactors=FALSE)
data.set <- data.set[data.set$YRDATA==2013,]
data.1 <- data.set[data.set$STATE=="Connecticut",]
data.1 <- data.1[data.1$ENROLL>0,]
data.1 <- data.1[,c(1,2,3,4,9)]
expn_student <- data.1$TOTALEXP/data.1$ENROLL
data.1 <- cbind.da... |
library(mlbench)
library(caret)
library(glue)
control <- trainControl(method="repeatedcv", verboseIter = TRUE, summaryFunction = multiClassSummary, classProbs = T, savePredictions = T, number=10, repeats=3)
control <- trainControl(method="repeatedcv", preProcOptions = list(thresh=0.8), verboseIter = TRUE, summaryFunct... | /classval.R | no_license | irisyupingren/patdisISMIR2018 | R | false | false | 4,019 | r | library(mlbench)
library(caret)
library(glue)
control <- trainControl(method="repeatedcv", verboseIter = TRUE, summaryFunction = multiClassSummary, classProbs = T, savePredictions = T, number=10, repeats=3)
control <- trainControl(method="repeatedcv", preProcOptions = list(thresh=0.8), verboseIter = TRUE, summaryFunct... |
#set directory
setwd("G:/My Drive/GradSchoolStuff(UT)/Research-Data/Gaming Data/centrality analysis")
#read in data
merged_data <- read.csv("pergame-merged-LIWC64.csv")
#look at distribution of per_gaming values
hist(merged_data$per_gaming,breaks=100)
#Get median to do a median split on high vs. low gaming community... | /videogames-reddit/pergame_ingame_analysis.R | no_license | mohinitellakat/PlayingWithData | R | false | false | 1,045 | r | #set directory
setwd("G:/My Drive/GradSchoolStuff(UT)/Research-Data/Gaming Data/centrality analysis")
#read in data
merged_data <- read.csv("pergame-merged-LIWC64.csv")
#look at distribution of per_gaming values
hist(merged_data$per_gaming,breaks=100)
#Get median to do a median split on high vs. low gaming community... |
context("get_test_index")
setup({
tenv <- parent.env(environment())
proj_old <- tryCatch(usethis::proj_get(), error = function(e) NULL)
assign("proj_old", proj_old, tenv)
assign("td", file.path(tempdir(), "testthis"), tenv)
assign("proj_test", file.path(td, "test_pkg"), tenv)
dir <- find_testdata("test... | /tests/testthat/test_get_test_index.R | no_license | jimsforks/testthis | R | false | false | 2,249 | r | context("get_test_index")
setup({
tenv <- parent.env(environment())
proj_old <- tryCatch(usethis::proj_get(), error = function(e) NULL)
assign("proj_old", proj_old, tenv)
assign("td", file.path(tempdir(), "testthis"), tenv)
assign("proj_test", file.path(td, "test_pkg"), tenv)
dir <- find_testdata("test... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.