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 |
|---|---|---|---|---|---|---|---|---|---|
data_dem_clean=function(dat.dem.raw, nm.patient_num, nm.gender, nm.age, nm.race){
dat.sub=data.frame(dat.dem.raw[,c(nm.patient_num, nm.gender, nm.age, nm.race)])
dat.sub[,nm.age]=as.character(dat.sub[,nm.age])
dat.sub[,nm.gender]=as.character(dat.sub[,nm.gender])
dat.sub[,nm.race]=as.character(dat.sub[,... | /FourCePhase2Data/R/functions.R | no_license | ChuanHong/Phase2DataRPackage | R | false | false | 39,547 | r | data_dem_clean=function(dat.dem.raw, nm.patient_num, nm.gender, nm.age, nm.race){
dat.sub=data.frame(dat.dem.raw[,c(nm.patient_num, nm.gender, nm.age, nm.race)])
dat.sub[,nm.age]=as.character(dat.sub[,nm.age])
dat.sub[,nm.gender]=as.character(dat.sub[,nm.gender])
dat.sub[,nm.race]=as.character(dat.sub[,... |
# R script for "Statistisk usikkerhed i meningsmålingerne"
# URL: https://erikgahner.dk/2022/statistisk-usikkerhed-i-meningsmalingerne/
library("tidyverse")
set.seed(1234)
fv <- data.frame(
parti = c("Socialdemokratiet", "Radikale Venstre", "Det Konservative Folkeparti",
"Nye Borgerlige", "Klaus Riskær... | /2022/10-usikkerhed.R | no_license | erikgahner/posts | R | false | false | 3,338 | r | # R script for "Statistisk usikkerhed i meningsmålingerne"
# URL: https://erikgahner.dk/2022/statistisk-usikkerhed-i-meningsmalingerne/
library("tidyverse")
set.seed(1234)
fv <- data.frame(
parti = c("Socialdemokratiet", "Radikale Venstre", "Det Konservative Folkeparti",
"Nye Borgerlige", "Klaus Riskær... |
PACKAGES = c("Amelia",
"apsrtable",
"arm",
"car",
"countrycode",
"cshapes",
"doBy",
"filehash",
"foreign",
"gdata",
"ggplot2",
"gridExtra",
"gtools",
"Hmisc",
"lme4",
"lmer",
"lmtest",
"maptools",
"MASS",
"Matrix",
"mice",
"mvtnorm",
"plm",
"plyr",
"pscl",
"qc... | /packages.R | no_license | Mabdelaziz/R-Scripts | R | false | false | 527 | r | PACKAGES = c("Amelia",
"apsrtable",
"arm",
"car",
"countrycode",
"cshapes",
"doBy",
"filehash",
"foreign",
"gdata",
"ggplot2",
"gridExtra",
"gtools",
"Hmisc",
"lme4",
"lmer",
"lmtest",
"maptools",
"MASS",
"Matrix",
"mice",
"mvtnorm",
"plm",
"plyr",
"pscl",
"qc... |
##### Source file for building dfs with raw data for muplots
rawprep <- data.frame(term=c("total01", "spring01", "summer01", "autumn01", "winter01",
"total12", "spring12", "summer12", "autumn12", "winter12",
"total23", "spring23", "summer23", "autumn23", "wint... | /analyses/source/rawdataprep.R | no_license | cchambe12/nscradiocarbon | R | false | false | 12,480 | r | ##### Source file for building dfs with raw data for muplots
rawprep <- data.frame(term=c("total01", "spring01", "summer01", "autumn01", "winter01",
"total12", "spring12", "summer12", "autumn12", "winter12",
"total23", "spring23", "summer23", "autumn23", "wint... |
### PLOT 4 R Swift Code
setwd("~/ONLINE COURSES/DATA SCIENCE/Coursera Data Science/Electrical Power Consumption Dataset")
### Reads in data from file
dataFile <- data.table::fread(input = "household_power_consumption.txt"
, na.strings="?")
### Prevents Scientific Notation
dataFile[, Globa... | /plot4.R | no_license | omoaletsane/ExData_Plotting1 | R | false | false | 1,016 | r | ### PLOT 4 R Swift Code
setwd("~/ONLINE COURSES/DATA SCIENCE/Coursera Data Science/Electrical Power Consumption Dataset")
### Reads in data from file
dataFile <- data.table::fread(input = "household_power_consumption.txt"
, na.strings="?")
### Prevents Scientific Notation
dataFile[, Globa... |
testlist <- list(A = structure(c(-2.03491660520598e+236, 3.33926300873106e-294, 3.85333647492037e-255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(6L, 6L)), B = structure(0, .Dim = c(1L, 1L)))
result <- do.call(multivariance:::match_rows,testlist)
str(... | /multivariance/inst/testfiles/match_rows/AFL_match_rows/match_rows_valgrind_files/1613112674-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 327 | r | testlist <- list(A = structure(c(-2.03491660520598e+236, 3.33926300873106e-294, 3.85333647492037e-255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(6L, 6L)), B = structure(0, .Dim = c(1L, 1L)))
result <- do.call(multivariance:::match_rows,testlist)
str(... |
paste00 <- function(...) paste0(..., collapse = "")
| /R/paste00.R | no_license | cran/cwhmisc | R | false | false | 53 | r | paste00 <- function(...) paste0(..., collapse = "")
|
num <- 1:10
num = 10:1
100:200 -> num
num1 <- 11 # c(11)
num2 <- 3 # c(3)
num1 / num2
num1 %% num2 #나머지
num1 %/% num2 #몫
#LIST
v<-c(1,2,3)
l<-list(1,2,3)
v * 10 #벡터 곱(연산)은 가능하지만
l*10 #리스트 연산은 불가하다.
v
l
v[1]
l[1]
l[[1]]
l[[1]] * 10 #가능
lds <- list(1,2,3)
lds
lds+100
unlist(lds)
unlist(lds)+100
lds[1]
lds[1]+10... | /R/Rexam/day3/day3.R | no_license | MyChoYS/K_TIL | R | false | false | 4,978 | r | num <- 1:10
num = 10:1
100:200 -> num
num1 <- 11 # c(11)
num2 <- 3 # c(3)
num1 / num2
num1 %% num2 #나머지
num1 %/% num2 #몫
#LIST
v<-c(1,2,3)
l<-list(1,2,3)
v * 10 #벡터 곱(연산)은 가능하지만
l*10 #리스트 연산은 불가하다.
v
l
v[1]
l[1]
l[[1]]
l[[1]] * 10 #가능
lds <- list(1,2,3)
lds
lds+100
unlist(lds)
unlist(lds)+100
lds[1]
lds[1]+10... |
\name{imageQT}
\alias{imageQT}
\title{
Performs an image quadtree decomposition.
}
\description{
The quadtree decomposition is achieved by recursively splitting subimages into regions of stationarity.
}
\usage{
imageQT(image, test = TOS2D, minsize = 64,alpha=0.05, ...)
}
\arguments{
\item{image}{An image to be decomp... | /man/imageQT.Rd | no_license | nunesmatt/LS2Wstat | R | false | false | 2,311 | rd | \name{imageQT}
\alias{imageQT}
\title{
Performs an image quadtree decomposition.
}
\description{
The quadtree decomposition is achieved by recursively splitting subimages into regions of stationarity.
}
\usage{
imageQT(image, test = TOS2D, minsize = 64,alpha=0.05, ...)
}
\arguments{
\item{image}{An image to be decomp... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/compute_functions.R
\name{urlMaps.update}
\alias{urlMaps.update}
\title{Updates the specified UrlMap resource with the data included in the request.}
\usage{
urlMaps.update(UrlMap, project, urlMap, requestId = NULL)
}
\arguments{
\item{UrlMap... | /googlecomputealpha.auto/man/urlMaps.update.Rd | permissive | GVersteeg/autoGoogleAPI | R | false | true | 1,289 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/compute_functions.R
\name{urlMaps.update}
\alias{urlMaps.update}
\title{Updates the specified UrlMap resource with the data included in the request.}
\usage{
urlMaps.update(UrlMap, project, urlMap, requestId = NULL)
}
\arguments{
\item{UrlMap... |
aggregate_returns_portfolio_2 <-
function(data, wts_tbl, period = "monthly"){
output_tbl <- data %>%
multi_asset_return_portfolio(period = period) %>%
portfolio_return(wts_tbl, name_portfolio = "new portfolio") %>%
select(-symbol) %>% #intentionally remove the symbol of new portfolio label
mutat... | /older_version/00_prior_script/04_forecast.R | no_license | StephenLung/Part-5-Draft | R | false | false | 5,698 | r | aggregate_returns_portfolio_2 <-
function(data, wts_tbl, period = "monthly"){
output_tbl <- data %>%
multi_asset_return_portfolio(period = period) %>%
portfolio_return(wts_tbl, name_portfolio = "new portfolio") %>%
select(-symbol) %>% #intentionally remove the symbol of new portfolio label
mutat... |
library(copBasic)
### Name: spectralmeas
### Title: Estimation of the Spectral Measure
### Aliases: spectralmeas
### Keywords: copula (goodness-of-fit) copula (inference) inference
### spectral measure inference goodness-of-fit API to the copula package
### package copula (comparison to)
### ** Examples
## Not ... | /data/genthat_extracted_code/copBasic/examples/spectralmeas.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 2,793 | r | library(copBasic)
### Name: spectralmeas
### Title: Estimation of the Spectral Measure
### Aliases: spectralmeas
### Keywords: copula (goodness-of-fit) copula (inference) inference
### spectral measure inference goodness-of-fit API to the copula package
### package copula (comparison to)
### ** Examples
## Not ... |
# Startup message
.onAttach <- function(lib, pkg) {
packageStartupMessage(
paste0(
"\n >===============================================================================<",
"\n OpenStats is developed by International Mouse Phenotyping Consortium (IMPC) ",
"\n More details : https://www.m... | /R/Auxi.R | no_license | Shicheng-Guo/OpenStats | R | false | false | 115,672 | r | # Startup message
.onAttach <- function(lib, pkg) {
packageStartupMessage(
paste0(
"\n >===============================================================================<",
"\n OpenStats is developed by International Mouse Phenotyping Consortium (IMPC) ",
"\n More details : https://www.m... |
library(tidyverse)
set.seed(123321)
samples <- read_tsv('../autoRNAseq/sampleTable1218_tissues.tab', col_names = F)
qcd_samples <- read_csv('ref/QCdsapmles1218.txt') %>% colnames(.)
samples <- filter(samples, X1%in%qcd_samples)
eye <- filter(samples,X5%in%c("Retina_Adult.Tissue", "RPE_Adult.Tissue",'Cornea_Adult.Tissue... | /scripts/run_2_scripts/make_sampleTableV3.R | no_license | vinay-swamy/ocular_transcriptomes_pipeline | R | false | false | 1,036 | r | library(tidyverse)
set.seed(123321)
samples <- read_tsv('../autoRNAseq/sampleTable1218_tissues.tab', col_names = F)
qcd_samples <- read_csv('ref/QCdsapmles1218.txt') %>% colnames(.)
samples <- filter(samples, X1%in%qcd_samples)
eye <- filter(samples,X5%in%c("Retina_Adult.Tissue", "RPE_Adult.Tissue",'Cornea_Adult.Tissue... |
setwd("C:\\Users\\David Ouyang\\Dropbox\\StatisticalAnalysis\\Sinonasal\\Final Data Set")
library(ggplot2)
data <- read.csv("ComplicationsOverTime.csv", stringsAsFactors = FALSE)
str(data)
data$count <- 1
PropData <- ddply(data, c("year", "compType"), summarise, count = sum(count))
qplot(data = PropData, year, coun... | /Final Data Set/Figures.r | no_license | douyang/Sinonasal-Surgery-Outcomes | R | false | false | 3,987 | r | setwd("C:\\Users\\David Ouyang\\Dropbox\\StatisticalAnalysis\\Sinonasal\\Final Data Set")
library(ggplot2)
data <- read.csv("ComplicationsOverTime.csv", stringsAsFactors = FALSE)
str(data)
data$count <- 1
PropData <- ddply(data, c("year", "compType"), summarise, count = sum(count))
qplot(data = PropData, year, coun... |
### implementation of post death facts class
PostDeath<- function()
{
check_code="CA-004"
check_entry<-get_catalog_entry(check_code)
check_name <- check_entry$check_type
check_alias<-check_entry$alias
me <- CheckType(check_code,check_name, check_alias)
## Add the name for the class
class(me) <- append(... | /Library/PostDeath.R | permissive | rtmill/Data-Quality-Analysis | R | false | false | 1,427 | r | ### implementation of post death facts class
PostDeath<- function()
{
check_code="CA-004"
check_entry<-get_catalog_entry(check_code)
check_name <- check_entry$check_type
check_alias<-check_entry$alias
me <- CheckType(check_code,check_name, check_alias)
## Add the name for the class
class(me) <- append(... |
#!/usr/bin/env Rscript
library("tidyverse")
library("SingleCellExperiment")
library("optparse")
library("Seurat")
option_list = list(
make_option(c("-w", "--workingdir"), type="character", default=NULL,
help="working directory", metavar="character"),
make_option(c("-i", "--input"), type="character"... | /scpipelines/R/seurat.R | permissive | deevdevil88/single-cell | R | false | false | 875 | r | #!/usr/bin/env Rscript
library("tidyverse")
library("SingleCellExperiment")
library("optparse")
library("Seurat")
option_list = list(
make_option(c("-w", "--workingdir"), type="character", default=NULL,
help="working directory", metavar="character"),
make_option(c("-i", "--input"), type="character"... |
#' Convert a named color into a hexadecimal color with rgb value
#' @param color A named color
#' @return a hexadecimal color
#' @importFrom stringr str_flatten str_detect
#' @importFrom grDevices col2rgb
#' @export
#' @examples
#' color2hex("green")
#' color2hex("red")
color2hex <- function(color) {
## return (dir... | /R/ztable2flextable.R | no_license | cardiomoon/ztable | R | false | false | 8,589 | r | #' Convert a named color into a hexadecimal color with rgb value
#' @param color A named color
#' @return a hexadecimal color
#' @importFrom stringr str_flatten str_detect
#' @importFrom grDevices col2rgb
#' @export
#' @examples
#' color2hex("green")
#' color2hex("red")
color2hex <- function(color) {
## return (dir... |
timingCI <- function(result.df,task_num,exp_condition) {
result_subset.df <- subset(result.df,TaskID==task_num)
result_subset.df <- result_subset.df[result_subset.df$VisModeID==exp_condition,]
result_subset.df$log_duration <- log(result_subset.df$duration)
result_skewness <- skewness(result_subset.df$duratio... | /Analysis/timingCIs.R | permissive | cquijanoch/VRTrendVis | R | false | false | 1,562 | r | timingCI <- function(result.df,task_num,exp_condition) {
result_subset.df <- subset(result.df,TaskID==task_num)
result_subset.df <- result_subset.df[result_subset.df$VisModeID==exp_condition,]
result_subset.df$log_duration <- log(result_subset.df$duration)
result_skewness <- skewness(result_subset.df$duratio... |
# ---------------------------------------------------------------------
# gets a good range for the tuning parameter in CASC
# ---------------------------------------------------------------------
getTuningRangeRohe = function(graphMatrix, covariates, nBlocks,
assortative) {
nCov = ncol(co... | /R/getTuningRangeRohe.R | permissive | Pill-GZ/CASC | R | false | false | 1,441 | r | # ---------------------------------------------------------------------
# gets a good range for the tuning parameter in CASC
# ---------------------------------------------------------------------
getTuningRangeRohe = function(graphMatrix, covariates, nBlocks,
assortative) {
nCov = ncol(co... |
\name{strip}
\alias{strip}
\title{Strip strings from white space}
\description{Strip a string from white space from left, right or both}
\usage{
strip(string, left=NA)
}
\arguments{
\item{string}{A character vector of strings to be stripped -- or a list of them.}
\item{left}{Whether to strip strings from right, l... | /R/packages/basetools/man/strip.Rd | permissive | tnrangwi/CompareProgrammingUsingHolidayManager | R | false | false | 900 | rd | \name{strip}
\alias{strip}
\title{Strip strings from white space}
\description{Strip a string from white space from left, right or both}
\usage{
strip(string, left=NA)
}
\arguments{
\item{string}{A character vector of strings to be stripped -- or a list of them.}
\item{left}{Whether to strip strings from right, l... |
# Convenience functions for generating containers
# A sequence is a container made by putting anims in a sequence
vec <- function(..., start=0, durn=NULL, label=labelSel()) {
anims <- list(...)
x <- container(anims, start, durn, label)
class(x) <- c("vecAnim", class(x))
x
}
# A track is a container m... | /R/build.R | no_license | hdhe/animaker | R | false | false | 4,677 | r |
# Convenience functions for generating containers
# A sequence is a container made by putting anims in a sequence
vec <- function(..., start=0, durn=NULL, label=labelSel()) {
anims <- list(...)
x <- container(anims, start, durn, label)
class(x) <- c("vecAnim", class(x))
x
}
# A track is a container m... |
#' General Inference
#' Testing general hypothesis regarding the qunatile process of the endogenous
#' variable.
#' @param object An ivqr object returned from the function \code{ivqr()}
#' @param variable A number indicates which endogenous variable to test. Since
#' at most two endongenous variables can be included i... | /R/ks.R | no_license | geyh96/IVQR | R | false | false | 10,593 | r | #' General Inference
#' Testing general hypothesis regarding the qunatile process of the endogenous
#' variable.
#' @param object An ivqr object returned from the function \code{ivqr()}
#' @param variable A number indicates which endogenous variable to test. Since
#' at most two endongenous variables can be included i... |
########################################################
###### COMPARING GROUND-BASED VEGETATION MEASURES ######
######### TO REMOTELY SENSED VEGETATION INDICES ########
############# NSERP KJB Jul-Aug 2016 #################
########################################################
#### SETUP ####
## WD
wd_workco... | /rmt-veg.R | no_license | kjbark3r/RemoteSensing | R | false | false | 11,441 | r | ########################################################
###### COMPARING GROUND-BASED VEGETATION MEASURES ######
######### TO REMOTELY SENSED VEGETATION INDICES ########
############# NSERP KJB Jul-Aug 2016 #################
########################################################
#### SETUP ####
## WD
wd_workco... |
#' panel_3d UI Function
#'
#' @description A shiny Module that generates the 3d model of the input raster.
#'
#' @param id,input,output,session Internal parameters for {shiny}.
#'
#' @noRd
#'
#' @importFrom shiny NS tagList
mod_panel_3d_ui <- function(id){
ns <- NS(id)
tagList(
rglwidget::rglwidgetOutput(ns("PL... | /R/mod_panel_3d.R | permissive | joshualerickson/trexr | R | false | false | 4,786 | r | #' panel_3d UI Function
#'
#' @description A shiny Module that generates the 3d model of the input raster.
#'
#' @param id,input,output,session Internal parameters for {shiny}.
#'
#' @noRd
#'
#' @importFrom shiny NS tagList
mod_panel_3d_ui <- function(id){
ns <- NS(id)
tagList(
rglwidget::rglwidgetOutput(ns("PL... |
## Velocity curves - model and application
## adult & Juvenile
## produces probability curves for velocity, and application to sample node data (time series) for adult and Juvenile
## also data distributions
## packages
library(tidyverse)
library(tidyr)
library(sm)
library(lubridate) # work with dates
library(dplyr... | /scripts/sas_velocity/F2_F300_Velocity_model_and_application_final.R | no_license | ksirving/flow_eco_mech | R | false | false | 32,368 | r | ## Velocity curves - model and application
## adult & Juvenile
## produces probability curves for velocity, and application to sample node data (time series) for adult and Juvenile
## also data distributions
## packages
library(tidyverse)
library(tidyr)
library(sm)
library(lubridate) # work with dates
library(dplyr... |
# Zac Monroe
# B365 - 11946
# HW 1
# Problem 7
# See hw1_submission.pdf for non-code work/answers
# This is the sample space
p = c(.1, .2, .3, .35, .02, .03);
# This is the vector containing the maximum number for each element in p that a
# random number must be less than in order for the index of that element in p
#... | /b365/hw1/prob7.r | no_license | ZacMilano/OldSchoolFiles | R | false | false | 1,809 | r | # Zac Monroe
# B365 - 11946
# HW 1
# Problem 7
# See hw1_submission.pdf for non-code work/answers
# This is the sample space
p = c(.1, .2, .3, .35, .02, .03);
# This is the vector containing the maximum number for each element in p that a
# random number must be less than in order for the index of that element in p
#... |
#uses sqldf and dplyr packages.
library(sqldf)
library(dplyr)
#Merges the training and the test sets to create one data set.
# Set Filename and URL
filename<-"dataset.zip"
url<-"https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip"
#Download and Unzip the File
download.file(url,filena... | /run_analysis.R | no_license | edward1two/Getting-and-Cleaning-Data-Assignment | R | false | false | 2,865 | r | #uses sqldf and dplyr packages.
library(sqldf)
library(dplyr)
#Merges the training and the test sets to create one data set.
# Set Filename and URL
filename<-"dataset.zip"
url<-"https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip"
#Download and Unzip the File
download.file(url,filena... |
#Unit 6
a <- c(0,1,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0)
b <- c(0,1,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0)
#function to transform names into a binary matrix based on letters
transNameDist <- function(x,y){
alphabets <- data.frame(letters,number=seq_along(letters))
name1 <- x
name2 <- y
a <- ifelse(... | /Unit 6/Week6_Solutions.r | no_license | franckess/Analytics-Edge-MIT | R | false | false | 13,467 | r | #Unit 6
a <- c(0,1,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0)
b <- c(0,1,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0)
#function to transform names into a binary matrix based on letters
transNameDist <- function(x,y){
alphabets <- data.frame(letters,number=seq_along(letters))
name1 <- x
name2 <- y
a <- ifelse(... |
testlist <- list(Rs = numeric(0), atmp = numeric(0), relh = c(7.64681398433536e-304, -4.29227809743625e-307, 1.81037701089217e+87, -2.93112217825115e-158, 9.03412394302482e-46, 7.31195213563656e+256, -1.93925524631599e-68, 2.08343441298214e-168, 1.39098956557385e-309, 4.66631809251609e-301, -4.35371624255136e-143, ... | /meteor/inst/testfiles/ET0_Makkink/AFL_ET0_Makkink/ET0_Makkink_valgrind_files/1615864408-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 675 | r | testlist <- list(Rs = numeric(0), atmp = numeric(0), relh = c(7.64681398433536e-304, -4.29227809743625e-307, 1.81037701089217e+87, -2.93112217825115e-158, 9.03412394302482e-46, 7.31195213563656e+256, -1.93925524631599e-68, 2.08343441298214e-168, 1.39098956557385e-309, 4.66631809251609e-301, -4.35371624255136e-143, ... |
#' Migrate HemOnc and RxNorm Vocabularies Ancestry
#' @description This function executes on the condition that there are zero rows in the concept_ancestor table in the hemonc_extension schema.
#' @import SqlRender
#' @import pg13
#' @import dplyr
#' @param source_schema The schema where the main OMOP vocabularies are ... | /R/migrateConceptAncestor.R | no_license | meerapatelmd/HemOncExt | R | false | false | 1,865 | r | #' Migrate HemOnc and RxNorm Vocabularies Ancestry
#' @description This function executes on the condition that there are zero rows in the concept_ancestor table in the hemonc_extension schema.
#' @import SqlRender
#' @import pg13
#' @import dplyr
#' @param source_schema The schema where the main OMOP vocabularies are ... |
library(testthat)
test_check("idbCollections") | /tests/testthat.R | permissive | iDigBio/idb-us-collections | R | false | false | 46 | r | library(testthat)
test_check("idbCollections") |
# ---------------------------------------------------------------------------------------------------------------
# 0: Loading packages
# ---------------------------------------------------------------------------------------------------------------
require(readr)
require(purrr)
require(stringr)
require(dplyr)
# -... | /run_analysis.R | no_license | olusade1/GettingCleaningData | R | false | false | 4,814 | r | # ---------------------------------------------------------------------------------------------------------------
# 0: Loading packages
# ---------------------------------------------------------------------------------------------------------------
require(readr)
require(purrr)
require(stringr)
require(dplyr)
# -... |
# Unit tests on the hybridModel function
if(require(fpp) & require(forecast) & require(testthat)){
context("Testing input for hybridModel()")
test_that("Testing invalid inputs", {
expect_error(hybridModel(y = 1:10, models = "jten"))
expect_error(hybridModel(y = 1:10, models = 5))
expect_error(hybridMode... | /forecastHybrid/tests/testthat/test-hybridModel.R | no_license | ingted/R-Examples | R | false | false | 2,107 | r | # Unit tests on the hybridModel function
if(require(fpp) & require(forecast) & require(testthat)){
context("Testing input for hybridModel()")
test_that("Testing invalid inputs", {
expect_error(hybridModel(y = 1:10, models = "jten"))
expect_error(hybridModel(y = 1:10, models = 5))
expect_error(hybridMode... |
library(qtl)
library(funqtl)
# load first replicate of Spalding data
spal <- read.cross("csv", "", "../Datas/input_rev.csv", genotypes=c("A","B"), na.strings="*")
spal <- convert2riself(spal) # no fcn exist
spal <- jittermap(spal)
#spal <- fill.geno(spal, method=c("imp"))
#spal <- calc.genoprob(spal, step=1)
... | /Simulations/forsim2.R | permissive | ruixiangliu/Paper_FunQTL | R | false | false | 2,870 | r | library(qtl)
library(funqtl)
# load first replicate of Spalding data
spal <- read.cross("csv", "", "../Datas/input_rev.csv", genotypes=c("A","B"), na.strings="*")
spal <- convert2riself(spal) # no fcn exist
spal <- jittermap(spal)
#spal <- fill.geno(spal, method=c("imp"))
#spal <- calc.genoprob(spal, step=1)
... |
planarians_evalue=do.call(rbind,lapply(split(planarians,planarians$Trinity5_Id),function(x) x[which.min(x$E_value),]))
dim(planarians_evalue)
planarians_cov_grt_50=do.call(rbind,lapply(split(planarians,planarians$Trinity5_Id),function(x) x[(x$Coverage_percentage >= 50),]))
dim(planarians_cov_grt_50)
planarians_cov_grt_... | /R_scripts/blastP_hits_filtering_planarians.R | no_license | tsekara/TransRefiner | R | false | false | 1,096 | r | planarians_evalue=do.call(rbind,lapply(split(planarians,planarians$Trinity5_Id),function(x) x[which.min(x$E_value),]))
dim(planarians_evalue)
planarians_cov_grt_50=do.call(rbind,lapply(split(planarians,planarians$Trinity5_Id),function(x) x[(x$Coverage_percentage >= 50),]))
dim(planarians_cov_grt_50)
planarians_cov_grt_... |
pollutantmean <- function(directory, pollutant, id = 1:332) {
## 'directory' is a character vector of length 1 indicating
## the location of the CSV files
## 'pollutant' is a character vector of length 1 indicating
## the name of the pollutant for which we will calculate the
## mean; either "su... | /pollutantmean.R | no_license | Homulvas/datasciencecoursera | R | false | false | 1,223 | r | pollutantmean <- function(directory, pollutant, id = 1:332) {
## 'directory' is a character vector of length 1 indicating
## the location of the CSV files
## 'pollutant' is a character vector of length 1 indicating
## the name of the pollutant for which we will calculate the
## mean; either "su... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rc_rCompare.R
\name{rCompare}
\alias{rCompare}
\title{Compare two data frames}
\usage{
rCompare(dfA, dfB, keys = NA, roundDigits = NA, mismatches = NA,
trimChars = FALSE)
}
\arguments{
\item{dfA}{data frame. The first data object. dataCompa... | /dataCompareR/man/rCompare.Rd | permissive | Lextuga007/dataCompareR | R | false | true | 2,304 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rc_rCompare.R
\name{rCompare}
\alias{rCompare}
\title{Compare two data frames}
\usage{
rCompare(dfA, dfB, keys = NA, roundDigits = NA, mismatches = NA,
trimChars = FALSE)
}
\arguments{
\item{dfA}{data frame. The first data object. dataCompa... |
testlist <- list(b = c(-1667457875L, -1399022436L, 67964173L, 67964173L, -1835887972L))
result <- do.call(mcga:::ByteVectorToDoubles,testlist)
str(result) | /mcga/inst/testfiles/ByteVectorToDoubles/AFL_ByteVectorToDoubles/ByteVectorToDoubles_valgrind_files/1613106210-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 155 | r | testlist <- list(b = c(-1667457875L, -1399022436L, 67964173L, 67964173L, -1835887972L))
result <- do.call(mcga:::ByteVectorToDoubles,testlist)
str(result) |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/CfFuncs.R
\name{npv}
\alias{npv}
\title{Net Present Value of a periodic cashflow (NPV)}
\usage{
npv(i, cf, ts = seq(from = 0, by = 1, along.with = cf))
}
\arguments{
\item{i}{The rate used to discount the cashflow. It must be effecti... | /man/npv.Rd | no_license | cran/tvm | R | false | true | 778 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/CfFuncs.R
\name{npv}
\alias{npv}
\title{Net Present Value of a periodic cashflow (NPV)}
\usage{
npv(i, cf, ts = seq(from = 0, by = 1, along.with = cf))
}
\arguments{
\item{i}{The rate used to discount the cashflow. It must be effecti... |
\encoding{UTF-8}
\name{MultipleParaNCAoutput}
\alias{MultipleParaNCAoutput}
\title{Output of NCA for parallel study}
\description{
We provides several txt outputs.
1. NCA PK.txt:
-->Css_max, Tss_max, AUCss(tau), ln(Css_max), ln(AUCss(tau)),
MRTss(tau), T1/2(z), Vd/F, lambda, Clss/F, Cav and... | /man/MultipleParaNCAoutput.rd | no_license | cran/bear | R | false | false | 531 | rd | \encoding{UTF-8}
\name{MultipleParaNCAoutput}
\alias{MultipleParaNCAoutput}
\title{Output of NCA for parallel study}
\description{
We provides several txt outputs.
1. NCA PK.txt:
-->Css_max, Tss_max, AUCss(tau), ln(Css_max), ln(AUCss(tau)),
MRTss(tau), T1/2(z), Vd/F, lambda, Clss/F, Cav and... |
library(asbio) # Contains function ConDis.matrix
library(reshape2) # To access melt function
library(ggplot2)
library(VIM)
library(Amelia)
library(RcppEigen)
library(HSAUR2)
library(outliers) # To find outliers in given data.
# Question 1
library(asbio) # Contains function ConDis.matrix
x <- c(3,4,2... | /Assignment 2/Solution/Code.R | no_license | stk94/R | R | false | false | 8,435 | r | library(asbio) # Contains function ConDis.matrix
library(reshape2) # To access melt function
library(ggplot2)
library(VIM)
library(Amelia)
library(RcppEigen)
library(HSAUR2)
library(outliers) # To find outliers in given data.
# Question 1
library(asbio) # Contains function ConDis.matrix
x <- c(3,4,2... |
library(readr)
library(stringr)
# principal table
clientes <- readRDS("FinalDataSet/transacciones.rds")
df1 <- clientes
varnum <- 'NumTransx'
varcat <- 'Abandono'
# dfs %>%
# ggplot(aes(x = factor(Abandono), y = NumTransx)) +
# geom_boxplot() +
# theme_bw()
bxplt <- function(df, varcat, varnum){
dfs... | /test.R | no_license | romanAVJ/ProyectoSupervivencia | R | false | false | 728 | r | library(readr)
library(stringr)
# principal table
clientes <- readRDS("FinalDataSet/transacciones.rds")
df1 <- clientes
varnum <- 'NumTransx'
varcat <- 'Abandono'
# dfs %>%
# ggplot(aes(x = factor(Abandono), y = NumTransx)) +
# geom_boxplot() +
# theme_bw()
bxplt <- function(df, varcat, varnum){
dfs... |
library(riskyr)
### Name: is_complement
### Title: Verify that two numbers are complements.
### Aliases: is_complement
### ** Examples
# Basics:
is_complement(0, 1) # => TRUE
is_complement(1/3, 2/3) # => TRUE
is_complement(.33, .66) # => TRUE (as within default tol = .01)
is_complement(.33, .... | /data/genthat_extracted_code/riskyr/examples/is_complement.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 1,048 | r | library(riskyr)
### Name: is_complement
### Title: Verify that two numbers are complements.
### Aliases: is_complement
### ** Examples
# Basics:
is_complement(0, 1) # => TRUE
is_complement(1/3, 2/3) # => TRUE
is_complement(.33, .66) # => TRUE (as within default tol = .01)
is_complement(.33, .... |
library(cmdstanr)
library(copula)
library(ExtDist)
library(VGAM)
fp <- file.path("./examples/stan/copula/multi_normal_copula_example.stan")
mod <- cmdstan_model(fp, include_paths = "./functions/copula",
force_recompile = T)
G3 <- normalCopula(param=c(0.4,0.2,-0.8, -0.3, 0.15, -0.5), dim = 4, dis... | /examples/copula/R/multi_normal_example.R | permissive | jtimonen/helpful_stan_functions | R | false | false | 916 | r | library(cmdstanr)
library(copula)
library(ExtDist)
library(VGAM)
fp <- file.path("./examples/stan/copula/multi_normal_copula_example.stan")
mod <- cmdstan_model(fp, include_paths = "./functions/copula",
force_recompile = T)
G3 <- normalCopula(param=c(0.4,0.2,-0.8, -0.3, 0.15, -0.5), dim = 4, dis... |
library(dplyr)
source('./get_reactome_table.R')
args=commandArgs(trailingOnly=T)
ctype_enrichData=args[1]
#Load the TF-glycosylation pathway data. Loaded as "ctype_res_dta"
# loaded from the TF_GLYCOPATH_ENRICHMENT/TF_glycopath_enrichment_results directory:
f_path='../TF_GLYCOPATH_ENRICHMENT/TF_glycopath_enrichment_... | /TF_REACTOME_ENRICHMENT/TF_reactome_enrich.R | no_license | neel-lab/TF-glycogene | R | false | false | 1,658 | r | library(dplyr)
source('./get_reactome_table.R')
args=commandArgs(trailingOnly=T)
ctype_enrichData=args[1]
#Load the TF-glycosylation pathway data. Loaded as "ctype_res_dta"
# loaded from the TF_GLYCOPATH_ENRICHMENT/TF_glycopath_enrichment_results directory:
f_path='../TF_GLYCOPATH_ENRICHMENT/TF_glycopath_enrichment_... |
# Copyright (c) 2015,2016, Qin Zhu and Junhyong Kim, University of Pennsylvania.
# All Rights Reserved.
#
# You may not use this file except in compliance with the Kim Lab License
# located at
#
# http://kim.bio.upenn.edu/software/LICENSE
#
# Unless required by applicable law or agreed to in writing, this
# softwar... | /inst/app/src/server_code/analysis/stats_table.R | no_license | jeevanyue/PIVOT | R | false | false | 12,135 | r | # Copyright (c) 2015,2016, Qin Zhu and Junhyong Kim, University of Pennsylvania.
# All Rights Reserved.
#
# You may not use this file except in compliance with the Kim Lab License
# located at
#
# http://kim.bio.upenn.edu/software/LICENSE
#
# Unless required by applicable law or agreed to in writing, this
# softwar... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/datasets.R
\docType{data}
\name{m0}
\alias{m0}
\title{Austria SUTs}
\format{A supply table (V, a matrix) and a separate
import vector (m0), domestic use table (Ud, matrix) and import
use table (Um, matrix). Furthermore, the country an... | /man/m0.Rd | no_license | zauster/riot | R | false | true | 592 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/datasets.R
\docType{data}
\name{m0}
\alias{m0}
\title{Austria SUTs}
\format{A supply table (V, a matrix) and a separate
import vector (m0), domestic use table (Ud, matrix) and import
use table (Um, matrix). Furthermore, the country an... |
shinyServer( # run once when app is launched
function(input, output, session){ # each time a user visits the app
# source various button and input observer to launch alert or change pages
# disabling buttons ...
source(file = 'sources/servers/input_observers.R', local = TRUE)$value
# source... | /inst/wgcna_shiny/server.R | no_license | bdemeulder/WGCNAapp | R | false | false | 770 | r | shinyServer( # run once when app is launched
function(input, output, session){ # each time a user visits the app
# source various button and input observer to launch alert or change pages
# disabling buttons ...
source(file = 'sources/servers/input_observers.R', local = TRUE)$value
# source... |
# from https://stackoverflow.com/questions/39353580/how-to-implement-q-learning-in-r
#
# Author: aichao Date: Sep 6, 2016
#
# Input parameters are:
# R is the rewards matrix as defined in the blog
# N is the number of episodes to iterate
# alpha is the learning rate
# gamma is the discount factor
# tgt.state is the ta... | /qlearn.R | no_license | Mulliszl/R-Functions | R | false | false | 1,391 | r | # from https://stackoverflow.com/questions/39353580/how-to-implement-q-learning-in-r
#
# Author: aichao Date: Sep 6, 2016
#
# Input parameters are:
# R is the rewards matrix as defined in the blog
# N is the number of episodes to iterate
# alpha is the learning rate
# gamma is the discount factor
# tgt.state is the ta... |
#' Calculate Exons Per Transcript
#'
#' Brief Description: This function takes as input the cleaned
#' chromosome file and the data frames created from the merged
#' liver gtf, which have been subsetted based on transcripts
#' present in the known, ntng or ntkg data. It then creates a reference
#' table of transcript... | /stcr/R/exon.tpt.table.R | no_license | hsmith9002/RLBTCP | R | false | false | 4,302 | r | #' Calculate Exons Per Transcript
#'
#' Brief Description: This function takes as input the cleaned
#' chromosome file and the data frames created from the merged
#' liver gtf, which have been subsetted based on transcripts
#' present in the known, ntng or ntkg data. It then creates a reference
#' table of transcript... |
geocoded_attentats_done <- read_excel("geocoded_attentats_done.xlsx",
col_types = c("text", "text", "text",
"text", "text", "numeric", "numeric",
"text", "text", "text", "text", "text",
"numeric", "text", "numeric", "numeric",
"numeric", "numeric", "numeric",
"numeric", "text", "text", "text",
"text", "text", "text", "... | /atttentat.R | no_license | hsidb/research- | R | false | false | 2,130 | r | geocoded_attentats_done <- read_excel("geocoded_attentats_done.xlsx",
col_types = c("text", "text", "text",
"text", "text", "numeric", "numeric",
"text", "text", "text", "text", "text",
"numeric", "text", "numeric", "numeric",
"numeric", "numeric", "numeric",
"numeric", "text", "text", "text",
"text", "text", "text", "... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/momentum_routines.R
\name{gene.relative.velocity.estimates}
\alias{gene.relative.velocity.estimates}
\title{Estimate RNA velocity using gene-relative slopes}
\usage{
gene.relative.velocity.estimates(emat, nmat, deltaT = 1, smat = NULL,
stea... | /man/gene.relative.velocity.estimates.Rd | no_license | tractatus/velocyto.R | R | false | true | 3,250 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/momentum_routines.R
\name{gene.relative.velocity.estimates}
\alias{gene.relative.velocity.estimates}
\title{Estimate RNA velocity using gene-relative slopes}
\usage{
gene.relative.velocity.estimates(emat, nmat, deltaT = 1, smat = NULL,
stea... |
is.fasta <- function(fpath){
stop('TODO')
}
is.fastq <- function(fpath){
stop('TODO')
}
which.ext <- function(fpath) {
bfxns <- list(
'fasta' = is.fasta,
'fastq' = is.fastq
)
stop('TODO')
}
has.header <- function(fpath){
fCon <- file(fpath, 'r')
header <- readLines(fCon, n=1, skipNul=T); close(... | /R/fastautil.R | permissive | Chebuu/fastalign | R | false | false | 1,255 | r | is.fasta <- function(fpath){
stop('TODO')
}
is.fastq <- function(fpath){
stop('TODO')
}
which.ext <- function(fpath) {
bfxns <- list(
'fasta' = is.fasta,
'fastq' = is.fastq
)
stop('TODO')
}
has.header <- function(fpath){
fCon <- file(fpath, 'r')
header <- readLines(fCon, n=1, skipNul=T); close(... |
#' Scores a swim meet
#'
#' Used to add a \code{Points} column with point values for each place. Can
#' either score "timed finals" type meets where any athlete can get any place,
#' or "prelims-finals", type meets, where placing is restricted by prelim
#' performance.
#'
#' @importFrom dplyr slice
#' @importFrom dply... | /R/results_score.R | no_license | hareshsuppiah/SwimmeR-1 | R | false | false | 13,693 | r | #' Scores a swim meet
#'
#' Used to add a \code{Points} column with point values for each place. Can
#' either score "timed finals" type meets where any athlete can get any place,
#' or "prelims-finals", type meets, where placing is restricted by prelim
#' performance.
#'
#' @importFrom dplyr slice
#' @importFrom dply... |
\name{Select}
\alias{Select}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
%% ~~function to do ... ~~
}
\description{
%% ~~ A concise (1-5 lines) description of what the function does. ~~
}
\usage{
Select(b)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
\item{b}{
%%... | /gtSampling/man/Select.Rd | no_license | supriyan/gtSampling | R | false | false | 1,242 | rd | \name{Select}
\alias{Select}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
%% ~~function to do ... ~~
}
\description{
%% ~~ A concise (1-5 lines) description of what the function does. ~~
}
\usage{
Select(b)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
\item{b}{
%%... |
df <- read.csv("~/Documents/study/stat_learning/data/Advertising.csv")
df$X <- NULL
summary(lm(Sales ~ TV, df))["coefficients"]
summary(lm(Sales ~ Radio, df))["coefficients"]
summary(lm(Sales ~ Newspaper, df))["coefficients"]
par(mfrow=c(1,3))
plot(df$TV, df$Sales,col = "red", xlab = "TV", ylab = "Sales")
abline(lm... | /stat_learning/hw1.R | no_license | katejim/study | R | false | false | 3,606 | r | df <- read.csv("~/Documents/study/stat_learning/data/Advertising.csv")
df$X <- NULL
summary(lm(Sales ~ TV, df))["coefficients"]
summary(lm(Sales ~ Radio, df))["coefficients"]
summary(lm(Sales ~ Newspaper, df))["coefficients"]
par(mfrow=c(1,3))
plot(df$TV, df$Sales,col = "red", xlab = "TV", ylab = "Sales")
abline(lm... |
#' Summary of all variables within train and test data
#'
#' @param train.set The \emph{train} data (a data frame)
#' @param test.set The \emph{test} data (a data frame)
#' @param var.output (\strong{optional}) The \emph{output} variable (has to be a variable in \code{train.set})
#' @param digits (defaults to \code{3})... | /R/____allvariables.summary____old____.R | no_license | ahdxb/data.exploration | R | false | false | 3,681 | r | #' Summary of all variables within train and test data
#'
#' @param train.set The \emph{train} data (a data frame)
#' @param test.set The \emph{test} data (a data frame)
#' @param var.output (\strong{optional}) The \emph{output} variable (has to be a variable in \code{train.set})
#' @param digits (defaults to \code{3})... |
#' getPreloadedDataFilename
#'
#' Gets the path of Polyhedra preloaded data CSV file
#'
#' @param polyhedra_preloaded_data filename of polyhedra preloaded data csv
#' @return the path to the Polyhedra database file
#' @noRd
getPreloadedDataFilename <- function(polyhedra_preloaded_data =
... | /R/package-lib.R | no_license | schloerke/Rpolyhedra | R | false | false | 13,139 | r | #' getPreloadedDataFilename
#'
#' Gets the path of Polyhedra preloaded data CSV file
#'
#' @param polyhedra_preloaded_data filename of polyhedra preloaded data csv
#' @return the path to the Polyhedra database file
#' @noRd
getPreloadedDataFilename <- function(polyhedra_preloaded_data =
... |
paralogscold <- read.table("paralogs_cold.dat",header=T)
paralogshot <- read.table("paralogs_hot.dat",header=T)
pdf("coldhot_paralogs.pdf")
boxplot(paralogscold$TOTAL,paralogshot$TOTAL,main="paralogs Cold-Hot Density BoxPlot", outline=FALSE, names=c("Cold","Hot"))
| /summary_plots/chrom_summary.old/coldhot_paralogs.R | no_license | stajichlab/coprinopsis_PNAS_2010 | R | false | false | 265 | r | paralogscold <- read.table("paralogs_cold.dat",header=T)
paralogshot <- read.table("paralogs_hot.dat",header=T)
pdf("coldhot_paralogs.pdf")
boxplot(paralogscold$TOTAL,paralogshot$TOTAL,main="paralogs Cold-Hot Density BoxPlot", outline=FALSE, names=c("Cold","Hot"))
|
Huber.full <- readRDS("/Users/Matt Multach/Dropbox/USC_Grad2/Courses/Dissertation/Dissertation_Git/Data_Storage/Full_results/Huberlasso_full.RData")
#dealing with error/result from map(safely())
#create empty lists for error + result
Huber.error <- list()
Huber.result <- list()
Huber.final <- list()
#split data into s... | /Model_Application/Full_Run/store_huber_FULL.R | no_license | multach87/Dissertation | R | false | false | 2,202 | r | Huber.full <- readRDS("/Users/Matt Multach/Dropbox/USC_Grad2/Courses/Dissertation/Dissertation_Git/Data_Storage/Full_results/Huberlasso_full.RData")
#dealing with error/result from map(safely())
#create empty lists for error + result
Huber.error <- list()
Huber.result <- list()
Huber.final <- list()
#split data into s... |
####### R Code For DATA ANALYSIS 8 ##########################
####### REGRESSION ##########################
# Upload the dataset for this week.
# Call it examdata
examdata = read.csv(file.choose(), header = TRUE)
####### SUPER IMPORTANT STE... | /DA8_ Simple Linear Regression.R | no_license | eliza3c23/Stats-R | R | false | false | 7,698 | r | ####### R Code For DATA ANALYSIS 8 ##########################
####### REGRESSION ##########################
# Upload the dataset for this week.
# Call it examdata
examdata = read.csv(file.choose(), header = TRUE)
####### SUPER IMPORTANT STE... |
\name{Sbackward}
\alias{Sbackward}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Computes The Backward Probabilities
}
\description{
The \code{Sbackward} function computes the backward probabilities. The backward probabilities for state 'S' up to output observations at time k is defined ... | /man/Sbackward.Rd | no_license | cran/SAutomata | R | false | false | 1,662 | rd | \name{Sbackward}
\alias{Sbackward}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Computes The Backward Probabilities
}
\description{
The \code{Sbackward} function computes the backward probabilities. The backward probabilities for state 'S' up to output observations at time k is defined ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/agentset-functions.R
\docType{methods}
\name{inRadius}
\alias{inRadius}
\alias{inRadius,matrix,numeric,matrix-method}
\title{\code{Agents} in radius}
\usage{
inRadius(agents, radius, agents2, world, torus = FALSE)
\S4method{inRadius}{matrix,... | /man/inRadius.Rd | no_license | mt-digital/NetLogoR | R | false | true | 3,186 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/agentset-functions.R
\docType{methods}
\name{inRadius}
\alias{inRadius}
\alias{inRadius,matrix,numeric,matrix-method}
\title{\code{Agents} in radius}
\usage{
inRadius(agents, radius, agents2, world, torus = FALSE)
\S4method{inRadius}{matrix,... |
x <-1:5
y <- 1:5
plot(x,y) | /plot_xy.R | no_license | sharonwsolis/project_practice | R | false | false | 26 | r | x <-1:5
y <- 1:5
plot(x,y) |
#Forest Cover Prediction - Kaggle
#Environment Setup
###Remove Objects
rm(list = ls())
###Clear Memory
gc(reset = TRUE)
###Set Working Directory
setwd("/Users/eve/Dropbox/Activities_2017/Kaggle1_ForestCoverTypePredictions")
###Library
library(dplyr)
library(randomForest)
library(ggplot2)
#Data Summary
dat <- read.... | /1_RandomForest_Try.R | no_license | EveChen/Kaggle_Easy1 | R | false | false | 1,890 | r | #Forest Cover Prediction - Kaggle
#Environment Setup
###Remove Objects
rm(list = ls())
###Clear Memory
gc(reset = TRUE)
###Set Working Directory
setwd("/Users/eve/Dropbox/Activities_2017/Kaggle1_ForestCoverTypePredictions")
###Library
library(dplyr)
library(randomForest)
library(ggplot2)
#Data Summary
dat <- read.... |
# Author: Jesper Tveit
# date: 16.11.2016
# last update: 18.11.2016
#
# The following code plots an m by m visualization of the recursion relation:
# Z[n+1] = P + Z[n]^4, for P in the interval [-w/2,w/2]x[-i*w/2,i*w/2]
#
# O(m^2 x n) computations (i.e. give it a few seconds to finish)
w <- 2.8 # interval s... | /fraktal.R | no_license | JesperTveit/FunSnippets | R | false | false | 1,211 | r | # Author: Jesper Tveit
# date: 16.11.2016
# last update: 18.11.2016
#
# The following code plots an m by m visualization of the recursion relation:
# Z[n+1] = P + Z[n]^4, for P in the interval [-w/2,w/2]x[-i*w/2,i*w/2]
#
# O(m^2 x n) computations (i.e. give it a few seconds to finish)
w <- 2.8 # interval s... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/runDEAnalysis.R
\name{.formatDEAList}
\alias{.formatDEAList}
\title{Helper function for differential expression analysis methods that accepts
multiple ways of conditional subsetting and returns stable index format.
Meanwhile it does all the i... | /man/dot-formatDEAList.Rd | permissive | rz2333/singleCellTK | R | false | true | 2,751 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/runDEAnalysis.R
\name{.formatDEAList}
\alias{.formatDEAList}
\title{Helper function for differential expression analysis methods that accepts
multiple ways of conditional subsetting and returns stable index format.
Meanwhile it does all the i... |
ice=read.csv("icecream.csv",sep=",")
ice<-ice[-length(ice$date),]
ice
pairs(ice)
plot.ts(ice$IC)
library(nlme)
X=cbind(1,ice$temp)
X
n=29
p=2
rho.hat=0.7557313
C.ar1=corAR1(rho.hat)
C.ar1
C.ar1=Initialize(C.ar1,data=ice)
C.ar1
R=corMatrix(C.ar1)
R[1:3,1:3]
W=solve(R[1:29,1:29]/(1-(rho.hat)^2))
Y<-t(X)%*%W%*%X
Y
F<-((0... | /Regression_Analysis_and_Modeling/Week 9/Homework 7/HW7_practice.R | no_license | amalag-19/Applied_Coursework | R | false | false | 731 | r | ice=read.csv("icecream.csv",sep=",")
ice<-ice[-length(ice$date),]
ice
pairs(ice)
plot.ts(ice$IC)
library(nlme)
X=cbind(1,ice$temp)
X
n=29
p=2
rho.hat=0.7557313
C.ar1=corAR1(rho.hat)
C.ar1
C.ar1=Initialize(C.ar1,data=ice)
C.ar1
R=corMatrix(C.ar1)
R[1:3,1:3]
W=solve(R[1:29,1:29]/(1-(rho.hat)^2))
Y<-t(X)%*%W%*%X
Y
F<-((0... |
/TCGA and CGGA Quantitative analysis of ICD .R | no_license | shuaima1991/mRNA-vccine | R | false | false | 1,500 | r | ||
# https://cran.r-project.org/web/packages/philentropy/vignettes/Distances.html
library(philentropy)
x1 = c(1,2,2)
x2 = c(4,4,2)
X <- rbind(x1, x2)
X
# L2 distance
distance(X, method = "euclidean")
# L1 distance
# sum of abs of element wise subtract
distance(X, method = "manhattan")
# cosine distance
# sum of eleme... | /notebooks/u02-distances.R | no_license | ucbiyyq/ucbiyyq-w207re | R | false | false | 502 | r | # https://cran.r-project.org/web/packages/philentropy/vignettes/Distances.html
library(philentropy)
x1 = c(1,2,2)
x2 = c(4,4,2)
X <- rbind(x1, x2)
X
# L2 distance
distance(X, method = "euclidean")
# L1 distance
# sum of abs of element wise subtract
distance(X, method = "manhattan")
# cosine distance
# sum of eleme... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ipfinder.R
\docType{data}
\name{FORMAT}
\alias{FORMAT}
\title{DEFAULT FORMAT}
\format{An object of class \code{character} of length 1.}
\usage{
FORMAT
}
\description{
DEFAULT FORMAT
}
\keyword{datasets}
| /man/FORMAT.Rd | permissive | ipfinder-io/ip-finder-rlang | R | false | true | 281 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ipfinder.R
\docType{data}
\name{FORMAT}
\alias{FORMAT}
\title{DEFAULT FORMAT}
\format{An object of class \code{character} of length 1.}
\usage{
FORMAT
}
\description{
DEFAULT FORMAT
}
\keyword{datasets}
|
prime<-function(x)
{
status<-0
for(i in 2:(x-1))
{
if((x%%i) == 0)
{
status<-1
break
}
}
{
if(status == 0)
print("Primary")
else
print("Composite")
}
} | /primary.R | no_license | anshmalik/calculator | R | false | false | 225 | r | prime<-function(x)
{
status<-0
for(i in 2:(x-1))
{
if((x%%i) == 0)
{
status<-1
break
}
}
{
if(status == 0)
print("Primary")
else
print("Composite")
}
} |
#' @title Problems of distribution of delay in stochastic projects
#' @description This function calculates the delay of a stochastic project, once it has been carried out. In addition, it also calculates the distribution of the delay on the different activities with the Stochastic Shapley rule.
#' @param prec1and2 A... | /R v1.3.3/function_pert_estocastico_demora.R | no_license | Juan-Goncalves-Dosantos/ProjectManagement | R | false | false | 19,324 | r | #' @title Problems of distribution of delay in stochastic projects
#' @description This function calculates the delay of a stochastic project, once it has been carried out. In addition, it also calculates the distribution of the delay on the different activities with the Stochastic Shapley rule.
#' @param prec1and2 A... |
#These steps will help you combine the outputs
#from your spatial interpolation with your income data.
# Convert your interpolation into a raster and map it:
r <- raster(P.idw)
r.m <- mask(r, income.tracts)
surfaceMap <-tm_shape(r.m) +
tm_raster(n=5, palette="Blues",
title="IDW \nPredicted PM2.... | /combiningCensus.R | no_license | Kharnadek/final418 | R | false | false | 993 | r | #These steps will help you combine the outputs
#from your spatial interpolation with your income data.
# Convert your interpolation into a raster and map it:
r <- raster(P.idw)
r.m <- mask(r, income.tracts)
surfaceMap <-tm_shape(r.m) +
tm_raster(n=5, palette="Blues",
title="IDW \nPredicted PM2.... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/methods.R
\docType{methods}
\name{estimateDispersions}
\alias{estimateDispersions}
\alias{estimateDispersions,DESeqDataSet-method}
\title{Estimate the dispersions for a DESeqDataSet}
\usage{
\S4method{estimateDispersions}{DESeqDataSet}(
obj... | /man/estimateDispersions.Rd | no_license | aloriot/DESeq2 | R | false | true | 4,836 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/methods.R
\docType{methods}
\name{estimateDispersions}
\alias{estimateDispersions}
\alias{estimateDispersions,DESeqDataSet-method}
\title{Estimate the dispersions for a DESeqDataSet}
\usage{
\S4method{estimateDispersions}{DESeqDataSet}(
obj... |
#Distribution for eigenvalues
TracyWidom <- function(variances, nv, no) {
# Inputs for R function TracyWidom :
# - Variances adding up to 1, corresponding to eigenvalues from a PCA or SVD
# - number of variables (equal to number of variances)
# - number of observations in matrix from which pca and variances were compu... | /R/TracyWidom.R | no_license | carinelegrand/RiboVIEW | R | false | false | 1,250 | r | #Distribution for eigenvalues
TracyWidom <- function(variances, nv, no) {
# Inputs for R function TracyWidom :
# - Variances adding up to 1, corresponding to eigenvalues from a PCA or SVD
# - number of variables (equal to number of variances)
# - number of observations in matrix from which pca and variances were compu... |
read_exercise <- function(file)
{
## read all text
x <- readLines(file)
markup <- switch(tools::file_ext(file),
"tex" = "latex",
"md" = "markdown"
)
## add linebreaks within \end{answerlist}\end{...}
## to work around Sweave dropping spaces between these
if(markup == "latex") {
sep <- "\\007\... | /exams/R/read_exercise.R | no_license | ingted/R-Examples | R | false | false | 3,724 | r | read_exercise <- function(file)
{
## read all text
x <- readLines(file)
markup <- switch(tools::file_ext(file),
"tex" = "latex",
"md" = "markdown"
)
## add linebreaks within \end{answerlist}\end{...}
## to work around Sweave dropping spaces between these
if(markup == "latex") {
sep <- "\\007\... |
/network_community_detection.R | no_license | cpratt0/Modern_Stats_and_Machine_Learning | R | false | false | 4,441 | r | ||
# Make a plot of the proportion of fixed sites by class and by C1 frequency.
nc_col <- '#2c7bb6'
syn_col <- '#abd9e9'
ns_col <- '#fdae61'
del_col <- '#d7191c'
# Read in the genotype frequency data
par_frq <- read.table("/Users/tomkono/Dropbox/Large_Project_Files/Genomic_Prediction/Ancestral_State/GP_Ancestral.txt.gz"... | /Analysis_Scripts/Plotting/P_fixation_by_Freq.R | no_license | MorrellLAB/Deleterious_GP | R | false | false | 7,797 | r | # Make a plot of the proportion of fixed sites by class and by C1 frequency.
nc_col <- '#2c7bb6'
syn_col <- '#abd9e9'
ns_col <- '#fdae61'
del_col <- '#d7191c'
# Read in the genotype frequency data
par_frq <- read.table("/Users/tomkono/Dropbox/Large_Project_Files/Genomic_Prediction/Ancestral_State/GP_Ancestral.txt.gz"... |
#survey analysis
sur = read.csv("survey.csv")
head(sur)
#boxplot
r=ggplot(data=sur, aes(x=topic,y=score))+
geom_violin()+
geom_point()+
ylab("Score")+
xlab("")+
theme_bw() +
theme(axis.title=element_text(size=23),axis.text=element_text(size=10,angle = 45),panel.grid = element_blank(), axis.line=element_... | /survey_analysis.R | no_license | ruetbri/klangwig | R | false | false | 1,110 | r | #survey analysis
sur = read.csv("survey.csv")
head(sur)
#boxplot
r=ggplot(data=sur, aes(x=topic,y=score))+
geom_violin()+
geom_point()+
ylab("Score")+
xlab("")+
theme_bw() +
theme(axis.title=element_text(size=23),axis.text=element_text(size=10,angle = 45),panel.grid = element_blank(), axis.line=element_... |
library(oce)
### Name: plot,amsr-method
### Title: Plot an amsr Object
### Aliases: plot,amsr-method plot.amsr
### ** Examples
## Not run:
##D d <- read.amsr("f34_20160102v7.2.gz")
##D asp <- 1/cos(pi*40/180)
##D plot(d, "SST", col=oceColorsJet, xlim=c(-80,0), ylim=c(20,60), asp=asp)
##D data(coastlineWorldMedium,... | /data/genthat_extracted_code/oce/examples/plot-amsr-method.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 443 | r | library(oce)
### Name: plot,amsr-method
### Title: Plot an amsr Object
### Aliases: plot,amsr-method plot.amsr
### ** Examples
## Not run:
##D d <- read.amsr("f34_20160102v7.2.gz")
##D asp <- 1/cos(pi*40/180)
##D plot(d, "SST", col=oceColorsJet, xlim=c(-80,0), ylim=c(20,60), asp=asp)
##D data(coastlineWorldMedium,... |
## This function creates a special "matrix" object can
## cache its inverse.
makeCacheMatrix <- function(x = matrix()) {
m <- NULL # m is the inverse matrix
# set the value of the matrix
set <- function(y){
x <<- y
m <<- NULL
}
# get the value of the matrix
get <- function() x
# s... | /cachematrix.R | no_license | mayurjethe/ProgrammingAssignment2 | R | false | false | 1,163 | r | ## This function creates a special "matrix" object can
## cache its inverse.
makeCacheMatrix <- function(x = matrix()) {
m <- NULL # m is the inverse matrix
# set the value of the matrix
set <- function(y){
x <<- y
m <<- NULL
}
# get the value of the matrix
get <- function() x
# s... |
# --------------------------------------------
# Authors: Pieter Schoonees and Andreas Alfons
# Erasmus Universiteit Rotterdam
# --------------------------------------------
# ------------------
# Web Scraping
# ------------------
## Required packages
library("RCurl")
library("XML")
library("jsonlite")
## ... | /AdvR_course_ERIM/04-WebScraping.R | no_license | WeiyiDeng/R_data | R | false | false | 1,701 | r | # --------------------------------------------
# Authors: Pieter Schoonees and Andreas Alfons
# Erasmus Universiteit Rotterdam
# --------------------------------------------
# ------------------
# Web Scraping
# ------------------
## Required packages
library("RCurl")
library("XML")
library("jsonlite")
## ... |
##setwd("~/datasciencecoursera/Exploratory Data Analysis/power_consumption")
## Load data into R (assumes data file is in current working directory)
powerdata <- read.table("household_power_consumption.txt", header=TRUE,
sep=";", na.strings="?")
#Concatenate date and time strings
powerd... | /plot4.R | no_license | erinv/ExData_Plotting1 | R | false | false | 1,675 | r |
##setwd("~/datasciencecoursera/Exploratory Data Analysis/power_consumption")
## Load data into R (assumes data file is in current working directory)
powerdata <- read.table("household_power_consumption.txt", header=TRUE,
sep=";", na.strings="?")
#Concatenate date and time strings
powerd... |
#####################################################################################
## Author: Daniel Sabanes Bove[sabanesd *a*t* roche *.* com],
## Wai Yin Yeung [ w *.* yeung *a*t* lancaster *.* ac *.* uk]
## Project: Object-oriented implementation of CRM designs
##
## Time-stamp: <[Model-class.R] by DSB Mo... | /R/Model-class.R | no_license | cran/crmPack | R | false | false | 162,061 | r | #####################################################################################
## Author: Daniel Sabanes Bove[sabanesd *a*t* roche *.* com],
## Wai Yin Yeung [ w *.* yeung *a*t* lancaster *.* ac *.* uk]
## Project: Object-oriented implementation of CRM designs
##
## Time-stamp: <[Model-class.R] by DSB Mo... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plotFunctions.R
\name{Zplot}
\alias{Zplot}
\title{Function to plot Latent profiles}
\usage{
Zplot(df, ylab, ylim = c(0, 4))
}
\arguments{
\item{df}{data.frame object output from \code{createZdf}}
\item{ylab}{Label of y-axis}
\item{ylim}{def... | /man/Zplot.Rd | no_license | mpierrejean/c3co | R | false | true | 429 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plotFunctions.R
\name{Zplot}
\alias{Zplot}
\title{Function to plot Latent profiles}
\usage{
Zplot(df, ylab, ylim = c(0, 4))
}
\arguments{
\item{df}{data.frame object output from \code{createZdf}}
\item{ylab}{Label of y-axis}
\item{ylim}{def... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cnfa.R
\name{cnfa}
\alias{cnfa}
\alias{print.cnfa}
\alias{show.cnfa}
\alias{cnfa,GLcenfa,Raster-method}
\alias{cnfa,GLcenfa,Spatial-method}
\alias{cnfa,Raster,Raster-method}
\alias{cnfa,Raster,Spatial-method}
\title{Climate-niche factor analy... | /man/cnfa.Rd | no_license | rinnan/CENFA | R | false | true | 6,573 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cnfa.R
\name{cnfa}
\alias{cnfa}
\alias{print.cnfa}
\alias{show.cnfa}
\alias{cnfa,GLcenfa,Raster-method}
\alias{cnfa,GLcenfa,Spatial-method}
\alias{cnfa,Raster,Raster-method}
\alias{cnfa,Raster,Spatial-method}
\title{Climate-niche factor analy... |
testlist <- list(AgeVector = c(-4.73074171454048e-167, 2.2262381097027e-76, -9.12990429452974e-204, 5.97087417427845e-79, 4.7390525269307e-300, 6.58361441690132e-121, 3.58611068565168e-154, -2.94504776827523e-186, 2.62380314702636e-116, -6.78950518864266e+23, 6.99705453475081e-167, 86485.676793021, 1.11271562183704... | /myTAI/inst/testfiles/cpp_bootMatrix/AFL_cpp_bootMatrix/cpp_bootMatrix_valgrind_files/1615768384-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 1,803 | r | testlist <- list(AgeVector = c(-4.73074171454048e-167, 2.2262381097027e-76, -9.12990429452974e-204, 5.97087417427845e-79, 4.7390525269307e-300, 6.58361441690132e-121, 3.58611068565168e-154, -2.94504776827523e-186, 2.62380314702636e-116, -6.78950518864266e+23, 6.99705453475081e-167, 86485.676793021, 1.11271562183704... |
reformat_to_array = function( input, matchfrom, matchto ) {
ndims = length(matchto)
out = NULL
if (ndims == 1) {
out = array( NA, dim=length(matchto[[1]]), dimnames=matchto )
d1 = match( matchfrom[[1]], matchto[[1]] )
out[ d1 ] = input
# out = matrix( NA, nrow=length(matchto[[1]]), ncol=1, d... | /R/reformat_to_array.R | permissive | jae0/aegis | R | false | false | 1,480 | r |
reformat_to_array = function( input, matchfrom, matchto ) {
ndims = length(matchto)
out = NULL
if (ndims == 1) {
out = array( NA, dim=length(matchto[[1]]), dimnames=matchto )
d1 = match( matchfrom[[1]], matchto[[1]] )
out[ d1 ] = input
# out = matrix( NA, nrow=length(matchto[[1]]), ncol=1, d... |
testlist <- list(doy = c(4.62595082430429e-312, 3.64097969159734e-277, -0.427429395729092, 2.09887675795476e-104, 1.55322770574539e-47, 1.45474215376015e+135, 3.56441595774554e+114, -2.62382424450768e+303, -9.52682579807939e+139, -3.98397314603138e+183, -1.77863325536183e+126, 6.42851301544252e-310, 1.6601383076532... | /meteor/inst/testfiles/Photoperiod/AFL_Photoperiod/Photoperiod_valgrind_files/1615768610-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 683 | r | testlist <- list(doy = c(4.62595082430429e-312, 3.64097969159734e-277, -0.427429395729092, 2.09887675795476e-104, 1.55322770574539e-47, 1.45474215376015e+135, 3.56441595774554e+114, -2.62382424450768e+303, -9.52682579807939e+139, -3.98397314603138e+183, -1.77863325536183e+126, 6.42851301544252e-310, 1.6601383076532... |
# Griffin Wong
# 12/04/2019
# Drexel University Dornsife School of Public Health
# Department of Epidemiology and Biostatistics
# PBHL 312-001: Public Health Data Analysis
# Question 3
new_drug <- c(123,113,114,102,106,109,101,104,116,124)
best_standard_care <- c(134,129,128,123,127,134,124,121,131,137)
t.test(new... | /pbhl_312_homework_5.r | no_license | griffinwong10/PBHL_312_Public_Health_Data_Analyis | R | false | false | 1,594 | r | # Griffin Wong
# 12/04/2019
# Drexel University Dornsife School of Public Health
# Department of Epidemiology and Biostatistics
# PBHL 312-001: Public Health Data Analysis
# Question 3
new_drug <- c(123,113,114,102,106,109,101,104,116,124)
best_standard_care <- c(134,129,128,123,127,134,124,121,131,137)
t.test(new... |
#' `nplot` using base graphics
#' @param edge.color.mix Proportion of the mixing.
#' @param edge.color.alpha Either a vector of length 1 or 2, or a matrix of
#' size `ecount(x)*2` with values in `[0,1]`. Alpha (transparency) levels (see
#' details)
#' @inheritParams nplot
#' @export
nplot_base <- function(
x,
layou... | /R/netplot_base.r | permissive | anhnguyendepocen/netplot | R | false | false | 7,598 | r | #' `nplot` using base graphics
#' @param edge.color.mix Proportion of the mixing.
#' @param edge.color.alpha Either a vector of length 1 or 2, or a matrix of
#' size `ecount(x)*2` with values in `[0,1]`. Alpha (transparency) levels (see
#' details)
#' @inheritParams nplot
#' @export
nplot_base <- function(
x,
layou... |
##' Compute QC metrics for each sample informing how much it fits the reference samples. It can compute: the average distance between a sample and the 10% closest reference samples; the proportion of single-bin calls; the proportion of calls with copy number estimate close to 2. These metrics might be useful to interpr... | /R/qc.sample.R | no_license | hjanime/PopSV | R | false | false | 3,277 | r | ##' Compute QC metrics for each sample informing how much it fits the reference samples. It can compute: the average distance between a sample and the 10% closest reference samples; the proportion of single-bin calls; the proportion of calls with copy number estimate close to 2. These metrics might be useful to interpr... |
#' Extracts Positive test
#'
#' @param DataFrame A Data Frame object from Test API
#' @return NewFrame Contains only positive test
#' @examples
#' testApiIsPositive(PCR_Test)
#' testApiIsPositive(ByLab_Test)
testApiIsPositive<-function(DataFrame){
NewFrame=DataFrame
NewFrame$isPositive<-as.character(grepl("positiv... | /PilasPack.Rcheck/00_pkg_src/PilasPack/R/testApiIsPositive.R | permissive | DataSciencePRDH/PILASPack | R | false | false | 387 | r | #' Extracts Positive test
#'
#' @param DataFrame A Data Frame object from Test API
#' @return NewFrame Contains only positive test
#' @examples
#' testApiIsPositive(PCR_Test)
#' testApiIsPositive(ByLab_Test)
testApiIsPositive<-function(DataFrame){
NewFrame=DataFrame
NewFrame$isPositive<-as.character(grepl("positiv... |
#import file in Rstudio
att <- read.csv("Attrition.csv", header = TRUE, sep = ",")
View(att)
str(att)
summary(att)
#import library
library(dplyr)
library(plyr)
#check unique values
unique(att$EmployeeCount)
unique(att$StandardHours)
unique(att$Over18)
#check age distribution
hist(att$Age)
#check Daily rate distribu... | /HR_IBM_Attrition_EDA.R | no_license | dinkargoyal/IBM-HR-Analytics-Employee-Attrition-Performance | R | false | false | 7,259 | r | #import file in Rstudio
att <- read.csv("Attrition.csv", header = TRUE, sep = ",")
View(att)
str(att)
summary(att)
#import library
library(dplyr)
library(plyr)
#check unique values
unique(att$EmployeeCount)
unique(att$StandardHours)
unique(att$Over18)
#check age distribution
hist(att$Age)
#check Daily rate distribu... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/4_metaClustering.R
\name{MetaClustering}
\alias{MetaClustering}
\title{MetaClustering}
\usage{
MetaClustering(data, method, max = 20, seed = NULL, ...)
}
\arguments{
\item{data}{Matrix containing the data to cluster}
\item{method}{Clustering... | /man/MetaClustering.Rd | no_license | SofieVG/FlowSOM | R | false | true | 1,364 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/4_metaClustering.R
\name{MetaClustering}
\alias{MetaClustering}
\title{MetaClustering}
\usage{
MetaClustering(data, method, max = 20, seed = NULL, ...)
}
\arguments{
\item{data}{Matrix containing the data to cluster}
\item{method}{Clustering... |
library(MplusAutomation)
### Name: friendlyGregexpr
### Title: Friendly Regular Expression
### Aliases: friendlyGregexpr
### Keywords: internal
### ** Examples
## make me
| /data/genthat_extracted_code/MplusAutomation/examples/friendlyGregexpr.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 178 | r | library(MplusAutomation)
### Name: friendlyGregexpr
### Title: Friendly Regular Expression
### Aliases: friendlyGregexpr
### Keywords: internal
### ** Examples
## make me
|
testlist <- list(bytes1 = c(838991872L, -1426006528L, 103677952L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L), pmutation = 0)
result <- do.call(mcga:::ByteCodeMutation,testlist)
str(res... | /mcga/inst/testfiles/ByteCodeMutation/libFuzzer_ByteCodeMutation/ByteCodeMutation_valgrind_files/1612887429-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 324 | r | testlist <- list(bytes1 = c(838991872L, -1426006528L, 103677952L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L), pmutation = 0)
result <- do.call(mcga:::ByteCodeMutation,testlist)
str(res... |
#LDA
install.packages('ISLR')
library(ISLR) #credit card dataset
library(MASS)
dfr = Default
index = sample(x = 1:nrow(dfr), size = round(nrow(dfr) * 0.5))
train_dfr = dfr[index, ]
test_dfr = dfr[-index, ]
model = lda(default ~ student + balance + income, data = train_dfr)
summary(model)
pred = predict(model, tes... | /q9.R | no_license | RishiKumarPS/DA | R | false | false | 861 | r | #LDA
install.packages('ISLR')
library(ISLR) #credit card dataset
library(MASS)
dfr = Default
index = sample(x = 1:nrow(dfr), size = round(nrow(dfr) * 0.5))
train_dfr = dfr[index, ]
test_dfr = dfr[-index, ]
model = lda(default ~ student + balance + income, data = train_dfr)
summary(model)
pred = predict(model, tes... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.