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
############################################# # # # Name: Ashley Music # # Date: 08/10/2020 # # Subject: NN # # Class: BDAT 625 # # File Name: ...
/Week7_Clustering_Music_Ashley.R
no_license
aggiemusic/R
R
false
false
3,257
r
############################################# # # # Name: Ashley Music # # Date: 08/10/2020 # # Subject: NN # # Class: BDAT 625 # # File Name: ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plot.ggplot.gene.R \docType{methods} \name{ggplot.gene} \alias{ggplot.gene} \alias{ggplot.gene,StefansExpressionSet-method} \title{description of function ggplot.gene} \usage{ ggplot.gene(dat, gene, colrs = NULL, groupCol = "GroupID", colCol ...
/man/ggplot.gene-methods.Rd
no_license
stela2502/StefansExpressionSet
R
false
true
817
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plot.ggplot.gene.R \docType{methods} \name{ggplot.gene} \alias{ggplot.gene} \alias{ggplot.gene,StefansExpressionSet-method} \title{description of function ggplot.gene} \usage{ ggplot.gene(dat, gene, colrs = NULL, groupCol = "GroupID", colCol ...
library(ape) testtree <- read.tree("7071_0.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="7071_0_unrooted.txt")
/codeml_files/newick_trees_processed/7071_0/rinput.R
no_license
DaniBoo/cyanobacteria_project
R
false
false
135
r
library(ape) testtree <- read.tree("7071_0.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="7071_0_unrooted.txt")
#' Transform RNA-Seq Data Ready for Linear Mixed Modelling with dream() #' #' Transform count data to log2-counts per million (logCPM), estimate the mean-variance relationship and use this to compute appropriate observation-level weights. The data are then ready for linear mixed modelling with dream(). This method...
/R/voomWithDreamWeights.R
no_license
alexvpickering/variancePartition
R
false
false
7,459
r
#' Transform RNA-Seq Data Ready for Linear Mixed Modelling with dream() #' #' Transform count data to log2-counts per million (logCPM), estimate the mean-variance relationship and use this to compute appropriate observation-level weights. The data are then ready for linear mixed modelling with dream(). This method...
# Functions definition -------------------------------------------- usethis::use_r("<function_name>") # Document the function going inside its body and pressing # "`CTRL` + `SHIFT` + `ALT` + R". # # More info at: https://r-pkgs.org/man.html # Install any new required package by renv::install("<new.package.used.in.t...
/dev/development_cycle.R
permissive
CorradoLanera/workflow
R
false
false
1,334
r
# Functions definition -------------------------------------------- usethis::use_r("<function_name>") # Document the function going inside its body and pressing # "`CTRL` + `SHIFT` + `ALT` + R". # # More info at: https://r-pkgs.org/man.html # Install any new required package by renv::install("<new.package.used.in.t...
# This file is generated by make.paws. Please do not edit here. #' @importFrom paws.common new_handlers new_service NULL #' Amazon DocumentDB with MongoDB compatibility #' #' @description #' Amazon DocumentDB API documentation #' #' @examples #' \donttest{svc <- docdb() #' svc$add_tags_to_resource( #' Foo = 123 #' )...
/cran/paws.database/R/docdb_service.R
permissive
peoplecure/paws
R
false
false
6,419
r
# This file is generated by make.paws. Please do not edit here. #' @importFrom paws.common new_handlers new_service NULL #' Amazon DocumentDB with MongoDB compatibility #' #' @description #' Amazon DocumentDB API documentation #' #' @examples #' \donttest{svc <- docdb() #' svc$add_tags_to_resource( #' Foo = 123 #' )...
context("datasets_keyvalue") test_that("correct classes",{ ## Geography expect_is(region, "keyvalue") expect_is(lan, "keyvalue") expect_is(kommun, "keyvalue") expect_is(forsamling, "keyvalue") expect_is(distrikt, "keyvalue") ## Administ...
/tests/testthat/test-datasets_keyvalue.R
no_license
gil906/decoder
R
false
false
1,270
r
context("datasets_keyvalue") test_that("correct classes",{ ## Geography expect_is(region, "keyvalue") expect_is(lan, "keyvalue") expect_is(kommun, "keyvalue") expect_is(forsamling, "keyvalue") expect_is(distrikt, "keyvalue") ## Administ...
# Copyright 2017 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
/data-raw/process_ecoprovinces.R
permissive
bcgov/bcmapsdata
R
false
false
859
r
# Copyright 2017 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
## run_analysis.r ## description - takes the data set from UCI samsung galaxy wearable ## work and performs several functions ## 1. merges test/train data ## 2. renames variables based on label info provided by UCI ## 3. accurately and appropriately describes activity occurring during each observation set (each row) ##...
/run_analysis.R
no_license
eajung830/course_project_getting_and_cleaning_data
R
false
false
3,432
r
## run_analysis.r ## description - takes the data set from UCI samsung galaxy wearable ## work and performs several functions ## 1. merges test/train data ## 2. renames variables based on label info provided by UCI ## 3. accurately and appropriately describes activity occurring during each observation set (each row) ##...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/draw.med.R \name{draw.med} \alias{draw.med} \title{Simple Mediation Diagrams} \usage{ draw.med(model1, model2, model3, y, x, m, df) } \arguments{ \item{model1}{The saved regression model of \code{y~x} model where X predicts Y.} \item{model2}...
/man/draw.med.Rd
permissive
doomlab/MeMoBootR
R
false
true
1,269
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/draw.med.R \name{draw.med} \alias{draw.med} \title{Simple Mediation Diagrams} \usage{ draw.med(model1, model2, model3, y, x, m, df) } \arguments{ \item{model1}{The saved regression model of \code{y~x} model where X predicts Y.} \item{model2}...
cluster_features = c("commits_authored","issues_participated","issues_opened","issues_closed") avg_cohesion = 0 avg_separation = 0 for(i in 1:20){ cohesion = 0 separation = 0 for (j in 2:13){ model = kmeans(na.omit(medium_projects[,cluster_features]), centers = j) cohesion[j] <- model$tot.within...
/cluster_roles_medium_size_projects.R
no_license
vtsimpouris/analyze_github
R
false
false
980
r
cluster_features = c("commits_authored","issues_participated","issues_opened","issues_closed") avg_cohesion = 0 avg_separation = 0 for(i in 1:20){ cohesion = 0 separation = 0 for (j in 2:13){ model = kmeans(na.omit(medium_projects[,cluster_features]), centers = j) cohesion[j] <- model$tot.within...
##### Process image ##### library(keras) library(EBImage) library(stringr) library(pbapply) secondCat <- readImage("train/cat.1.jpg") display(secondCat) # Set image size width <- 50 height <- 50 extract_feature <- function(dir_path, width, height, labelsExist = T) { img_size <- width * height ## ...
/script.R
no_license
monogenea/CNNtutorial
R
false
false
4,734
r
##### Process image ##### library(keras) library(EBImage) library(stringr) library(pbapply) secondCat <- readImage("train/cat.1.jpg") display(secondCat) # Set image size width <- 50 height <- 50 extract_feature <- function(dir_path, width, height, labelsExist = T) { img_size <- width * height ## ...
source("./hello-world.R") library(testthat) test_that("no name", { expect_equal(hello_world(), "Hello, World!") }) message("All tests passed for exercise: hello-world")
/r/hello-world/test_hello-world.R
no_license
magahet/exercism
R
false
false
173
r
source("./hello-world.R") library(testthat) test_that("no name", { expect_equal(hello_world(), "Hello, World!") }) message("All tests passed for exercise: hello-world")
with(a6aad994e8860486bb26251ba49bf2519, {ROOT <- 'D:/SEMOSS_v4.0.0_x64/SEMOSS_v4.0.0_x64/semosshome/db/Atadata2__3b3e4a3b-d382-4e98-9950-9b4e8b308c1c/version/1c4fa71c-191c-4da9-8102-b247ffddc5d3';FRAME481253$DATA_COLLECTION_TIME[FRAME481253$DATA_COLLECTION_TIME == ""] <- 0;});
/1c4fa71c-191c-4da9-8102-b247ffddc5d3/R/Temp/ayYOngOlLdoBw.R
no_license
ayanmanna8/test
R
false
false
277
r
with(a6aad994e8860486bb26251ba49bf2519, {ROOT <- 'D:/SEMOSS_v4.0.0_x64/SEMOSS_v4.0.0_x64/semosshome/db/Atadata2__3b3e4a3b-d382-4e98-9950-9b4e8b308c1c/version/1c4fa71c-191c-4da9-8102-b247ffddc5d3';FRAME481253$DATA_COLLECTION_TIME[FRAME481253$DATA_COLLECTION_TIME == ""] <- 0;});
# This file is generated by make.paws. Please do not edit here. #' @importFrom paws.common new_handlers new_service set_config NULL #' AWS IoT 1-Click Devices Service #' #' @description #' Describes all of the AWS IoT 1-Click device-related API operations for #' the service. Also provides sample requests, responses, a...
/cran/paws.internet.of.things/R/iot1clickdevicesservice_service.R
permissive
TWarczak/paws
R
false
false
4,212
r
# This file is generated by make.paws. Please do not edit here. #' @importFrom paws.common new_handlers new_service set_config NULL #' AWS IoT 1-Click Devices Service #' #' @description #' Describes all of the AWS IoT 1-Click device-related API operations for #' the service. Also provides sample requests, responses, a...
\name{WrdTableBorders} \alias{WrdTableBorders} %- Also NEED an '\alias' for EACH other topic documented here. \title{Draw Borders to a Word Table %% ~~function to do ... ~~ } \description{Drawing borders in a Word table is quite tedious. This function allows to select any range and draw border lines around it. %% ~~ ...
/man/WrdTableBorders.Rd
no_license
facorread/DescTools
R
false
false
3,107
rd
\name{WrdTableBorders} \alias{WrdTableBorders} %- Also NEED an '\alias' for EACH other topic documented here. \title{Draw Borders to a Word Table %% ~~function to do ... ~~ } \description{Drawing borders in a Word table is quite tedious. This function allows to select any range and draw border lines around it. %% ~~ ...
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Do not modify this file since it was automatically generated from: % % FirmaSet.R % % by the Rdoc compiler part of the R.oo package. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{FirmaSet} \docType{class}...
/man/FirmaSet.Rd
no_license
microarray/aroma.affymetrix
R
false
false
5,398
rd
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Do not modify this file since it was automatically generated from: % % FirmaSet.R % % by the Rdoc compiler part of the R.oo package. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{FirmaSet} \docType{class}...
get.mesos.from.xls = function( file='mesothelioma.xls', sheetname='Incidence', vname.row=1, xrows=2:10, cols=1:19, fix.yr=NULL) { # Get mesothelioma incidence counts from published xls or xlsx workbooks require('testthat') require('stringr') expect_false( options( 'stringsAsFactors')[[1]]) if ( !is...
/Functions/get.mesos.from.xls.r
no_license
teemo48/HSE_models_2013-08
R
false
false
1,266
r
get.mesos.from.xls = function( file='mesothelioma.xls', sheetname='Incidence', vname.row=1, xrows=2:10, cols=1:19, fix.yr=NULL) { # Get mesothelioma incidence counts from published xls or xlsx workbooks require('testthat') require('stringr') expect_false( options( 'stringsAsFactors')[[1]]) if ( !is...
getwd() setwd("C:\\Users\\MUNYEOB\\Desktop\\공부\\R\\project_7") kor <- scan("7_kor.txt") print(kor) hist(kor, breaks = 5, # 기둥 개수 10개 freq = FALSE, # 비율(확률밀도)로 나타냄 col = rainbow(5), main = "국어 점수의 분포", xlab = "국어점수", ylab = "비율")
/project_7/7장 수치 데이터에서의 정보_7.R
no_license
MUNYEBOKIM/r_language_novince
R
false
false
319
r
getwd() setwd("C:\\Users\\MUNYEOB\\Desktop\\공부\\R\\project_7") kor <- scan("7_kor.txt") print(kor) hist(kor, breaks = 5, # 기둥 개수 10개 freq = FALSE, # 비율(확률밀도)로 나타냄 col = rainbow(5), main = "국어 점수의 분포", xlab = "국어점수", ylab = "비율")
library("EBImage") N = 16 vni <- function(n,i,N){ if(n=0){out <- ifelse(i<=N,sqrt(1/N),NULL) } else { out <- ifelse(i<=N,sqrt(2/N)*cos(pi*n*(i-1/2)/N),NULL) } out } sum(vni(1,1:16,N)*vni(1,1:16,N)) sum(vni(1,1:16,N)*vni(2,1:16,N)) size = 100 flower <- channel((readImage("flower.j...
/HW1/hw1p2.r
no_license
shr264/SparseApprox
R
false
false
3,825
r
library("EBImage") N = 16 vni <- function(n,i,N){ if(n=0){out <- ifelse(i<=N,sqrt(1/N),NULL) } else { out <- ifelse(i<=N,sqrt(2/N)*cos(pi*n*(i-1/2)/N),NULL) } out } sum(vni(1,1:16,N)*vni(1,1:16,N)) sum(vni(1,1:16,N)*vni(2,1:16,N)) size = 100 flower <- channel((readImage("flower.j...
install.packages("gapminder", "tidyverse") library(gapminder) library(tidyverse) library(dplyr) summary(gapminder) str(gapminder) filter(gapminder, lifeExp == min(lifeExp)) x <- filter(gapminder, lifeExp > 60 , gdpPercap < 7000) y <- filter(gapminder, lifeExp > 60 | gdpPercap < 7000) check
/S_Balazs.R
no_license
pte-bioinformatics-core/intro-r
R
false
false
310
r
install.packages("gapminder", "tidyverse") library(gapminder) library(tidyverse) library(dplyr) summary(gapminder) str(gapminder) filter(gapminder, lifeExp == min(lifeExp)) x <- filter(gapminder, lifeExp > 60 , gdpPercap < 7000) y <- filter(gapminder, lifeExp > 60 | gdpPercap < 7000) check
#q1 fileUrl1 <- "https://d396qusza40orc.cloudfront.net/getdata%2Fdata%2Fss06hid.csv" download.file(fileUrl1, destfile = 'idaho_housing_2006.csv', method='curl') housing_data <- fread('idaho_housing_2006.csv') str(housing_data) housing_data[, .N, by=VAL] #q3 fileUrl2 <- "https://d396qusza40orc.cloudfront.net/getdata%2F...
/03_Getting_and_Cleaning_Data/course_work/quiz1.R
no_license
VenkiPhy6/courseRa
R
false
false
972
r
#q1 fileUrl1 <- "https://d396qusza40orc.cloudfront.net/getdata%2Fdata%2Fss06hid.csv" download.file(fileUrl1, destfile = 'idaho_housing_2006.csv', method='curl') housing_data <- fread('idaho_housing_2006.csv') str(housing_data) housing_data[, .N, by=VAL] #q3 fileUrl2 <- "https://d396qusza40orc.cloudfront.net/getdata%2F...
.addTask <- function(jobId, taskId, rCommand, ...) { storageCredentials <- rAzureBatch::getStorageCredentials() args <- list(...) .doAzureBatchGlobals <- args$envir dependsOn <- args$dependsOn argsList <- args$args cloudCombine <- args$cloudCombine userOutputFiles <- args$outputFiles containerImage <- ...
/R/helpers.R
permissive
jbdatascience/doAzureParallel
R
false
false
7,528
r
.addTask <- function(jobId, taskId, rCommand, ...) { storageCredentials <- rAzureBatch::getStorageCredentials() args <- list(...) .doAzureBatchGlobals <- args$envir dependsOn <- args$dependsOn argsList <- args$args cloudCombine <- args$cloudCombine userOutputFiles <- args$outputFiles containerImage <- ...
# Central location for parameter aliases. # See https://lightgbm.readthedocs.io/en/latest/Parameters.html#core-parameters # [description] List of respected parameter aliases specific to lgb.Dataset. Wrapped in a function to # take advantage of lazy evaluation (so it doesn't matter what order # ...
/R-package/R/aliases.R
permissive
h2oai/LightGBM
R
false
false
2,838
r
# Central location for parameter aliases. # See https://lightgbm.readthedocs.io/en/latest/Parameters.html#core-parameters # [description] List of respected parameter aliases specific to lgb.Dataset. Wrapped in a function to # take advantage of lazy evaluation (so it doesn't matter what order # ...
# Functions to perform outline morphometric analysis on body outline images # Input is a set of photos and meta data, output is a fourier characterisation of # photos, individuals, species and mimic types. # These calculations are slow, so results are saved and reused # if no photos have changed since the last calcul...
/Statistical analysis/morpho-calculation.fns.r
no_license
JimMcL/MRes
R
false
false
5,878
r
# Functions to perform outline morphometric analysis on body outline images # Input is a set of photos and meta data, output is a fourier characterisation of # photos, individuals, species and mimic types. # These calculations are slow, so results are saved and reused # if no photos have changed since the last calcul...
## library ---- library(rvest) # install.packages("RSelenium") library(RSelenium) ## web scraping ---- # selenium serverをローカルで起動しておく # % docker run -d -p 4445:4444 selenium/standalone-firefox remDr <- remoteDriver(remoteServerAddr = "localhost", port = 4445L, browserName = ...
/languages_analysis.R
no_license
nozma/ProjectEuler
R
false
false
2,107
r
## library ---- library(rvest) # install.packages("RSelenium") library(RSelenium) ## web scraping ---- # selenium serverをローカルで起動しておく # % docker run -d -p 4445:4444 selenium/standalone-firefox remDr <- remoteDriver(remoteServerAddr = "localhost", port = 4445L, browserName = ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in % R/question-3-010-eval-charts-predicted-happiness.R \name{question_3_010_eval_charts_predicted_happiness} \alias{question_3_010_eval_charts_predicted_happiness} \title{question_3_010_eval_charts_predicted_happiness TODO Fix error} \usage{ ...
/man/question_3_010_eval_charts_predicted_happiness.Rd
no_license
b136325/pids.wellbeing.weather
R
false
true
496
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in % R/question-3-010-eval-charts-predicted-happiness.R \name{question_3_010_eval_charts_predicted_happiness} \alias{question_3_010_eval_charts_predicted_happiness} \title{question_3_010_eval_charts_predicted_happiness TODO Fix error} \usage{ ...
library(glmnet) mydata = read.table("../../../../TrainingSet/FullSet/ReliefF/autonomic_ganglia.csv",head=T,sep=",") x = as.matrix(mydata[,4:ncol(mydata)]) y = as.matrix(mydata[,1]) set.seed(123) glm = cv.glmnet(x,y,nfolds=10,type.measure="mse",alpha=0.3,family="gaussian",standardize=TRUE) sink('./autonomic_ganglia_041....
/Model/EN/ReliefF/autonomic_ganglia/autonomic_ganglia_041.R
no_license
esbgkannan/QSMART
R
false
false
367
r
library(glmnet) mydata = read.table("../../../../TrainingSet/FullSet/ReliefF/autonomic_ganglia.csv",head=T,sep=",") x = as.matrix(mydata[,4:ncol(mydata)]) y = as.matrix(mydata[,1]) set.seed(123) glm = cv.glmnet(x,y,nfolds=10,type.measure="mse",alpha=0.3,family="gaussian",standardize=TRUE) sink('./autonomic_ganglia_041....
omop_get_review_table_names <- function() { c("person", "condition_era", "condition_occurrence", "death", "device_exposure", "dose_era", "drug_era", "drug_exposure", "measurement", "note", "observation", "observation_period", "payer_plan_period", "procedure_occurrence", "specimen", "visit_occurrence") } omop_ta...
/lib/omop.R
no_license
lrasmus/ReviewR
R
false
false
32,391
r
omop_get_review_table_names <- function() { c("person", "condition_era", "condition_occurrence", "death", "device_exposure", "dose_era", "drug_era", "drug_exposure", "measurement", "note", "observation", "observation_period", "payer_plan_period", "procedure_occurrence", "specimen", "visit_occurrence") } omop_ta...
library(R2MLwiN) ### Name: hungary1 ### Title: Hungarian component of 2nd International Science Survey, '84; ### see Goldstein 2003 ### Aliases: hungary1 ### Keywords: datasets ### ** Examples ## Not run: ##D ##D data(hungary1, package = "R2MLwiN") ##D ##D (mymodel <- runMLwiN(c(es_core, biol_core, biol_r3, bi...
/data/genthat_extracted_code/R2MLwiN/examples/hungary1.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
503
r
library(R2MLwiN) ### Name: hungary1 ### Title: Hungarian component of 2nd International Science Survey, '84; ### see Goldstein 2003 ### Aliases: hungary1 ### Keywords: datasets ### ** Examples ## Not run: ##D ##D data(hungary1, package = "R2MLwiN") ##D ##D (mymodel <- runMLwiN(c(es_core, biol_core, biol_r3, bi...
#수치형 병수 #정수 - integer(int), R에서 다루는 모든 숫자 - numeric num1 <- 10 class(num1) num2 <- 10L class(num2) result <- num1+num2 result class(result)
/advanced/num_var.R
no_license
tumorbox/R
R
false
false
172
r
#수치형 병수 #정수 - integer(int), R에서 다루는 모든 숫자 - numeric num1 <- 10 class(num1) num2 <- 10L class(num2) result <- num1+num2 result class(result)
#context("anema_imaging") library(magrittr) # get_mirror_point testing point <- define_wells(tibble::tibble(wID=1,x=0,y=0,Q=0.5,R=5,diam=0.75,path=1,orig_wID=1,w_group="a")) point_sf <- point %>% dplyr::mutate(X=x,Y=y) %>% sf::st_as_sf(coords=c("X","Y")) boundary <- tibble::tibble(bID=1,m=-1,b=1,bound_type="NF") we...
/tests/testthat/test-imaging.R
permissive
gopalpenny/anem
R
false
false
10,011
r
#context("anema_imaging") library(magrittr) # get_mirror_point testing point <- define_wells(tibble::tibble(wID=1,x=0,y=0,Q=0.5,R=5,diam=0.75,path=1,orig_wID=1,w_group="a")) point_sf <- point %>% dplyr::mutate(X=x,Y=y) %>% sf::st_as_sf(coords=c("X","Y")) boundary <- tibble::tibble(bID=1,m=-1,b=1,bound_type="NF") we...
#' utility function #' #' @author Alistair Dunn #' "spm.make.filename" <- function(file, path = "") { if (path != "") { plc <- substring(path, nchar(path)) if (!(plc == "\\" | plc == "/")) path <- paste(path, "/", sep = "") } filename <- paste(path, file, sep = "") return(filename) }
/R-libraries/spm/R/spm.make.filename.R
no_license
alistairdunn1/SPM
R
false
false
313
r
#' utility function #' #' @author Alistair Dunn #' "spm.make.filename" <- function(file, path = "") { if (path != "") { plc <- substring(path, nchar(path)) if (!(plc == "\\" | plc == "/")) path <- paste(path, "/", sep = "") } filename <- paste(path, file, sep = "") return(filename) }
# Cleveland Plot # original source: r graphics cookbook # load the ggplot2 library library(ggplot2) # load the gcookbook library library(gcookbook) # create an object that is the top 25 hitters of 2001 tophit <- tophitters2001[1:25, ] # get the names, sorted first by lg, then by avg nameorder <- tophit$name[order(t...
/cleveland-plot.r
no_license
anhnguyendepocen/r-code-examples
R
false
false
1,829
r
# Cleveland Plot # original source: r graphics cookbook # load the ggplot2 library library(ggplot2) # load the gcookbook library library(gcookbook) # create an object that is the top 25 hitters of 2001 tophit <- tophitters2001[1:25, ] # get the names, sorted first by lg, then by avg nameorder <- tophit$name[order(t...
# Iteratively grows random forests, finds case specific feature interactions iRF <- function(x, y, xtest=NULL, ytest=NULL, n.iter=5, ntree=500, n.core=1, mtry.select.prob=rep(1/ncol(x), ncol(x)), keep.impvar.quantile=N...
/iRF/R/iRF.R
no_license
akhikolla/InformationHouse
R
false
false
9,129
r
# Iteratively grows random forests, finds case specific feature interactions iRF <- function(x, y, xtest=NULL, ytest=NULL, n.iter=5, ntree=500, n.core=1, mtry.select.prob=rep(1/ncol(x), ncol(x)), keep.impvar.quantile=N...
# # Covert NBL gene expression array data to csv format. # Input data are saved in separated files by sample at two genomic # levels (gene and transcript) and platform is HuEx-1_0-st-v2_01 # ________________________________________________________________ # xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
/inst/munge_scripts/target_nbl_file_processing/target_nbl_gene_array_tab2csv.R
no_license
teamcgc/TARGETCloud
R
false
false
10,424
r
# # Covert NBL gene expression array data to csv format. # Input data are saved in separated files by sample at two genomic # levels (gene and transcript) and platform is HuEx-1_0-st-v2_01 # ________________________________________________________________ # xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
library(glmnet) mydata = read.table("./TrainingSet/RF/stomach.csv",head=T,sep=",") x = as.matrix(mydata[,4:ncol(mydata)]) y = as.matrix(mydata[,1]) set.seed(123) glm = cv.glmnet(x,y,nfolds=10,type.measure="mse",alpha=0.55,family="gaussian",standardize=FALSE) sink('./Model/EN/Classifier/stomach/stomach_062.txt',append=T...
/Model/EN/Classifier/stomach/stomach_062.R
no_license
leon1003/QSMART
R
false
false
354
r
library(glmnet) mydata = read.table("./TrainingSet/RF/stomach.csv",head=T,sep=",") x = as.matrix(mydata[,4:ncol(mydata)]) y = as.matrix(mydata[,1]) set.seed(123) glm = cv.glmnet(x,y,nfolds=10,type.measure="mse",alpha=0.55,family="gaussian",standardize=FALSE) sink('./Model/EN/Classifier/stomach/stomach_062.txt',append=T...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/appweightstable.R \name{appweightstable} \alias{appweightstable} \title{Retrieves data from the DataMuster database for the Table of Cattle Weights Data} \usage{ appweightstable( property, sex, category, alms, zoom, timezone, us...
/man/appweightstable.Rd
no_license
PrecisionLivestockManagement/DMApp
R
false
true
1,541
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/appweightstable.R \name{appweightstable} \alias{appweightstable} \title{Retrieves data from the DataMuster database for the Table of Cattle Weights Data} \usage{ appweightstable( property, sex, category, alms, zoom, timezone, us...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/norm_funcs.R \name{median_center} \alias{median_center} \title{Median Center Transformation} \usage{ median_center(e_data, edata_id, feature_subset, backtransform = FALSE, apply_norm = FALSE, check.names = TRUE) } \arguments{ \item{e_data}{...
/man/median_center.Rd
no_license
vk2mars/pmartRqc
R
false
true
2,941
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/norm_funcs.R \name{median_center} \alias{median_center} \title{Median Center Transformation} \usage{ median_center(e_data, edata_id, feature_subset, backtransform = FALSE, apply_norm = FALSE, check.names = TRUE) } \arguments{ \item{e_data}{...
# Virginie Rondeau 2012-4-12 for optimx options(digits=12) if(!require("frailtypack"))stop("this test requires package frailtypack.") if(!require("survival"))stop("this test requires survival.") if(!require("boot"))stop("this test requires boot.") if(!require("MASS"))stop("this test requires MASS.") if(!require("survC...
/demo/frailtypack_frailtyPenal.R
no_license
socale/frailtypack
R
false
false
3,435
r
# Virginie Rondeau 2012-4-12 for optimx options(digits=12) if(!require("frailtypack"))stop("this test requires package frailtypack.") if(!require("survival"))stop("this test requires survival.") if(!require("boot"))stop("this test requires boot.") if(!require("MASS"))stop("this test requires MASS.") if(!require("survC...
rm(list=ls(all=TRUE)) library(ggplot2) dirName = "../../data/wns/2016-11-03-16-24-26/" clean_names = c("Total infections", "Infections in 2007", "Infections in 2008", "Infections in 2009", "Infections in 2010", "Infections in 2011", "Infections in 2012", "Infections in 2013", ...
/scripts/plotting/bayesP.R
no_license
nickjmeyer/spatioTemporalDecisions
R
false
false
2,927
r
rm(list=ls(all=TRUE)) library(ggplot2) dirName = "../../data/wns/2016-11-03-16-24-26/" clean_names = c("Total infections", "Infections in 2007", "Infections in 2008", "Infections in 2009", "Infections in 2010", "Infections in 2011", "Infections in 2012", "Infections in 2013", ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pairwise.R \name{cld2} \alias{cld2} \title{Modified Compact Letter Display to Irregular Designs} \usage{ cld2(object, level = 0.05) } \arguments{ \item{object}{an object returned by \code{\link[multcomp]{glht}()}. It is assumed that the matri...
/man/cld2.Rd
no_license
walmes/wzRfun
R
false
true
2,082
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pairwise.R \name{cld2} \alias{cld2} \title{Modified Compact Letter Display to Irregular Designs} \usage{ cld2(object, level = 0.05) } \arguments{ \item{object}{an object returned by \code{\link[multcomp]{glht}()}. It is assumed that the matri...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/DTcolsample.R \name{DTcolsample} \alias{DTcolsample} \title{data.table colsampling (nearly without) copy} \usage{ DTcolsample(DT, kept, remove = FALSE) } \arguments{ \item{DT}{Type: data.table. The data.table to combine on.} \item{kept}{Type...
/man/DTcolsample.Rd
no_license
ghellstern/Laurae
R
false
true
1,202
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/DTcolsample.R \name{DTcolsample} \alias{DTcolsample} \title{data.table colsampling (nearly without) copy} \usage{ DTcolsample(DT, kept, remove = FALSE) } \arguments{ \item{DT}{Type: data.table. The data.table to combine on.} \item{kept}{Type...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/setup_parallel_model_inputs.R \name{setup_parallel_model_inputs} \alias{setup_parallel_model_inputs} \title{Grabbing parallel model inputs} \usage{ setup_parallel_model_inputs(use_argparse = FALSE, load_prerun_image = TRUE, file_format = "....
/mbg/mbg_core_code/mbg_central/LBDCore/man/setup_parallel_model_inputs.Rd
no_license
The-Oxford-GBD-group/typhi_paratyphi_modelling_code
R
false
true
773
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/setup_parallel_model_inputs.R \name{setup_parallel_model_inputs} \alias{setup_parallel_model_inputs} \title{Grabbing parallel model inputs} \usage{ setup_parallel_model_inputs(use_argparse = FALSE, load_prerun_image = TRUE, file_format = "....
#' Calculate Unobserved Selection Bias #' #' @description We calculate an effect of selection on unobservables #' on estiamted coefficient of treatment. This method is presented by #' Oster (2019, Journal of Business & Economic Statistics). #' Let b0 and r0 be the coefficient of treatment and R-squared #' ...
/R/osterbias.r
permissive
KatoPachi/Rkato
R
false
false
2,573
r
#' Calculate Unobserved Selection Bias #' #' @description We calculate an effect of selection on unobservables #' on estiamted coefficient of treatment. This method is presented by #' Oster (2019, Journal of Business & Economic Statistics). #' Let b0 and r0 be the coefficient of treatment and R-squared #' ...
libs <- c('data.table', 'ape', 'caper', 'MASS') lapply(libs, require, character.only = TRUE) ## load all mammal data and mammals=fread("input/mammals.csv",header=T) TS = fread("input/thermoregulatory_scope.csv",header = T) TS <- merge(mammals, TS, by = "species") TSfly <- TS[locomotion == "A"] ## lo...
/scripts/1.4-compDataFlyTS.R
no_license
qwebber/mammal-migration
R
false
false
9,248
r
libs <- c('data.table', 'ape', 'caper', 'MASS') lapply(libs, require, character.only = TRUE) ## load all mammal data and mammals=fread("input/mammals.csv",header=T) TS = fread("input/thermoregulatory_scope.csv",header = T) TS <- merge(mammals, TS, by = "species") TSfly <- TS[locomotion == "A"] ## lo...
#' @export makeRLearner.regr.lm = function() { makeRLearnerRegr( cl = "regr.lm", package = "stats", par.set = makeParamSet( makeDiscreteLearnerParam(id = "method", default = "moment", values = c("moment", "mle", "mve", "t")), makeNumericLearnerParam(id = "nu", lower = 2, requires = expression(...
/R/RLearner_regr_lm.R
no_license
mmadsen/mlr
R
false
false
1,201
r
#' @export makeRLearner.regr.lm = function() { makeRLearnerRegr( cl = "regr.lm", package = "stats", par.set = makeParamSet( makeDiscreteLearnerParam(id = "method", default = "moment", values = c("moment", "mle", "mve", "t")), makeNumericLearnerParam(id = "nu", lower = 2, requires = expression(...
library(testthat) test_check("bluegrafir")
/tests/testthat.R
no_license
jsaraviadrago/bluegrafir
R
false
false
45
r
library(testthat) test_check("bluegrafir")
\name{getWikiMedia.ImageInfo} \alias{getWikiMedia.ImageInfo} \title{Gets EXIF information} \description{ \code{getWikiMedia.ImageInfo} function fetches the EXIF (Exchangeable image file format) data via the \href{https://www.mediawiki.org/wiki/API}{Wikimedia API} for any donated image. The resulting EXIF data (named li...
/man/getWikimedia.Rd
no_license
cran/plotKML
R
false
false
2,862
rd
\name{getWikiMedia.ImageInfo} \alias{getWikiMedia.ImageInfo} \title{Gets EXIF information} \description{ \code{getWikiMedia.ImageInfo} function fetches the EXIF (Exchangeable image file format) data via the \href{https://www.mediawiki.org/wiki/API}{Wikimedia API} for any donated image. The resulting EXIF data (named li...
shell("cls") ################################ # Create edx set, validation set ################################ # Note: this process could take a couple of minutes # if(!require(tidyverse)) install.packages("tidyverse", repos = "http://cran.us.r-project.org") # if(!require(caret)) install.packages("caret", ...
/movielens dataset script Final Draft.R
no_license
yu138538/ML-Project
R
false
false
4,740
r
shell("cls") ################################ # Create edx set, validation set ################################ # Note: this process could take a couple of minutes # if(!require(tidyverse)) install.packages("tidyverse", repos = "http://cran.us.r-project.org") # if(!require(caret)) install.packages("caret", ...
\name{fun.vangenuchten.h.theta} \alias{fun.vangenuchten.h.theta} \title{van Genuchten 1980's function h(theta) (water retension). } \description{Calculate the soilwater tension h at a given water content theta with the Van Genuchten water retention function.} \usage{fun.vangenuchten.h.theta(theta, alpha, n, ...
/pkg/soilwaterfun2/man/fun.vangenuchten.h.theta.Rd
no_license
r-forge/soilwater
R
false
false
2,594
rd
\name{fun.vangenuchten.h.theta} \alias{fun.vangenuchten.h.theta} \title{van Genuchten 1980's function h(theta) (water retension). } \description{Calculate the soilwater tension h at a given water content theta with the Van Genuchten water retention function.} \usage{fun.vangenuchten.h.theta(theta, alpha, n, ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/eval_boundary_summary.R \name{eval_boundary_summary} \alias{eval_boundary_summary} \alias{eval_boundary_summary.default} \alias{eval_boundary_summary.ConservationProblem} \title{Evaluate solution boundary length} \usage{ eval_boundary_summary...
/man/eval_boundary_summary.Rd
no_license
diminera/prioritizr
R
false
true
13,693
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/eval_boundary_summary.R \name{eval_boundary_summary} \alias{eval_boundary_summary} \alias{eval_boundary_summary.default} \alias{eval_boundary_summary.ConservationProblem} \title{Evaluate solution boundary length} \usage{ eval_boundary_summary...
library(endoU) library(tidyverse) library(fs) library(usethis) basedir <- "~/Dropbox (Hesselberth Lab)/Rachel_data/EndoU_project" norm_tabs <- fs::path_join(c(basedir, "all_RNA_bg/exp_2")) viral_tabs <- fs::path_join(c(basedir, "viral_bg/neg/exp2")) dinuc_positions <- fs::path_join(c(basedir, "dinuc_byposition/mhv.din...
/data-raw/viral_cov_2nd.R
no_license
hesselberthlab/endoU
R
false
false
3,691
r
library(endoU) library(tidyverse) library(fs) library(usethis) basedir <- "~/Dropbox (Hesselberth Lab)/Rachel_data/EndoU_project" norm_tabs <- fs::path_join(c(basedir, "all_RNA_bg/exp_2")) viral_tabs <- fs::path_join(c(basedir, "viral_bg/neg/exp2")) dinuc_positions <- fs::path_join(c(basedir, "dinuc_byposition/mhv.din...
## name: pca_loading.r ## date: 04/18/2016 load("/Users/hyangl/project/ras/results/2015/0730_ras_transducin/comparison/ali.RData") load("/Users/hyangl/project/ras/results/2016/0415_pdbs/gt/sse_gt.RData") source("/Users/hyangl/project/ras/results/2015/functions/add.community.rect.R") attach(transducin) pc.xray <- pca...
/0415_pdbs/gt/pca_loading.r
no_license
Hongyang449/2016
R
false
false
1,817
r
## name: pca_loading.r ## date: 04/18/2016 load("/Users/hyangl/project/ras/results/2015/0730_ras_transducin/comparison/ali.RData") load("/Users/hyangl/project/ras/results/2016/0415_pdbs/gt/sse_gt.RData") source("/Users/hyangl/project/ras/results/2015/functions/add.community.rect.R") attach(transducin) pc.xray <- pca...
#' concept #' #' @description #' ## Table Description #' #' The Standardized Vocabularies contains records, or Concepts, that uniquely identify each fundamental unit of meaning used to express clinical information in all domain tables of the CDM. Concepts are derived from vocabularies, which represent clinical informat...
/R/concept.R
permissive
thewileylab/synPUF
R
false
false
1,948
r
#' concept #' #' @description #' ## Table Description #' #' The Standardized Vocabularies contains records, or Concepts, that uniquely identify each fundamental unit of meaning used to express clinical information in all domain tables of the CDM. Concepts are derived from vocabularies, which represent clinical informat...
#' @include utilities.R #' @include data_prep.R #' @include FLTable.R #' @include FLLinRegr.R NULL #' An S4 class to represent output from coxph on in-database Objects #' #' @slot timeValCol column name representing time variable #' @slot statusCol column name representing Status variable #' @slot vfcalls information ...
/R/FLCoxph.R
no_license
mohakuma/AdapteR
R
false
false
35,553
r
#' @include utilities.R #' @include data_prep.R #' @include FLTable.R #' @include FLLinRegr.R NULL #' An S4 class to represent output from coxph on in-database Objects #' #' @slot timeValCol column name representing time variable #' @slot statusCol column name representing Status variable #' @slot vfcalls information ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Seurat_III.R \name{ggUMAP} \alias{ggUMAP} \title{ggUMAP} \usage{ ggUMAP( object, colFac = NULL, col_vector = NULL, ptSize = 0.15, ptAlpha = 0.5, add2title = "", legendTitle = "", cells.use = NULL ) } \arguments{ \item{object}{...
/man/ggUMAP.Rd
no_license
bimberlabinternal/OOSAP
R
false
true
419
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Seurat_III.R \name{ggUMAP} \alias{ggUMAP} \title{ggUMAP} \usage{ ggUMAP( object, colFac = NULL, col_vector = NULL, ptSize = 0.15, ptAlpha = 0.5, add2title = "", legendTitle = "", cells.use = NULL ) } \arguments{ \item{object}{...
\name{RunMAXEIG} \alias{RunMAXEIG} \title{ Performs MAXEIG } \description{ This function performs the MAXEIG analysis } \usage{ RunMAXEIG(x, parameters) } \arguments{ \item{x}{ The data matrix } \item{parameters}{ The data and program parameters } } \details{ Called by higher-order functions; users do not need to c...
/man/RunMAXEIG.Rd
no_license
mrmeloman/RTaxometricsPlus
R
false
false
748
rd
\name{RunMAXEIG} \alias{RunMAXEIG} \title{ Performs MAXEIG } \description{ This function performs the MAXEIG analysis } \usage{ RunMAXEIG(x, parameters) } \arguments{ \item{x}{ The data matrix } \item{parameters}{ The data and program parameters } } \details{ Called by higher-order functions; users do not need to c...
setwd("~/Dropbox/Rworkspace/projects/phlpp2snp") rm(list = ls()) load("snpexp.rda") ls() View(tmx) View(snpresult) dim(tmx) dim(snpresult) for (i in 1:nrow(snpresult)){ n = which(rownames(tmx)==snpresult[i,2]) gene = tmx[which(rownames(tmx) == snpresult[i,3]),which(tmx[n,] == "0" | tmx[n,] == "2")] x = tmx[...
/141016.r
no_license
sonicyyouth/snip
R
false
false
1,105
r
setwd("~/Dropbox/Rworkspace/projects/phlpp2snp") rm(list = ls()) load("snpexp.rda") ls() View(tmx) View(snpresult) dim(tmx) dim(snpresult) for (i in 1:nrow(snpresult)){ n = which(rownames(tmx)==snpresult[i,2]) gene = tmx[which(rownames(tmx) == snpresult[i,3]),which(tmx[n,] == "0" | tmx[n,] == "2")] x = tmx[...
#' Estimates pest arrivals by fertiliser imports #' #' Estimates pest arrivals by fertiliser imports. #' #' @param fertiliser_weight A `RasterLayer` or file path to a raster file #' containing weights to distribute arrivals by. #' @param leakage_rate Numeric vector of 2 values, giving the lower and upper #' bounds ...
/R/arrivals_by_fertiliser.R
no_license
jscamac/edmaps
R
false
false
2,585
r
#' Estimates pest arrivals by fertiliser imports #' #' Estimates pest arrivals by fertiliser imports. #' #' @param fertiliser_weight A `RasterLayer` or file path to a raster file #' containing weights to distribute arrivals by. #' @param leakage_rate Numeric vector of 2 values, giving the lower and upper #' bounds ...
# Developing Data Products - Project # GSS data explorer app library(shiny) shinyUI(pageWithSidebar( headerPanel("Data Exploration: Income, Education, Gender and Religion!"), sidebarPanel( h3('Data Options'), sliderInput("irange", label = "Year(s) of interest:", ...
/ShinyApp/ui.R
no_license
sepanda/DevelopingDataProducts
R
false
false
2,193
r
# Developing Data Products - Project # GSS data explorer app library(shiny) shinyUI(pageWithSidebar( headerPanel("Data Exploration: Income, Education, Gender and Religion!"), sidebarPanel( h3('Data Options'), sliderInput("irange", label = "Year(s) of interest:", ...
testlist <- list(hk = structure(c(5.26469206021037e-259, 2.36751570796521e+84, 4.36355390610692e-158, 9.44066562523514e-128, 7.91497609201597e-229, 6.24907748638477e+68, 4.35730825062176e-266, 8.20776804274475e+172, 3.44537453019238e+207, 1.09553257949338e+179, 1.97897532091248e-76, 2.74592696460806e+169, 2.6614412...
/issuestests/amt/inst/testfiles/cpp_simulate_ssf/cpp_simulate_ssf_output/log_72bd13b1cad89c26c380597a60840c67e2405011/cpp_simulate_ssf-test.R
no_license
akhikolla/RcppDeepStateTest
R
false
false
3,278
r
testlist <- list(hk = structure(c(5.26469206021037e-259, 2.36751570796521e+84, 4.36355390610692e-158, 9.44066562523514e-128, 7.91497609201597e-229, 6.24907748638477e+68, 4.35730825062176e-266, 8.20776804274475e+172, 3.44537453019238e+207, 1.09553257949338e+179, 1.97897532091248e-76, 2.74592696460806e+169, 2.6614412...
library(glmnet) mydata = read.table("./TrainingSet/LassoBIC/endometrium.csv",head=T,sep=",") x = as.matrix(mydata[,4:ncol(mydata)]) y = as.matrix(mydata[,1]) set.seed(123) glm = cv.glmnet(x,y,nfolds=10,type.measure="mse",alpha=0.65,family="gaussian",standardize=TRUE) sink('./Model/EN/Lasso/endometrium/endometrium_069.t...
/Model/EN/Lasso/endometrium/endometrium_069.R
no_license
leon1003/QSMART
R
false
false
366
r
library(glmnet) mydata = read.table("./TrainingSet/LassoBIC/endometrium.csv",head=T,sep=",") x = as.matrix(mydata[,4:ncol(mydata)]) y = as.matrix(mydata[,1]) set.seed(123) glm = cv.glmnet(x,y,nfolds=10,type.measure="mse",alpha=0.65,family="gaussian",standardize=TRUE) sink('./Model/EN/Lasso/endometrium/endometrium_069.t...
library(tidyverse) library(rvest) template <- read_csv("src/scraping/templates/template.csv") %>% mutate_all(funs(str_replace(., "Mighty Ducks of Anaheim", "Anaheim Ducks"))) %>% mutate_all(funs(str_replace(., "Phoenix Coyotes", "Arizona Coyotes"))) accronyms_pg <- read_html("https://en.wikipedia.org/wiki/Templat...
/src/scraping/R/evolving-hockey-war.R
no_license
braydentang1/NHLPlayoffs
R
false
false
5,163
r
library(tidyverse) library(rvest) template <- read_csv("src/scraping/templates/template.csv") %>% mutate_all(funs(str_replace(., "Mighty Ducks of Anaheim", "Anaheim Ducks"))) %>% mutate_all(funs(str_replace(., "Phoenix Coyotes", "Arizona Coyotes"))) accronyms_pg <- read_html("https://en.wikipedia.org/wiki/Templat...
\name{make.variable} \alias{make.variable} \title{ Check a list of linear differential equation specifications. } \description{ A system of linear differential equations is defined by a list of length equal to the number of variables in the system. Each member of this list defines a single linear differentia...
/MSc-SimSci/ACM41000-Uncertainty-Quantification/assignement3/Data2LD_Fix/Data2LD_Fix/man/make.variable.Rd
no_license
iantowey/sandbox
R
false
false
11,076
rd
\name{make.variable} \alias{make.variable} \title{ Check a list of linear differential equation specifications. } \description{ A system of linear differential equations is defined by a list of length equal to the number of variables in the system. Each member of this list defines a single linear differentia...
heart = read.table("/Users/amitkumar/R/data/heart.data", sep = ",", header = T) names(heart) heart = heart[-c(1, 5, 7)] heartfit = glm(chd~., data = heart, family=binomial) summary(heartfit)
/LogisticRegressionHeart.R
no_license
amitnke/Regression
R
false
false
191
r
heart = read.table("/Users/amitkumar/R/data/heart.data", sep = ",", header = T) names(heart) heart = heart[-c(1, 5, 7)] heartfit = glm(chd~., data = heart, family=binomial) summary(heartfit)
"sackin.test" <- function(tree,model="yule",alternative="less",n.mc=500) { #catalan <- function(n) { # if (n<2) return(1) # s<-seq(1,n,by=2) # res<-prod(s) # return(res) #} sackin3<-function(n,model,p=1/3) { if (n>2) { l <- switch( model, "biased" = sample(n-1,1,.5*dbinom(0:(n-2),size=(n-2),prob=...
/R/sackin.test.R
no_license
bcm-uga/apTreeshape
R
false
false
2,261
r
"sackin.test" <- function(tree,model="yule",alternative="less",n.mc=500) { #catalan <- function(n) { # if (n<2) return(1) # s<-seq(1,n,by=2) # res<-prod(s) # return(res) #} sackin3<-function(n,model,p=1/3) { if (n>2) { l <- switch( model, "biased" = sample(n-1,1,.5*dbinom(0:(n-2),size=(n-2),prob=...
###R program for g-formula in observational study rm(list=ls()) library(data.table) library(splines) library(FSA) library(zoo) library(boot) library(plyr) library(SuperLearner) ######################## ####1.Read in dataset### ####...
/gformula.R
permissive
jessicagerald/parametricgformulaR
R
false
false
4,393
r
###R program for g-formula in observational study rm(list=ls()) library(data.table) library(splines) library(FSA) library(zoo) library(boot) library(plyr) library(SuperLearner) ######################## ####1.Read in dataset### ####...
library(rstan) m1 <- stan('standard-cauchy.stan', chains=1); s1 <- extract(m1, inc_warmup=TRUE, permuted=FALSE) s1df <- s1[,1,] %>% data.frame %>% mutate(iteration=1:nrow(.)) %>% gather(parameter, value, x, lp__) %>% mutate(parameter=as.character(parameter), parameterization='bad') m2 <- stan('standard-cauchy-fix....
/standard-cauchy-fix.R
no_license
sakrejda/stan-talk
R
false
false
980
r
library(rstan) m1 <- stan('standard-cauchy.stan', chains=1); s1 <- extract(m1, inc_warmup=TRUE, permuted=FALSE) s1df <- s1[,1,] %>% data.frame %>% mutate(iteration=1:nrow(.)) %>% gather(parameter, value, x, lp__) %>% mutate(parameter=as.character(parameter), parameterization='bad') m2 <- stan('standard-cauchy-fix....
## @b : beta b ## @n : sample size per arm ## @a : number of arms ## @r : censoring rate survSim <- function(b, n, a, r){ sim <- array(numeric(), c(n,a)) for(j in 1:a){ m <- 100 # mixture amount B <- rbeta(m, 1, b) p <- numeric(m) p[1] <- B[1] p[2:m] <- sapply(2:m, function(i) B[i] * pr...
/Validation/validSim.R
no_license
gabriben/survThief-Validation
R
false
false
2,717
r
## @b : beta b ## @n : sample size per arm ## @a : number of arms ## @r : censoring rate survSim <- function(b, n, a, r){ sim <- array(numeric(), c(n,a)) for(j in 1:a){ m <- 100 # mixture amount B <- rbeta(m, 1, b) p <- numeric(m) p[1] <- B[1] p[2:m] <- sapply(2:m, function(i) B[i] * pr...
# Exploratory Data Analysis Shiny App for Redline BLS data. # The filename app.R is required by Shiny. library(utils) library(data.table) library(rvest) # XML/HTML handling library(rdrop2) # Dropbox wrapper library(shiny) library(shinyTree) source('MakeCodeTree.R') source('CondLoadDataTable.R') # Globals are first ...
/ShinyEDA/app.R
permissive
fagan2888/03-the-redline
R
false
false
18,318
r
# Exploratory Data Analysis Shiny App for Redline BLS data. # The filename app.R is required by Shiny. library(utils) library(data.table) library(rvest) # XML/HTML handling library(rdrop2) # Dropbox wrapper library(shiny) library(shinyTree) source('MakeCodeTree.R') source('CondLoadDataTable.R') # Globals are first ...
# show the graph for the most recent session reactlog::showReactGraph() observe({ # show the graph filtered on this observer and its dependencies reactlog::showReactGraph() })
/vignettes/examples/show-react-graph.R
no_license
glin/reactlog
R
false
false
181
r
# show the graph for the most recent session reactlog::showReactGraph() observe({ # show the graph filtered on this observer and its dependencies reactlog::showReactGraph() })
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/write.r \name{write} \alias{write} \title{Write HDF Object} \usage{ write(what, x, path, overwrite = FALSE, parallel = FALSE) } \description{ Write HDF Object } \keyword{internal}
/man/write.Rd
no_license
mkoohafkan/hdfqlr
R
false
true
258
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/write.r \name{write} \alias{write} \title{Write HDF Object} \usage{ write(what, x, path, overwrite = FALSE, parallel = FALSE) } \description{ Write HDF Object } \keyword{internal}
## This creates two functions that cache a square input matrix and ## its inverse (makeCacheMatrix function) and computes the inverse ## of a square matrix and stores it (cathces it) to save ## computation time. ## makeCacheMatrix function creates a special "matrix" object that can cache the input ## matrix and i...
/cachematrix.R
no_license
vkh1/ProgrammingAssignment2
R
false
false
1,089
r
## This creates two functions that cache a square input matrix and ## its inverse (makeCacheMatrix function) and computes the inverse ## of a square matrix and stores it (cathces it) to save ## computation time. ## makeCacheMatrix function creates a special "matrix" object that can cache the input ## matrix and i...
rm(list=ls()) library(tidyverse) library(scales) library(lspline) library(estimatr) library(texreg) library(ggthemes) library(moments) library(readxl) # load the data: my_path <- "C:/Users/diama/Documents/CEU-BA-Assignments/Coding1_DataAnalysis2/Covid19-Regression/data/" df <- read.csv(paste0(my_path, "clean/covid_p...
/Covid19-Regression/codes/covid19_analysis_DiamanEszter.R
no_license
DiamantEszter97/Coding1-DA2-Assigments
R
false
false
10,750
r
rm(list=ls()) library(tidyverse) library(scales) library(lspline) library(estimatr) library(texreg) library(ggthemes) library(moments) library(readxl) # load the data: my_path <- "C:/Users/diama/Documents/CEU-BA-Assignments/Coding1_DataAnalysis2/Covid19-Regression/data/" df <- read.csv(paste0(my_path, "clean/covid_p...
* * **** **** ***** *** ***** *** ***** *** * ***** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * **** *** * * * * * *** * * *** * * * * * * * * * * * * * * *...
/RD/DBFOTO.RD
no_license
pingleware/apac-accounting-code
R
false
false
3,945
rd
* * **** **** ***** *** ***** *** ***** *** * ***** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * **** *** * * * * * *** * * *** * * * * * * * * * * * * * * *...
## File Name: reglca_monitor_random_starts.R ## File Version: 0.06 reglca_monitor_random_starts <- function( control_random_starts, iter, opt_fct, item_probs, class_probs, max_increment0, max_increment, item_probs_random_starts, class_probs_random_starts ) { if ( control_random_starts$use_random_starts ){ ...
/R/reglca_monitor_random_starts.R
no_license
alexanderrobitzsch/CDM
R
false
false
1,751
r
## File Name: reglca_monitor_random_starts.R ## File Version: 0.06 reglca_monitor_random_starts <- function( control_random_starts, iter, opt_fct, item_probs, class_probs, max_increment0, max_increment, item_probs_random_starts, class_probs_random_starts ) { if ( control_random_starts$use_random_starts ){ ...
## Exploratory_Data_Analysis ## Project 1 ## Plot 3 ## Getting full dataset get_full <- read.csv("./Data/household_power_consumption.txt", header=T, sep=';', na.strings="?", nrows=2075259, check.names=F, stringsAsFactors=F, comment.char="", quote='\"') get_full$Date <- as.Date(get_full$Date, for...
/Plot3.R
no_license
cchippaal/ExData_Plotting1
R
false
false
1,031
r
## Exploratory_Data_Analysis ## Project 1 ## Plot 3 ## Getting full dataset get_full <- read.csv("./Data/household_power_consumption.txt", header=T, sep=';', na.strings="?", nrows=2075259, check.names=F, stringsAsFactors=F, comment.char="", quote='\"') get_full$Date <- as.Date(get_full$Date, for...
# Link against mariadb native client static libraries # Info and source code: https://downloads.mariadb.org/client-native/ # Source copy: http://rstats-db.github.io/RMySQL/mariadb_client-2.0.0-src.tar.gz if(!file.exists("../windows/mariadb-client-2.0/include/mysql.h")){ setInternet2() download.file("http://rstats-d...
/tools/winlibs.R
no_license
arturochian/RMySQL
R
false
false
501
r
# Link against mariadb native client static libraries # Info and source code: https://downloads.mariadb.org/client-native/ # Source copy: http://rstats-db.github.io/RMySQL/mariadb_client-2.0.0-src.tar.gz if(!file.exists("../windows/mariadb-client-2.0/include/mysql.h")){ setInternet2() download.file("http://rstats-d...
#------------------------------------------------# # # File name: mergeRDwithSpinoutCounts.R # # Author: Nicolas Fernandez-Arias # # Purpose: # # This merges the SpinoutCounts dataset with the # R&D and parent-firm location data from compustat. #------------------------------------------------# ## First read in com...
/empirics/code/mergeRDwithSpinoutCounts.R
no_license
nfernandez-arias/Endogenous-growth-with-spinouts
R
false
false
2,121
r
#------------------------------------------------# # # File name: mergeRDwithSpinoutCounts.R # # Author: Nicolas Fernandez-Arias # # Purpose: # # This merges the SpinoutCounts dataset with the # R&D and parent-firm location data from compustat. #------------------------------------------------# ## First read in com...
# Practical Machine Learning Course Project # Exploratory analysis # setwd("D:/Dropbox/Dropbox/Coursera/Practical Machine Learning/Project") #LAPTOP library(caret) library(dplyr) setwd("C:/Users/USER/Dropbox/Coursera/Practical Machine Learning/Project") #DESKTOP train <- read.csv("pml-training.csv") set.seed(123...
/pml_project.R
no_license
mbaumer09/PracticalMachineLearning
R
false
false
6,124
r
# Practical Machine Learning Course Project # Exploratory analysis # setwd("D:/Dropbox/Dropbox/Coursera/Practical Machine Learning/Project") #LAPTOP library(caret) library(dplyr) setwd("C:/Users/USER/Dropbox/Coursera/Practical Machine Learning/Project") #DESKTOP train <- read.csv("pml-training.csv") set.seed(123...
#' Add nodes and attributes to graph from a table #' @description Add nodes and their attributes to an #' existing graph object from data in a CSV file or a #' data frame. #' @param graph a graph object of class #' \code{dgr_graph}. #' @param table either a path to a CSV file, or, a data #' frame object. #' @param labe...
/R/add_nodes_from_table.R
permissive
akkalbist55/DiagrammeR
R
false
false
8,771
r
#' Add nodes and attributes to graph from a table #' @description Add nodes and their attributes to an #' existing graph object from data in a CSV file or a #' data frame. #' @param graph a graph object of class #' \code{dgr_graph}. #' @param table either a path to a CSV file, or, a data #' frame object. #' @param labe...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ELW_est.R \name{ELW2S} \alias{ELW2S} \title{Two-Step Exact local Whittle estimator of fractional integration with unknown mean and time trend.} \usage{ ELW2S(data, m, trend_order = 0, taper = c("Velasco", "HC")) } \arguments{ \item...
/LongMemoryTS/man/ELW2S.Rd
no_license
akhikolla/TestedPackages-NoIssues
R
false
true
1,484
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ELW_est.R \name{ELW2S} \alias{ELW2S} \title{Two-Step Exact local Whittle estimator of fractional integration with unknown mean and time trend.} \usage{ ELW2S(data, m, trend_order = 0, taper = c("Velasco", "HC")) } \arguments{ \item...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/diff2.R \name{diff2} \alias{diff2} \title{Fast lagged differences} \usage{ diff2(x, idxs = NULL, lag = 1L, differences = 1L, ..., useNames = TRUE) } \arguments{ \item{x}{A \code{\link[base]{numeric}} \code{\link[base]{vector}} of length N.} ...
/man/diff2.Rd
no_license
HenrikBengtsson/matrixStats
R
false
true
1,201
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/diff2.R \name{diff2} \alias{diff2} \title{Fast lagged differences} \usage{ diff2(x, idxs = NULL, lag = 1L, differences = 1L, ..., useNames = TRUE) } \arguments{ \item{x}{A \code{\link[base]{numeric}} \code{\link[base]{vector}} of length N.} ...
library(ggplot2) palette <- c('#ffffff','#0033BB') data <- read.table("data.txt", header = T, sep = "\t") d <- qplot(GenomeSizeMb, ProteomeSize, data = data, colour = factor(Phenotype)) #d + layer(geom = "point") #d + geom_point() #d + geom_jitter(size = 5) #d + geom_smooth(size = 0.1) d + theme_set(theme_bw()) #d...
/src/R_plots/size.r
no_license
Edison2021/Neolecta_genome_project
R
false
false
1,499
r
library(ggplot2) palette <- c('#ffffff','#0033BB') data <- read.table("data.txt", header = T, sep = "\t") d <- qplot(GenomeSizeMb, ProteomeSize, data = data, colour = factor(Phenotype)) #d + layer(geom = "point") #d + geom_point() #d + geom_jitter(size = 5) #d + geom_smooth(size = 0.1) d + theme_set(theme_bw()) #d...
#library(holoSimCell) #devtools::load_all() ### imputed, popmap (individualID->pop mapping), pts (sample locations) and ashpred ### are now built into holoSimCell ### as built in dataframes (in data/ directory) ## check out the extra two command-line args: simdir and outdir args <- commandArgs(TRUE) i <- as.numeric(arg...
/inst/extdata/ashpaper/hSC_Ash.R
no_license
stranda/holoSimCell
R
false
false
13,664
r
#library(holoSimCell) #devtools::load_all() ### imputed, popmap (individualID->pop mapping), pts (sample locations) and ashpred ### are now built into holoSimCell ### as built in dataframes (in data/ directory) ## check out the extra two command-line args: simdir and outdir args <- commandArgs(TRUE) i <- as.numeric(arg...
##### # Program - run_analysis.R # This program provides the solution to the project in the Getting and Cleaning Data class. # Comments are to document this code. For more info, refer to the README.md file. # For more info on the output of this program, see the run book for this project. ##### # This is the wor...
/run_analysis.R
no_license
mojohammer/getdataproject
R
false
false
3,701
r
##### # Program - run_analysis.R # This program provides the solution to the project in the Getting and Cleaning Data class. # Comments are to document this code. For more info, refer to the README.md file. # For more info on the output of this program, see the run book for this project. ##### # This is the wor...
#' @author Dennis Assenmacher #' @title PESA-II Crossover #' @description Uniform crossover between two individuals #' @export crossover = function(v1,v2) { length= length(v1) solution = sapply(1:length,function(x){ crossover=rbinom(1,1,0.5) if(crossover==0) return(v1[x]) else return(v2[x]) ...
/PESAII/R/crossover.R
no_license
Malano1988/MOCK
R
false
false
356
r
#' @author Dennis Assenmacher #' @title PESA-II Crossover #' @description Uniform crossover between two individuals #' @export crossover = function(v1,v2) { length= length(v1) solution = sapply(1:length,function(x){ crossover=rbinom(1,1,0.5) if(crossover==0) return(v1[x]) else return(v2[x]) ...
## Nathen Byford ## September 1, 2020 ## STA 3386 ###################### rm(list = ls()) library(datasets) library(tidyverse) faithful <- faithful faithful$waiting %>% mean() faithful$waiting %>% sd() faithful$waiting %>% quantile() faithful$waiting %>% summary() ggplot(faithful, aes(x = eruptions, y = waiting))...
/sep.1/LAB_1.r
no_license
nathenbyford/STA3386
R
false
false
925
r
## Nathen Byford ## September 1, 2020 ## STA 3386 ###################### rm(list = ls()) library(datasets) library(tidyverse) faithful <- faithful faithful$waiting %>% mean() faithful$waiting %>% sd() faithful$waiting %>% quantile() faithful$waiting %>% summary() ggplot(faithful, aes(x = eruptions, y = waiting))...
#libs library(RCurl) library(jsonlite) library(plyr) library(RQuantLib) library(httr) library(quantmod) library(PerformanceAnalytics) library(urca) library(RMySQL) #fixJSON output fixJSON <- function(json_str){ stuff = c('cid','cp','s','cs','vol','expiry','underlying_id','underlying_price', 'p','c','oi',...
/R/volarb.R
no_license
nickkz/chronofile
R
false
false
6,327
r
#libs library(RCurl) library(jsonlite) library(plyr) library(RQuantLib) library(httr) library(quantmod) library(PerformanceAnalytics) library(urca) library(RMySQL) #fixJSON output fixJSON <- function(json_str){ stuff = c('cid','cp','s','cs','vol','expiry','underlying_id','underlying_price', 'p','c','oi',...
library(Knapsackpackage) library(testthat) set.seed(42) n <- 2000 knapsack_objects <- data.frame( w=sample(1:4000, size = n, replace = TRUE), v=runif(n = n, 0, 10000) ) context("Knapsackpackage") test_that('Greedy heuristics knapsack',{ expect_equal(greedy_knapsack(knapsack_objects[1:800,],3500)$value, 19...
/tests/testthat/test_greedy_knapsack.R
no_license
akilahmd/Knapsackpackage
R
false
false
589
r
library(Knapsackpackage) library(testthat) set.seed(42) n <- 2000 knapsack_objects <- data.frame( w=sample(1:4000, size = n, replace = TRUE), v=runif(n = n, 0, 10000) ) context("Knapsackpackage") test_that('Greedy heuristics knapsack',{ expect_equal(greedy_knapsack(knapsack_objects[1:800,],3500)$value, 19...
##This function creates a special "matrix" object that can cache its inverse. makeCacheMatrix <- function(x = matrix()){ m <- NULL set <- function(y){ x <<- y m <<- NULL } get <- function() x setinverse <- function(inv) m <<- i...
/cachematrix.R
no_license
cgarrita/ProgrammingAssignment2
R
false
false
987
r
##This function creates a special "matrix" object that can cache its inverse. makeCacheMatrix <- function(x = matrix()){ m <- NULL set <- function(y){ x <<- y m <<- NULL } get <- function() x setinverse <- function(inv) m <<- i...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/WGCNA.R \name{WGCNA_coexprNetwork} \alias{WGCNA_coexprNetwork} \title{WGCNA main function.} \usage{ WGCNA_coexprNetwork(datExpr, power, maxBlockSize = NULL, minModuleSize = 25, networkType = "signed", mergeCutHeight = 0.2, numericLabels =...
/man/WGCNA_coexprNetwork.Rd
permissive
babyding/YSX
R
false
true
7,744
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/WGCNA.R \name{WGCNA_coexprNetwork} \alias{WGCNA_coexprNetwork} \title{WGCNA main function.} \usage{ WGCNA_coexprNetwork(datExpr, power, maxBlockSize = NULL, minModuleSize = 25, networkType = "signed", mergeCutHeight = 0.2, numericLabels =...
library(plyr) library(ggplot2) library(RColorBrewer) library(reshape2) library(gtools) library(stats) library(shiny) library(scales) library(plotly) ## library(httr) library(shinyTree) library(jsonlite) library(DT) library(shinyjs) library(stringr) ## library(parallel) library(DBI) library(odbc) shinyServer(function(i...
/server.R
no_license
SuLab/mercator_shiny
R
false
false
97,920
r
library(plyr) library(ggplot2) library(RColorBrewer) library(reshape2) library(gtools) library(stats) library(shiny) library(scales) library(plotly) ## library(httr) library(shinyTree) library(jsonlite) library(DT) library(shinyjs) library(stringr) ## library(parallel) library(DBI) library(odbc) shinyServer(function(i...
## generated by make_metadata_documentation(): do not edit by hand ## see source in data-raw/make_metadata_documentation.R #' Combined metadata of all studies in curatedMetagenomicData #' #' The combined sample level metadata of all studies in curatedMetagenomicData. #' #' @format A data.frame with 5716 rows and 80...
/R/combined_metadata.R
permissive
alenzhao/curatedMetagenomicData
R
false
false
5,233
r
## generated by make_metadata_documentation(): do not edit by hand ## see source in data-raw/make_metadata_documentation.R #' Combined metadata of all studies in curatedMetagenomicData #' #' The combined sample level metadata of all studies in curatedMetagenomicData. #' #' @format A data.frame with 5716 rows and 80...
#Running script, assuming that the Kaggle training and test datasets are in the working directory #and named "Kaggle_train.csv" and "Kaggle_test.csv", and that 3 cores are available for parallel #processing (the program implements leave-one-out cross-validation in parallel). The script consists #of a definition of a...
/Adaboost_Dec_27_leave_one_out.R
no_license
StuartBarnum/Adaboost-Titanic
R
false
false
21,084
r
#Running script, assuming that the Kaggle training and test datasets are in the working directory #and named "Kaggle_train.csv" and "Kaggle_test.csv", and that 3 cores are available for parallel #processing (the program implements leave-one-out cross-validation in parallel). The script consists #of a definition of a...
fileUrl <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip" download.file(fileUrl,destfile="ass1.zip",method="curl") #list.files() # unzip the downloaded file d <- read.table(unzip("ass1.zip"), sep=";",header=TRUE, na.strings="?", colClasses=c("character","charact...
/plot3.R
no_license
robarmillis/ExData_Plotting1
R
false
false
1,336
r
fileUrl <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip" download.file(fileUrl,destfile="ass1.zip",method="curl") #list.files() # unzip the downloaded file d <- read.table(unzip("ass1.zip"), sep=";",header=TRUE, na.strings="?", colClasses=c("character","charact...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/bivariate-normal-distribution.R \name{BivNormal} \alias{BivNormal} \alias{dbvnorm} \alias{rbvnorm} \title{Bivariate normal distribution} \usage{ dbvnorm(x, y = NULL, mean1 = 0, mean2 = mean1, sd1 = 1, sd2 = sd1, cor = 0, log = FALSE) rbvno...
/man/BivNormal.Rd
no_license
mnel/extraDistr
R
false
true
2,029
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/bivariate-normal-distribution.R \name{BivNormal} \alias{BivNormal} \alias{dbvnorm} \alias{rbvnorm} \title{Bivariate normal distribution} \usage{ dbvnorm(x, y = NULL, mean1 = 0, mean2 = mean1, sd1 = 1, sd2 = sd1, cor = 0, log = FALSE) rbvno...
## sym = 0, pos = c("名詞", "形容詞"),kigo = "記号", docMatrix2 <- function( directory, pos = "Default" , minFreq = 1, weight = "no", kigo = 0, co = 0, dic = "" , mecabrc = "", etc = "" ) { # posN <- length(pos) # gc() if(any(suppressWarnings(dir(directory) ) > 0)){ ...
/R/docMatrix2.R
no_license
IshidaMotohiro/RMeCabUni
R
false
false
3,897
r
## sym = 0, pos = c("名詞", "形容詞"),kigo = "記号", docMatrix2 <- function( directory, pos = "Default" , minFreq = 1, weight = "no", kigo = 0, co = 0, dic = "" , mecabrc = "", etc = "" ) { # posN <- length(pos) # gc() if(any(suppressWarnings(dir(directory) ) > 0)){ ...
# 计字符串 #### computeString <- function(e,na.rm = TRUE){ e <- unique(e) if(na.rm) e <- e[!is.na(e)] e <- sort(e) return(paste(e,collapse = ",")) } #考试难度,e:某一元素,x:总分#### difficultyExam <- function(e,x){ return(mean(e,na.rm=TRUE) / x) } #求离差,e:某一元素,col:某一列#### deviationfromAverage <- function(e,col){ ret...
/R/rscript/RFunction.R
no_license
ming19871211/docker-tools
R
false
false
6,794
r
# 计字符串 #### computeString <- function(e,na.rm = TRUE){ e <- unique(e) if(na.rm) e <- e[!is.na(e)] e <- sort(e) return(paste(e,collapse = ",")) } #考试难度,e:某一元素,x:总分#### difficultyExam <- function(e,x){ return(mean(e,na.rm=TRUE) / x) } #求离差,e:某一元素,col:某一列#### deviationfromAverage <- function(e,col){ ret...