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
library(tidyverse) library(readxl) df <- read_excel("aerossol/exemplo_dt_numero_massa.xlsx") View(df) df <- df %>% mutate(ln_diametro = log(diametro)) ln_d <- sum(df$amostra1*df$ln_diametro)/sum(df$amostra1) ln_sigma <- sqrt(sum(df$amostra1*(df$ln_diametro - ln_d)^2)/(sum(df$amostra1)-1)) exp(ln_d) exp(ln_sigma...
/aerossol.R
permissive
williamorim/iag-meteorologia-pol-ar
R
false
false
324
r
library(tidyverse) library(readxl) df <- read_excel("aerossol/exemplo_dt_numero_massa.xlsx") View(df) df <- df %>% mutate(ln_diametro = log(diametro)) ln_d <- sum(df$amostra1*df$ln_diametro)/sum(df$amostra1) ln_sigma <- sqrt(sum(df$amostra1*(df$ln_diametro - ln_d)^2)/(sum(df$amostra1)-1)) exp(ln_d) exp(ln_sigma...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/AssayMutRatio.R \name{AssayMutRatio} \alias{AssayMutRatio} \title{Calculate the mutation detection rate using different assays} \usage{ AssayMutRatio( nucmerr = nucmerr, assays = assays, totalsample = totalsample, plotType = "barplot"...
/man/AssayMutRatio.Rd
no_license
cran/CovidMutations
R
false
true
1,415
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/AssayMutRatio.R \name{AssayMutRatio} \alias{AssayMutRatio} \title{Calculate the mutation detection rate using different assays} \usage{ AssayMutRatio( nucmerr = nucmerr, assays = assays, totalsample = totalsample, plotType = "barplot"...
\name{prepareRegions} \alias{prepareRegions} \title{ Parse bed files and convert them in a list of data.frames } \description{ This function will convert a bed files into a \code{list} of \code{data.frames}. } \usage{ prepareRegions( regions, cores=1) } \arguments{ \item{regions}{A vector of bed ...
/man/prepareRegions.Rd
no_license
Frederic-bioinfo/MetaFeatures
R
false
false
851
rd
\name{prepareRegions} \alias{prepareRegions} \title{ Parse bed files and convert them in a list of data.frames } \description{ This function will convert a bed files into a \code{list} of \code{data.frames}. } \usage{ prepareRegions( regions, cores=1) } \arguments{ \item{regions}{A vector of bed ...
#### Run EasyStrata for miami and sex qq plot args=commandArgs() ### folder name phenotype = args[3] phenotype #### define phenotype sample = args[4] sample library(EasyStrata) EasyStrata(paste("/mnt/lustre/groups/ukbiobank/usr/chris/500k/output/body_composition/miami/",phenotype,"_",sample,"_miami.ecf", sep = ""...
/plots/miami/miami_qq.R
no_license
lizhihao1990/ukbgwas
R
false
false
463
r
#### Run EasyStrata for miami and sex qq plot args=commandArgs() ### folder name phenotype = args[3] phenotype #### define phenotype sample = args[4] sample library(EasyStrata) EasyStrata(paste("/mnt/lustre/groups/ukbiobank/usr/chris/500k/output/body_composition/miami/",phenotype,"_",sample,"_miami.ecf", sep = ""...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/assignment_ngs.R \name{assignment_adegenet} \alias{assignment_adegenet} \title{assignment with adegenet} \usage{ assignment_adegenet(data = NULL, select.markers = NULL, markers.names = NULL, missing.data = NULL, adegenet.dapc.opt = "optim...
/man/assignment_adegenet.Rd
no_license
juadiegaitan/assigner
R
false
true
584
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/assignment_ngs.R \name{assignment_adegenet} \alias{assignment_adegenet} \title{assignment with adegenet} \usage{ assignment_adegenet(data = NULL, select.markers = NULL, markers.names = NULL, missing.data = NULL, adegenet.dapc.opt = "optim...
# generate 10 values of x, evenly spread between 0 and 1 x <- seq(0,1,len=10) # generate corresponding values of t, including the random error t <- sin(2*pi*x)+rnorm(n=10,mean=0,sd=0.3) # plot the training set. You might want to adjust the value of ylim, depending on drawn data points and fitted functions plot(x,t...
/Exercise/Tutorial/polynomials.R
no_license
maffh92/Pattern-Recognition
R
false
false
1,694
r
# generate 10 values of x, evenly spread between 0 and 1 x <- seq(0,1,len=10) # generate corresponding values of t, including the random error t <- sin(2*pi*x)+rnorm(n=10,mean=0,sd=0.3) # plot the training set. You might want to adjust the value of ylim, depending on drawn data points and fitted functions plot(x,t...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/helpers.R \name{extractDist} \alias{extractDist} \title{Extracts the distance from a getRoute() result.} \usage{ extractDist(route_object, unit = "km", rnd = TRUE) } \arguments{ \item{route_object}{The object as otputted by the getRoute() fun...
/man/extractDist.Rd
permissive
jersme/connectHERE
R
false
true
740
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/helpers.R \name{extractDist} \alias{extractDist} \title{Extracts the distance from a getRoute() result.} \usage{ extractDist(route_object, unit = "km", rnd = TRUE) } \arguments{ \item{route_object}{The object as otputted by the getRoute() fun...
city <- c("서울","부산","대구","인천","광주","대전","울산") #city라는 변수 만들기 pm25 <-c(14, 9, 11, 13, 11, 9, 8) #실시간 미세먼지 lat <- c(37.56, 35.18,35.87,37.45,35.16,36.35,35.53) lon <- c(126.97,129.07,128.60,126.70,126.85,127.38,129.31) plot(x=lon, y=lat, pch=19, cex=pm25*0.3, col=rgb(1,0,0,0.3), xlim=c(123,133), ylim=c(34.5,38.5), xlab=...
/0202_PM25_yerim.R
no_license
yelee117/scnu_R_class
R
false
false
673
r
city <- c("서울","부산","대구","인천","광주","대전","울산") #city라는 변수 만들기 pm25 <-c(14, 9, 11, 13, 11, 9, 8) #실시간 미세먼지 lat <- c(37.56, 35.18,35.87,37.45,35.16,36.35,35.53) lon <- c(126.97,129.07,128.60,126.70,126.85,127.38,129.31) plot(x=lon, y=lat, pch=19, cex=pm25*0.3, col=rgb(1,0,0,0.3), xlim=c(123,133), ylim=c(34.5,38.5), xlab=...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/checkDataReturn.R \name{checkDataReturn_daily} \alias{checkDataReturn_daily} \title{checkDataReturn_daily} \usage{ checkDataReturn_daily(dataset, day_start, day_end) } \arguments{ \item{dataset}{the data.frame to check} \item{day_start}{char...
/man/checkDataReturn_daily.Rd
permissive
aWhereAPI/aWhere-R-Library
R
false
true
632
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/checkDataReturn.R \name{checkDataReturn_daily} \alias{checkDataReturn_daily} \title{checkDataReturn_daily} \usage{ checkDataReturn_daily(dataset, day_start, day_end) } \arguments{ \item{dataset}{the data.frame to check} \item{day_start}{char...
# Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate context("Test StudyNewRequestExperimentalDesign") model.instance <- StudyNewRequestExperimentalDesign$new() test_that("PUI", { # tests for the property `PUI` (character) # MIAPPE V1.1 (DM-23) Ty...
/tests/testthat/test_study_new_request_experimental_design.R
no_license
Breeding-Insight/brapi-r-v2
R
false
false
1,111
r
# Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate context("Test StudyNewRequestExperimentalDesign") model.instance <- StudyNewRequestExperimentalDesign$new() test_that("PUI", { # tests for the property `PUI` (character) # MIAPPE V1.1 (DM-23) Ty...
Ungureanu si generatia sa ( 22 mai 1999 ) Ungureanu si generatia sa ( 22 mai 1999 ) CORNEL NISTORESCU Duminica , 23 Mai 1999 Ungureanu si generatia sa Evenimentele din ultima vreme au impins spre fundalul scenei aparitia unei carti . dar toata aceasta fierbere din Iugoslavia l - a adus in atentia publicului pe secreta...
/data/Newspapers/1999.05.23.editorial.47966.0042.r
no_license
narcis96/decrypting-alpha
R
false
false
4,783
r
Ungureanu si generatia sa ( 22 mai 1999 ) Ungureanu si generatia sa ( 22 mai 1999 ) CORNEL NISTORESCU Duminica , 23 Mai 1999 Ungureanu si generatia sa Evenimentele din ultima vreme au impins spre fundalul scenei aparitia unei carti . dar toata aceasta fierbere din Iugoslavia l - a adus in atentia publicului pe secreta...
### Function for nutrient N constraint in medium term ie passive, leaching, wood considered # specifically for uptake as a function of root - O-CN approach # i.e. N uptake as a saturating function of mineral N M_constraint_root_clm <- function(df, a, C_pass, C_slow, Nin_L) { # nc scalar scalar_n <- (1/df ...
/QE_Functions/n_uptake_root_biomass/M_constraint_root_clm.R
no_license
mingkaijiang/QEframework
R
false
false
1,442
r
### Function for nutrient N constraint in medium term ie passive, leaching, wood considered # specifically for uptake as a function of root - O-CN approach # i.e. N uptake as a saturating function of mineral N M_constraint_root_clm <- function(df, a, C_pass, C_slow, Nin_L) { # nc scalar scalar_n <- (1/df ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/genData.R \name{gen.Data} \alias{gen.Data} \title{Generate Data} \usage{ gen.Data(Trend, Seasonality, Period, Length) } \description{ Generates data for a toy Shiny app }
/man/gen.Data.Rd
no_license
DanielWaller/multiseas
R
false
true
250
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/genData.R \name{gen.Data} \alias{gen.Data} \title{Generate Data} \usage{ gen.Data(Trend, Seasonality, Period, Length) } \description{ Generates data for a toy Shiny app }
## Author : Simon Moulds ## Data : August 2015 ## 1. statewise information state_energ_src_frac <- state_energy_frac(x=yrs, y=micensus_energ, state="Gujarat", glm=FALSE) fv_frac <- state_fv_frac(x=yrs, y=agcensus_fv, state="Gujarat", glm=FALSE) ## 2. districtwise information ## =======================...
/indagridat/data-raw/code/utils/data-quality/gujarat.R
no_license
simonmoulds/r_indagridat
R
false
false
157,121
r
## Author : Simon Moulds ## Data : August 2015 ## 1. statewise information state_energ_src_frac <- state_energy_frac(x=yrs, y=micensus_energ, state="Gujarat", glm=FALSE) fv_frac <- state_fv_frac(x=yrs, y=agcensus_fv, state="Gujarat", glm=FALSE) ## 2. districtwise information ## =======================...
library(EMD) ### Name: semd ### Title: Statistical Empirical Mode Decomposition ### Aliases: semd ### Keywords: nonparametric ### ** Examples ndata <- 2048 tt <- seq(0, 9, length=ndata) xt <- sin(pi * tt) + sin(2* pi * tt) + sin(6 * pi * tt) + 0.5 * tt set.seed(1) xt <- xt + rnorm(ndata, 0, sd(xt...
/data/genthat_extracted_code/EMD/examples/semd.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
2,154
r
library(EMD) ### Name: semd ### Title: Statistical Empirical Mode Decomposition ### Aliases: semd ### Keywords: nonparametric ### ** Examples ndata <- 2048 tt <- seq(0, 9, length=ndata) xt <- sin(pi * tt) + sin(2* pi * tt) + sin(6 * pi * tt) + 0.5 * tt set.seed(1) xt <- xt + rnorm(ndata, 0, sd(xt...
#plot2.R #Exploratory Data Analysis, Project 1, plot 2 library(dplyr) #Set working directory, specifies the location of your working directory setwd("Specify working directory") #open data ds <- read.table("data/household_power_consumption.txt", header = TRUE, sep=";", colClasses=c("charac...
/plot2.R
no_license
bimark2418/ExData_Plotting1
R
false
false
917
r
#plot2.R #Exploratory Data Analysis, Project 1, plot 2 library(dplyr) #Set working directory, specifies the location of your working directory setwd("Specify working directory") #open data ds <- read.table("data/household_power_consumption.txt", header = TRUE, sep=";", colClasses=c("charac...
context("test parameter functions") ### API tests with mock API calls ---- # First set the API KEY to a static value key <- Sys.getenv("NASSQS_TOKEN") nassqs_auth(key = "API_KEY") # Tests with_mock_api({ test_that("nassqs_param_values forms a correct URL", { expect_GET(nassqs_param_values("source_desc"), ...
/tests/testthat/test-params.R
permissive
nealrichardson/rnassqs
R
false
false
2,645
r
context("test parameter functions") ### API tests with mock API calls ---- # First set the API KEY to a static value key <- Sys.getenv("NASSQS_TOKEN") nassqs_auth(key = "API_KEY") # Tests with_mock_api({ test_that("nassqs_param_values forms a correct URL", { expect_GET(nassqs_param_values("source_desc"), ...
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/minhash.R \name{minhash_generator} \alias{minhash_generator} \title{Generate a minhash function} \usage{ minhash_generator(n = 200, seed = NULL) } \arguments{ \item{n}{The number of minhashes that the returned function should generate...
/man/minhash_generator.Rd
permissive
Sandy4321/textreuse
R
false
false
1,968
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/minhash.R \name{minhash_generator} \alias{minhash_generator} \title{Generate a minhash function} \usage{ minhash_generator(n = 200, seed = NULL) } \arguments{ \item{n}{The number of minhashes that the returned function should generate...
#Data Science Course 3 Project require(plyr) require(data.table) #Get the data from the web if it's not already present in the working directory fileUrl1 <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip" if(!file.exists("./Dataset.zip") & !file.exists("./UCI HAR Dataset"...
/run_analysis.R
no_license
djmcqueen/Getting_and_Cleaning_Data
R
false
false
4,049
r
#Data Science Course 3 Project require(plyr) require(data.table) #Get the data from the web if it's not already present in the working directory fileUrl1 <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip" if(!file.exists("./Dataset.zip") & !file.exists("./UCI HAR Dataset"...
library(RobExtremes) ### Name: validParameter-methods ### Title: Methods for function validParameter in Package 'RobExtremes' ### Aliases: validParameter-methods validParameter ### validParameter,GParetoFamily-method ### validParameter,WeibullFamily-method validParameter,GEVFamily-method ### validParameter,Pare...
/data/genthat_extracted_code/RobExtremes/examples/validParameter-methods.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
533
r
library(RobExtremes) ### Name: validParameter-methods ### Title: Methods for function validParameter in Package 'RobExtremes' ### Aliases: validParameter-methods validParameter ### validParameter,GParetoFamily-method ### validParameter,WeibullFamily-method validParameter,GEVFamily-method ### validParameter,Pare...
## These functions intend to obtain the inverse of a matrix, ## and potentilly reduce the time taken to do so by caching previous ansers ## makeVector creates a function stored in a vector makeVector <- function(x = numeric()) { invers <- NULL set <- function(y) { x <<- y inv <<- NULL } get...
/cachematrix.R
no_license
oflynmm64/ProgrammingAssignment2
R
false
false
974
r
## These functions intend to obtain the inverse of a matrix, ## and potentilly reduce the time taken to do so by caching previous ansers ## makeVector creates a function stored in a vector makeVector <- function(x = numeric()) { invers <- NULL set <- function(y) { x <<- y inv <<- NULL } get...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mturk_operations.R \name{mturk_create_worker_block} \alias{mturk_create_worker_block} \title{The CreateWorkerBlock operation allows you to prevent a Worker from working on your HITs} \usage{ mturk_create_worker_block(WorkerId, Reason) } \argu...
/cran/paws.analytics/man/mturk_create_worker_block.Rd
permissive
paws-r/paws
R
false
true
940
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mturk_operations.R \name{mturk_create_worker_block} \alias{mturk_create_worker_block} \title{The CreateWorkerBlock operation allows you to prevent a Worker from working on your HITs} \usage{ mturk_create_worker_block(WorkerId, Reason) } \argu...
# Multiple Linear Regression # Importing the dataset dataset = read.csv('50_Startups.csv') dataset$State = factor(dataset$State, levels = c('New York', "California", 'Florida'), labels = c(1,2,3) ) library(caTools) set.seed(123) split = sample.spli...
/Part 2 - Regression/Section 5 - Multiple Linear Regression/multiple_linear_regression.R
no_license
AliHasnainRizvi/machine-learning-a-z
R
false
false
736
r
# Multiple Linear Regression # Importing the dataset dataset = read.csv('50_Startups.csv') dataset$State = factor(dataset$State, levels = c('New York', "California", 'Florida'), labels = c(1,2,3) ) library(caTools) set.seed(123) split = sample.spli...
library(cluster.datasets) ### Name: british.butterfly.appearance ### Title: Hartigan (1975) Times of Appearance of British Butterflies ### Aliases: british.butterfly.appearance ### Keywords: datasets ### ** Examples data(british.butterfly.appearance)
/data/genthat_extracted_code/cluster.datasets/examples/british.butterfly.appearance.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
258
r
library(cluster.datasets) ### Name: british.butterfly.appearance ### Title: Hartigan (1975) Times of Appearance of British Butterflies ### Aliases: british.butterfly.appearance ### Keywords: datasets ### ** Examples data(british.butterfly.appearance)
\name{FactorAnalysis} \alias{FactorAnalysis} %- Also NEED an '\alias' for EACH other topic documented here. \title{FactorAnalysis } \description{Analyzes comparison data with known factorial structures } \usage{ FactorAnalysis(data, corr.matrix = FALSE, max.iteration = 50,n.factors = 0, corr.type = "pearson") } \argume...
/man/FactorAnalysis.Rd
no_license
cran/RGenData
R
false
false
1,286
rd
\name{FactorAnalysis} \alias{FactorAnalysis} %- Also NEED an '\alias' for EACH other topic documented here. \title{FactorAnalysis } \description{Analyzes comparison data with known factorial structures } \usage{ FactorAnalysis(data, corr.matrix = FALSE, max.iteration = 50,n.factors = 0, corr.type = "pearson") } \argume...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/factor2string.R \name{step_factor2string} \alias{step_factor2string} \alias{tidy.step_factor2string} \title{Convert Factors to Strings} \usage{ step_factor2string(recipe, ..., role = NA, trained = FALSE, columns = FALSE, skip = FALSE, id = ...
/man/step_factor2string.Rd
no_license
ewv88/recipes
R
false
true
2,837
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/factor2string.R \name{step_factor2string} \alias{step_factor2string} \alias{tidy.step_factor2string} \title{Convert Factors to Strings} \usage{ step_factor2string(recipe, ..., role = NA, trained = FALSE, columns = FALSE, skip = FALSE, id = ...
\name{ym3} \alias{ym3} \title{The function constructs Youden-m square designs. The function provides the parameters of the PBIB design constituted when the incomplete columns of this Youden-m square are taken as blocks.} \description{By omitting the middle and equal number of rows, say t rows, from both ends of any ...
/man/ym3.Rd
no_license
cran/PBIBD
R
false
false
1,673
rd
\name{ym3} \alias{ym3} \title{The function constructs Youden-m square designs. The function provides the parameters of the PBIB design constituted when the incomplete columns of this Youden-m square are taken as blocks.} \description{By omitting the middle and equal number of rows, say t rows, from both ends of any ...
library(data.table) library(dplyr) library(lubridate) library(tidyr) power <- fread("household_power_consumption.txt", na.strings = "?") power <- tbl_df(power) power$Date <- dmy(power$Date) power$Time <- hms(power$Time) power_sub <- power %>% filter(Date =='2007-02-01'| Date == '2007-02-02') %>% mutate(Date_T...
/plot2.R
no_license
sztomczyk86/ExData_Plotting1
R
false
false
523
r
library(data.table) library(dplyr) library(lubridate) library(tidyr) power <- fread("household_power_consumption.txt", na.strings = "?") power <- tbl_df(power) power$Date <- dmy(power$Date) power$Time <- hms(power$Time) power_sub <- power %>% filter(Date =='2007-02-01'| Date == '2007-02-02') %>% mutate(Date_T...
############ GRAPHIQUES ET TABLEAUX DE LA PARTIE 6 ########## # Importation des données rm(list = ls()) cheminsource <- "/Users/simonrabate/Desktop/PENSIPP 0.1/" load(paste0(cheminsource,"Simulations/CN/CN_MACRO/CN1.RData")) b <- pliq_[,2] load(paste0(cheminsource,"Simulations/CN/CN_MICRO/micro2.RData")) pliq_[,3]<...
/Simulations/CN/PapierJEM/Partie6.R
no_license
philippechataignon/pensipp
R
false
false
13,601
r
############ GRAPHIQUES ET TABLEAUX DE LA PARTIE 6 ########## # Importation des données rm(list = ls()) cheminsource <- "/Users/simonrabate/Desktop/PENSIPP 0.1/" load(paste0(cheminsource,"Simulations/CN/CN_MACRO/CN1.RData")) b <- pliq_[,2] load(paste0(cheminsource,"Simulations/CN/CN_MICRO/micro2.RData")) pliq_[,3]<...
clustering.runKCenters = function(data, kccaFamilyName, outputDir){ norm.0_1 = function(data){ (data - min(data))/(max(data) - min(data)) } norm.standardScore = function(data){ (data - mean(data))/sd(data) } data = as.data.frame(sapply(data, norm.standardScore)) krange ...
/RWorks/Clustering.R
no_license
FRH-Analytics/tutor-qEa
R
false
false
11,412
r
clustering.runKCenters = function(data, kccaFamilyName, outputDir){ norm.0_1 = function(data){ (data - min(data))/(max(data) - min(data)) } norm.standardScore = function(data){ (data - mean(data))/sd(data) } data = as.data.frame(sapply(data, norm.standardScore)) krange ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/TSEind.R \name{MSLEi} \alias{MSLEi} \title{Mean squared logarithmic error (MSLE)} \usage{ MSLEi(Actual1, Survey1, ...) } \arguments{ \item{Actual1}{data from a "gold standard" survey; data are assumed to be the "actual" response, wit...
/man/MSLEi.Rd
no_license
cran/TSEind
R
false
true
1,005
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/TSEind.R \name{MSLEi} \alias{MSLEi} \title{Mean squared logarithmic error (MSLE)} \usage{ MSLEi(Actual1, Survey1, ...) } \arguments{ \item{Actual1}{data from a "gold standard" survey; data are assumed to be the "actual" response, wit...
/dadapp/multiplot.R
no_license
nickjkomarov/trialsapp
R
false
false
62,523
r
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # # ProjectName: Servier CHC 2020Q1 # Purpose: Projection # programmer: Zhe Liu # date: 2020-05-19 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ##---- Readin data ---- total.imp ...
/04_Codes/03_Projection.R
no_license
Zaphiroth/Servier_CHC_2020Q1
R
false
false
5,806
r
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # # ProjectName: Servier CHC 2020Q1 # Purpose: Projection # programmer: Zhe Liu # date: 2020-05-19 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ##---- Readin data ---- total.imp ...
# set working directory setwd("C:/RBook/EDA") # check if the plots exits if (!file.exists('plots')) { dir.create('plots') } # load data source('scripts/Pr1.R') # open tool png(filename='plots/plot2.png',width=480,height=480,units='px') # plot data plot(power.consumption$DateTime,power.consumption$GlobalAct...
/plot2.R
no_license
ribery77/ExData_Plotting1
R
false
false
415
r
# set working directory setwd("C:/RBook/EDA") # check if the plots exits if (!file.exists('plots')) { dir.create('plots') } # load data source('scripts/Pr1.R') # open tool png(filename='plots/plot2.png',width=480,height=480,units='px') # plot data plot(power.consumption$DateTime,power.consumption$GlobalAct...
######################## Contamination ######################################### # Contamination plots contam_draw = function(data, spread, xlim, ylim){ if (spread == "discrete") { ggplot() + geom_point(data = data, aes(x = X, y = Y, shape = label, color = dis_level)) + scale_color_gradient(name = "C...
/Sampling_visualization.R
no_license
foodsafetylab/ILSI_remote_repo
R
false
false
19,973
r
######################## Contamination ######################################### # Contamination plots contam_draw = function(data, spread, xlim, ylim){ if (spread == "discrete") { ggplot() + geom_point(data = data, aes(x = X, y = Y, shape = label, color = dis_level)) + scale_color_gradient(name = "C...
data <- read.table("household_power_consumption.txt", header=TRUE, sep = ";", colClasses =c( rep("character",2), rep( "numeric", 7)), na.string="?", strip.white=T) data2 <- rbind(data[data$Date=="1/2/2007",],data[data$Date=="2/2/2007",]) z = strptime(paste(data2$Date, data2$Time,...
/plot4.R
no_license
gzwuyue/test-upload
R
false
false
976
r
data <- read.table("household_power_consumption.txt", header=TRUE, sep = ";", colClasses =c( rep("character",2), rep( "numeric", 7)), na.string="?", strip.white=T) data2 <- rbind(data[data$Date=="1/2/2007",],data[data$Date=="2/2/2007",]) z = strptime(paste(data2$Date, data2$Time,...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/listOMLDataSetQualities.R \name{listOMLDataSetQualities} \alias{listOMLDataSetQualities} \title{List available OpenML qualities names.} \usage{ listOMLDataSetQualities(verbosity = NULL) } \arguments{ \item{verbosity}{[\code{integer(1)}]\cr Pr...
/man/listOMLDataSetQualities.Rd
permissive
annakrystalli/openml-r
R
false
true
1,425
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/listOMLDataSetQualities.R \name{listOMLDataSetQualities} \alias{listOMLDataSetQualities} \title{List available OpenML qualities names.} \usage{ listOMLDataSetQualities(verbosity = NULL) } \arguments{ \item{verbosity}{[\code{integer(1)}]\cr Pr...
#' @include mungebit_template.R NULL #' Select rows in a dataframe. #' #' @name select_rows #' @param dataframe a data.frame #' @param rows an atomic vector or function. Drop all but these rows. #' If \code{rows} is a function, the rows will be selected based on the #' \code{whole} parameter. If \code{whole = TR...
/R/select_rows.R
permissive
syberia/syberiaMungebits2
R
false
false
1,446
r
#' @include mungebit_template.R NULL #' Select rows in a dataframe. #' #' @name select_rows #' @param dataframe a data.frame #' @param rows an atomic vector or function. Drop all but these rows. #' If \code{rows} is a function, the rows will be selected based on the #' \code{whole} parameter. If \code{whole = TR...
#先抓取所有医生的职称和所在的医院id,此代码在医院的id的基础上,抓取医院的相关信息 library(curl) library(jsonlite) library(tidyverse) library(rvest) library(stringr) library(stringi) #获取医生的id和医生总数 input_file = 'haodf/doc.info.0509.csv' doclist.all <- read.csv(input_file, header = TRUE, stringsAsFactors = FALSE) #doclist.all <- uniq...
/haodf/hosp.list.info.0510.R
no_license
Rongrong0220/haodfcrawler
R
false
false
7,112
r
#先抓取所有医生的职称和所在的医院id,此代码在医院的id的基础上,抓取医院的相关信息 library(curl) library(jsonlite) library(tidyverse) library(rvest) library(stringr) library(stringi) #获取医生的id和医生总数 input_file = 'haodf/doc.info.0509.csv' doclist.all <- read.csv(input_file, header = TRUE, stringsAsFactors = FALSE) #doclist.all <- uniq...
#Multiple sounds # # Script to process all .wav files in a directory and save # the requested index to a .csv file. # # multiple_sounds <- function(directory, resultfile, soundindex = c("ndsi", "acoustic_complexity", "acoustic_diversity", "acoustic_evenness", "bioacoustic_index", "H"), no_cores = 1, flac = FALSE, from...
/soundecology/R/multiple_sounds.R
no_license
jonathanbeever/soundecology
R
false
false
16,918
r
#Multiple sounds # # Script to process all .wav files in a directory and save # the requested index to a .csv file. # # multiple_sounds <- function(directory, resultfile, soundindex = c("ndsi", "acoustic_complexity", "acoustic_diversity", "acoustic_evenness", "bioacoustic_index", "H"), no_cores = 1, flac = FALSE, from...
library(GEOquery) library(Biobase) source("http://bioconductor.org/biocLite.R") biocLite() biocLite("GEOmetadb") # Finding the annotation database for a given GPL platform id. library(GEOmetadb) sqlfile = getSQLiteFile() library(DBI) con = dbConnect(RSQLite::SQLite(), sqlfile) get_annotation_db <- function(gpl_id) ...
/r_scripts/GSE66360.R
permissive
jeyabbalas/Bayesian-Rule-Learning
R
false
false
3,800
r
library(GEOquery) library(Biobase) source("http://bioconductor.org/biocLite.R") biocLite() biocLite("GEOmetadb") # Finding the annotation database for a given GPL platform id. library(GEOmetadb) sqlfile = getSQLiteFile() library(DBI) con = dbConnect(RSQLite::SQLite(), sqlfile) get_annotation_db <- function(gpl_id) ...
library(FitAR) ### Name: ARToMA ### Title: Coefficients In Infinite Moving Average Expansion ### Aliases: ARToMA ### Keywords: ts ### ** Examples ARToMA(0.5,20) ARToMA(c(0.2,0.5), 15)
/data/genthat_extracted_code/FitAR/examples/ARToMA.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
191
r
library(FitAR) ### Name: ARToMA ### Title: Coefficients In Infinite Moving Average Expansion ### Aliases: ARToMA ### Keywords: ts ### ** Examples ARToMA(0.5,20) ARToMA(c(0.2,0.5), 15)
#' Aggregate daily values of SWAT.profile to Vegetationperiods #' #' @param dat data.frame or data.table of SWAT.profile aggregate daily profile water #' contents, generated by \code{\link{AggregateSWATi}} #' @param vp.year years for which the vegetation periods shall be summed up #' @param vp.start start-doys (day of ...
/R-Functions/aggr_states_soil_vegper.R
no_license
pschmidtwalter/LWFB90_multisite_runs
R
false
false
6,138
r
#' Aggregate daily values of SWAT.profile to Vegetationperiods #' #' @param dat data.frame or data.table of SWAT.profile aggregate daily profile water #' contents, generated by \code{\link{AggregateSWATi}} #' @param vp.year years for which the vegetation periods shall be summed up #' @param vp.start start-doys (day of ...
# EXERCISE # Edge-betweenness community detection # An alternative community detection method is edge-betweenness. In this exercise you will repeat the community detection of the karate club using this method and compare the results visually to the fast-greedy method. # INSTRUCTIONS # 100 XP # INSTRUCTIONS # 100 XP # ...
/Course 11 - Network Analysis/chapter_04_exercise_05.r
no_license
thiagolrpinho/DataScience4All
R
false
false
1,023
r
# EXERCISE # Edge-betweenness community detection # An alternative community detection method is edge-betweenness. In this exercise you will repeat the community detection of the karate club using this method and compare the results visually to the fast-greedy method. # INSTRUCTIONS # 100 XP # INSTRUCTIONS # 100 XP # ...
# =============================================================================== # * FILE: pums_import.R # * PURPOSE: Import PUMS data and create framework for data analysis # * AUTHORS: Adam Staveski # * DATE CREATED: June 4, 2020 # * DATE LAST MODIFIED: July 10, 2020 # =========================================...
/pums_import.R
no_license
astaveski/rochester
R
false
false
25,823
r
# =============================================================================== # * FILE: pums_import.R # * PURPOSE: Import PUMS data and create framework for data analysis # * AUTHORS: Adam Staveski # * DATE CREATED: June 4, 2020 # * DATE LAST MODIFIED: July 10, 2020 # =========================================...
repmat <- function (a, n, m) { kronecker(matrix(1, n, m), a) }
/Code/R/Development/SlimPosition/R/repmat.R
no_license
cfhammill/ExPosition-Family
R
false
false
65
r
repmat <- function (a, n, m) { kronecker(matrix(1, n, m), a) }
setwd("C:/Users/Aishwarya/Desktop") # THE MAIN FUNCTION my.pca <- function() { # READ DATA FROM CSV FILE my.data <- my.read("short_data.csv") # STORE THE NAME OF SUBJ AND SENTIMENTAL ELECTRODES processed.data <- my.data[c(1,3,4,5,6,7,8,9,10,11,12,15,16)] processed.data$C3 <- as.numeric(processed...
/PrincipalComponet.R
no_license
AnushreeAnkola/Multichannel-EEG-based-Principal-Component-Sentiment-Disorder-Detection-model
R
false
false
5,072
r
setwd("C:/Users/Aishwarya/Desktop") # THE MAIN FUNCTION my.pca <- function() { # READ DATA FROM CSV FILE my.data <- my.read("short_data.csv") # STORE THE NAME OF SUBJ AND SENTIMENTAL ELECTRODES processed.data <- my.data[c(1,3,4,5,6,7,8,9,10,11,12,15,16)] processed.data$C3 <- as.numeric(processed...
library(qdap) ### Name: space_fill ### Title: Replace Spaces ### Aliases: space_fill ### ** Examples ## Not run: ##D x <- c("I want to hear the Dr. Martin Luther King Jr. speech.", ##D "I also want to go to the white House to see President Obama speak.") ##D ##D keeps <- c("Dr. Martin Luther King Jr.", "The W...
/data/genthat_extracted_code/qdap/examples/space_fill.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
428
r
library(qdap) ### Name: space_fill ### Title: Replace Spaces ### Aliases: space_fill ### ** Examples ## Not run: ##D x <- c("I want to hear the Dr. Martin Luther King Jr. speech.", ##D "I also want to go to the white House to see President Obama speak.") ##D ##D keeps <- c("Dr. Martin Luther King Jr.", "The W...
## sr-ch5.R ## Chapter 5 - Multivariate Linear Models library(rethinking) data(WaffleDivorce) d <- WaffleDivorce head(d) names(d) # standardize d$MedianAgeMarriage.s <- (d$MedianAgeMarriage - mean(d$MedianAgeMarriage))/sd(d$MedianAgeMarriage) # fit m5.1 <- map(alist( Divorce ~ dnorm(mu, sigma), mu <- a + bA * Me...
/sr-ch5.R
no_license
loudermilk/bayesian-stats
R
false
false
14,993
r
## sr-ch5.R ## Chapter 5 - Multivariate Linear Models library(rethinking) data(WaffleDivorce) d <- WaffleDivorce head(d) names(d) # standardize d$MedianAgeMarriage.s <- (d$MedianAgeMarriage - mean(d$MedianAgeMarriage))/sd(d$MedianAgeMarriage) # fit m5.1 <- map(alist( Divorce ~ dnorm(mu, sigma), mu <- a + bA * Me...
# This function needs the reshape2 R package. ## If argument dataSetType = "", then the function will return training and test data collected by UCI from the ## accelerometers of Samsung Galaxy S smartphones containing only the measurements on the mean and standard deviation ## for each measurement. ## If argum...
/run_analysis.r
no_license
khendrat/CourseraJHUCourse3
R
false
false
2,876
r
# This function needs the reshape2 R package. ## If argument dataSetType = "", then the function will return training and test data collected by UCI from the ## accelerometers of Samsung Galaxy S smartphones containing only the measurements on the mean and standard deviation ## for each measurement. ## If argum...
options(stringsAsFactors=FALSE) Tags <- read.csv("~/R/travel_stackexchange_com/Tags.csv") Posts <- read.csv("~/R/travel_stackexchange_com/Posts.csv") Users <- read.csv("~/R/travel_stackexchange_com/Users.csv") library(sqldf) g <- head(Tags) dokladny_wybor_posts <- sqldf("select * from Posts where OwnerU...
/ZAD_2_2_PROJEKT_2_sqldf.R
no_license
mariolciax/Projekt_nr_2_PDU
R
false
false
1,652
r
options(stringsAsFactors=FALSE) Tags <- read.csv("~/R/travel_stackexchange_com/Tags.csv") Posts <- read.csv("~/R/travel_stackexchange_com/Posts.csv") Users <- read.csv("~/R/travel_stackexchange_com/Users.csv") library(sqldf) g <- head(Tags) dokladny_wybor_posts <- sqldf("select * from Posts where OwnerU...
#' gscounts #' #' Design and monitoring of group sequential designs with negative binomial data. #' #' @docType package #' @author Tobias Muetze <tobias.muetze@outlook.com> #' @importFrom Rcpp evalCpp #' @useDynLib gscounts #' @name gscounts NULL #' Hospitalizations #' #' A dataset containing the hospitalization ...
/R/zzz.R
no_license
tobiasmuetze/gscounts
R
false
false
800
r
#' gscounts #' #' Design and monitoring of group sequential designs with negative binomial data. #' #' @docType package #' @author Tobias Muetze <tobias.muetze@outlook.com> #' @importFrom Rcpp evalCpp #' @useDynLib gscounts #' @name gscounts NULL #' Hospitalizations #' #' A dataset containing the hospitalization ...
## Author: Sergio García Prado ## Title: Durret - Exercise 4.19 rm(list = ls()) l <- 5 mu <- 2 (Q <- matrix(c(-l, l, 0, 0, 0, mu, -(l + mu), l, 0, 0, 0, 2 * mu, -(l + 2 * mu), l, 0, ...
/stochastic-processes/durret/ch-4/durret-4-19.R
permissive
garciparedes/r-examples
R
false
false
899
r
## Author: Sergio García Prado ## Title: Durret - Exercise 4.19 rm(list = ls()) l <- 5 mu <- 2 (Q <- matrix(c(-l, l, 0, 0, 0, mu, -(l + mu), l, 0, 0, 0, 2 * mu, -(l + 2 * mu), l, 0, ...
#' @details #' An implementation of the Language Server Protocol for R "_PACKAGE" Documents <- R6::R6Class("Documents", public = list( get = function(uri) { if (uri %in% names(private$cache)) { private$cache[[uri]] } else { logger$error(uri, "not fou...
/R/languageserver.R
no_license
rukmal/languageserver
R
false
false
5,463
r
#' @details #' An implementation of the Language Server Protocol for R "_PACKAGE" Documents <- R6::R6Class("Documents", public = list( get = function(uri) { if (uri %in% names(private$cache)) { private$cache[[uri]] } else { logger$error(uri, "not fou...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/textfunc_getSentimentScore.R \name{textfunc.getSentimentFromScore} \alias{textfunc.getSentimentFromScore} \title{Get sentiment from sentimen score} \usage{ textfunc.getSentimentFromScore(SentimentScore) } \arguments{ \item{SentimentScore}{int...
/man/textfunc.getSentimentFromScore.Rd
no_license
emillykkejensen/textfunc
R
false
true
491
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/textfunc_getSentimentScore.R \name{textfunc.getSentimentFromScore} \alias{textfunc.getSentimentFromScore} \title{Get sentiment from sentimen score} \usage{ textfunc.getSentimentFromScore(SentimentScore) } \arguments{ \item{SentimentScore}{int...
#' Tidiers for data.frame objects #' #' These perform tidy summaries of data.frame objects. \code{tidy} produces #' summary statistics about each column, while \code{glance} simply reports #' the number of rows and columns. Note that \code{augment.data.frame} will #' throw an error. #' #' @param x A data.frame #' @pa...
/R/data.frame_tidiers.R
no_license
rmc2/broom
R
false
false
2,613
r
#' Tidiers for data.frame objects #' #' These perform tidy summaries of data.frame objects. \code{tidy} produces #' summary statistics about each column, while \code{glance} simply reports #' the number of rows and columns. Note that \code{augment.data.frame} will #' throw an error. #' #' @param x A data.frame #' @pa...
library(queueing) ### Name: print.summary.o_MMInf ### Title: Summary of the results of a M/M/Infinite queueing model ### Aliases: print.summary.o_MMInf ### Keywords: M/M/Infinite ### ** Examples ## create input parameters i_mminf <- NewInput.MMInf(lambda=0.25, mu=4, n=0) ## Build the model o_mminf <- QueueingModel...
/data/genthat_extracted_code/queueing/examples/print.summary.o_MMInf.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
380
r
library(queueing) ### Name: print.summary.o_MMInf ### Title: Summary of the results of a M/M/Infinite queueing model ### Aliases: print.summary.o_MMInf ### Keywords: M/M/Infinite ### ** Examples ## create input parameters i_mminf <- NewInput.MMInf(lambda=0.25, mu=4, n=0) ## Build the model o_mminf <- QueueingModel...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/SimClean.R \name{SimClean} \alias{SimClean} \title{Removes/cleans files and folders that have been saved} \usage{ SimClean(..., dirs = NULL, generate_data = FALSE, results = FALSE, seeds = FALSE, temp = FALSE, save_details = list()) } \argu...
/man/SimClean.Rd
no_license
SJRushford/SimDesign
R
false
true
1,880
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/SimClean.R \name{SimClean} \alias{SimClean} \title{Removes/cleans files and folders that have been saved} \usage{ SimClean(..., dirs = NULL, generate_data = FALSE, results = FALSE, seeds = FALSE, temp = FALSE, save_details = list()) } \argu...
# Illustrates the use of Bayes Classifier with the single variable case install.packages("ISLR") library("ISLR") summary(Default) str(Default) attach(Default) # Manual Approach (1) all.dist <- addmargins(prop.table(table(student,default))) all.dist # What is the conditional distribution given a customer is a studen...
/lecture/example/mv03_cond_dist_naive-bayes.R
no_license
ChenXuMC/man2
R
false
false
1,217
r
# Illustrates the use of Bayes Classifier with the single variable case install.packages("ISLR") library("ISLR") summary(Default) str(Default) attach(Default) # Manual Approach (1) all.dist <- addmargins(prop.table(table(student,default))) all.dist # What is the conditional distribution given a customer is a studen...
\name{staining} \alias{staining} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Staining Quality Controls } \description{ Staining controls are used to examine the efficiency of the staining step in both the red and green channels. These controls are independent of the hybridization and extensio...
/R/man/staining.Rd
no_license
baminou/QC450K
R
false
false
1,956
rd
\name{staining} \alias{staining} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Staining Quality Controls } \description{ Staining controls are used to examine the efficiency of the staining step in both the red and green channels. These controls are independent of the hybridization and extensio...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/nee_functions.R \name{one_minus_ut} \alias{one_minus_ut} \title{1 - ut} \usage{ one_minus_ut(lambda, mu, t) } \arguments{ \item{lambda}{speciation rate} \item{mu}{extinction rate} \item{t}{time} } \value{ 1 - ut } \description{ Nee's functi...
/man/one_minus_ut.Rd
no_license
Giappo/jap
R
false
true
362
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/nee_functions.R \name{one_minus_ut} \alias{one_minus_ut} \title{1 - ut} \usage{ one_minus_ut(lambda, mu, t) } \arguments{ \item{lambda}{speciation rate} \item{mu}{extinction rate} \item{t}{time} } \value{ 1 - ut } \description{ Nee's functi...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Functions.R \name{spp699} \alias{spp699} \title{species function} \usage{ spp699(a, b, c, d, e) } \arguments{ \item{a}{environmental parameter} \item{b}{environmental parameter} \item{c}{environmental parameter} \item{d}{environmental para...
/man/spp699.Rd
permissive
Djeppschmidt/Model.Microbiome
R
false
true
456
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Functions.R \name{spp699} \alias{spp699} \title{species function} \usage{ spp699(a, b, c, d, e) } \arguments{ \item{a}{environmental parameter} \item{b}{environmental parameter} \item{c}{environmental parameter} \item{d}{environmental para...
#table(bike$student) #student <- bike[bike$student==1,] #table(student$cyc_freq) #distance <- student$distance #mean(distance) table(bike$cyc_freq == 'Daily') daily_riders <- bike[bike$cyc_freq == 'Daily',] table(daily_riders$gender == 'F' ) ages_riders <- daily_riders$age mean(ages_riders)
/demo1.R
no_license
Mushirahmed/R_workspace
R
false
false
293
r
#table(bike$student) #student <- bike[bike$student==1,] #table(student$cyc_freq) #distance <- student$distance #mean(distance) table(bike$cyc_freq == 'Daily') daily_riders <- bike[bike$cyc_freq == 'Daily',] table(daily_riders$gender == 'F' ) ages_riders <- daily_riders$age mean(ages_riders)
library(ggplot2) library(dplyr) library(forcats) library(tidyr) library(readr) theme_bw_nolines <- function() { theme_bw() + theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank()) } source("analysis/transient/common_simulation_functions.R") # theme_set(theme_classic()) tra...
/analysis/transient/transient-fig.R
no_license
kieranrcampbell/ouija-paper
R
false
false
4,435
r
library(ggplot2) library(dplyr) library(forcats) library(tidyr) library(readr) theme_bw_nolines <- function() { theme_bw() + theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank()) } source("analysis/transient/common_simulation_functions.R") # theme_set(theme_classic()) tra...
#' Express a function as a closure #' #' Unlike [rlang::as_closure()], the formals of `closure()` agree with those #' of [args()]. #' #' @param f Function. #' #' @return If `f` is a closure, it is simply returned. Otherwise, `f` is a #' primitive function, and `closure()` wraps it in a closure whose environment #' ...
/R/closure.R
permissive
egnha/gestalt
R
false
false
2,458
r
#' Express a function as a closure #' #' Unlike [rlang::as_closure()], the formals of `closure()` agree with those #' of [args()]. #' #' @param f Function. #' #' @return If `f` is a closure, it is simply returned. Otherwise, `f` is a #' primitive function, and `closure()` wraps it in a closure whose environment #' ...
library(Matrix) library(RSpectra) #### load data and packages setwd("/data/victorxun/scTenifoldtime/GSE147807") source("new_Normalization.R") source("pcNet.R") source("regression_fun.R") source("tensorDecomposition.R") source("scTenifoldTime.R") dta <- readRDS("data/dta_raw.rds") dta_sudotime <- readRDS("data/dta_sud...
/GSE147807/code/scTenifoldTime_tensor_cor.R
no_license
guanxunli/sc_Tensor_time
R
false
false
1,144
r
library(Matrix) library(RSpectra) #### load data and packages setwd("/data/victorxun/scTenifoldtime/GSE147807") source("new_Normalization.R") source("pcNet.R") source("regression_fun.R") source("tensorDecomposition.R") source("scTenifoldTime.R") dta <- readRDS("data/dta_raw.rds") dta_sudotime <- readRDS("data/dta_sud...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/normalScoresTest.R \name{normalScoresTest} \alias{normalScoresTest} \alias{normalScoresTest.default} \alias{normalScoresTest.formula} \title{Lu-Smith Normal Scores Test} \usage{ normalScoresTest(x, ...) \method{normalScoresTest}{default}(x, ...
/man/normalScoresTest.Rd
no_license
pociuteagne/PMCMRplus
R
false
true
2,800
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/normalScoresTest.R \name{normalScoresTest} \alias{normalScoresTest} \alias{normalScoresTest.default} \alias{normalScoresTest.formula} \title{Lu-Smith Normal Scores Test} \usage{ normalScoresTest(x, ...) \method{normalScoresTest}{default}(x, ...
shinyServer(function(input, output) { TitleClass <- reactive({ switch(as.character(input$class), "1" = "First Class", "2" = "Second Class", "3" = "Third Class") }) output$mainPlot <- renderPlot({ selected.data <- subset(titanic.data...
/server.R
no_license
shannonrush/DDP_shiny
R
false
false
1,194
r
shinyServer(function(input, output) { TitleClass <- reactive({ switch(as.character(input$class), "1" = "First Class", "2" = "Second Class", "3" = "Third Class") }) output$mainPlot <- renderPlot({ selected.data <- subset(titanic.data...
\name{cenmle} \alias{cenmle} \title{ Regression by Maximum Likelihood Estimation for Left-censored Data } \description{ Regression by Maximum Likelihood (ML) Estimation for left-censored ("nondetect" or "less-than") data. This routine computes regression estimates of slope(s) and intercept by maxim...
/man/cenmle.Rd
no_license
cran/NADA
R
false
false
4,766
rd
\name{cenmle} \alias{cenmle} \title{ Regression by Maximum Likelihood Estimation for Left-censored Data } \description{ Regression by Maximum Likelihood (ML) Estimation for left-censored ("nondetect" or "less-than") data. This routine computes regression estimates of slope(s) and intercept by maxim...
# aRpsDCA # Copyright (C) 2016 dwt | terminus data science, LLC # <dwt [at] terminusdatascience.com> # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, ...
/data/genthat_extracted_code/aRpsDCA/tests/fit_and_plot_from_interval_with_curtailment.R
no_license
surayaaramli/typeRrh
R
false
false
3,468
r
# aRpsDCA # Copyright (C) 2016 dwt | terminus data science, LLC # <dwt [at] terminusdatascience.com> # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, ...
/test_015.R
no_license
haoingg/ADSP
R
false
false
424
r
library(GEOquery) library(affy) library(limma) library(hgu133plus2.db) #get GSE50697 from LSM3241_Assignment1 dir gse_file ='GSE50697_family.soft' gse <- getGEO(filename = gse_file) #get gse methods gse_methods <- methods(class=class(gse)) #explore gse meta data gse_meta<- names(Meta(gse)) #get names ...
/array_analysis_3241.r
no_license
HoWeiChin/LSM3241_CA1
R
false
false
3,384
r
library(GEOquery) library(affy) library(limma) library(hgu133plus2.db) #get GSE50697 from LSM3241_Assignment1 dir gse_file ='GSE50697_family.soft' gse <- getGEO(filename = gse_file) #get gse methods gse_methods <- methods(class=class(gse)) #explore gse meta data gse_meta<- names(Meta(gse)) #get names ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/setup.R \name{setup} \alias{setup} \title{Set up environment to use \code{amplicR}} \usage{ setup() } \description{ Install/update additional packages needed that are not installed the conventional way. } \details{ \code{Bioconductor} recomm...
/man/setup.Rd
no_license
carlopacioni/amplicR
R
false
true
1,173
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/setup.R \name{setup} \alias{setup} \title{Set up environment to use \code{amplicR}} \usage{ setup() } \description{ Install/update additional packages needed that are not installed the conventional way. } \details{ \code{Bioconductor} recomm...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/common.R \name{common} \alias{common} \title{Find Common} \usage{ common(data) } \arguments{ \item{data}{must be list} } \value{ vectors } \description{ Find Common } \examples{ \dontrun{ data1=c('a','e','d') data2=c('a','...
/man/common.Rd
no_license
yikeshu0611/onetree
R
false
true
401
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/common.R \name{common} \alias{common} \title{Find Common} \usage{ common(data) } \arguments{ \item{data}{must be list} } \value{ vectors } \description{ Find Common } \examples{ \dontrun{ data1=c('a','e','d') data2=c('a','...
# Siwei 29 Sept 2020 # Organise CMC_SCZ data # init library(readr) library(edgeR) ## CMC_MSSM_Penn_Pitt_DLPFC_mRNA_IlluminaHiSeq2500_geneExpressionRaw <- read_delim("/nvmefs/VPS45/shared_molecular_neuropathology_mgandal/Shared-molecular-neuropathology-across-major-psychiatric-disorders-parallels-polygenic-overlap...
/Siwei_analysis/code_R/master_codes/organise_CMC_SCZ_data.R
no_license
endeneon/VPS45_repo
R
false
false
4,435
r
# Siwei 29 Sept 2020 # Organise CMC_SCZ data # init library(readr) library(edgeR) ## CMC_MSSM_Penn_Pitt_DLPFC_mRNA_IlluminaHiSeq2500_geneExpressionRaw <- read_delim("/nvmefs/VPS45/shared_molecular_neuropathology_mgandal/Shared-molecular-neuropathology-across-major-psychiatric-disorders-parallels-polygenic-overlap...
mydata <- read.table("household_power_consumption.txt", header=TRUE, sep=";", na.strings = "?", nrows= 1000000, stringsAsFactors=FALSE) mydata$DateTime <- paste(mydata$Date, mydata$Time) mydata$DateTime <- as.Date(mydata$DateTime, format = "%d/%m/%Y %H:%M:%S") library(dplyr) subsetted <- filter(mydata, DateTime >= ...
/plot3.R
no_license
dinosossi/ExData_Plotting1
R
false
false
1,130
r
mydata <- read.table("household_power_consumption.txt", header=TRUE, sep=";", na.strings = "?", nrows= 1000000, stringsAsFactors=FALSE) mydata$DateTime <- paste(mydata$Date, mydata$Time) mydata$DateTime <- as.Date(mydata$DateTime, format = "%d/%m/%Y %H:%M:%S") library(dplyr) subsetted <- filter(mydata, DateTime >= ...
library(stm) library(biom) library(readr) library(tidyr) library(dplyr) library(fastICA) library(randomForest) library(stringr) library(kernlab) library(Rcpp) library(parallel) library(foreach) library(ape) library(phyloseq) library(doParallel) library(stm) library(LDAvis) library(caret) library(glmnet) library(ggplot2...
/code_active/gevers_model_analysis_rarefied_2.R
no_license
EESI/exploring_thematic_structure
R
false
false
73,922
r
library(stm) library(biom) library(readr) library(tidyr) library(dplyr) library(fastICA) library(randomForest) library(stringr) library(kernlab) library(Rcpp) library(parallel) library(foreach) library(ape) library(phyloseq) library(doParallel) library(stm) library(LDAvis) library(caret) library(glmnet) library(ggplot2...
create.barplot <- function(data = NULL, x = NULL, y = NULL, fill = NULL, group = NULL, group.col = FALSE, group.row = FALSE, rotate = FALSE, width = 0.9, ylab = NULL, xlab = NULL, yaxis.log.scale = FALSE, xaxis.log.scale = FALSE, theme = NULL) { # validate the arguments if (is.null(x)) stop('Missing x argument') ...
/R/create.barplot.R
no_license
rdeborja/plotting.general
R
false
false
2,763
r
create.barplot <- function(data = NULL, x = NULL, y = NULL, fill = NULL, group = NULL, group.col = FALSE, group.row = FALSE, rotate = FALSE, width = 0.9, ylab = NULL, xlab = NULL, yaxis.log.scale = FALSE, xaxis.log.scale = FALSE, theme = NULL) { # validate the arguments if (is.null(x)) stop('Missing x argument') ...
\name{makeaxes} \Rdversion{1.1} \alias{makeaxes} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Makes axes on a map plot. } \description{ This actually isn't going to be used unless you make a map from the plotmap function in kftrack... } \usage{ makeaxes(xmin = -100, xmax = 10, xtick = 10, ymin...
/deprecated/makeaxes.Rd
no_license
galuardi/analyzepsat
R
false
false
1,442
rd
\name{makeaxes} \Rdversion{1.1} \alias{makeaxes} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Makes axes on a map plot. } \description{ This actually isn't going to be used unless you make a map from the plotmap function in kftrack... } \usage{ makeaxes(xmin = -100, xmax = 10, xtick = 10, ymin...
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/adf.r \name{lm.model.frame} \alias{lm.model.frame} \title{Construct model.frame} \usage{ lm.model.frame(formula, data, subset, weights, na.action, contrasts = NULL, offset) } \arguments{ \item{formula}{a formula to use with type equ...
/man/lm.model.frame.Rd
no_license
linearregression/ioregression
R
false
false
1,098
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/adf.r \name{lm.model.frame} \alias{lm.model.frame} \title{Construct model.frame} \usage{ lm.model.frame(formula, data, subset, weights, na.action, contrasts = NULL, offset) } \arguments{ \item{formula}{a formula to use with type equ...
#Assignment problem # J1 J2 J3 #x1 15 10 9 #x2 9 15 10 #x3 10 12 8 library(lpSolve) costs<-matrix(c(15,10,9,9,15,10,10,12,8),nrow=3,byrow=TRUE) costs lp.assign(costs) lp.assign(costs)$solution
/P3 OR/Assignment.R
no_license
RomanaAsad/29-Romana-Asad
R
false
false
256
r
#Assignment problem # J1 J2 J3 #x1 15 10 9 #x2 9 15 10 #x3 10 12 8 library(lpSolve) costs<-matrix(c(15,10,9,9,15,10,10,12,8),nrow=3,byrow=TRUE) costs lp.assign(costs) lp.assign(costs)$solution
# amended 28_11_2007 # the first derivatives squares have been used here #---------------------------------------------------------------------------------------- ST5<- function (mu.link="identity", sigma.link="log", nu.link ="identity", tau.link="log") { mstats <- checklink( "mu.link", "Skew t, type 3", sub...
/R/ST5.R
no_license
deoclecioamorim/GAMLSS-Distibutions
R
false
false
11,861
r
# amended 28_11_2007 # the first derivatives squares have been used here #---------------------------------------------------------------------------------------- ST5<- function (mu.link="identity", sigma.link="log", nu.link ="identity", tau.link="log") { mstats <- checklink( "mu.link", "Skew t, type 3", sub...
## Oct13,08 check 2fold down genes, gearmoran{ade4} ## Oct10,08 after fixing chr annotaion erros ### based 0422308.chr.R ### using background correction and non-chr5 nomalization rm(list=ls()) # Exactly form of mulinomial sampling # vector of x and p loglh.multinomial.sampling <- function( x, p ) { tota...
/R.scripts/101308-2fold-permutation.R
no_license
hongqin/2008-sor55-gwas-code
R
false
false
8,885
r
## Oct13,08 check 2fold down genes, gearmoran{ade4} ## Oct10,08 after fixing chr annotaion erros ### based 0422308.chr.R ### using background correction and non-chr5 nomalization rm(list=ls()) # Exactly form of mulinomial sampling # vector of x and p loglh.multinomial.sampling <- function( x, p ) { tota...
## ------------- ## Name: Cloud_Proc.R ## Program version: R 3.2.3 ## Dependencies: ## Author: J.H. Belle ## Purpose: Process cloud product results ## ------------- # Read in 24-hour observations #CalifG24hr <- read.csv("T:/eohprojs/CDC_climatechange/Jess/Dissertation/EPAcleaned/CalifG24hr.csv", stringsAsFactors = F) ...
/Cloud_Proc.R
permissive
jhbelle/Aim1Repo
R
false
false
8,650
r
## ------------- ## Name: Cloud_Proc.R ## Program version: R 3.2.3 ## Dependencies: ## Author: J.H. Belle ## Purpose: Process cloud product results ## ------------- # Read in 24-hour observations #CalifG24hr <- read.csv("T:/eohprojs/CDC_climatechange/Jess/Dissertation/EPAcleaned/CalifG24hr.csv", stringsAsFactors = F) ...
library(testthat) library(soiltestcorr) test_check("soiltestcorr")
/tests/testthat.R
permissive
adriancorrendo/soiltestcorr
R
false
false
68
r
library(testthat) library(soiltestcorr) test_check("soiltestcorr")
library(ndl) ### Name: learn ### Title: Count cue-outcome co-occurences needed to run the Danks ### equations. ### Aliases: learn ### Keywords: classif ### ** Examples #None (internal function)
/data/genthat_extracted_code/ndl/examples/learn.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
203
r
library(ndl) ### Name: learn ### Title: Count cue-outcome co-occurences needed to run the Danks ### equations. ### Aliases: learn ### Keywords: classif ### ** Examples #None (internal function)
#' Test speed of mirror #' #' @param min.second the minium second time to visit the mirror web page #' @param cran logical, whether to test CRAN mirrors. Default is TRUE #' @param bioc logical, whether to test bioconductor mirrors. Default is TRUE #' @importFrom utils read.csv #' @return repositories which visiting tim...
/R/mirror.speed.R
no_license
Xuyifei-NAU/do
R
false
false
3,059
r
#' Test speed of mirror #' #' @param min.second the minium second time to visit the mirror web page #' @param cran logical, whether to test CRAN mirrors. Default is TRUE #' @param bioc logical, whether to test bioconductor mirrors. Default is TRUE #' @importFrom utils read.csv #' @return repositories which visiting tim...
library(shinylogs) untar("8a36736625a2437bb084ba65b32a8c14.tar") logs <- read_json_logs("logs") logs$inputs
/read-logs.R
no_license
faast-for-teachers/generality-shiny
R
false
false
111
r
library(shinylogs) untar("8a36736625a2437bb084ba65b32a8c14.tar") logs <- read_json_logs("logs") logs$inputs
/AnaliseCP ME 731 2S 2020.R
no_license
rodneyfv/AM_S2_2020
R
false
false
6,424
r
library(ggplot2) library(ggthemes) library(lmtest) library(tidyr) library(dplyr) library(multcomp) library(lme4) library(nlstools) library(knitr) library("RColorBrewer") library(wesanderson) library(extrafont) library(cowplot) library(latex2exp) library('R.matlab') library(boot) library(viridis) library(english) #====...
/stats_confexp_newfunctions.R
no_license
GBruening/Prob_reward
R
false
false
19,713
r
library(ggplot2) library(ggthemes) library(lmtest) library(tidyr) library(dplyr) library(multcomp) library(lme4) library(nlstools) library(knitr) library("RColorBrewer") library(wesanderson) library(extrafont) library(cowplot) library(latex2exp) library('R.matlab') library(boot) library(viridis) library(english) #====...
library(caret) library(randomForest) #setwd("D:/Userfiles/dfernandezcanon/Desktop/ML") setwd("/Users/dfernandezcanon/Documents/Development/R/Project/08-Practica_Machine_Learning/Project") #getting the data train.url <- "http://d396qusza40orc.cloudfront.net/predmachlearn/pml-training.csv" test.url <- "http://d396qusza...
/Project/Project.R
no_license
dannyferc/08-Practica_Machine_Learning
R
false
false
2,247
r
library(caret) library(randomForest) #setwd("D:/Userfiles/dfernandezcanon/Desktop/ML") setwd("/Users/dfernandezcanon/Documents/Development/R/Project/08-Practica_Machine_Learning/Project") #getting the data train.url <- "http://d396qusza40orc.cloudfront.net/predmachlearn/pml-training.csv" test.url <- "http://d396qusza...
vcov.rasch <- function (object, robust = FALSE, ...) { if (!inherits(object, "rasch")) stop("Use only with 'rasch' objects.\n") inv.hes <- if (robust) { score.vec <- function (betas, X, constraint, GH) { p <- nrow(betas) pr <- probs(GH$Z %*% t(betas)) ...
/R/vcov.rasch.R
no_license
cran/ltm
R
false
false
1,680
r
vcov.rasch <- function (object, robust = FALSE, ...) { if (!inherits(object, "rasch")) stop("Use only with 'rasch' objects.\n") inv.hes <- if (robust) { score.vec <- function (betas, X, constraint, GH) { p <- nrow(betas) pr <- probs(GH$Z %*% t(betas)) ...
\name{family} \alias{mkdata.binomial} \alias{dev.resid.binomial} \alias{dev.null.binomial} \alias{cv.binomial} \alias{y0.binomial} \alias{proj0.binomial} \alias{kl.binomial} \alias{cfit.binomial} \alias{mkdata.poisson} \alias{dev.resid.poisson} \alias{dev.null.poisson} \alias{cv.poisson} \alias{y0.poisson} \alias{proj0...
/man/family.Rd
no_license
cran/gss
R
false
false
4,876
rd
\name{family} \alias{mkdata.binomial} \alias{dev.resid.binomial} \alias{dev.null.binomial} \alias{cv.binomial} \alias{y0.binomial} \alias{proj0.binomial} \alias{kl.binomial} \alias{cfit.binomial} \alias{mkdata.poisson} \alias{dev.resid.poisson} \alias{dev.null.poisson} \alias{cv.poisson} \alias{y0.poisson} \alias{proj0...
library(testthat) library(MaryFactors) test_check("MaryFactors")
/tests/testthat.R
no_license
MaryHe/First-Package-of-Mary
R
false
false
66
r
library(testthat) library(MaryFactors) test_check("MaryFactors")
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/newtons_method.R \name{newtons_method} \alias{newtons_method} \title{Newton's method for finding optima} \usage{ newtons_method(y, k_xx, precision = 0.05) } \arguments{ \item{y}{Vector of outcome variables.} \item{k_xx}{Covariance matrix of ...
/man/newtons_method.Rd
no_license
ooelrich/OBBP
R
false
true
579
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/newtons_method.R \name{newtons_method} \alias{newtons_method} \title{Newton's method for finding optima} \usage{ newtons_method(y, k_xx, precision = 0.05) } \arguments{ \item{y}{Vector of outcome variables.} \item{k_xx}{Covariance matrix of ...
#Akin Yalcinkaya #PCA(Principal Component Analysis) en nüyük variances açıklamak library(h2o) #h2o,büyük veri için açık kaynaklı bir yazılımdır. #kullanıcların veri modellerini keşfetmesinin bit parçası olarak binclerce model uymasını sağlar h2o.init() prostatePath = system.file("extdata","prostate.csv"...
/yapaysiniraglari/h2o prostate-PCA/prostate.PCA.R
no_license
yalcinkayakin/YapaySinirAglari-R
R
false
false
674
r
#Akin Yalcinkaya #PCA(Principal Component Analysis) en nüyük variances açıklamak library(h2o) #h2o,büyük veri için açık kaynaklı bir yazılımdır. #kullanıcların veri modellerini keşfetmesinin bit parçası olarak binclerce model uymasını sağlar h2o.init() prostatePath = system.file("extdata","prostate.csv"...
library(otsad) context("Incremental Processing Sd-Ewma") test_that("IpSdEwma gives the correct result", { ## Generate data set.seed(100) n <- 500 x <- sample(1:100, n, replace = TRUE) x[70:90] <- sample(110:115, 21, replace = TRUE) x[25] <- 200 x[320] <- 170 df <- data.frame(timestamp=1:n,value=x) ...
/tests/testthat/test_ip_sd_ewma.R
permissive
JacintoCC/otsad
R
false
false
1,070
r
library(otsad) context("Incremental Processing Sd-Ewma") test_that("IpSdEwma gives the correct result", { ## Generate data set.seed(100) n <- 500 x <- sample(1:100, n, replace = TRUE) x[70:90] <- sample(110:115, 21, replace = TRUE) x[25] <- 200 x[320] <- 170 df <- data.frame(timestamp=1:n,value=x) ...
## ----setup, include = FALSE---------------------------------------------- calibration_res <- NULL knitr::opts_chunk$set( collapse = TRUE, comment = "#>", eval = !identical(Sys.getenv("NO_VIGNETTE_ON_CRAN"), "") # set to FALSE to prevent eval on CRAN! ) ## ----load_libs-----------------------------------------...
/vignettes/How_to_autocalibrate_a_SWMM_model_with_swmmr.R
no_license
SumathyS/swmmr
R
false
false
3,616
r
## ----setup, include = FALSE---------------------------------------------- calibration_res <- NULL knitr::opts_chunk$set( collapse = TRUE, comment = "#>", eval = !identical(Sys.getenv("NO_VIGNETTE_ON_CRAN"), "") # set to FALSE to prevent eval on CRAN! ) ## ----load_libs-----------------------------------------...
#' Run Shiny Application #' #' @param population A ypr population object #' @export #' @examples #' if(interactive()){run_ypr_app()} run_ypr_app <- function(population = NULL) { chk::chkor(chk_population(population, parameters), chk::chk_null(population)) shinyOptions(population = population) shiny::shinyAppDir...
/R/run_app.R
permissive
cran/shinyypr
R
false
false
425
r
#' Run Shiny Application #' #' @param population A ypr population object #' @export #' @examples #' if(interactive()){run_ypr_app()} run_ypr_app <- function(population = NULL) { chk::chkor(chk_population(population, parameters), chk::chk_null(population)) shinyOptions(population = population) shiny::shinyAppDir...
\name{dgdb} \alias{dgdb} \docType{data} \title{ DGs database } \description{ In silico generated database for common DGs. } \usage{data("dgdb")} \format{ Data frame with 147 observations and the following 3 variables. \describe{ \item{\code{formula}}{character vector containing molecular formulas.}...
/man/dgdb.Rd
no_license
cran/LipidMS
R
false
false
535
rd
\name{dgdb} \alias{dgdb} \docType{data} \title{ DGs database } \description{ In silico generated database for common DGs. } \usage{data("dgdb")} \format{ Data frame with 147 observations and the following 3 variables. \describe{ \item{\code{formula}}{character vector containing molecular formulas.}...