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
options(scipen=999) rm(list=ls()) setwd("C:/Users/Royka/Documents/IDC/practicum") train <- read.csv("train.csv",header = T) test <- read.csv("test.csv",header = T) dim(train) names(train) str(train) summary(train$LotArea) summary(train$Neighborhood) summary(train$SalePrice) table(train$Neighborhood) prop.table(table...
/r.r
no_license
roykroy10/practicum
R
false
false
13,278
r
options(scipen=999) rm(list=ls()) setwd("C:/Users/Royka/Documents/IDC/practicum") train <- read.csv("train.csv",header = T) test <- read.csv("test.csv",header = T) dim(train) names(train) str(train) summary(train$LotArea) summary(train$Neighborhood) summary(train$SalePrice) table(train$Neighborhood) prop.table(table...
## Exploratory Data Analysis - Week 1 Course Project ## Get dataset filename <- "household_power_consumption.txt" hpc <- read.table(text = grep("^[1,2]/2/2007", readLines(filename), value = TRUE), header = TRUE, sep = ";", col.names = c("Date", "Time", "Global_...
/plot4.R
no_license
iguedelafuente/EDA-Project
R
false
false
1,633
r
## Exploratory Data Analysis - Week 1 Course Project ## Get dataset filename <- "household_power_consumption.txt" hpc <- read.table(text = grep("^[1,2]/2/2007", readLines(filename), value = TRUE), header = TRUE, sep = ";", col.names = c("Date", "Time", "Global_...
#' load_genelist #' #' \code{load_genelist} Loads a gene list from a file #' #' Expects the first line to be descriptive #' #' @param list_path Folder where it is stored #' @param lookuptable Dataframe containing HGNC.symbol and MGI.symbol as columns #' @param speciesWanted Either 'human' or 'mouse' #' @return res Res...
/R/load_genelist.r
no_license
NathanSkene/DendriticEnrichmentPackage
R
false
false
1,759
r
#' load_genelist #' #' \code{load_genelist} Loads a gene list from a file #' #' Expects the first line to be descriptive #' #' @param list_path Folder where it is stored #' @param lookuptable Dataframe containing HGNC.symbol and MGI.symbol as columns #' @param speciesWanted Either 'human' or 'mouse' #' @return res Res...
# Fragile States Index visualization ----------------------------------------- # # fragilestates_overlap.R: script to visualize three classifications of fragile states # # Geo data from Natural Earth: http://www.naturalearthdata.com/downloads/10m-cultural-vectors/ # # Laura Hughes, lhughes@usaid.gov, 6 October 2016 # w...
/fragilestates/03_fragilestates_maps.R
permissive
flaneuse/Misc.-projects
R
false
false
18,087
r
# Fragile States Index visualization ----------------------------------------- # # fragilestates_overlap.R: script to visualize three classifications of fragile states # # Geo data from Natural Earth: http://www.naturalearthdata.com/downloads/10m-cultural-vectors/ # # Laura Hughes, lhughes@usaid.gov, 6 October 2016 # w...
# this is R script to analyze EDX data of GBS. # start with a long format which contains raw NCS data of an individual. # convert the raw values into the percentage values relative to upper/lower limits of normal values. # i will later develop a script for interpretation based on several published criteria, # and...
/r2p.R
no_license
yoonhohong/GBS
R
false
false
2,250
r
# this is R script to analyze EDX data of GBS. # start with a long format which contains raw NCS data of an individual. # convert the raw values into the percentage values relative to upper/lower limits of normal values. # i will later develop a script for interpretation based on several published criteria, # and...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/lda.R \name{plotLDA} \alias{plotLDA} \title{Plots LDA} \usage{ plotLDA( df = NULL, id = NULL, label_scheme_sub = NULL, type = "obs", dimension = 2, folds = 1, show_ids = TRUE, show_ellipses = FALSE, col_group = NULL, col_c...
/man/plotLDA.Rd
permissive
sailfish009/proteoQ
R
false
true
8,022
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/lda.R \name{plotLDA} \alias{plotLDA} \title{Plots LDA} \usage{ plotLDA( df = NULL, id = NULL, label_scheme_sub = NULL, type = "obs", dimension = 2, folds = 1, show_ids = TRUE, show_ellipses = FALSE, col_group = NULL, col_c...
##JHU R Programming Assignment #2 ##Gareth James Briggs ##March 2020 ## These functions enable the calculation of the inverse of a matrix and the inverse's caching. ## The inverse need not be calculated again following the input of the same matrix, it can be ## retrieved from cache. ## makeCacheMatrix function cre...
/cachematrix.R
no_license
GarethJBriggs/ProgrammingAssignment2
R
false
false
2,255
r
##JHU R Programming Assignment #2 ##Gareth James Briggs ##March 2020 ## These functions enable the calculation of the inverse of a matrix and the inverse's caching. ## The inverse need not be calculated again following the input of the same matrix, it can be ## retrieved from cache. ## makeCacheMatrix function cre...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cognitoidentityprovider_operations.R \name{cognitoidentityprovider_delete_user} \alias{cognitoidentityprovider_delete_user} \title{Allows a user to delete himself or herself} \usage{ cognitoidentityprovider_delete_user(AccessToken) } \argumen...
/cran/paws.security.identity/man/cognitoidentityprovider_delete_user.Rd
permissive
paws-r/paws
R
false
true
639
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cognitoidentityprovider_operations.R \name{cognitoidentityprovider_delete_user} \alias{cognitoidentityprovider_delete_user} \title{Allows a user to delete himself or herself} \usage{ cognitoidentityprovider_delete_user(AccessToken) } \argumen...
library(dslabs) data("heights") y <- heights$height #set.seed(2) #if you are using R 3.5 or earlier set.seed(2, sample.kind = "Rounding") #if you are using R 3.6 or later test_index <- createDataPartition(y, times = 1, p = 0.5, list = FALSE) train_set <- heights %>% slice(-test_index) test_set <- heights %>% slice(te...
/Section3_ML_1_RegressionCategorical.R
no_license
jithin-nair/DS_ML
R
false
false
1,553
r
library(dslabs) data("heights") y <- heights$height #set.seed(2) #if you are using R 3.5 or earlier set.seed(2, sample.kind = "Rounding") #if you are using R 3.6 or later test_index <- createDataPartition(y, times = 1, p = 0.5, list = FALSE) train_set <- heights %>% slice(-test_index) test_set <- heights %>% slice(te...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pof_cables_20_10_04kv.R \name{pof_cables_20_10_04kv} \alias{pof_cables_20_10_04kv} \title{Current Probability of Failure for 20/10/0.4kV cables} \source{ DNO Common Network Asset Indices Methodology (CNAIM), Health & Criticality - Version 1.1...
/man/pof_cables_20_10_04kv.Rd
permissive
scoultersdcoe/CNAIM
R
false
true
3,579
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pof_cables_20_10_04kv.R \name{pof_cables_20_10_04kv} \alias{pof_cables_20_10_04kv} \title{Current Probability of Failure for 20/10/0.4kV cables} \source{ DNO Common Network Asset Indices Methodology (CNAIM), Health & Criticality - Version 1.1...
workdir=("F:\\r.python\\r_workingdirectory\\data") setwd(workdir) hosp_data=read.csv("F:\\r.python\\r_workingdirectory\\data\\CaliforniaHospitalData.csv",header=T,sep=",") emp_data=read.table("F:\\r.python\\r_workingdirectory\\data\\CaliforniaHospitalData_Personnel.txt",header=T,sep="\t") hosp_data emp_data h...
/THA02_mehar_nikhil.R
no_license
nikhilmehar/Arrrrrr
R
false
false
3,164
r
workdir=("F:\\r.python\\r_workingdirectory\\data") setwd(workdir) hosp_data=read.csv("F:\\r.python\\r_workingdirectory\\data\\CaliforniaHospitalData.csv",header=T,sep=",") emp_data=read.table("F:\\r.python\\r_workingdirectory\\data\\CaliforniaHospitalData_Personnel.txt",header=T,sep="\t") hosp_data emp_data h...
## Put comments here that give an overall description of what your ## functions do ## Write a short comment describing this function makeCacheMatrix <- function(x = matrix()) { xinv <- NULL set <- function(y) { x <<- y xinv <<- NULL } get <- function() { return(x) } setInverse <- function(inverse) { ...
/cachematrix.R
no_license
amb23/ProgrammingAssignment2
R
false
false
802
r
## Put comments here that give an overall description of what your ## functions do ## Write a short comment describing this function makeCacheMatrix <- function(x = matrix()) { xinv <- NULL set <- function(y) { x <<- y xinv <<- NULL } get <- function() { return(x) } setInverse <- function(inverse) { ...
1 - pnorm(84, mean = 69, sd = 3)
/edX/DS Visualization/Normal Distributions/Ex4 Compute proportion.R
no_license
shinichimatsuda/R_Training
R
false
false
33
r
1 - pnorm(84, mean = 69, sd = 3)
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ti_monocle.R, R/ti_container.R \name{ti_monocle_ddrtree} \alias{ti_monocle_ddrtree} \alias{ti_monocle_ddrtree} \title{Inferring trajectories with Monocle v2} \usage{ ti_monocle_ddrtree(docker = dynwrap::test_docker_installation(), reduction...
/man/ti_monocle_ddrtree.Rd
no_license
ManuSetty/dynmethods
R
false
true
2,057
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ti_monocle.R, R/ti_container.R \name{ti_monocle_ddrtree} \alias{ti_monocle_ddrtree} \alias{ti_monocle_ddrtree} \title{Inferring trajectories with Monocle v2} \usage{ ti_monocle_ddrtree(docker = dynwrap::test_docker_installation(), reduction...
library(ape) testtree <- read.tree("5112_0.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="5112_0_unrooted.txt")
/codeml_files/newick_trees_processed/5112_0/rinput.R
no_license
DaniBoo/cyanobacteria_project
R
false
false
135
r
library(ape) testtree <- read.tree("5112_0.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="5112_0_unrooted.txt")
## These set of functions demonstrate the Scoping features of R ## Every function in R run in their own unique "environment". Using this feature, ## objects can be cached in one env and called from another env. ## Assignment 2 is to "cache" the inverse of a matrix in a functions scope and use it ## by accessing it fr...
/cachematrix.R
no_license
misal6/ProgrammingAssignment2
R
false
false
2,026
r
## These set of functions demonstrate the Scoping features of R ## Every function in R run in their own unique "environment". Using this feature, ## objects can be cached in one env and called from another env. ## Assignment 2 is to "cache" the inverse of a matrix in a functions scope and use it ## by accessing it fr...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/bio_funs.R \name{bio_rename} \alias{bio_rename} \title{Rename all but first column Useful for changing a single name in a tidyverse sentence} \usage{ bio_rename(sett, namevec) } \arguments{ \item{sett}{data.frame} \item{namevec}{new names, m...
/man/bio_rename.Rd
no_license
CelMcC/UKBTools
R
false
true
482
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/bio_funs.R \name{bio_rename} \alias{bio_rename} \title{Rename all but first column Useful for changing a single name in a tidyverse sentence} \usage{ bio_rename(sett, namevec) } \arguments{ \item{sett}{data.frame} \item{namevec}{new names, m...
# Factor P1 P2 P3 Goal Units penalty # Profit 20 15 25 Max Millions/$ 1 # Emp Lev 6 4 5 = 50 employees -6 # Earnings 8 7 5 >= 75 Millions/$ -3 # 20x1 + 15x2 + 25x3 >= 75 # 6x1 + 4x2 + 5x3 = 50 # ...
/810831824_8.R
no_license
sean-delo/KSU_QUANT_MANAGEMENT_MODELING
R
false
false
1,003
r
# Factor P1 P2 P3 Goal Units penalty # Profit 20 15 25 Max Millions/$ 1 # Emp Lev 6 4 5 = 50 employees -6 # Earnings 8 7 5 >= 75 Millions/$ -3 # 20x1 + 15x2 + 25x3 >= 75 # 6x1 + 4x2 + 5x3 = 50 # ...
#' Standard server function for a Little App #' #' This function provides the standard set of services for a Little App #' #' #' @details The argument `V` is a reactive value created *outside* of this function. #' It holds the state which is the main means of communication among the controls #' and the output displays....
/R/standard_littleapp_server.R
no_license
StatPREP/LittleApps
R
false
false
2,586
r
#' Standard server function for a Little App #' #' This function provides the standard set of services for a Little App #' #' #' @details The argument `V` is a reactive value created *outside* of this function. #' It holds the state which is the main means of communication among the controls #' and the output displays....
subroutine inftrd (inftrn) implicit integer*4 (i-n) #ccc version date: 06/01/83 #ccc author(s): Roger Clark & Jeff Hoover #ccc language: Ratfor #ccc #ccc short description: #ccc This subroutine does file display, transfer, and #ccc overlay #ccc algorithm description: no...
/src-local/specpr/src.specpr/dtol/inftrn.r
no_license
ns-bak/tetracorder-tutorial
R
false
false
1,966
r
subroutine inftrd (inftrn) implicit integer*4 (i-n) #ccc version date: 06/01/83 #ccc author(s): Roger Clark & Jeff Hoover #ccc language: Ratfor #ccc #ccc short description: #ccc This subroutine does file display, transfer, and #ccc overlay #ccc algorithm description: no...
#' Update a package's metadata #' #' @export #' @param x (list) A list with key-value pairs #' @param id (character) Resource ID to update (required) #' @template args #' @template key #' @examples \dontrun{ #' # Setup #' ckanr_setup(url = "http://demo.ckan.org", key = getOption("ckan_demo_key")) #' #' # Create a packa...
/R/package_patch.R
permissive
wush978/ckanr
R
false
false
1,009
r
#' Update a package's metadata #' #' @export #' @param x (list) A list with key-value pairs #' @param id (character) Resource ID to update (required) #' @template args #' @template key #' @examples \dontrun{ #' # Setup #' ckanr_setup(url = "http://demo.ckan.org", key = getOption("ckan_demo_key")) #' #' # Create a packa...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/import_CSDR_Detailed_Definitions.R \docType{data} \name{detailed_defs} \alias{detailed_defs} \title{CSDR Detailed Definitions} \format{A tibble of factors with 93 rows and 8 columns: \describe{ \item{\code{Short Name}}{\code{Definition of Sho...
/man/detailed_defs.Rd
no_license
daniel-r-germony/dstCSDR
R
false
true
21,276
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/import_CSDR_Detailed_Definitions.R \docType{data} \name{detailed_defs} \alias{detailed_defs} \title{CSDR Detailed Definitions} \format{A tibble of factors with 93 rows and 8 columns: \describe{ \item{\code{Short Name}}{\code{Definition of Sho...
### Build the best lesion model possible ### Find the best based on Jenna Wiens suggestions on test and training ## Marc Sze #Load needed libraries source('code/functions.R') loadLibs(c("dplyr", "caret","scales", "doMC")) # Read in necessary data frames shared <- read.delim('data/process/final.0.03.subsa...
/code/old/setup_RF_test.R
permissive
SchlossLab/Sze_FollowUps_Microbiome_2017
R
false
false
4,233
r
### Build the best lesion model possible ### Find the best based on Jenna Wiens suggestions on test and training ## Marc Sze #Load needed libraries source('code/functions.R') loadLibs(c("dplyr", "caret","scales", "doMC")) # Read in necessary data frames shared <- read.delim('data/process/final.0.03.subsa...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ec2_operations.R \name{ec2_enable_vpc_classic_link} \alias{ec2_enable_vpc_classic_link} \title{Enables a VPC for ClassicLink} \usage{ ec2_enable_vpc_classic_link(DryRun, VpcId) } \arguments{ \item{DryRun}{Checks whether you have the required ...
/cran/paws.compute/man/ec2_enable_vpc_classic_link.Rd
permissive
TWarczak/paws
R
false
true
1,427
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ec2_operations.R \name{ec2_enable_vpc_classic_link} \alias{ec2_enable_vpc_classic_link} \title{Enables a VPC for ClassicLink} \usage{ ec2_enable_vpc_classic_link(DryRun, VpcId) } \arguments{ \item{DryRun}{Checks whether you have the required ...
/R/aula-09-scripts.R
no_license
melchiadesblanco/CID23_Estatistica_Introducao_a_R
R
false
false
2,264
r
TotalCount=857331 Period(ms)=92491 Throughput(ops/sec)=9269,35 Min=161 Mean=669,83 50.000ptile=279 90.000ptile=366 99.000ptile=18703 99.900ptile=44959 99.990ptile=63167 99.999ptile=71487 Max=73087 0,0,0,0,000000 1,0,0,0,000000 2,0,0,0,000000 3,0,0,0,000000 4,0,0,0,000000 5,0,0,0,000000 6,0,0,0,000000 7,0,0,0,000000 8,0...
/all_data/rd/cperf1/Oracle_check_1/300_400_d-2016.06.22-17.21.10-ycsb-run-READ.rd
no_license
rykachevskiy/azul-results
R
false
false
200,775
rd
TotalCount=857331 Period(ms)=92491 Throughput(ops/sec)=9269,35 Min=161 Mean=669,83 50.000ptile=279 90.000ptile=366 99.000ptile=18703 99.900ptile=44959 99.990ptile=63167 99.999ptile=71487 Max=73087 0,0,0,0,000000 1,0,0,0,000000 2,0,0,0,000000 3,0,0,0,000000 4,0,0,0,000000 5,0,0,0,000000 6,0,0,0,000000 7,0,0,0,000000 8,0...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/animint.R \name{animint2dir} \alias{animint} \alias{animint2dir} \title{Compile and render an animint in a local directory} \usage{ animint2dir(plot.list, out.dir = tempfile(), json.file = "plot.json", open.browser = interactive(), css.file...
/man/animint2dir.Rd
no_license
viswaraavi/animint
R
false
true
6,050
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/animint.R \name{animint2dir} \alias{animint} \alias{animint2dir} \title{Compile and render an animint in a local directory} \usage{ animint2dir(plot.list, out.dir = tempfile(), json.file = "plot.json", open.browser = interactive(), css.file...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/superApply.R \name{getPartitionIndeces} \alias{getPartitionIndeces} \title{Helper of superApply} \usage{ getPartitionIndeces(x, tasks = tasks) } \description{ Creates a list with slots, containing the start and end indeces corresponding to ...
/man/getPartitionIndeces.Rd
no_license
pablo-gar/rSubmitter
R
false
true
558
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/superApply.R \name{getPartitionIndeces} \alias{getPartitionIndeces} \title{Helper of superApply} \usage{ getPartitionIndeces(x, tasks = tasks) } \description{ Creates a list with slots, containing the start and end indeces corresponding to ...
library(GetoptLong) library(GlobalOptions) library(parallel) library(ComplexHeatmap) library(EnrichedHeatmap) library(matrixStats) library(GenomeInfoDb) library(epik.Gviz) library(HilbertCurve) library(gtrellis) library(numbers) library(ggplot2) library(Rcpp) library(memoise) library(RColorBrewer) library(grid) libr...
/load.R
no_license
jokergoo/epik
R
false
false
850
r
library(GetoptLong) library(GlobalOptions) library(parallel) library(ComplexHeatmap) library(EnrichedHeatmap) library(matrixStats) library(GenomeInfoDb) library(epik.Gviz) library(HilbertCurve) library(gtrellis) library(numbers) library(ggplot2) library(Rcpp) library(memoise) library(RColorBrewer) library(grid) libr...
library(tiledb) ## trying to mimick the simple variable length char domain unit test ## based the C++ API test ## Name of the array to create. array_name <- "ex_5" ## Path is either current directory, or a local config value is found uri <- file.path(getOption("TileDB_Data_Path", "."), array_name) create <- functio...
/tiledb/inst/examples/ex_5.R
permissive
akhikolla/TestedPackages-NoIssues
R
false
false
1,869
r
library(tiledb) ## trying to mimick the simple variable length char domain unit test ## based the C++ API test ## Name of the array to create. array_name <- "ex_5" ## Path is either current directory, or a local config value is found uri <- file.path(getOption("TileDB_Data_Path", "."), array_name) create <- functio...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/youtube_objects.R \name{WatchSettings} \alias{WatchSettings} \title{WatchSettings Object} \usage{ WatchSettings(backgroundColor = NULL, featuredPlaylistId = NULL, textColor = NULL) } \arguments{ \item{backgroundColor}{The text color for the...
/googleyoutubev3.auto/man/WatchSettings.Rd
permissive
GVersteeg/autoGoogleAPI
R
false
true
744
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/youtube_objects.R \name{WatchSettings} \alias{WatchSettings} \title{WatchSettings Object} \usage{ WatchSettings(backgroundColor = NULL, featuredPlaylistId = NULL, textColor = NULL) } \arguments{ \item{backgroundColor}{The text color for the...
context("test-gill09_harmonicity") test_that("regression tests: dyads", { df <- read.csv(system.file("reformatted-data/dyads.csv", package = "bowl18"), stringsAsFactors = FALSE) chords <- purrr::pmap(list(df$pc_1, df$pc_2), ~ hrep::pi_chord(c(..1, ..2))) for (i in seq_along(chords)) { expec...
/tests/testthat/test-bowl18_harmonicity.R
permissive
pmcharrison/bowl18
R
false
false
1,446
r
context("test-gill09_harmonicity") test_that("regression tests: dyads", { df <- read.csv(system.file("reformatted-data/dyads.csv", package = "bowl18"), stringsAsFactors = FALSE) chords <- purrr::pmap(list(df$pc_1, df$pc_2), ~ hrep::pi_chord(c(..1, ..2))) for (i in seq_along(chords)) { expec...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/analysis_diffSplicing.R \name{singleDiffAnalyses} \alias{singleDiffAnalyses} \title{Perform statistical analysis on a given splicing event} \usage{ singleDiffAnalyses(vector, group, threshold = 1, step = 100, analyses = c("wilcoxRankSum", "...
/man/singleDiffAnalyses.Rd
no_license
IlyaFinkelshteyn/psichomics
R
false
true
1,262
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/analysis_diffSplicing.R \name{singleDiffAnalyses} \alias{singleDiffAnalyses} \title{Perform statistical analysis on a given splicing event} \usage{ singleDiffAnalyses(vector, group, threshold = 1, step = 100, analyses = c("wilcoxRankSum", "...
#' Get information about the gene set #' @description Navigates to the relevant web page about the molecular signature #' @param Msig name of the molecular signature #' @param species Species that the signature belongs to #' @export getMSigInfo = function(Msig,species){ link = paste0("https://www.gsea-msigdb.org/gs...
/R/getMSigInfo.R
permissive
oganm/MSigDB
R
false
false
519
r
#' Get information about the gene set #' @description Navigates to the relevant web page about the molecular signature #' @param Msig name of the molecular signature #' @param species Species that the signature belongs to #' @export getMSigInfo = function(Msig,species){ link = paste0("https://www.gsea-msigdb.org/gs...
## File Name: lsem_permutationTest_define_exported_objects.R ## File Version: 0.105 lsem_permutationTest_define_exported_objects <- function() { varlist <- c('arglist', 'lsem_permutationTest_collect_output') return(varlist) }
/R/lsem_permutationTest_define_exported_objects.R
no_license
cran/sirt
R
false
false
243
r
## File Name: lsem_permutationTest_define_exported_objects.R ## File Version: 0.105 lsem_permutationTest_define_exported_objects <- function() { varlist <- c('arglist', 'lsem_permutationTest_collect_output') return(varlist) }
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/use_r_hub.R \name{use_r_hub} \alias{use_r_hub} \title{Use an ignored \code{rhub.R} file} \usage{ use_r_hub(save_as = "rhub.R", open = is_interactive()) } \arguments{ \item{save_as}{Path of file to create, relative to root of active project. D...
/man/use_r_hub.Rd
permissive
emptyfield-ds/opensky
R
false
true
558
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/use_r_hub.R \name{use_r_hub} \alias{use_r_hub} \title{Use an ignored \code{rhub.R} file} \usage{ use_r_hub(save_as = "rhub.R", open = is_interactive()) } \arguments{ \item{save_as}{Path of file to create, relative to root of active project. D...
#!/usr/bin/env Rscript library(opal) options(opal.username='administrator', opal.password='password', opal.url='https://opal-demo.obiba.org') fnac <- "FNAC.FNAC" options(verbose=FALSE) # # start a Datashield session # o <- opal.login() rid <- datashield.assign(o,"D",fnac, async=TRUE, wait=FALSE)...
/inst/examples/datashield-commands.R
no_license
IulianD/opal
R
false
false
3,059
r
#!/usr/bin/env Rscript library(opal) options(opal.username='administrator', opal.password='password', opal.url='https://opal-demo.obiba.org') fnac <- "FNAC.FNAC" options(verbose=FALSE) # # start a Datashield session # o <- opal.login() rid <- datashield.assign(o,"D",fnac, async=TRUE, wait=FALSE)...
usePackage <- function(p) { if (!is.element(p, installed.packages()[,1])) install.packages(p, dep = TRUE) require(p, character.only = TRUE) }
/usePackage.r
no_license
drhoda/peloton
R
false
false
155
r
usePackage <- function(p) { if (!is.element(p, installed.packages()[,1])) install.packages(p, dep = TRUE) require(p, character.only = TRUE) }
PACKAGES <- c( "here", "tidyverse", "ggforce", "patchwork", "igraph", "ggraph", "latex2exp" ) INSTALLED_PACKAGES <- rownames(installed.packages()) for (package in PACKAGES) { if (!(package %in% INSTALLED_PACKAGES)) install.packages(package) }
/netsci/scripts/prep-dependencies.R
no_license
MikoBie/SocEli
R
false
false
284
r
PACKAGES <- c( "here", "tidyverse", "ggforce", "patchwork", "igraph", "ggraph", "latex2exp" ) INSTALLED_PACKAGES <- rownames(installed.packages()) for (package in PACKAGES) { if (!(package %in% INSTALLED_PACKAGES)) install.packages(package) }
## ---- include = FALSE--------------------------------------------------------- knitr::opts_chunk$set( collapse = TRUE, comment = "#>", eval = identical(tolower(Sys.getenv("NOT_CRAN")), "true"), out.width = "100%" ) ## ----eval=FALSE, message=FALSE, warning=FALSE--------------------------------- # #...
/inst/doc/intro_to_geobr.R
no_license
cran/geobr
R
false
false
4,245
r
## ---- include = FALSE--------------------------------------------------------- knitr::opts_chunk$set( collapse = TRUE, comment = "#>", eval = identical(tolower(Sys.getenv("NOT_CRAN")), "true"), out.width = "100%" ) ## ----eval=FALSE, message=FALSE, warning=FALSE--------------------------------- # #...
\name{readBED} \alias{readBED} \title{ Read a BED File } \description{ Read a BED File into a data.frame } \usage{ readBED(file) } \arguments{ \item{file}{ The filename of BED file to read. } } \details{ The function reads a BED file, and assign the first column to chromosome name, second column to chromosomal star...
/man/readBED.Rd
permissive
qwang-big/irene
R
false
false
804
rd
\name{readBED} \alias{readBED} \title{ Read a BED File } \description{ Read a BED File into a data.frame } \usage{ readBED(file) } \arguments{ \item{file}{ The filename of BED file to read. } } \details{ The function reads a BED file, and assign the first column to chromosome name, second column to chromosomal star...
#' Extract country code look up table from UN Comtrade #' #' Returns a dataframe of countries and country codes, #' downloaded from UN Comtrade. For use with the UN Comtrade API, full API #' docs can be found at \url{https://comtrade.un.org/data/doc/api/} #' #' @param reporters Default value NULL, otherwise this should...
/R/ct_countries_table.R
no_license
rtaph/comtradr
R
false
false
2,313
r
#' Extract country code look up table from UN Comtrade #' #' Returns a dataframe of countries and country codes, #' downloaded from UN Comtrade. For use with the UN Comtrade API, full API #' docs can be found at \url{https://comtrade.un.org/data/doc/api/} #' #' @param reporters Default value NULL, otherwise this should...
library(tidyverse) library(glmnet) library(hdm) library(plm) set.seed(2018) # download (about 450 MB) # https://s3.us-east-2.amazonaws.com/criteo-uplift-dataset/ download.file("https://s3.us-east-2.amazonaws.com/criteo-uplift-dataset/criteo-uplift.csv.gz", "criteo-uplift.csv.gz") # Read dataset df_a <- read.csv(gzfi...
/TokyoR_71.R
no_license
ykaneko1992/TokyoR_20180705
R
false
false
7,237
r
library(tidyverse) library(glmnet) library(hdm) library(plm) set.seed(2018) # download (about 450 MB) # https://s3.us-east-2.amazonaws.com/criteo-uplift-dataset/ download.file("https://s3.us-east-2.amazonaws.com/criteo-uplift-dataset/criteo-uplift.csv.gz", "criteo-uplift.csv.gz") # Read dataset df_a <- read.csv(gzfi...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/runsTest.R \name{runsTest} \alias{runsTest} \title{Runs Test for Randomness} \usage{ runsTest( y, plot.it = FALSE, alternative = c("two.sided", "positive.correlated", "negative.correlated"), emp.distribution = NULL ) } \arguments{ \it...
/man/runsTest.Rd
no_license
lindesaysh/MRSea
R
false
true
2,455
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/runsTest.R \name{runsTest} \alias{runsTest} \title{Runs Test for Randomness} \usage{ runsTest( y, plot.it = FALSE, alternative = c("two.sided", "positive.correlated", "negative.correlated"), emp.distribution = NULL ) } \arguments{ \it...
# ========= # Now also create a histogram with total reads per cell totalReads_noMito = apply(groupedSCS$patientAllMod@expdata,2,sum) log10TotalReads = log10(totalReads_noMito+1) theCutoff = log10(1000+1) binwidth = max(log10TotalReads)/200 breaks = seq(0,max(log10TotalReads)+binwidth,binwidth) totalReads_A=log10TotalR...
/Projects/HCM SCS/HCM_SCS_Manuscript_d_additional_QCplots_totalReads.R
no_license
vanrooij-lab/scRNAseq-HCM-human--old
R
false
false
847
r
# ========= # Now also create a histogram with total reads per cell totalReads_noMito = apply(groupedSCS$patientAllMod@expdata,2,sum) log10TotalReads = log10(totalReads_noMito+1) theCutoff = log10(1000+1) binwidth = max(log10TotalReads)/200 breaks = seq(0,max(log10TotalReads)+binwidth,binwidth) totalReads_A=log10TotalR...
dataset_path<-"~/ParkinsonBayes/dataset_real2_svml1_loocv_logbyT/dataset_real2_loocv.rds" result_path<-"~/ParkinsonBayes/dataset_real2_svml1_loocv_logbyT/" ##################################################################### setwd(result_path) one_dataset<-readRDS(dataset_path) dataset <- one_dataset$dataset otu_nam...
/Codes for ML models/dataset_real2_svml1_loocv_logbyT/__Rcodes/modify_genus_name.R
no_license
Cm744/Prediction-of-Parkinson-Disease-from-Gut-Microbial-Data
R
false
false
2,509
r
dataset_path<-"~/ParkinsonBayes/dataset_real2_svml1_loocv_logbyT/dataset_real2_loocv.rds" result_path<-"~/ParkinsonBayes/dataset_real2_svml1_loocv_logbyT/" ##################################################################### setwd(result_path) one_dataset<-readRDS(dataset_path) dataset <- one_dataset$dataset otu_nam...
#' Tree distance matrix calculation #' #' This function takes a list of trees and returns a distance matrix #' populated with Robinson-Foulds tree distances between all trees #' in the list. #' #' @param trees a multiPhylo object #' #' @return RF A distance matrix of RF distances #' #' @keywords treespace, tree dist...
/R/spr_tree.dist.matrix.R
no_license
graemetlloyd/ProjectWhalehead
R
false
false
1,013
r
#' Tree distance matrix calculation #' #' This function takes a list of trees and returns a distance matrix #' populated with Robinson-Foulds tree distances between all trees #' in the list. #' #' @param trees a multiPhylo object #' #' @return RF A distance matrix of RF distances #' #' @keywords treespace, tree dist...
#========================================================= # Ancillary data #========================================================= #' SSP data #' #' @description Country level population and GDP data per SSP (SSP_database_v9.csv). To be consistent we make use of the IIASA-WIC Model/scenarios #' @source https://tnt...
/R/data.R
permissive
JGCRI/rfasst
R
false
false
45,962
r
#========================================================= # Ancillary data #========================================================= #' SSP data #' #' @description Country level population and GDP data per SSP (SSP_database_v9.csv). To be consistent we make use of the IIASA-WIC Model/scenarios #' @source https://tnt...
#' @rdname ICCest #' @export #' @importFrom stats aggregate anova aov formula na.omit replications ICCbare <- function(x, y, data = NULL){ icall <- list(y = substitute(y), x = substitute(x)) if(is.character(icall$y)){ warning("passing a character string to 'y' is deprecated since ICC vesion 2.3.0 and w...
/R/ICCbare.R
no_license
matthewwolak/ICC
R
false
false
3,059
r
#' @rdname ICCest #' @export #' @importFrom stats aggregate anova aov formula na.omit replications ICCbare <- function(x, y, data = NULL){ icall <- list(y = substitute(y), x = substitute(x)) if(is.character(icall$y)){ warning("passing a character string to 'y' is deprecated since ICC vesion 2.3.0 and w...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/std_error.R \name{std_error} \alias{std_error} \title{A Standard Error Function} \usage{ std_error(x) } \arguments{ \item{x}{The data you want to estimate standard error. Can be a vector or a matrix} } \description{ This function allows you t...
/man/std_error.Rd
no_license
sashby/hodgepodge
R
false
true
484
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/std_error.R \name{std_error} \alias{std_error} \title{A Standard Error Function} \usage{ std_error(x) } \arguments{ \item{x}{The data you want to estimate standard error. Can be a vector or a matrix} } \description{ This function allows you t...
#Create data Recovery = cbind(rbinom(50,1,.8), c(rbinom(40,1,.6),rep(NA,10)), c(rbinom(30,1,.65),rep(NA,20)),rbinom(50,1,.40), c(rbinom(30,1,.85),rep(NA,20))) colnames(Recovery) = c("Doc1", "Doc2", "Doc3", "Doc4", "Doc5") write.csv(Recovery, "motion.csv", row.names = FALSE) set.seed(14) Y=read.csv("motion.csv") head(Y...
/MathProgramming/R/Doctor hierarchical model for student (1).R
no_license
djwide/proofOfLangCompetency
R
false
false
3,706
r
#Create data Recovery = cbind(rbinom(50,1,.8), c(rbinom(40,1,.6),rep(NA,10)), c(rbinom(30,1,.65),rep(NA,20)),rbinom(50,1,.40), c(rbinom(30,1,.85),rep(NA,20))) colnames(Recovery) = c("Doc1", "Doc2", "Doc3", "Doc4", "Doc5") write.csv(Recovery, "motion.csv", row.names = FALSE) set.seed(14) Y=read.csv("motion.csv") head(Y...
if (!requireNamespace("BiocManager")) install.packages("BiocManager") BiocManager::install() lst = c("GEOquery", "affy", "limma", "huex10sttranscriptcluster.db", "org.Hs.eg.db", "oligo") for(i in lst) { if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager") BiocManage...
/Lab_week3.R
no_license
dhyhz/LSM3241_CA1
R
false
false
10,394
r
if (!requireNamespace("BiocManager")) install.packages("BiocManager") BiocManager::install() lst = c("GEOquery", "affy", "limma", "huex10sttranscriptcluster.db", "org.Hs.eg.db", "oligo") for(i in lst) { if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager") BiocManage...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/symmetric-delete.R \name{nlp_symmetric_delete_pretrained} \alias{nlp_symmetric_delete_pretrained} \title{Load a pretrained Spark NLP model} \usage{ nlp_symmetric_delete_pretrained(sc, input_cols, output_col, name = NULL, lang = NULL, remote...
/man/nlp_symmetric_delete_pretrained.Rd
permissive
mstei4176/sparknlp
R
false
true
872
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/symmetric-delete.R \name{nlp_symmetric_delete_pretrained} \alias{nlp_symmetric_delete_pretrained} \title{Load a pretrained Spark NLP model} \usage{ nlp_symmetric_delete_pretrained(sc, input_cols, output_col, name = NULL, lang = NULL, remote...
# Install and load packages package_names <- c("survey","dplyr","foreign","devtools") lapply(package_names, function(x) if(!x %in% installed.packages()) install.packages(x)) lapply(package_names, require, character.only=T) install_github("e-mitchell/meps_r_pkg/MEPS") library(MEPS) options(survey.lonely.ps...
/mepstrends/hc_use/json/code/r/meanEXP__poverty__insurance__.r
permissive
HHS-AHRQ/MEPS-summary-tables
R
false
false
2,755
r
# Install and load packages package_names <- c("survey","dplyr","foreign","devtools") lapply(package_names, function(x) if(!x %in% installed.packages()) install.packages(x)) lapply(package_names, require, character.only=T) install_github("e-mitchell/meps_r_pkg/MEPS") library(MEPS) options(survey.lonely.ps...
# -------------------------------------------------------------------------------- # --- Analise descritiva criativa ------------------------------------------------ # -------------------------------------------------------------------------------- source("E:/Projetos R/Street Figther/pgms -GIT/00.Libname.R") ...
/pgms -GIT/95.plots_hist_lut.R
no_license
WOLFurriell/StreetFigtherV
R
false
false
1,778
r
# -------------------------------------------------------------------------------- # --- Analise descritiva criativa ------------------------------------------------ # -------------------------------------------------------------------------------- source("E:/Projetos R/Street Figther/pgms -GIT/00.Libname.R") ...
## ## Modeling Epidemics over Observed Networks ## EpiModel Gallery (https://github.com/statnet/EpiModel-Gallery) ## ## Author: Samuel M. Jenness (Emory University) ## Date: August 2018 ## # Example 1: Base Model --------------------------------------------------- ## Updated Initialization Module ## new_init_mod <...
/2018-08-ObservedNetworkData/module-fx.R
permissive
waternk/EpiModel-Gallery
R
false
false
6,375
r
## ## Modeling Epidemics over Observed Networks ## EpiModel Gallery (https://github.com/statnet/EpiModel-Gallery) ## ## Author: Samuel M. Jenness (Emory University) ## Date: August 2018 ## # Example 1: Base Model --------------------------------------------------- ## Updated Initialization Module ## new_init_mod <...
#!/usr/bin/env Rscript try(setwd(dirname(rstudioapi::getActiveDocumentContext()$path))) # setwd("..") require(PopGenome) require(WhopGenome) require(data.table) require(tidyverse) # 1 - chromosome # 2 - start of window # 3 - end of window # 4 - VCF file # 5 - GFF file # 6 - Save Label # & - Strain file # test args # ...
/Processed_Data/cbriggsae/cbr_pi/Interval_Popgen.R
no_license
AndersenLab/Ce-328pop-div
R
false
false
4,834
r
#!/usr/bin/env Rscript try(setwd(dirname(rstudioapi::getActiveDocumentContext()$path))) # setwd("..") require(PopGenome) require(WhopGenome) require(data.table) require(tidyverse) # 1 - chromosome # 2 - start of window # 3 - end of window # 4 - VCF file # 5 - GFF file # 6 - Save Label # & - Strain file # test args # ...
library(gsheet) student1= "https://docs.google.com/spreadsheets/d/1qLHa5qFTyWacta8F-IGo6J3Zpf-BVR9OrlqONuJDqYc/edit#gid=2051155174" student = as.data.frame(gsheet2tbl(student1)) str(student) df1= student (colnames = names(df1)) #attributes(df1) = NULL #df1 = as.data.frame(df1) attributes(df1) attr(df1, which='spec') =...
/DH/Student.R
no_license
pratikkayal/Ranalytics
R
false
false
4,882
r
library(gsheet) student1= "https://docs.google.com/spreadsheets/d/1qLHa5qFTyWacta8F-IGo6J3Zpf-BVR9OrlqONuJDqYc/edit#gid=2051155174" student = as.data.frame(gsheet2tbl(student1)) str(student) df1= student (colnames = names(df1)) #attributes(df1) = NULL #df1 = as.data.frame(df1) attributes(df1) attr(df1, which='spec') =...
##GNDVI all.prairie.spl <- split(all.prairie, all.prairie$monoTreeName) ##changed ndvi.mat to all.prairie to complie with 01.compileData.R all.prairie.mean <- sapply(all.prairie.spl, function(x) { apply(x, 2, function(y) mean(as.numeric(y), rm.na = T)) }) %>% t %>% as.data.frame GNDVI.small <- all.prairie.mean[...
/SCRIPTS/ARCHIVE/04.phylo.v3--REMOVEDLINESFROMV2.R
no_license
andrew-hipp/prairie-biomass-2018
R
false
false
6,829
r
##GNDVI all.prairie.spl <- split(all.prairie, all.prairie$monoTreeName) ##changed ndvi.mat to all.prairie to complie with 01.compileData.R all.prairie.mean <- sapply(all.prairie.spl, function(x) { apply(x, 2, function(y) mean(as.numeric(y), rm.na = T)) }) %>% t %>% as.data.frame GNDVI.small <- all.prairie.mean[...
\name{inverse} \alias{inverse} %- Also NEED an '\alias' for EACH other topic documented here. \title{inverse} \description{ Internal function } \usage{ inverse(X) } %- maybe also 'usage' for other objects documented here. \arguments{ \item{X}{matrix} } \keyword{internal}
/man/inverse.Rd
no_license
cran/EMA
R
false
false
276
rd
\name{inverse} \alias{inverse} %- Also NEED an '\alias' for EACH other topic documented here. \title{inverse} \description{ Internal function } \usage{ inverse(X) } %- maybe also 'usage' for other objects documented here. \arguments{ \item{X}{matrix} } \keyword{internal}
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/kim.R \name{KimSmoother} \alias{KimSmoother} \title{Smoothing algorithm from Kim (1994) to be used following a run of KimFilter function.} \usage{ KimSmoother(xA, Pa, A, P, x, p, stateP, stateP_fut) } \arguments{ \item{xA}{Filtered st...
/man/KimSmoother.Rd
no_license
rbagd/dynfactoR
R
false
false
887
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/kim.R \name{KimSmoother} \alias{KimSmoother} \title{Smoothing algorithm from Kim (1994) to be used following a run of KimFilter function.} \usage{ KimSmoother(xA, Pa, A, P, x, p, stateP, stateP_fut) } \arguments{ \item{xA}{Filtered st...
# FIXME: compare relative selectFeaturesSequential = function(learner, task, resampling, measures, bit.names, bits.to.features, control, opt.path, show.info) { seq.step = function(forward, state, gen.new.states, compare) { # we have too many vars already and cannot move forward if (forward && !is.na(control$m...
/R/selectFeaturesSequential.R
no_license
jianf7/mlr
R
false
false
3,567
r
# FIXME: compare relative selectFeaturesSequential = function(learner, task, resampling, measures, bit.names, bits.to.features, control, opt.path, show.info) { seq.step = function(forward, state, gen.new.states, compare) { # we have too many vars already and cannot move forward if (forward && !is.na(control$m...
#' @include internal.R Constraint-class.R marxan_connectivity_data_to_matrix.R NULL #' Add neighbor constraints #' #' Add constraints to a conservation planning problem to ensure #' that all selected planning units in the solution have at least a certain #' number of neighbors that are also selected in the solution. #...
/R/add_neighbor_constraints.R
no_license
prioritizr/prioritizr
R
false
false
16,915
r
#' @include internal.R Constraint-class.R marxan_connectivity_data_to_matrix.R NULL #' Add neighbor constraints #' #' Add constraints to a conservation planning problem to ensure #' that all selected planning units in the solution have at least a certain #' number of neighbors that are also selected in the solution. #...
#' @title Export cluster scripts #' @author Giovanni Laudanno #' @description Export cluster scripts #' @inheritParams default_params_doc #' @return nothing #' @export upload_bash_scripts <- function( project_name, account = jap::your_account(), session = NA ) { # open session new_session <- FAL...
/R/ssh_functions.R
no_license
Giappo/jap
R
false
false
11,360
r
#' @title Export cluster scripts #' @author Giovanni Laudanno #' @description Export cluster scripts #' @inheritParams default_params_doc #' @return nothing #' @export upload_bash_scripts <- function( project_name, account = jap::your_account(), session = NA ) { # open session new_session <- FAL...
package_root <- function() { res <- find.package("recensement") if(!dir.exists(file.path(res, "cache"))) { dir.create(file.path(res, "cache", "data", "2016"), recursive = TRUE) dir.create(file.path(res, "cache", "shp"), recursive = TRUE) } res } download_2016_census_profile <- function(dguid = "...
/R/download-boundary-files.R
no_license
context-dependent/recensement
R
false
false
4,184
r
package_root <- function() { res <- find.package("recensement") if(!dir.exists(file.path(res, "cache"))) { dir.create(file.path(res, "cache", "data", "2016"), recursive = TRUE) dir.create(file.path(res, "cache", "shp"), recursive = TRUE) } res } download_2016_census_profile <- function(dguid = "...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/multi_color.R \name{multi_color} \alias{multi_color} \title{Multi-color text} \usage{ multi_color( txt = "hello world!", colors = "rainbow", type = "message", direction = "vertical", recycle_chars = FALSE, add_leading_newline = FA...
/man/multi_color.Rd
no_license
cran/multicolor
R
false
true
2,823
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/multi_color.R \name{multi_color} \alias{multi_color} \title{Multi-color text} \usage{ multi_color( txt = "hello world!", colors = "rainbow", type = "message", direction = "vertical", recycle_chars = FALSE, add_leading_newline = FA...
# (c) 2019 Brian Romanchuk source('startup.R') cpi <- pfetch('F@CPIAUCSL') us_core_level <-pfetch('F@CPILFESL') us_core <- pchange(us_core_level, 12) inf <- pchange(cpi,12) can <- pfetch('STATCAN@18100256|v112593702') can_core = pchange(can,12) ser <- us_core pp <- Plot2Ser(ser, can_core, legend=c('U.S. CPI', 'Can...
/legacy/R/c20200202_us_can_inf.R
permissive
brianr747/platform
R
false
false
1,203
r
# (c) 2019 Brian Romanchuk source('startup.R') cpi <- pfetch('F@CPIAUCSL') us_core_level <-pfetch('F@CPILFESL') us_core <- pchange(us_core_level, 12) inf <- pchange(cpi,12) can <- pfetch('STATCAN@18100256|v112593702') can_core = pchange(can,12) ser <- us_core pp <- Plot2Ser(ser, can_core, legend=c('U.S. CPI', 'Can...
library(class) library(readxl) library(lattice) library(ggplot2) library(caret) library(e1071) # Load Data from source into a spam dataframe spam <- read_xlsx("Spam_filter.xlsx") # nrow return the number of rows in spam # sample returns Random Samples and Permutations in spam # spam[sample(nrow(spam)),] return all ro...
/Spam-filter.R
no_license
SuneJepsen/SpamFilter
R
false
false
1,529
r
library(class) library(readxl) library(lattice) library(ggplot2) library(caret) library(e1071) # Load Data from source into a spam dataframe spam <- read_xlsx("Spam_filter.xlsx") # nrow return the number of rows in spam # sample returns Random Samples and Permutations in spam # spam[sample(nrow(spam)),] return all ro...
# install.packages("dplyr") library(dplyr) # install this package if you haven't already # for loops on files and objects (instead of just vectors) ################# Make csv files to test function on ################ if(dir.exists("empty_directory") == FALSE){ dir.create("empty_directory") # this will make a new ...
/assignments/Assignment_3_easy_way.R
no_license
A-DeNittis/Data_Course
R
false
false
4,151
r
# install.packages("dplyr") library(dplyr) # install this package if you haven't already # for loops on files and objects (instead of just vectors) ################# Make csv files to test function on ################ if(dir.exists("empty_directory") == FALSE){ dir.create("empty_directory") # this will make a new ...
install.packages("Sleuth3") library("Sleuth3") attach(ex1223) set.seed(1234) E1 <- 0 E1[ex1223$Esteem1 != 1] = 0 E1[ex1223$Esteem1 == 1] = 1 ex1223$E1 <- E1 l.Income2005 <- log(ex1223$Income2005) ex1223$l.Income2005 <- l.Income2005 dev <- sample(2, nrow(ex1223), replace=TRUE, prob=c(0.67, 0.33)) ex1223.train <- e...
/DSS -HW 6.R
no_license
jcweng/stat6306introdatascience
R
false
false
1,607
r
install.packages("Sleuth3") library("Sleuth3") attach(ex1223) set.seed(1234) E1 <- 0 E1[ex1223$Esteem1 != 1] = 0 E1[ex1223$Esteem1 == 1] = 1 ex1223$E1 <- E1 l.Income2005 <- log(ex1223$Income2005) ex1223$l.Income2005 <- l.Income2005 dev <- sample(2, nrow(ex1223), replace=TRUE, prob=c(0.67, 0.33)) ex1223.train <- e...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/overlapping_batches.R \name{generate_overlapping_batches} \alias{generate_overlapping_batches} \title{Function to divide the sequence in batches with user defined size} \usage{ generate_overlapping_batches(input.seq, size = 50, overlap = 15) ...
/man/generate_overlapping_batches.Rd
no_license
augusto-garcia/onemap
R
false
true
597
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/overlapping_batches.R \name{generate_overlapping_batches} \alias{generate_overlapping_batches} \title{Function to divide the sequence in batches with user defined size} \usage{ generate_overlapping_batches(input.seq, size = 50, overlap = 15) ...
# This file is generated by make.paws. Please do not edit here. #' @importFrom paws.common new_handlers new_service NULL #' AWS CodePipeline #' #' @description #' **Overview** #' #' This is the AWS CodePipeline API Reference. This guide provides #' descriptions of the actions and data types for AWS CodePipeline. Some...
/cran/paws.developer.tools/R/codepipeline_service.R
permissive
peoplecure/paws
R
false
false
11,986
r
# This file is generated by make.paws. Please do not edit here. #' @importFrom paws.common new_handlers new_service NULL #' AWS CodePipeline #' #' @description #' **Overview** #' #' This is the AWS CodePipeline API Reference. This guide provides #' descriptions of the actions and data types for AWS CodePipeline. Some...
# TFM, Master en Metodos Computacionales UNAV #Autor: Ane Martinez Larrinaga #Tutores: Silvestre Vicent Cambra y Mikel Hernaez #Fecha: 27-04-2021 #OBJETIVO: es realizar el analisis de la expresion diferencial de mi grupo constante en LUAD, realmente no es un grupo como tal #ya que luego tiene varios integrantes extr...
/6_ScriptAnalisisDiferencial/4_AnalisisDiferencialGrupoConstante.R
no_license
anemartinezlarrinaga2898/TFM_ANE_MARTINEZ
R
false
false
5,056
r
# TFM, Master en Metodos Computacionales UNAV #Autor: Ane Martinez Larrinaga #Tutores: Silvestre Vicent Cambra y Mikel Hernaez #Fecha: 27-04-2021 #OBJETIVO: es realizar el analisis de la expresion diferencial de mi grupo constante en LUAD, realmente no es un grupo como tal #ya que luego tiene varios integrantes extr...
/2017-11-28.Progetto3.R
no_license
canualextib/pre-final
R
false
false
3,672
r
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_site_data_from_NASIS_db.R \name{get_site_data_from_NASIS_db} \alias{get_site_data_from_NASIS_db} \title{Get Site Data from a local NASIS Database} \usage{ get_site_data_from_NASIS_db( SS = TRUE, stringsAsFactors = default.stringsAsFac...
/man/get_site_data_from_NASIS_db.Rd
no_license
Emory-ENVS-SihiLab/soilDB
R
false
true
1,131
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_site_data_from_NASIS_db.R \name{get_site_data_from_NASIS_db} \alias{get_site_data_from_NASIS_db} \title{Get Site Data from a local NASIS Database} \usage{ get_site_data_from_NASIS_db( SS = TRUE, stringsAsFactors = default.stringsAsFac...
Fl_Spec_Log_Norm <- function(){ count = 1 #Get the Directories in variables setwd(workingdir2) Olddir <- getwd() Newdir <- paste(getwd(),'/FL_AMAX',sep = '') list.files(path=Newdir) #Create a dataframe to store the variables vec <- vector(mode = 'numeric',length = length(list.files(path=Newdir))...
/Earthquake_v4/ALL_FUNCTIONS/02_09_Fault_Specific_Log_Norm_COMBFL_v1.R
no_license
PeterHedley94/Earthquake_Analysis
R
false
false
1,538
r
Fl_Spec_Log_Norm <- function(){ count = 1 #Get the Directories in variables setwd(workingdir2) Olddir <- getwd() Newdir <- paste(getwd(),'/FL_AMAX',sep = '') list.files(path=Newdir) #Create a dataframe to store the variables vec <- vector(mode = 'numeric',length = length(list.files(path=Newdir))...
#' Read data from a URL #' #' The task for this function is to read the data from the URL location and assign #' appropriate column names. The function will throw a warning if there are #' more columns in the data table than expected. If there are fewer columns than #' expected the function will retry up to 10 times to...
/R Package/ffanalytics/R/readUrl.R
no_license
zsy31shuyang/FantasyFootballAnalyticsR
R
false
false
9,061
r
#' Read data from a URL #' #' The task for this function is to read the data from the URL location and assign #' appropriate column names. The function will throw a warning if there are #' more columns in the data table than expected. If there are fewer columns than #' expected the function will retry up to 10 times to...
library(dplyr) df <- read.table("household_power_consumption.txt",sep = ';',header = T) as.Date(df$Date,format='%d/%m/%Y') -> df$Date filter(df,(Date=='2007-02-01' | Date=='2007-02-02')) ->DF plot(as.numeric(as.character(DF$Global_active_power)),type='l',xaxt='n',ylab ="Global Active Power (kilowatts)",xlab="",lwd=...
/plot2.R
no_license
yashgyy/PlottingBaseR
R
false
false
391
r
library(dplyr) df <- read.table("household_power_consumption.txt",sep = ';',header = T) as.Date(df$Date,format='%d/%m/%Y') -> df$Date filter(df,(Date=='2007-02-01' | Date=='2007-02-02')) ->DF plot(as.numeric(as.character(DF$Global_active_power)),type='l',xaxt='n',ylab ="Global Active Power (kilowatts)",xlab="",lwd=...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data_color.R \name{data_color} \alias{data_color} \title{Set data cell colors using a palette or a color function} \usage{ data_color( data, columns, colors, alpha = NULL, apply_to = "fill", autocolor_text = TRUE ) } \arguments{ \...
/man/data_color.Rd
permissive
tomryder9/gt
R
false
true
6,443
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data_color.R \name{data_color} \alias{data_color} \title{Set data cell colors using a palette or a color function} \usage{ data_color( data, columns, colors, alpha = NULL, apply_to = "fill", autocolor_text = TRUE ) } \arguments{ \...
################################### # manuscript_expr_analysis.R ################################### # Load data ########### { TCGA_maf<- readRDS("data/TCGA_maf_mainHLAType.rds") load("data/GO_v62.RData") } # Libraries ############ { library(svglite) library(plotrix) source("scripts/functions/do_GSEA2.R") ...
/scripts/manuscript_expr_analysis.R
no_license
JimmyVdEynden/immunoediting
R
false
false
12,739
r
################################### # manuscript_expr_analysis.R ################################### # Load data ########### { TCGA_maf<- readRDS("data/TCGA_maf_mainHLAType.rds") load("data/GO_v62.RData") } # Libraries ############ { library(svglite) library(plotrix) source("scripts/functions/do_GSEA2.R") ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/paws.directconnect_operations.R \name{create_direct_connect_gateway} \alias{create_direct_connect_gateway} \title{Creates a Direct Connect gateway, which is an intermediate object that enables you to connect a set of virtual interfaces and vi...
/service/paws.directconnect/man/create_direct_connect_gateway.Rd
permissive
CR-Mercado/paws
R
false
true
1,481
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/paws.directconnect_operations.R \name{create_direct_connect_gateway} \alias{create_direct_connect_gateway} \title{Creates a Direct Connect gateway, which is an intermediate object that enables you to connect a set of virtual interfaces and vi...
# Scrape play-by-play (pbp) data from ESPN NCAA Men's Basketball game web pages. # For a given team in a givn season, retrive the team's schedule from their scheduale web page. # Extract all the game IDs from the schedule data. # Use each game ID to retrive the PBP data for that game. # Save the schedule and PBP data f...
/season-smallmultiples-app/scripts/extract_espn_mcb_season_pbp.R
no_license
tpasinet/mcb-season-smallmultiples
R
false
false
5,110
r
# Scrape play-by-play (pbp) data from ESPN NCAA Men's Basketball game web pages. # For a given team in a givn season, retrive the team's schedule from their scheduale web page. # Extract all the game IDs from the schedule data. # Use each game ID to retrive the PBP data for that game. # Save the schedule and PBP data f...
################################################################## ## Program: Spencers Deff Example.R ## Name: J.Dever ## Project: SURV699E - A Practical Course in Sampling and Weighting ## Date: 11/09/07 ## Purpose: Calculate Spencer's Deff and compare with 1 + relvar(wts), ## Kish's approximatio...
/Examples/13 Steps in Weighting/Examples/Spencers Deff Example.R
no_license
andrewohall/PracTools
R
false
false
5,658
r
################################################################## ## Program: Spencers Deff Example.R ## Name: J.Dever ## Project: SURV699E - A Practical Course in Sampling and Weighting ## Date: 11/09/07 ## Purpose: Calculate Spencer's Deff and compare with 1 + relvar(wts), ## Kish's approximatio...
| pc = 0xc002 | a = 0x01 | x = 0x00 | y = 0x00 | sp = 0x01fd | p[NV-BDIZC] = 00110100 | | pc = 0xc003 | a = 0x00 | x = 0x00 | y = 0x00 | sp = 0x01fd | p[NV-BDIZC] = 00110111 | | pc = 0xc004 | a = 0x80 | x = 0x00 | y = 0x00 | sp = 0x01fd | p[NV-BDIZC] = 10110100 | | pc = 0xc005 | a = 0x40 | x = 0x00 | y = 0x00 | sp = 0x...
/emulator/res/ror_acc.r
no_license
uatach/mc861-nes
R
false
false
968
r
| pc = 0xc002 | a = 0x01 | x = 0x00 | y = 0x00 | sp = 0x01fd | p[NV-BDIZC] = 00110100 | | pc = 0xc003 | a = 0x00 | x = 0x00 | y = 0x00 | sp = 0x01fd | p[NV-BDIZC] = 00110111 | | pc = 0xc004 | a = 0x80 | x = 0x00 | y = 0x00 | sp = 0x01fd | p[NV-BDIZC] = 10110100 | | pc = 0xc005 | a = 0x40 | x = 0x00 | y = 0x00 | sp = 0x...
library(shiny) shinyServer(function(input, output) { #The Average American Diet ##Meat & Poultry ##Fish & Shellfish ##Eggs ##Cheese ##Dairy Products ##Flour & Cereal Products ##Caloric Sweeteners ##Vegetables ##Coffee, Cocoa & Nuts ##Fruits ##Fats & Oils YearlyAverage = 1996.3 #in lbs Weigh...
/server.R
no_license
taninaim/BEACN_Calculator
R
false
false
27,178
r
library(shiny) shinyServer(function(input, output) { #The Average American Diet ##Meat & Poultry ##Fish & Shellfish ##Eggs ##Cheese ##Dairy Products ##Flour & Cereal Products ##Caloric Sweeteners ##Vegetables ##Coffee, Cocoa & Nuts ##Fruits ##Fats & Oils YearlyAverage = 1996.3 #in lbs Weigh...
plot2 <- function() { library(dplyr) plotData <- read.table("./household_power_consumption.txt", sep = ";", header = TRUE) # remove data that we aren't interested in plotData <- plotData[plotData$Date == "1/2/2007" | plotData$Date == "2/2/2007",] smallerPlotData <- plotData %>% select(Date,T...
/course4_assignment1/plot2.R
no_license
slopez200/datasciencecoursera
R
false
false
891
r
plot2 <- function() { library(dplyr) plotData <- read.table("./household_power_consumption.txt", sep = ";", header = TRUE) # remove data that we aren't interested in plotData <- plotData[plotData$Date == "1/2/2007" | plotData$Date == "2/2/2007",] smallerPlotData <- plotData %>% select(Date,T...
library(raster) library(rgdal) dem <- raster("QGIS/ASTGTM2_S34W072/ASTGTM2_S34W072_dem.tif") shape <- readOGR(dsn = "QGIS/merval.shp", layer = "merval") point_dem <- extract(dem, shape) hist(point_dem[[1]])
/valuesDEM.R
no_license
arielfuentes/wrangling-spatial-data
R
false
false
207
r
library(raster) library(rgdal) dem <- raster("QGIS/ASTGTM2_S34W072/ASTGTM2_S34W072_dem.tif") shape <- readOGR(dsn = "QGIS/merval.shp", layer = "merval") point_dem <- extract(dem, shape) hist(point_dem[[1]])
# The mammal n code was run in parallel on the cluster. # Load the coordinates and make into a spatial dataframe. # Edited 26 Apr 2018: Specify path to HPCC at top data_path <- '/mnt/research/neon' mammal_n_all <- list() for (i in 1:25) { load(file = paste0(data_path, '/external_data/raw_external_data/iucn/mammaln'...
/code/vis/mammalmap.r
no_license
NEON-biodiversity/mammalitv
R
false
false
3,196
r
# The mammal n code was run in parallel on the cluster. # Load the coordinates and make into a spatial dataframe. # Edited 26 Apr 2018: Specify path to HPCC at top data_path <- '/mnt/research/neon' mammal_n_all <- list() for (i in 1:25) { load(file = paste0(data_path, '/external_data/raw_external_data/iucn/mammaln'...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/number.R \name{number_construct} \alias{number_construct} \title{helper function that constructs canvas items of a number widget} \usage{ number_construct(.switchboard, eavesdrop = NULL, size = 1, label = " ", ...) } \description{ helper func...
/man/number_construct.Rd
no_license
suharoschi/switchboard
R
false
true
394
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/number.R \name{number_construct} \alias{number_construct} \title{helper function that constructs canvas items of a number widget} \usage{ number_construct(.switchboard, eavesdrop = NULL, size = 1, label = " ", ...) } \description{ helper func...
library(iBST) ### Name: tree2indicators ### Title: From a tree to indicators (or dummy variables) ### Aliases: tree2indicators ### Keywords: documentation tree ### ** Examples fit <- rpart(Kyphosis ~ Age + Number + Start, data = kyphosis) tree2indicators(fit)
/data/genthat_extracted_code/iBST/examples/tree2indicators.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
267
r
library(iBST) ### Name: tree2indicators ### Title: From a tree to indicators (or dummy variables) ### Aliases: tree2indicators ### Keywords: documentation tree ### ** Examples fit <- rpart(Kyphosis ~ Age + Number + Start, data = kyphosis) tree2indicators(fit)
# Data Preprocessing Template # Importing the dataset dataset = read.csv('Data.csv') # Splitting the dataset into the Training set and Test set # install.packages('caTools') library(caTools) set.seed(123) split = sample.split(dataset$DependentVariable, SplitRatio = 0.8) training_set = subset(dataset, split == TRUE) ...
/data_preprocessing_template.R
no_license
Lucky9128/LearningDataScience
R
false
false
448
r
# Data Preprocessing Template # Importing the dataset dataset = read.csv('Data.csv') # Splitting the dataset into the Training set and Test set # install.packages('caTools') library(caTools) set.seed(123) split = sample.split(dataset$DependentVariable, SplitRatio = 0.8) training_set = subset(dataset, split == TRUE) ...
data <- read.table("./household_power_consumption.txt", sep = ";", stringsAsFactors = FALSE, na.strings = "?", header = TRUE, colClasses = c( "character", "character", "numeric", "numeric", "numeric", "numeric", "numeric", "numeric", "numeric" ) ) data <- within( data, datetime <- strptime(paste(Date, Time), format = "...
/plot4.R
no_license
bezoarboy/ExData_Plotting1
R
false
false
1,292
r
data <- read.table("./household_power_consumption.txt", sep = ";", stringsAsFactors = FALSE, na.strings = "?", header = TRUE, colClasses = c( "character", "character", "numeric", "numeric", "numeric", "numeric", "numeric", "numeric", "numeric" ) ) data <- within( data, datetime <- strptime(paste(Date, Time), format = "...
# Practica 1 # Leemos el archivo install.packages("readxl") library("readxl") ejercicio29 <- read_excel("/home/ivan/Data-science-degree/data-science-degree/DATOS DEL LIBRO-ANDERSON/Ch 02 Descriptive/Crosstab.xls",'Data') x <- ejercicio29$x # recuperamos la columna x y <- ejercicio29$y # recuperamos la columna y datafra...
/Analisis Estadistico/Practica 1 - Ivan Mujica - Analisis-Estadistico-I/Practica1.R
no_license
ifmm87/data-science-degree
R
false
false
918
r
# Practica 1 # Leemos el archivo install.packages("readxl") library("readxl") ejercicio29 <- read_excel("/home/ivan/Data-science-degree/data-science-degree/DATOS DEL LIBRO-ANDERSON/Ch 02 Descriptive/Crosstab.xls",'Data') x <- ejercicio29$x # recuperamos la columna x y <- ejercicio29$y # recuperamos la columna y datafra...
addin_lint <- function() { filename <- rstudioapi::getSourceEditorContext() if (filename$path == "") { return("Current source has no path. Please save before continue") } config_file <- lintr:::find_config(filename$path) if (length(config_file) == 0) { config_linters <- NULL } else { config <- ...
/R/addins.R
permissive
mwaldstein/lintr
R
false
false
908
r
addin_lint <- function() { filename <- rstudioapi::getSourceEditorContext() if (filename$path == "") { return("Current source has no path. Please save before continue") } config_file <- lintr:::find_config(filename$path) if (length(config_file) == 0) { config_linters <- NULL } else { config <- ...
# this script will predict on defensive data
/R_code/predict_def.R
no_license
benmbrew/nfl_df_project
R
false
false
44
r
# this script will predict on defensive data
write.pspp <- function (data , datafile, pspp.path , decmax=6 , as.factors=TRUE , use.bat=FALSE) { data <- as.data.frame(data) df <- data codefile <- paste0( datafile , ".sps" ) adQuote <- function(x){paste("\"", x, "\"", sep = "")} varnames <- colnames(df) if ( as.factors ){ dfn <- lapp...
/miceadds/R/write.pspp.R
no_license
ingted/R-Examples
R
false
false
4,730
r
write.pspp <- function (data , datafile, pspp.path , decmax=6 , as.factors=TRUE , use.bat=FALSE) { data <- as.data.frame(data) df <- data codefile <- paste0( datafile , ".sps" ) adQuote <- function(x){paste("\"", x, "\"", sep = "")} varnames <- colnames(df) if ( as.factors ){ dfn <- lapp...
#' Make an interactive map to view in the browser as a GitHub gist #' #' @export #' @template args #' @param description Description for the Github gist, or leave to default (=no description) #' @param public (logical) Whether gist is public (default: TRUE) #' @param browse If TRUE (default) the map opens in your defau...
/mapr/R/map_gist.R
no_license
ingted/R-Examples
R
false
false
4,082
r
#' Make an interactive map to view in the browser as a GitHub gist #' #' @export #' @template args #' @param description Description for the Github gist, or leave to default (=no description) #' @param public (logical) Whether gist is public (default: TRUE) #' @param browse If TRUE (default) the map opens in your defau...
####PREPARING FECUNDITY DATA FOR ANALYSIS#### fcnd <- read_csv("results/fcnd.csv") #telling r which data are factors fcnd <- dplyr::mutate(fcnd, psyllid = factor(psyllid, levels = unique(psyllid))) fcnd <- dplyr::mutate(fcnd, germ = factor(germ, levels = unique(germ))) fcnd <- dplyr::mutate(fcnd, block = factor(...
/psyllid-data/scripts/09_fecundity_models.R
no_license
fiferworks/thesis
R
false
false
6,583
r
####PREPARING FECUNDITY DATA FOR ANALYSIS#### fcnd <- read_csv("results/fcnd.csv") #telling r which data are factors fcnd <- dplyr::mutate(fcnd, psyllid = factor(psyllid, levels = unique(psyllid))) fcnd <- dplyr::mutate(fcnd, germ = factor(germ, levels = unique(germ))) fcnd <- dplyr::mutate(fcnd, block = factor(...
########################################################################### ## RDROBUST R Package ## Do-file for Empirical Illustration ## Authors: Sebastian Calonico, Matias D. Cattaneo, Max H. Farrell and Rocio Titiunik ########################################################################### ### Clear R envi...
/unused/rdrobust_illustration.r
permissive
aassumpcao/discretionperformance
R
false
false
4,422
r
########################################################################### ## RDROBUST R Package ## Do-file for Empirical Illustration ## Authors: Sebastian Calonico, Matias D. Cattaneo, Max H. Farrell and Rocio Titiunik ########################################################################### ### Clear R envi...
### run GSEA for differential genes between clusters or between groups library(fgsea) ### prepare pre-ranked gene list for GSEA test ### convert gene.symbol to Entrez.ID library(org.Hs.eg.db) tmp <- unlist(as.list(org.Hs.egSYMBOL)) EntrezID2Symbol <- data.frame(GeneID=as.integer(names(tmp)),GeneSymbol=tmp,strings...
/downstreamAnalysis_scRNAseq_U251.R
no_license
qinting/ATRX_CellReports
R
false
false
10,511
r
### run GSEA for differential genes between clusters or between groups library(fgsea) ### prepare pre-ranked gene list for GSEA test ### convert gene.symbol to Entrez.ID library(org.Hs.eg.db) tmp <- unlist(as.list(org.Hs.egSYMBOL)) EntrezID2Symbol <- data.frame(GeneID=as.integer(names(tmp)),GeneSymbol=tmp,strings...