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
new_data_model <- function(tables, columns, references) { stopifnot(nrow(tables) > 0) stopifnot(nrow(columns) > 0) structure( list( tables = tables, columns = columns, references = references ), class = "data_model" ) } get_datamodel_from_overview <- function(overview) { new_da...
/R/data-model-helpers.R
permissive
philipp-baumann/dm
R
false
false
1,201
r
new_data_model <- function(tables, columns, references) { stopifnot(nrow(tables) > 0) stopifnot(nrow(columns) > 0) structure( list( tables = tables, columns = columns, references = references ), class = "data_model" ) } get_datamodel_from_overview <- function(overview) { new_da...
#################### # Modeling Met Ensemble Workflow # Step 6 :: Converstion to LINKAGES met formatting #################### # This script has been modified so it can be run as a job submission to the CRC's machines. # # Description: This step takes the monthly ensembles for temperature and precipitation, transfor...
/scripts/STEP-6-linkages.R
no_license
marissakivi/met-crc-workflow
R
false
false
3,587
r
#################### # Modeling Met Ensemble Workflow # Step 6 :: Converstion to LINKAGES met formatting #################### # This script has been modified so it can be run as a job submission to the CRC's machines. # # Description: This step takes the monthly ensembles for temperature and precipitation, transfor...
set.seed(42) n <- 2000 knapsack_objects <- data.frame(w=sample(1:4000, size = n, replace = TRUE),v=runif(n = n, 0, 10000)) x <- knapsack_objects[1:16,] w <- x$w v <- x$v W <- 2000 library(Rcpp) # cppFunction('List brute_force_Rcpp(IntegerVector w, NumericVector v ,int W) { int n=w.length(); NumericVector result(0...
/inst/Rccp_vs_R.R
no_license
Suhani8884/Lab6
R
false
false
1,085
r
set.seed(42) n <- 2000 knapsack_objects <- data.frame(w=sample(1:4000, size = n, replace = TRUE),v=runif(n = n, 0, 10000)) x <- knapsack_objects[1:16,] w <- x$w v <- x$v W <- 2000 library(Rcpp) # cppFunction('List brute_force_Rcpp(IntegerVector w, NumericVector v ,int W) { int n=w.length(); NumericVector result(0...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/order_stats.R \name{order_probs} \alias{order_probs} \title{Gets order statistics from a 0-1 uniform distribution} \usage{ order_probs(draw_size, k, n) } \arguments{ \item{draw_size}{- The size of the output sample} \item{k}{- The Kth smalle...
/man/order_probs.Rd
no_license
cran/orderstats
R
false
true
675
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/order_stats.R \name{order_probs} \alias{order_probs} \title{Gets order statistics from a 0-1 uniform distribution} \usage{ order_probs(draw_size, k, n) } \arguments{ \item{draw_size}{- The size of the output sample} \item{k}{- The Kth smalle...
testlist <- list(holes = integer(0), numholes = integer(0), x = c(-3.07438250847998e+305, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), y = numeric(0)) result <- do.call(decido:::earcut_cpp,testlist) str(result)
/decido/inst/testfiles/earcut_cpp/libFuzzer_earcut_cpp/earcut_cpp_valgrind_files/1609874343-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
215
r
testlist <- list(holes = integer(0), numholes = integer(0), x = c(-3.07438250847998e+305, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), y = numeric(0)) result <- do.call(decido:::earcut_cpp,testlist) str(result)
#' @name get_IATI_activity #' @rdname get_IATI_activity #' @title Pull Activities data from IATI datastore API #' @description Function to get activities endpoint from IATI-compliant dataset. #' #' @param url URL for websites containing IATI-compliant dataset. Default is #' "https://iatidatastore.iatistandard.org/sea...
/R/get_IATI_activity.R
permissive
unhcr-americas/IatiTidy
R
false
false
9,744
r
#' @name get_IATI_activity #' @rdname get_IATI_activity #' @title Pull Activities data from IATI datastore API #' @description Function to get activities endpoint from IATI-compliant dataset. #' #' @param url URL for websites containing IATI-compliant dataset. Default is #' "https://iatidatastore.iatistandard.org/sea...
## Exploratory Data Analysis - Course Project 2 - Plot 2 ## Set up the environment require(dplyr) ## Let the user know the application is starting print("The application is starting") ## Load RDS File Function loadfile <- function(directoryPath, filePath) { ## Form the path; handle the data file is i...
/plot2.R
no_license
mackertd/ExData_Plotting2
R
false
false
1,807
r
## Exploratory Data Analysis - Course Project 2 - Plot 2 ## Set up the environment require(dplyr) ## Let the user know the application is starting print("The application is starting") ## Load RDS File Function loadfile <- function(directoryPath, filePath) { ## Form the path; handle the data file is i...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/add_quantile_survreg.R \name{add_quantile.survreg} \alias{add_quantile.survreg} \title{Confidence Intervals for Predicted Survival Time Quantiles of Accelerated Failure Time Models} \usage{ \method{add_quantile}{survreg}( df, fit...
/man/add_quantile.survreg.Rd
no_license
cran/ciTools
R
false
true
4,390
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/add_quantile_survreg.R \name{add_quantile.survreg} \alias{add_quantile.survreg} \title{Confidence Intervals for Predicted Survival Time Quantiles of Accelerated Failure Time Models} \usage{ \method{add_quantile}{survreg}( df, fit...
input = file('stdin', 'r') line = strsplit(readLines(input, n=1), " ") hInicial = as.integer(line[[1]][1]) hFinal = as.integer(line[[1]][2]) if (hInicial > hFinal) { write(sprintf("O JOGO DUROU %d HORA(S)", 24 - (hInicial - hFinal)), '') } else if (hFinal > hInicial) { write(sprintf("O JOGO DUROU %d HORA(S)"...
/Iniciante/URI 1046.r
no_license
eduardo-mior/URI-Online-Judge-Solutions
R
false
false
408
r
input = file('stdin', 'r') line = strsplit(readLines(input, n=1), " ") hInicial = as.integer(line[[1]][1]) hFinal = as.integer(line[[1]][2]) if (hInicial > hFinal) { write(sprintf("O JOGO DUROU %d HORA(S)", 24 - (hInicial - hFinal)), '') } else if (hFinal > hInicial) { write(sprintf("O JOGO DUROU %d HORA(S)"...
setwd("~/R directory/Shiny/mtcars") library(slidify) # create project name author("mtcars")
/slidify.R
no_license
dylanwoon1/mtcars.shinyslidify
R
false
false
93
r
setwd("~/R directory/Shiny/mtcars") library(slidify) # create project name author("mtcars")
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/plotViperCharts.R \name{plotViperCharts} \alias{plotViperCharts} \title{Visualize binary classification predictions via ViperCharts system.} \usage{ plotViperCharts(obj, chart = "rocc", browse = TRUE, auth.key = NULL, task.id = NULL...
/man/plotViperCharts.Rd
no_license
gragusa/mlr
R
false
false
2,862
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/plotViperCharts.R \name{plotViperCharts} \alias{plotViperCharts} \title{Visualize binary classification predictions via ViperCharts system.} \usage{ plotViperCharts(obj, chart = "rocc", browse = TRUE, auth.key = NULL, task.id = NULL...
boost_program <- c(1102,34463338,34463338,63,1007,63,34463338,63,1005,63, 53,1101,3,0,1000,109,988,209,12,9, 1000,209,6,209,3,203,0,1008,1000,1, 63,1005,63,65,1008,1000,2,63,1005,63, 904,1008,1000,0,63,1005,63,58,4,25, 104,0,...
/2019/day9/boost_programm.R
permissive
azambranog/adventofcode
R
false
false
5,355
r
boost_program <- c(1102,34463338,34463338,63,1007,63,34463338,63,1005,63, 53,1101,3,0,1000,109,988,209,12,9, 1000,209,6,209,3,203,0,1008,1000,1, 63,1005,63,65,1008,1000,2,63,1005,63, 904,1008,1000,0,63,1005,63,58,4,25, 104,0,...
library(tidyverse) library(leaflet) a <- leaflet() leaflet() %>% addTiles() %>% addMarkers(lat = 37.55, lng = 127.07, label = "영우 글로벌", popup = "영우 글로벌") df <- data.frame(lat = runif(6, min = 37.52, max = 37.56), lng = runif(6, min = 127.06, max = 127.08)...
/r/day20.R
no_license
Esantomi/ygl
R
false
false
3,540
r
library(tidyverse) library(leaflet) a <- leaflet() leaflet() %>% addTiles() %>% addMarkers(lat = 37.55, lng = 127.07, label = "영우 글로벌", popup = "영우 글로벌") df <- data.frame(lat = runif(6, min = 37.52, max = 37.56), lng = runif(6, min = 127.06, max = 127.08)...
# Load library library(ggplot2) library(dplyr) # Reading Data demographic = read.csv("./data/demographic-condlaw.csv",header=TRUE,sep=",",stringsAsFactors=FALSE) columns = read.table("./data/demographic-condlaw-columns.txt") colnames(demographic) = columns[,2] raw_survey_1 = read.csv("./data/survey1-condlaw-complete.c...
/condolaw/demographic_condlaw.R
no_license
joausaga/finland-experiment-study
R
false
false
19,090
r
# Load library library(ggplot2) library(dplyr) # Reading Data demographic = read.csv("./data/demographic-condlaw.csv",header=TRUE,sep=",",stringsAsFactors=FALSE) columns = read.table("./data/demographic-condlaw-columns.txt") colnames(demographic) = columns[,2] raw_survey_1 = read.csv("./data/survey1-condlaw-complete.c...
library(shiny) shinyUI(pageWithSidebar( headerPanel("CO2 Predictions Per Gas Mileage"), sidebarPanel( strong("Usage:"), helpText("Select the gas type and input the gas mileage in liter per 100 kms (European unit)."), helpText("Clic on the Submit button or ...
/ShinyCode/ui.R
no_license
flaforgia/DataProduct
R
false
false
1,190
r
library(shiny) shinyUI(pageWithSidebar( headerPanel("CO2 Predictions Per Gas Mileage"), sidebarPanel( strong("Usage:"), helpText("Select the gas type and input the gas mileage in liter per 100 kms (European unit)."), helpText("Clic on the Submit button or ...
library(HiDimDA) ### Name: Slda ### Title: Shrunken Linear Discriminant Analysis. ### Aliases: Slda Slda.default Slda.data.frame is.Slda ### ** Examples # train classifier on Alon's Colon Cancer Data set # after a logarithmic transformation # (selecting genes by the Expanded HC scheme). ldarule <- Slda(log10(A...
/data/genthat_extracted_code/HiDimDA/examples/Slda.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
1,110
r
library(HiDimDA) ### Name: Slda ### Title: Shrunken Linear Discriminant Analysis. ### Aliases: Slda Slda.default Slda.data.frame is.Slda ### ** Examples # train classifier on Alon's Colon Cancer Data set # after a logarithmic transformation # (selecting genes by the Expanded HC scheme). ldarule <- Slda(log10(A...
library(tidytext) #tidytext package contains sentiments lexicons get_sentiments("bing") library(janeaustenr) library(stringr) #stringr package lets us use the pipe operator(%>%) library(dplyr) #dplyr package lets us use group_by function tidy_data<- austen_books()%>%group_by(book)%>% #austen_books() to gets a tibble of...
/Sentiment-analysis.R
no_license
marineprateek/Sentiment-analysis
R
false
false
2,028
r
library(tidytext) #tidytext package contains sentiments lexicons get_sentiments("bing") library(janeaustenr) library(stringr) #stringr package lets us use the pipe operator(%>%) library(dplyr) #dplyr package lets us use group_by function tidy_data<- austen_books()%>%group_by(book)%>% #austen_books() to gets a tibble of...
testlist <- list(n = 1242227683L) result <- do.call(breakfast:::setBitNumber,testlist) str(result)
/breakfast/inst/testfiles/setBitNumber/libFuzzer_setBitNumber/setBitNumber_valgrind_files/1609960690-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
98
r
testlist <- list(n = 1242227683L) result <- do.call(breakfast:::setBitNumber,testlist) str(result)
#' Import channel locations from various file formats #' #' Currently only ASA .elc format with Cartesian x-y-z coordinates is supported. #' #' @author Matt Craddock \email{matt@@mattcraddock.com} #' @param file_name Name and full path of file to be loaded. #' @param format If the file is not .elc format, "spherical", ...
/R/channel_management.R
no_license
msl052/eegUtils
R
false
false
25,150
r
#' Import channel locations from various file formats #' #' Currently only ASA .elc format with Cartesian x-y-z coordinates is supported. #' #' @author Matt Craddock \email{matt@@mattcraddock.com} #' @param file_name Name and full path of file to be loaded. #' @param format If the file is not .elc format, "spherical", ...
/R Kod.R
no_license
WroData/Wybory_do_RO
R
false
false
7,827
r
setwd("C:/Users/kate/Documents/datascience/coursera") NEI <- readRDS("summarySCC_PM25.rds") SCC <- readRDS("Source_Classification_Code.rds") #merge the NEI and SCC data frames NEISCC<-merge(NEI, SCC, by="SCC", all.x=TRUE) #find the values of Short.Name column that contains "Coal" neiscc<-grep("Coal", NEISCC$Short.Nam...
/expl data ass 2/plot4.R
no_license
katemarielewis/datasciencecoursera
R
false
false
917
r
setwd("C:/Users/kate/Documents/datascience/coursera") NEI <- readRDS("summarySCC_PM25.rds") SCC <- readRDS("Source_Classification_Code.rds") #merge the NEI and SCC data frames NEISCC<-merge(NEI, SCC, by="SCC", all.x=TRUE) #find the values of Short.Name column that contains "Coal" neiscc<-grep("Coal", NEISCC$Short.Nam...
## Load and extract data to be used power <- read.table("household_power_consumption.txt",header=TRUE,sep=";", stringsAsFactors = FALSE,blank.lines.skip = TRUE) alldata <- power[power$Date=="1/2/2007" | power$Date=="2/2/2007",] ##Create date object longdate <- as.POSIXct(paste(alldata$Date,alldata$Time), format="%d/%m/...
/plot4.R
no_license
rsarmiento81/ExData_Plotting1
R
false
false
1,179
r
## Load and extract data to be used power <- read.table("household_power_consumption.txt",header=TRUE,sep=";", stringsAsFactors = FALSE,blank.lines.skip = TRUE) alldata <- power[power$Date=="1/2/2007" | power$Date=="2/2/2007",] ##Create date object longdate <- as.POSIXct(paste(alldata$Date,alldata$Time), format="%d/%m/...
#' @title Calculate the decision table for a DESeq2 result. #' #' @description \code{Decision_dsresult} is an internal function used to summary the cut-off and the number of positive results used for DESeq2 result.. #' #' @param Inf_RES A \code{DESeqResults} or similar object that contains the result statistics for eit...
/R/Decision_infresult.R
no_license
ZW-xjtlu/meripQC
R
false
false
3,524
r
#' @title Calculate the decision table for a DESeq2 result. #' #' @description \code{Decision_dsresult} is an internal function used to summary the cut-off and the number of positive results used for DESeq2 result.. #' #' @param Inf_RES A \code{DESeqResults} or similar object that contains the result statistics for eit...
#' The following \code{l} vehicle speed \code{ul2} at time \code{t2}. #' #' @format The lead vehicle speed at \code{t2} is estimated with the exponential speed function \code{gbm(upre, theta, t2)}. #' \describe{ #' \item{ul2}{speed, measured in feet per second.} #' } "ul2"
/R/ul2.R
permissive
PJOssenbruggen/Basic
R
false
false
274
r
#' The following \code{l} vehicle speed \code{ul2} at time \code{t2}. #' #' @format The lead vehicle speed at \code{t2} is estimated with the exponential speed function \code{gbm(upre, theta, t2)}. #' \describe{ #' \item{ul2}{speed, measured in feet per second.} #' } "ul2"
#' Create a terminal token #' #' Creates a terminal token represented as (a row of) a parse table. #' @param tokens Character vector with tokens to create. #' @param texts Character vector with texts of the token to create. #' @param lag_newlines Character vector with lag_newlines corresponding to the #' tokens. #' @...
/R/token-create.R
permissive
isabella232/styler
R
false
false
6,036
r
#' Create a terminal token #' #' Creates a terminal token represented as (a row of) a parse table. #' @param tokens Character vector with tokens to create. #' @param texts Character vector with texts of the token to create. #' @param lag_newlines Character vector with lag_newlines corresponding to the #' tokens. #' @...
# for the sake of the demo, we assume there is a variable named "class" # that we want to predict from the rest of the variables of a data frame # this class can take 3 values 1, 2 and 3 and we are interested in 3 # load the data frame to test on load("data/testData.rda") ####################### # prediction from tr...
/code/test.R
permissive
frncsrss/gambleR
R
false
false
3,187
r
# for the sake of the demo, we assume there is a variable named "class" # that we want to predict from the rest of the variables of a data frame # this class can take 3 values 1, 2 and 3 and we are interested in 3 # load the data frame to test on load("data/testData.rda") ####################### # prediction from tr...
rm(list=ls()) source("IndicatorFunctions.R") source("ReadIndicatorType.R") source("CalculateIndicatorSupport.R") source("Assessment.R") source("ReadBounds.R") source("ReadIndicatorParms.R") source("ReadMonitoringData.R") library(tidyverse) library(haven) library(lme4) library(lubridate) library(shiny) library(dplyr...
/test.R
no_license
NIVA-Denmark/WATERS
R
false
false
2,469
r
rm(list=ls()) source("IndicatorFunctions.R") source("ReadIndicatorType.R") source("CalculateIndicatorSupport.R") source("Assessment.R") source("ReadBounds.R") source("ReadIndicatorParms.R") source("ReadMonitoringData.R") library(tidyverse) library(haven) library(lme4) library(lubridate) library(shiny) library(dplyr...
#' Extracting values from one or multiple raster files at point locations #' #' This function allows you to extract the values of one or many rasters at the location of given points. #' @param rasters An object of class RasterLayer, RasterStack or RasterBrick. Can also be a path to a raster file or multiple paths. In t...
/R/extract_raster.R
no_license
sitscholl/Rgadgets
R
false
false
3,108
r
#' Extracting values from one or multiple raster files at point locations #' #' This function allows you to extract the values of one or many rasters at the location of given points. #' @param rasters An object of class RasterLayer, RasterStack or RasterBrick. Can also be a path to a raster file or multiple paths. In t...
library(data.table) library(ggplot2) path_res_folder = '/home/jakob/Storage/uni/20WiSe/S-AML/Paper/Code/myres' paths = list.files(path_res_folder, full.names = T) names(paths) = basename(paths) tables = lapply(paths, fread) dt = rbindlist(tables[1:2]) # here just a subset of tables is selected. Adjust this to fit in y...
/analysis.R
no_license
UntotaufUrlaub/UnitDissection
R
false
false
6,132
r
library(data.table) library(ggplot2) path_res_folder = '/home/jakob/Storage/uni/20WiSe/S-AML/Paper/Code/myres' paths = list.files(path_res_folder, full.names = T) names(paths) = basename(paths) tables = lapply(paths, fread) dt = rbindlist(tables[1:2]) # here just a subset of tables is selected. Adjust this to fit in y...
Ftest <- function(yfdPar, xfdlist, betalist, wt=NULL, nperm=1000, argvals=NULL, q=0.05, plotres=TRUE, mul=1, ...){ if(missing(yfdPar) || missing(xfdlist) || missing(betalist)) stop("Missing Arguments") set.seed <- 123456789 Fnull <- rep(0, nperm) Fnullvals <- c() q <- 1 - q begin <- proc.time() fR...
/Actigraphy/R/Ftest.R
no_license
BioRankings/Actigraphy
R
false
false
2,694
r
Ftest <- function(yfdPar, xfdlist, betalist, wt=NULL, nperm=1000, argvals=NULL, q=0.05, plotres=TRUE, mul=1, ...){ if(missing(yfdPar) || missing(xfdlist) || missing(betalist)) stop("Missing Arguments") set.seed <- 123456789 Fnull <- rep(0, nperm) Fnullvals <- c() q <- 1 - q begin <- proc.time() fR...
## Put comments here that give an overall description of what your ## functions do ## Write a short comment describing this function ## This function creates a special "matrix" object ## that can cache its inverse. ## This function will- set the value of the matrix ## -get the value of the matrix ##- set the value o...
/cachematrix.R
no_license
pallavikhare24/ProgrammingAssignment2
R
false
false
1,419
r
## Put comments here that give an overall description of what your ## functions do ## Write a short comment describing this function ## This function creates a special "matrix" object ## that can cache its inverse. ## This function will- set the value of the matrix ## -get the value of the matrix ##- set the value o...
context("Data import tests") data(monpop, package = "poppr") data(Pinf, package = "poppr") data(H3N2, package = "adegenet") pr <- recode_polyploids(Pinf, newploidy = TRUE) y <- "13 6 1 6 7_09_BB Ind Pop CHMFc4 CHMFc5 CHMFc12 SEA SED SEE SEG SEI SEL SEN SEP SEQ SER A004 7_09_BB 224 85 163 132 1...
/tests/testthat/test-import.R
no_license
Neato-Nick/poppr
R
false
false
14,124
r
context("Data import tests") data(monpop, package = "poppr") data(Pinf, package = "poppr") data(H3N2, package = "adegenet") pr <- recode_polyploids(Pinf, newploidy = TRUE) y <- "13 6 1 6 7_09_BB Ind Pop CHMFc4 CHMFc5 CHMFc12 SEA SED SEE SEG SEI SEL SEN SEP SEQ SER A004 7_09_BB 224 85 163 132 1...
testlist <- list(end = NULL, start = NULL, x = structure(c(8.13805738626269e-298, 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), .Dim = 8:7), segment_end = structure(0, .Dim = c(1L, 1L)), segment_s...
/dynutils/inst/testfiles/project_to_segments/AFL_project_to_segments/project_to_segments_valgrind_files/1609871848-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
428
r
testlist <- list(end = NULL, start = NULL, x = structure(c(8.13805738626269e-298, 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), .Dim = 8:7), segment_end = structure(0, .Dim = c(1L, 1L)), segment_s...
## IMPORT / LOADING PACKAGES # if(!require(installr)) { # install.packages("installr"); require(installr)} library(plyr) library(dplyr) library(reshape) # loading this package for the purpose of renaming variables library(zoo) # converting month.index format data = tbl_df(read.csv("blog_data_2_2_15.csv", stringsAsFa...
/analysis_scripts/mchen/div2/stage_1.R
no_license
dimagi/dimagi-data-platform-R
R
false
false
27,065
r
## IMPORT / LOADING PACKAGES # if(!require(installr)) { # install.packages("installr"); require(installr)} library(plyr) library(dplyr) library(reshape) # loading this package for the purpose of renaming variables library(zoo) # converting month.index format data = tbl_df(read.csv("blog_data_2_2_15.csv", stringsAsFa...
## f2-genericFunctions.R --- ## Author : Jens Henrik Badsberg, Claus Dethlefsen, Luca La Rocca ## Created On : Tue Nov 30 14:23:00 2004 ## Last Modified By: Claus Dethlefsen ## Last Modified On: Sun Dec 17 21:38:36 2006 ## Update Count : 26 ## Status : Unknown, Use with caution! ######...
/R/f2-genericFunctions.R
no_license
ClausDethlefsen/giRaph
R
false
false
4,183
r
## f2-genericFunctions.R --- ## Author : Jens Henrik Badsberg, Claus Dethlefsen, Luca La Rocca ## Created On : Tue Nov 30 14:23:00 2004 ## Last Modified By: Claus Dethlefsen ## Last Modified On: Sun Dec 17 21:38:36 2006 ## Update Count : 26 ## Status : Unknown, Use with caution! ######...
format_named_list <- function(name, data) { c(paste0(name, ":"), if (length(data)) paste0(" ", names(data), ": ", data) ) } format_path <- function(patterns) { # Make sure patterns is a list if (inherits(patterns, "webfakes_regexp")) { patterns <- list(patterns) } else if (is.character(patterns)) {...
/R/print.R
permissive
isabella232/webfakes
R
false
false
5,193
r
format_named_list <- function(name, data) { c(paste0(name, ":"), if (length(data)) paste0(" ", names(data), ": ", data) ) } format_path <- function(patterns) { # Make sure patterns is a list if (inherits(patterns, "webfakes_regexp")) { patterns <- list(patterns) } else if (is.character(patterns)) {...
require(scales) require(ggplot2) require(plyr) #work in meters m2ml = 1609.34 #1609 meters in a mile partnership="SAIC / GMU / FAA\nPartnership" waist.r <- 0.7 * 1e-3 #mm (1e9/1e3) nphotons.5mW <- 1.6e16 power.5mW <- 5e-3 #in Watts source("~/R/RWCode/gausFit.r") #https://www.livephysics.com/physical...
/RAnalysisFiles/laser_cols_angs.r
no_license
jkreke/GMU_DAEN_690_FAA
R
false
false
8,456
r
require(scales) require(ggplot2) require(plyr) #work in meters m2ml = 1609.34 #1609 meters in a mile partnership="SAIC / GMU / FAA\nPartnership" waist.r <- 0.7 * 1e-3 #mm (1e9/1e3) nphotons.5mW <- 1.6e16 power.5mW <- 5e-3 #in Watts source("~/R/RWCode/gausFit.r") #https://www.livephysics.com/physical...
# File: plot.R # Description: Plotting pycollector performance tests. # It is supposed to be called from plot.sh data <- read.csv(file="output.csv", sep=",", head=TRUE) for (column in names(data)) { if (column != "Time" && column != "PID" ) { plot(data[,c("Time", column)], type="o", col="blu...
/performance/plot.R
permissive
isabella232/pycollector
R
false
false
333
r
# File: plot.R # Description: Plotting pycollector performance tests. # It is supposed to be called from plot.sh data <- read.csv(file="output.csv", sep=",", head=TRUE) for (column in names(data)) { if (column != "Time" && column != "PID" ) { plot(data[,c("Time", column)], type="o", col="blu...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/inspect.data.R \name{inspect.data} \alias{inspect.data} \title{Audit input data for common issues} \usage{ inspect.data(incid, GT = NULL, t = NULL) } \arguments{ \item{incid}{An object (vector, data.frame, list) storing incidence.} \item{GT}...
/man/inspect.data.Rd
no_license
tobadia/R0
R
false
true
2,661
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/inspect.data.R \name{inspect.data} \alias{inspect.data} \title{Audit input data for common issues} \usage{ inspect.data(incid, GT = NULL, t = NULL) } \arguments{ \item{incid}{An object (vector, data.frame, list) storing incidence.} \item{GT}...
###################################################################################### # CRG # Hana SUSAK #------------------------------------------------------------------------------------ # background model functions ###################################################################################### # Functi...
/R/background.R
permissive
yulab41/cDriver
R
false
false
25,896
r
###################################################################################### # CRG # Hana SUSAK #------------------------------------------------------------------------------------ # background model functions ###################################################################################### # Functi...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ProcessObs.R \name{ProcessObs} \alias{ProcessObs} \title{Process Observations} \usage{ ProcessObs(observations, parameters, detection.limits = NULL, date.fmt = "\%Y-\%m-\%d") } \arguments{ \item{observations}{data.frame. Observed data recor...
/man/ProcessObs.Rd
permissive
ktreinen/Trends
R
false
true
3,934
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ProcessObs.R \name{ProcessObs} \alias{ProcessObs} \title{Process Observations} \usage{ ProcessObs(observations, parameters, detection.limits = NULL, date.fmt = "\%Y-\%m-\%d") } \arguments{ \item{observations}{data.frame. Observed data recor...
library(arm) library(foreign) library(R2WinBUGS) library(rstanarm) library(rstan) ######################### # 1) LOGISTIC REGRESSION ######################## ## 1992 polls source("4.7_Fitting a series of regressions.R") # where data was cleaned; set the directory to be where this file is yr <- 1992 ok <- nes.year...
/homeworks/homework3/gl_regression_script.R
no_license
ginevracoal/bayesian-statistics
R
false
false
14,368
r
library(arm) library(foreign) library(R2WinBUGS) library(rstanarm) library(rstan) ######################### # 1) LOGISTIC REGRESSION ######################## ## 1992 polls source("4.7_Fitting a series of regressions.R") # where data was cleaned; set the directory to be where this file is yr <- 1992 ok <- nes.year...
\name{__ORGANISM__ Gene Sets} __ALIASES__ \title{Gene Set Annotation Tables} \description{This package provides a set of annotation tables that can be used to build gene set collection objects with the \code{\link[SetRank]{buildSetCollection}} function of the \code{SetRank} package. Each object is a data frame combinin...
/templates/documentation.Rd
no_license
C3c6e6/GeneSets
R
false
false
554
rd
\name{__ORGANISM__ Gene Sets} __ALIASES__ \title{Gene Set Annotation Tables} \description{This package provides a set of annotation tables that can be used to build gene set collection objects with the \code{\link[SetRank]{buildSetCollection}} function of the \code{SetRank} package. Each object is a data frame combinin...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/tableMatrix.R \name{dataType.tableList} \alias{dataType.tableList} \alias{dataType<-.tableList} \alias{dataType.tableMatrix} \alias{dataType<-.tableMatrix} \title{Get or set dataType attribute} \usage{ \method{dataType}{tableList}(obj, ...) ...
/man/dataType.tableList.Rd
no_license
InferenceTechnologies/tableMatrix
R
false
true
716
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/tableMatrix.R \name{dataType.tableList} \alias{dataType.tableList} \alias{dataType<-.tableList} \alias{dataType.tableMatrix} \alias{dataType<-.tableMatrix} \title{Get or set dataType attribute} \usage{ \method{dataType}{tableList}(obj, ...) ...
############################################ # Author: Medina Colic # Course: Exploratory Data Analysis # Assignment: Course Project I ############################################ epcData <- read.table("household_power_consumption.txt", header = T, sep = ";", na.strings = "?") subData <- epcData[epcData$Date %in% c(...
/plot1.R
no_license
mcolic/ExData_Plotting1
R
false
false
543
r
############################################ # Author: Medina Colic # Course: Exploratory Data Analysis # Assignment: Course Project I ############################################ epcData <- read.table("household_power_consumption.txt", header = T, sep = ";", na.strings = "?") subData <- epcData[epcData$Date %in% c(...
#włączenie bibliotek library(lsa) #zmiana katalogu roboczego workDir <- "E:\\RN\\TextMining12S" setwd(workDir) #lokalizacja katalogu ze skryptami scriptDir <- ".\\scripts" #ladowanie skryptu sourceFile <- paste( scriptDir, "\\", "frequencyMatrix.R", sep = "" ) source(sourceFile) #analiza wymiaróW ukryt...
/scripts/lsa.R
no_license
radeknic/textMining12S
R
false
false
2,153
r
#włączenie bibliotek library(lsa) #zmiana katalogu roboczego workDir <- "E:\\RN\\TextMining12S" setwd(workDir) #lokalizacja katalogu ze skryptami scriptDir <- ".\\scripts" #ladowanie skryptu sourceFile <- paste( scriptDir, "\\", "frequencyMatrix.R", sep = "" ) source(sourceFile) #analiza wymiaróW ukryt...
options(echo=TRUE) # if you want see commands in output file args <- commandArgs(trailingOnly = TRUE) node.idx = as.numeric(args[1]); if (.Platform$OS.type == "windows") { node.idx = 1 } if (.Platform$OS.type == "windows") { root.path = "C:/Users/psioda/Documents/Research Papers Temp/bayesDesignBasketHetero/00-gith...
/BHM/PROGRAMS/bhm-binomial.R
no_license
psioda/Basket-Hetero
R
false
false
3,924
r
options(echo=TRUE) # if you want see commands in output file args <- commandArgs(trailingOnly = TRUE) node.idx = as.numeric(args[1]); if (.Platform$OS.type == "windows") { node.idx = 1 } if (.Platform$OS.type == "windows") { root.path = "C:/Users/psioda/Documents/Research Papers Temp/bayesDesignBasketHetero/00-gith...
# Setting the working Directory #setwd("~/Insofe/Labs/PGP_Batch_31CUTE02__Instructions_and_Exam_details/data") getwd() set.seed(8284) # ------------------------------------------- # Loading common packages and libraries # -------------------------------------------- install.packages("DMwR") install.packages(...
/Multiclass_classification_multiple ML.R
no_license
Sreenietla/multi-class-classification-using-different-ML-algorithms
R
false
false
4,047
r
# Setting the working Directory #setwd("~/Insofe/Labs/PGP_Batch_31CUTE02__Instructions_and_Exam_details/data") getwd() set.seed(8284) # ------------------------------------------- # Loading common packages and libraries # -------------------------------------------- install.packages("DMwR") install.packages(...
#' @include internal.R NULL #' Replacement cost #' #' Calculate the replacement cost for priority actions in a project #' prioritization [problem()] (Moilanen *et al.* 2009). Actions associated #' with larger replacement cost values are more irreplaceable, and may #' need to be implemented sooner than actions with low...
/R/replacement_costs.R
no_license
prioritizr/oppr
R
false
false
5,567
r
#' @include internal.R NULL #' Replacement cost #' #' Calculate the replacement cost for priority actions in a project #' prioritization [problem()] (Moilanen *et al.* 2009). Actions associated #' with larger replacement cost values are more irreplaceable, and may #' need to be implemented sooner than actions with low...
/ppBEAN.R
no_license
caosmax/AFrica_LAC
R
false
false
31,688
r
library(DCluster) ### Name: pottwhitt.stat ### Title: Compute Potthoff-Whittinghill's Statistic ### Aliases: pottwhitt.stat pottwhitt.test ### Keywords: htest ### ** Examples library(spdep) data(nc.sids) sids<-data.frame(Observed=nc.sids$SID74) sids<-cbind(sids, Expected=nc.sids$BIR74*sum(nc.sids$SID74)/sum(nc.si...
/data/genthat_extracted_code/DCluster/examples/pottwhitt.stat.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
476
r
library(DCluster) ### Name: pottwhitt.stat ### Title: Compute Potthoff-Whittinghill's Statistic ### Aliases: pottwhitt.stat pottwhitt.test ### Keywords: htest ### ** Examples library(spdep) data(nc.sids) sids<-data.frame(Observed=nc.sids$SID74) sids<-cbind(sids, Expected=nc.sids$BIR74*sum(nc.sids$SID74)/sum(nc.si...
# This script models host and parasite richness using Generalized # Additive Models (GAMS). # # library(dplyr) library(mgcv) # the GAM package library(raster) # to deal with spatial data library(viridis) # map cols library(sjPlot) set.seed(1987) # Data ------------------------------------------------------------------...
/scripts/gam_host_parasite_richness.R
no_license
weibokong27/Peru_GDM
R
false
false
5,376
r
# This script models host and parasite richness using Generalized # Additive Models (GAMS). # # library(dplyr) library(mgcv) # the GAM package library(raster) # to deal with spatial data library(viridis) # map cols library(sjPlot) set.seed(1987) # Data ------------------------------------------------------------------...
1+2 "+"(1, 2) c(1, 2, 3 ) + c(4, 5, 6) c(1, 2, 3 ) * c(4, 5, 6) c(1, 2, 3 ) / c(4, 5, 6) c(1, 2, 3 ) %% c(4, 5, 6) # rest c(4, 5, 6) %% c(1, 2, 3 ) # mok c(4, 5, 6) %/% c(1, 2, 3 ) c(4, 5, 6) ** c(1, 2, 3 ) c(4, 5, 6) + c(1, 2) d <- c(1, 2) + c(4, 5, 6) d c(4, 5, 6) + c(1, 2 , 3, 4, 5, 6) c(1, 2 , 3, 4...
/01_RStudy/05_vector02.R
no_license
ihanseol/06_R
R
false
false
1,440
r
1+2 "+"(1, 2) c(1, 2, 3 ) + c(4, 5, 6) c(1, 2, 3 ) * c(4, 5, 6) c(1, 2, 3 ) / c(4, 5, 6) c(1, 2, 3 ) %% c(4, 5, 6) # rest c(4, 5, 6) %% c(1, 2, 3 ) # mok c(4, 5, 6) %/% c(1, 2, 3 ) c(4, 5, 6) ** c(1, 2, 3 ) c(4, 5, 6) + c(1, 2) d <- c(1, 2) + c(4, 5, 6) d c(4, 5, 6) + c(1, 2 , 3, 4, 5, 6) c(1, 2 , 3, 4...
# Individually-based model for a multiple species, # with density-dependence and explicit space (random # spatial pattern) # Simulate one quadrat through time # PBA 8-28-09 # qName = "Q1" totSims=2 Nyrs=22 Ngroups=6 startYr=2011 # doGroup=1 # E1 exclosure L=100 # dimension of square quadrat (cm) expand=1 # 1 = 1x...
/removals/ibm/old/ibm_validate_removal_1step_stochastic.r
no_license
pbadler/ExperimentTests
R
false
false
7,966
r
# Individually-based model for a multiple species, # with density-dependence and explicit space (random # spatial pattern) # Simulate one quadrat through time # PBA 8-28-09 # qName = "Q1" totSims=2 Nyrs=22 Ngroups=6 startYr=2011 # doGroup=1 # E1 exclosure L=100 # dimension of square quadrat (cm) expand=1 # 1 = 1x...
################################################################################ ##########Tests of relationship length on self and partner enhancement########## library(lme4) library(lmerTest) library(reshape2) library(ggplot2) ##########create difference score########## df <- read.csv("Reorganized1.csv",...
/mixed effects models.R
no_license
JPico6/MatePerceptionsStudy
R
false
false
2,261
r
################################################################################ ##########Tests of relationship length on self and partner enhancement########## library(lme4) library(lmerTest) library(reshape2) library(ggplot2) ##########create difference score########## df <- read.csv("Reorganized1.csv",...
# -------------------------------------------------------------- # EXERCISE 1 # -------------------------------------------------------------- # Social security numbers in the United States are represented by # numbers conforming to the following format: # # a leading 0 followed by two digits # followed by a ...
/final/ex1.R
no_license
hiroto-udagawa/stat133
R
false
false
1,808
r
# -------------------------------------------------------------- # EXERCISE 1 # -------------------------------------------------------------- # Social security numbers in the United States are represented by # numbers conforming to the following format: # # a leading 0 followed by two digits # followed by a ...
read.gis.pal <- function(filename, text) { # GRASS colortable files are messy # they all have value then color # value can be numeric or percent # color can be name, r:g:b or r g b # some are tab and some are space separated if(!missing(filename)) { colfile <- scan(filename, what=character(), sep="\n") } else ...
/R/read.gis.pal.R
no_license
phiala/giscolor
R
false
false
1,529
r
read.gis.pal <- function(filename, text) { # GRASS colortable files are messy # they all have value then color # value can be numeric or percent # color can be name, r:g:b or r g b # some are tab and some are space separated if(!missing(filename)) { colfile <- scan(filename, what=character(), sep="\n") } else ...
\name{cbb} \alias{cbb} \docType{data} \encoding{UTF-8} \title{Coffee berry borer trapping data} \description{Data on counts of coffee berry borer obtained using different traps through time.} \usage{data(cbb)} \format{ A data frame with 288 observations on the following 4 variables. \tabular{lll}{ \code{week...
/man/cbb.Rd
no_license
cran/hnp
R
false
false
2,444
rd
\name{cbb} \alias{cbb} \docType{data} \encoding{UTF-8} \title{Coffee berry borer trapping data} \description{Data on counts of coffee berry borer obtained using different traps through time.} \usage{data(cbb)} \format{ A data frame with 288 observations on the following 4 variables. \tabular{lll}{ \code{week...
#' Split transects from PCL #' #' \code{split_transects_from_pcl} places data values into x-bins (x-coordinates #' and) and z-bins (z-coordinates) #' #' Function to add two additional columns #' to the pcl dataset, one for the segment #' (which should only be from 1-4) and is #' designated by a -99999999 value...
/R/split_transects_from_pcl.R
no_license
cran/forestr
R
false
false
3,408
r
#' Split transects from PCL #' #' \code{split_transects_from_pcl} places data values into x-bins (x-coordinates #' and) and z-bins (z-coordinates) #' #' Function to add two additional columns #' to the pcl dataset, one for the segment #' (which should only be from 1-4) and is #' designated by a -99999999 value...
library(binom) AB_data <- read.csv("C:/U/CoronaVirus/PELLEAU_et_al/Manuscript/Database/IDEA_db.csv") AB_data <- AB_data[ which(AB_data$covid_status %in% c("flow-positive", "pcr-positive", "pre-epidemic-negative")),] AB_data <- AB_data[,-(38:39)] IMM_db <- read.csv("C:/U/CoronaVirus/PELLEAU_et_al/Manuscrip...
/SupFig3_Ab_data_HKU1_NL63_229E.R
permissive
MWhite-InstitutPasteur/SARSCoV2_AB_kinetics
R
false
false
27,733
r
library(binom) AB_data <- read.csv("C:/U/CoronaVirus/PELLEAU_et_al/Manuscript/Database/IDEA_db.csv") AB_data <- AB_data[ which(AB_data$covid_status %in% c("flow-positive", "pcr-positive", "pre-epidemic-negative")),] AB_data <- AB_data[,-(38:39)] IMM_db <- read.csv("C:/U/CoronaVirus/PELLEAU_et_al/Manuscrip...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Beta_function.R \name{coeff} \alias{coeff} \title{Linear Regression Coefficients Estimate} \usage{ coeff(Response, Predictors) } \arguments{ \item{Response}{A \code{data-frame} containing the response value in the dataset.} \item{Predictors}...
/man/coeff.Rd
no_license
ozntur/Final-Project-Group-10_OAG
R
false
true
693
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Beta_function.R \name{coeff} \alias{coeff} \title{Linear Regression Coefficients Estimate} \usage{ coeff(Response, Predictors) } \arguments{ \item{Response}{A \code{data-frame} containing the response value in the dataset.} \item{Predictors}...
context("Variable summaries") with_mock_HTTP({ ds <- loadDataset("test ds") gen <- ds$gender test_that("table 'method' dispatch", { expect_identical(table(1:5), base::table(1:5)) expect_identical(table(useNA="ifany", 1:5), base::table(useNA="ifany", 1:5)) expect_identic...
/tests/testthat/test-variable-summary.R
no_license
malecki/rcrunch
R
false
false
3,628
r
context("Variable summaries") with_mock_HTTP({ ds <- loadDataset("test ds") gen <- ds$gender test_that("table 'method' dispatch", { expect_identical(table(1:5), base::table(1:5)) expect_identical(table(useNA="ifany", 1:5), base::table(useNA="ifany", 1:5)) expect_identic...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/personalize_operations.R \name{personalize_list_schemas} \alias{personalize_list_schemas} \title{Returns the list of schemas associated with the account} \usage{ personalize_list_schemas(nextToken, maxResults) } \arguments{ \item{nextToken}{A...
/cran/paws.machine.learning/man/personalize_list_schemas.Rd
permissive
TWarczak/paws
R
false
true
1,239
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/personalize_operations.R \name{personalize_list_schemas} \alias{personalize_list_schemas} \title{Returns the list of schemas associated with the account} \usage{ personalize_list_schemas(nextToken, maxResults) } \arguments{ \item{nextToken}{A...
# simulate 1million + 1 genotypes # make phenotype from one SNP, with varying sigma values # then test all other genotypes against the phenotype test_phenotypes <- function(numSNPs,sigmaA, sigmaX){ n <- 8000 kinX <- get(load("500Peds_xKinship.RData")) kinAuto <- get(load("500Peds_autoKinship.RData")) ...
/test_phenotypes.R
no_license
mchughc/mlm_x
R
false
false
3,411
r
# simulate 1million + 1 genotypes # make phenotype from one SNP, with varying sigma values # then test all other genotypes against the phenotype test_phenotypes <- function(numSNPs,sigmaA, sigmaX){ n <- 8000 kinX <- get(load("500Peds_xKinship.RData")) kinAuto <- get(load("500Peds_autoKinship.RData")) ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/to_any_case_wrap.R \name{to_any_case_wrap} \alias{to_any_case_wrap} \title{Wrap to_any_case function} \usage{ to_any_case_wrap(string, case) } \arguments{ \item{df}{A dataframe} } \description{ Wrapper for \code{\link[snakecase]{to_any_case}}...
/man/to_any_case_wrap.Rd
permissive
chrischizinski/huntfishapp
R
false
true
374
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/to_any_case_wrap.R \name{to_any_case_wrap} \alias{to_any_case_wrap} \title{Wrap to_any_case function} \usage{ to_any_case_wrap(string, case) } \arguments{ \item{df}{A dataframe} } \description{ Wrapper for \code{\link[snakecase]{to_any_case}}...
context("Test extraction model eefun utilies for geepack objects") library(geepack, quietly = TRUE) data('ohio') test_binomial <- geeglm(resp ~ age, id = id, data = ohio, family = binomial(link = 'logit')) gee_eefun <- function(data, model){ f <- grab_psiFUN(model, data) function(theta){ ...
/tests/testthat/test_grab_eeFUN_geeglm.R
permissive
bsaul/geex
R
false
false
989
r
context("Test extraction model eefun utilies for geepack objects") library(geepack, quietly = TRUE) data('ohio') test_binomial <- geeglm(resp ~ age, id = id, data = ohio, family = binomial(link = 'logit')) gee_eefun <- function(data, model){ f <- grab_psiFUN(model, data) function(theta){ ...
messageSGP <- function(tmp.message, domain=NULL, appendLF=TRUE) { if (!is.call(tmp.message)) { base::message(tmp.message) } PrintLogMessage(tmp.message) invisible() } PrintLogMessage <- function(tmp.message, domain=NULL) { # print log message to file dir.create("Logs", showWarnings = FALSE) logfile <- paste("L...
/SGP/R/messageSGP.R
no_license
ingted/R-Examples
R
false
false
723
r
messageSGP <- function(tmp.message, domain=NULL, appendLF=TRUE) { if (!is.call(tmp.message)) { base::message(tmp.message) } PrintLogMessage(tmp.message) invisible() } PrintLogMessage <- function(tmp.message, domain=NULL) { # print log message to file dir.create("Logs", showWarnings = FALSE) logfile <- paste("L...
# install required packages if (!require(ndtv)) { install.packages(ndtv) } if (!require(dplyr)) { install.packages(dplyr) } if (!require(dplyr)) { install.packages(tidyr) } # load required packages library(ndtv) library(dplyr) library(tidyr) # skills project_file = "projects.jl" # read the skills from...
/script.R
no_license
edeas123/dynamic-skills-visualization
R
false
false
3,633
r
# install required packages if (!require(ndtv)) { install.packages(ndtv) } if (!require(dplyr)) { install.packages(dplyr) } if (!require(dplyr)) { install.packages(tidyr) } # load required packages library(ndtv) library(dplyr) library(tidyr) # skills project_file = "projects.jl" # read the skills from...
getNullDistribution<-function(controldatafile,casedatafile,treefile,simulateddatafile,varnames,Merrorvarnames=NULL,outfile,directCompare=FALSE,IndepDiff=FALSE){ ## order of varnames and Merrorvarnames has to be the same load(simulateddatafile) ## the variable has to have a specific name!! numtraits<-ncol(lSimu...
/getNullDistribution.R
no_license
bioinfoxh/phylogenetic-based_multi-omic_approach
R
false
false
4,287
r
getNullDistribution<-function(controldatafile,casedatafile,treefile,simulateddatafile,varnames,Merrorvarnames=NULL,outfile,directCompare=FALSE,IndepDiff=FALSE){ ## order of varnames and Merrorvarnames has to be the same load(simulateddatafile) ## the variable has to have a specific name!! numtraits<-ncol(lSimu...
devsMPRP <- read.table("~/Documents/git/rupak/scripts/reports/devs_mp_rp.csv",header=T,sep=",") boxplot(devsMPRP$devs_mp, devsMPRP$devs_rp, names=c("Developers in MP","Developers in RP"))
/paper1/images/devsMPRPbox.r
no_license
tajmilur-rahman/SOEN691D
R
false
false
188
r
devsMPRP <- read.table("~/Documents/git/rupak/scripts/reports/devs_mp_rp.csv",header=T,sep=",") boxplot(devsMPRP$devs_mp, devsMPRP$devs_rp, names=c("Developers in MP","Developers in RP"))
context("Testing convert_date_cols") # Setup ------------------------------------------------------------------------ d <- data.frame( a_DTS = c("2018-3-25", "2018-3-26"), b_DTS = c("2018-03-25", "2018-03-26"), c_DTS = c("3-25-2018", "3-26-2018"), d_DTS = c("03-25-2018", "03-26-2018"), e_DTS = c("Mar 25 2018...
/tests/testthat/test-convert_dates.R
permissive
g3rley/healthcareai-r
R
false
false
3,709
r
context("Testing convert_date_cols") # Setup ------------------------------------------------------------------------ d <- data.frame( a_DTS = c("2018-3-25", "2018-3-26"), b_DTS = c("2018-03-25", "2018-03-26"), c_DTS = c("3-25-2018", "3-26-2018"), d_DTS = c("03-25-2018", "03-26-2018"), e_DTS = c("Mar 25 2018...
AF <- as.data.frame(Air_France_Case_Spreadsheet_Supplement) sum(AF$Amount) / sum(AF$`Total Cost`) ROA_Whole<-sum(AF$Amount) / sum(AF$`Total Cost`) Google_US_Cost <- sum(AF$`Total Cost`[which(AF$`Publisher Name`=="Google - US")]) Google_US_Revenue <- sum(AF$Amount[which(AF$`Publisher Name`=="Google - US")]) ...
/Wei_Quan_ROA.R
no_license
marcelotournier/air_france_business_case
R
false
false
7,284
r
AF <- as.data.frame(Air_France_Case_Spreadsheet_Supplement) sum(AF$Amount) / sum(AF$`Total Cost`) ROA_Whole<-sum(AF$Amount) / sum(AF$`Total Cost`) Google_US_Cost <- sum(AF$`Total Cost`[which(AF$`Publisher Name`=="Google - US")]) Google_US_Revenue <- sum(AF$Amount[which(AF$`Publisher Name`=="Google - US")]) ...
x <- function(y) y+10
/newfunction.R
no_license
kamthecham/FloodImpactResearch
R
false
false
22
r
x <- function(y) y+10
install.packages("shiny") install.packages("DT") install.packages("plotly") install.packages("wordcloud2") install.packages("tm") install.packages("crosstalk") install.packages("webshot") webshot::install_phantomjs() install.packages("tinytex") tinytex::install_tinytex() install.packages("wordcloud") install.packages("...
/Guide and installation/install.R
no_license
LeonMigu/Internship_Visua_Combine
R
false
false
447
r
install.packages("shiny") install.packages("DT") install.packages("plotly") install.packages("wordcloud2") install.packages("tm") install.packages("crosstalk") install.packages("webshot") webshot::install_phantomjs() install.packages("tinytex") tinytex::install_tinytex() install.packages("wordcloud") install.packages("...
\name{lympho} \alias{lympho} \docType{data} \title{Lymphography domian (lympho) data %% ~~ data name/kind ... ~~ } \description{ Classification data set from the UCI Machine Learning Repository %% ~~ A concise (1-5 lines) description of the dataset. ~~ } \usage{data("cancer")} \format{ The format of the data is a ...
/man/lympho.Rd
no_license
cran/EnsCat
R
false
false
946
rd
\name{lympho} \alias{lympho} \docType{data} \title{Lymphography domian (lympho) data %% ~~ data name/kind ... ~~ } \description{ Classification data set from the UCI Machine Learning Repository %% ~~ A concise (1-5 lines) description of the dataset. ~~ } \usage{data("cancer")} \format{ The format of the data is a ...
# message("This is the ReadVcf() R Server Script") message("Starting up") # Index Input option_list = list( optparse::make_option(c("--vcf_file"), type="character", default="No Default", help="The file to be read in (including .vcf file extension)",metavar = "character"), optparse::ma...
/pkg_VariantCallinginR/R_Server_Scripts/S_ReadVcf.R
no_license
DRemarque/VariantCallinginR
R
false
false
7,876
r
# message("This is the ReadVcf() R Server Script") message("Starting up") # Index Input option_list = list( optparse::make_option(c("--vcf_file"), type="character", default="No Default", help="The file to be read in (including .vcf file extension)",metavar = "character"), optparse::ma...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/regex.R \name{step_regex} \alias{step_regex} \alias{tidy.step_regex} \title{Create Dummy Variables using Regular Expressions} \usage{ step_regex( recipe, ..., role = "predictor", trained = FALSE, pattern = ".", options = list(), ...
/man/step_regex.Rd
no_license
juliasilge/recipes
R
false
true
3,198
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/regex.R \name{step_regex} \alias{step_regex} \alias{tidy.step_regex} \title{Create Dummy Variables using Regular Expressions} \usage{ step_regex( recipe, ..., role = "predictor", trained = FALSE, pattern = ".", options = list(), ...
library(dggridR) ### Name: dgQ2DD_to_PROJTRI ### Title: Convert from Q2DD to PROJTRI ### Aliases: dgQ2DD_to_PROJTRI ### ** Examples ## Not run: ##D library(dggridR) ##D dggs <- dgconstruct(res=20) ##D ##D dgQ2DD_to_PROJTRI(dggs, in_quad, in_qx, in_qy) ## End(Not run)
/data/genthat_extracted_code/dggridR/examples/dgQ2DD_to_PROJTRI.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
278
r
library(dggridR) ### Name: dgQ2DD_to_PROJTRI ### Title: Convert from Q2DD to PROJTRI ### Aliases: dgQ2DD_to_PROJTRI ### ** Examples ## Not run: ##D library(dggridR) ##D dggs <- dgconstruct(res=20) ##D ##D dgQ2DD_to_PROJTRI(dggs, in_quad, in_qx, in_qy) ## End(Not run)
library(dplyr) library(stringr) ################################################## P6A <- read.table("#6A_2017_May_test.csv", header = TRUE, sep = ",", stringsAsFactors = FALSE) P6B <- read.table("#6B_2017_May_test.csv", header = TRUE, sep = ",", stringsAsFactors = FALSE) ############################################...
/fixed.R
no_license
Jheng-Yi-Chen/TFE-1
R
false
false
5,663
r
library(dplyr) library(stringr) ################################################## P6A <- read.table("#6A_2017_May_test.csv", header = TRUE, sep = ",", stringsAsFactors = FALSE) P6B <- read.table("#6B_2017_May_test.csv", header = TRUE, sep = ",", stringsAsFactors = FALSE) ############################################...
structure(list(a = 1, b = "c"), class = "data.frame", row.names = c(NA, -1L))
/x.R
no_license
aKzango/datasciencecoursera
R
false
false
79
r
structure(list(a = 1, b = "c"), class = "data.frame", row.names = c(NA, -1L))
#install and load needed packages install.packages("ggplot2") install.packages('plyr') install.packages('tidyverse') install.packages("gridExtra") install.packages('psych') install.packages('ggmap') install.packages('GGally') install.packages('cdata') install.package('corrplot') library(tidyverse) library(plyr) librar...
/eda/cardio_train EDA.R
no_license
jsbernet/capstone_healthcare
R
false
false
14,308
r
#install and load needed packages install.packages("ggplot2") install.packages('plyr') install.packages('tidyverse') install.packages("gridExtra") install.packages('psych') install.packages('ggmap') install.packages('GGally') install.packages('cdata') install.package('corrplot') library(tidyverse) library(plyr) librar...
setwd('C:/GitHub/Power grid resilience/weather_data_from_darksky_api') # install.packages('darksky') library('darksky') library('tidyverse') #data soruce: https://darksky.net/dev/docs#time-machine-request #Reference: https://github.com/hrbrmstr/darksky # Apparent (feels-like) temperature # Atmospheric pressu...
/Scrape_weather_data_given_time_DarkskyAPI.R
no_license
jinzhuyu/ScrapeWeatherDataFromDarksky
R
false
false
8,670
r
setwd('C:/GitHub/Power grid resilience/weather_data_from_darksky_api') # install.packages('darksky') library('darksky') library('tidyverse') #data soruce: https://darksky.net/dev/docs#time-machine-request #Reference: https://github.com/hrbrmstr/darksky # Apparent (feels-like) temperature # Atmospheric pressu...
#################################### # Script do_any do_many # R version 4.1 .1 # modler version 0.0.1 #################################### ## Carregague as bibliotecas instaladas library(sp) library(modleR) library(raster) # Ao criar um projeto no Rstudio (e neste exemplo integrado ao Git e Github), o R já entende ...
/R/2-Scripts_ENMs_SDMs_atualizado/2_ do_any_do_many.R
no_license
mlbazante/projeto_2
R
false
false
2,970
r
#################################### # Script do_any do_many # R version 4.1 .1 # modler version 0.0.1 #################################### ## Carregague as bibliotecas instaladas library(sp) library(modleR) library(raster) # Ao criar um projeto no Rstudio (e neste exemplo integrado ao Git e Github), o R já entende ...
if(!require(dplyr)){ install.packages('dplyr') library(dplyr) } if(!require(data.table)){ install.packages('data.table') library(data.table) } if(!require(zoo)){ install.packages('zoo') library(zoo) } if(!require(ggplot2)){ install.packages('ggplot2') library(ggplot2) } if(!req...
/HPI_FRE/FRE_State_HPI_Map.R
no_license
stuartiquinn/Housing_Analysis
R
false
false
7,508
r
if(!require(dplyr)){ install.packages('dplyr') library(dplyr) } if(!require(data.table)){ install.packages('data.table') library(data.table) } if(!require(zoo)){ install.packages('zoo') library(zoo) } if(!require(ggplot2)){ install.packages('ggplot2') library(ggplot2) } if(!req...
\name{plot.quadrattest} \alias{plot.quadrattest} \title{ Display the result of a quadrat counting test. } \description{ Given the result of a quadrat counting test, graphically display the quadrats that were used, the observed and expected counts, and the residual in each quadrat. } \usage{ \method{plot}{quad...
/man/plot.quadrattest.Rd
no_license
cuulee/spatstat
R
false
false
1,733
rd
\name{plot.quadrattest} \alias{plot.quadrattest} \title{ Display the result of a quadrat counting test. } \description{ Given the result of a quadrat counting test, graphically display the quadrats that were used, the observed and expected counts, and the residual in each quadrat. } \usage{ \method{plot}{quad...
.dashTrichComponents_js_metadata <- function() { deps_metadata <- list(`dash_trich_components` = structure(list(name = "dash_trich_components", version = "0.0.8", src = list(href = NULL, file = "deps"), meta = NULL, script = 'dash_trich_components.min.js', stylesheet = NULL, head = NULL, attachment = NULL, package = "d...
/R/internal.R
no_license
pkozilekmm/dash_trich_components
R
false
false
751
r
.dashTrichComponents_js_metadata <- function() { deps_metadata <- list(`dash_trich_components` = structure(list(name = "dash_trich_components", version = "0.0.8", src = list(href = NULL, file = "deps"), meta = NULL, script = 'dash_trich_components.min.js', stylesheet = NULL, head = NULL, attachment = NULL, package = "d...
suppressPackageStartupMessages(c( library(shinythemes), library(shiny), library(tm), library(stringr), library(markdown), library(stylo))) shinyUI(navbarPage("Coursera DS-JHU Capstone", theme = shinytheme("flatly"), ...
/Final-Submission/ui.R
no_license
parthashazra/Capstone-Master
R
false
false
1,520
r
suppressPackageStartupMessages(c( library(shinythemes), library(shiny), library(tm), library(stringr), library(markdown), library(stylo))) shinyUI(navbarPage("Coursera DS-JHU Capstone", theme = shinytheme("flatly"), ...
######################################################################### ## Here Try different initial values and different longer chains ## to show that my MCMC estimation methods work well ############################################################################ ############################# SARH #####...
/SARH_test.R
no_license
xinjunlyu/A-Spacial-Autoregressive-Stochastic-FrontierModel-with-Inefficiency-Heterogeneity-for-PanelData
R
false
false
14,302
r
######################################################################### ## Here Try different initial values and different longer chains ## to show that my MCMC estimation methods work well ############################################################################ ############################# SARH #####...
# Install all required packages for this example required_packages <- c("bayesplot", "brms", "cowplot", "data.table", "dplyr", "ggplot2", "ggridges", "reshape2", "rstan", "stringr", "tidybayes") installed_packages <- installed.packages()[,1] to_install <- setdiff(required_...
/R/install.R
permissive
rmit-ir/bayesian-shallow
R
false
false
549
r
# Install all required packages for this example required_packages <- c("bayesplot", "brms", "cowplot", "data.table", "dplyr", "ggplot2", "ggridges", "reshape2", "rstan", "stringr", "tidybayes") installed_packages <- installed.packages()[,1] to_install <- setdiff(required_...
c DCNF-Autarky [version 0.0.1]. c Copyright (c) 2018-2019 Swansea University. c c Input Clause Count: 5 c Performing E1-Autarky iteration. c Remaining clauses count after E-Reduction: 5 c c Input Parameter (command line, file): c input filename QBFLIB/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/query07...
/code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/query07_falsequ_1344/query07_falsequ_1344.R
no_license
arey0pushpa/dcnf-autarky
R
false
false
683
r
c DCNF-Autarky [version 0.0.1]. c Copyright (c) 2018-2019 Swansea University. c c Input Clause Count: 5 c Performing E1-Autarky iteration. c Remaining clauses count after E-Reduction: 5 c c Input Parameter (command line, file): c input filename QBFLIB/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/query07...
# server.R # library(shiny) library(tm) library(hash) library(grDevices) library(dplyr) library(devtools) #set working directory #setwd('C:\\Users\\lisar\\Documents\\R\\Coursera-SwiftKey\\final\\en_US\\LHR_Pub') #function sources source("./clean_Functions.R", local = TRUE) source("./transformation_Functions.R", l...
/server.R
no_license
lhr2/TestProject
R
false
false
1,635
r
# server.R # library(shiny) library(tm) library(hash) library(grDevices) library(dplyr) library(devtools) #set working directory #setwd('C:\\Users\\lisar\\Documents\\R\\Coursera-SwiftKey\\final\\en_US\\LHR_Pub') #function sources source("./clean_Functions.R", local = TRUE) source("./transformation_Functions.R", l...
require(shiny) require(ggvis) require(magrittr) options("scipen"=100, "digits"=4) data(mtcars) #Convert factor variables into factors mtcars$cyl <- as.factor(mtcars$cyl) #4, 6 or 8 mtcars$vs <- as.factor(mtcars$vs) #0- V engine or 1= straight engine. mtcars$am <- as.factor(mtcars$am) #0 - automatic and 1 - gear mtcar...
/DevelopingDataProducts/MPGPredictor/server.R
no_license
jonimatix/datasciencecoursera-1
R
false
false
1,882
r
require(shiny) require(ggvis) require(magrittr) options("scipen"=100, "digits"=4) data(mtcars) #Convert factor variables into factors mtcars$cyl <- as.factor(mtcars$cyl) #4, 6 or 8 mtcars$vs <- as.factor(mtcars$vs) #0- V engine or 1= straight engine. mtcars$am <- as.factor(mtcars$am) #0 - automatic and 1 - gear mtcar...
library(ape) testtree <- read.tree("4364_0.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="4364_0_unrooted.txt")
/codeml_files/newick_trees_processed/4364_0/rinput.R
no_license
DaniBoo/cyanobacteria_project
R
false
false
135
r
library(ape) testtree <- read.tree("4364_0.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="4364_0_unrooted.txt")
library(tidyverse) library(sf) library(covidtwitterbot) # pour shp_water # Input : Shapefile "Centres de services scolaires francophones (SDA)" shapefile https://www.donneesquebec.ca/recherche/dataset/territoires-des-commissions-scolaires-du-quebec/resource/4cd70cc8-2663-4f10-bfce-bb46f62a77da # shapefile css shp_arr...
/data-raw/shp_mtl.R
permissive
SimonCoulombe/covidtwitterbot
R
false
false
2,113
r
library(tidyverse) library(sf) library(covidtwitterbot) # pour shp_water # Input : Shapefile "Centres de services scolaires francophones (SDA)" shapefile https://www.donneesquebec.ca/recherche/dataset/territoires-des-commissions-scolaires-du-quebec/resource/4cd70cc8-2663-4f10-bfce-bb46f62a77da # shapefile css shp_arr...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/documentation.R \docType{data} \name{example_psi} \alias{example_psi} \title{Example PSI} \format{ A data frame } \usage{ example_psi } \description{ Example of PSI data } \keyword{datasets}
/man/example_psi.Rd
no_license
codeclan/CodeClanData
R
false
true
269
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/documentation.R \docType{data} \name{example_psi} \alias{example_psi} \title{Example PSI} \format{ A data frame } \usage{ example_psi } \description{ Example of PSI data } \keyword{datasets}
require(xgboost) require(Matrix) require(data.table) options(max.print=1000000000) #The parameters XGBoost will test on df_test <- read.csv("f1Testfixed.csv", header = TRUE) df <- data.table(df_test, keep.rownames = F) sparse_matrix <- sparse.model.matrix(~.-1 ,data = df) #The parameters XGBoost will learn from df_tr...
/XGBoostTitanic.R
no_license
roushrsh/KaggleTitanic
R
false
false
1,242
r
require(xgboost) require(Matrix) require(data.table) options(max.print=1000000000) #The parameters XGBoost will test on df_test <- read.csv("f1Testfixed.csv", header = TRUE) df <- data.table(df_test, keep.rownames = F) sparse_matrix <- sparse.model.matrix(~.-1 ,data = df) #The parameters XGBoost will learn from df_tr...
library(polychaosbasics) ### Name: polychaosbasics-package ### Title: Sensitivity Indexes Calculated from Polynomial Chaos Expansions ### Aliases: polychaosbasics-package polychaosbasics ### Keywords: package regression ### ** Examples # First example: # the dataset is simulated by using the Ishigami function nlhs...
/data/genthat_extracted_code/polychaosbasics/examples/polychaosbasics-package.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
1,489
r
library(polychaosbasics) ### Name: polychaosbasics-package ### Title: Sensitivity Indexes Calculated from Polynomial Chaos Expansions ### Aliases: polychaosbasics-package polychaosbasics ### Keywords: package regression ### ** Examples # First example: # the dataset is simulated by using the Ishigami function nlhs...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/macie2_operations.R \name{macie2_update_classification_job} \alias{macie2_update_classification_job} \title{Changes the status of a classification job} \usage{ macie2_update_classification_job(jobId, jobStatus) } \arguments{ \item{jobId}{[req...
/paws/man/macie2_update_classification_job.Rd
permissive
sanchezvivi/paws
R
false
true
2,070
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/macie2_operations.R \name{macie2_update_classification_job} \alias{macie2_update_classification_job} \title{Changes the status of a classification job} \usage{ macie2_update_classification_job(jobId, jobStatus) } \arguments{ \item{jobId}{[req...
testlist <- list(lims = structure(0, .Dim = c(1L, 1L)), points = structure(c(1.29549941127325e-318, 1.95850479489951e+179, 2.08227334401466e+262, 1.15963946977146e-152, 8.10541286676906e+228, 5.71229768251201e+151, 1.39137526939423e+93, 1.41050742846599e+248, 2.32159105515088e-152, 1.333811262027e+243, 0, 0, 0, 0, ...
/palm/inst/testfiles/pbc_distances/libFuzzer_pbc_distances/pbc_distances_valgrind_files/1612988390-test.R
no_license
akhikolla/updatedatatype-list2
R
false
false
412
r
testlist <- list(lims = structure(0, .Dim = c(1L, 1L)), points = structure(c(1.29549941127325e-318, 1.95850479489951e+179, 2.08227334401466e+262, 1.15963946977146e-152, 8.10541286676906e+228, 5.71229768251201e+151, 1.39137526939423e+93, 1.41050742846599e+248, 2.32159105515088e-152, 1.333811262027e+243, 0, 0, 0, 0, ...
rm(list=ls()) outFile='' parSampleFile1='fileList1.txt' parSampleFile2='fileList2.txt' parSampleFile3='' parSampleFile4='fileList4.txt' parFile1='' parFile2='' parFile3='' parFile4='/home/shengq2/program/RaviMartyLarsonCoefs/20230526_mona_rnaseq/20230526_meta.tsv' outputPdf<-FALSE;outputPng<-TRUE;outputTIFF<-FALSE;sho...
/lib/CQS/countTableGroupCorrelation.R
permissive
shengqh/ngsperl
R
false
false
29,241
r
rm(list=ls()) outFile='' parSampleFile1='fileList1.txt' parSampleFile2='fileList2.txt' parSampleFile3='' parSampleFile4='fileList4.txt' parFile1='' parFile2='' parFile3='' parFile4='/home/shengq2/program/RaviMartyLarsonCoefs/20230526_mona_rnaseq/20230526_meta.tsv' outputPdf<-FALSE;outputPng<-TRUE;outputTIFF<-FALSE;sho...