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 |
|---|---|---|---|---|---|---|---|---|---|
rm(list = ls(all = TRUE))
source("models.R") ## load models
source("nll_poisson.R") ## load neg log lik
require("stats4")
##the counter determines the bottle number +3 (columns before start) for monoculture data to be fit
species = 1
counter = species+3
y=17 #number of data points to use
jump=3
DATA<-read.csv("C... | /Coex_example/Files for final curve fits/R Scripts for fitting monocultures/fitfuncs_monos_allreps_least squares.r | no_license | OscarFHC/CoexistenceMethods | R | false | false | 3,921 | r | rm(list = ls(all = TRUE))
source("models.R") ## load models
source("nll_poisson.R") ## load neg log lik
require("stats4")
##the counter determines the bottle number +3 (columns before start) for monoculture data to be fit
species = 1
counter = species+3
y=17 #number of data points to use
jump=3
DATA<-read.csv("C... |
fig05x010<-function(){
mass<-c(5.9,32.0,40.0,51.5,70.0,100.0,78.0,80.0,85.0,85.0,
110.0,115.0,125.0,130.0,120.0,120.0,130.0,135.0,110.0,130.0,
150.0,145.0,150.0,170.0,225.0,145.0,188.0,180.0,197.0,218.0,
300.0,260.0,265.0,250.0,250.0,300.0,320.0,514.0,556.0,840.0,
685.0,700.0,700.0,690.0,900.0,650.0,820.0,850.0,90... | /graphicsforstatistics_2e_figures_scripts_r/Chapter 5/fig05x010.R | no_license | saqibarfeen/coding_time | R | false | false | 1,041 | r | fig05x010<-function(){
mass<-c(5.9,32.0,40.0,51.5,70.0,100.0,78.0,80.0,85.0,85.0,
110.0,115.0,125.0,130.0,120.0,120.0,130.0,135.0,110.0,130.0,
150.0,145.0,150.0,170.0,225.0,145.0,188.0,180.0,197.0,218.0,
300.0,260.0,265.0,250.0,250.0,300.0,320.0,514.0,556.0,840.0,
685.0,700.0,700.0,690.0,900.0,650.0,820.0,850.0,90... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mergeMatrices.R
\name{.mergeMatrices}
\alias{.mergeMatrices}
\title{Merge Multiple Matrices (main)}
\usage{
.mergeMatrices(
inpL,
mode = "intersect",
useColumn = 1,
extrRowNames = FALSE,
na.rm = TRUE,
argL = NULL,
silent = FALSE... | /man/dot-mergeMatrices.Rd | no_license | cran/wrMisc | R | false | true | 1,620 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mergeMatrices.R
\name{.mergeMatrices}
\alias{.mergeMatrices}
\title{Merge Multiple Matrices (main)}
\usage{
.mergeMatrices(
inpL,
mode = "intersect",
useColumn = 1,
extrRowNames = FALSE,
na.rm = TRUE,
argL = NULL,
silent = FALSE... |
################################
#### Project settings ####
################################
#---- R packages ----
library("conflicted")
library("tidyverse")
library("metafor")
library("clubSandwich")
library("drake")
library("gridExtra")
library("MAd")
library("visNetwork")
# packages_list <- c("confli... | /R/Settings.R | no_license | ClaudioZandonella/DMGC_Meta | R | false | false | 1,434 | r |
################################
#### Project settings ####
################################
#---- R packages ----
library("conflicted")
library("tidyverse")
library("metafor")
library("clubSandwich")
library("drake")
library("gridExtra")
library("MAd")
library("visNetwork")
# packages_list <- c("confli... |
###NOTES
# the primary stove recode is not correct
# manufactured == charcoal
# resolve either by tossing the stove_class variable
# or using the primary_stove variable
options(width=system("tput cols", intern=TRUE))
library(data.table)
library(ggplot2)
#helper(s)
return_cols_like <- function(dataframe, like, invert... | /r_scripts/unops_ap_modeling.R | permissive | ricpie/E2E-Data-Analysis | R | false | false | 34,399 | r | ###NOTES
# the primary stove recode is not correct
# manufactured == charcoal
# resolve either by tossing the stove_class variable
# or using the primary_stove variable
options(width=system("tput cols", intern=TRUE))
library(data.table)
library(ggplot2)
#helper(s)
return_cols_like <- function(dataframe, like, invert... |
rm(list = ls())
library(monocle3)
library(tidyverse)
library(imputeTS)
library(Seurat)
library(RColorBrewer)
library(Matrix)
library(cowplot)
library(future)
require(scales)
library(ggthemes)
library(sctransform)
library(patchwork)
library(harmony)
values <- c(brewer.pal(9,"Set1"),
brewer.pal... | /分开导入.R | no_license | Jasoncbh/scRNA | R | false | false | 30,418 | r | rm(list = ls())
library(monocle3)
library(tidyverse)
library(imputeTS)
library(Seurat)
library(RColorBrewer)
library(Matrix)
library(cowplot)
library(future)
require(scales)
library(ggthemes)
library(sctransform)
library(patchwork)
library(harmony)
values <- c(brewer.pal(9,"Set1"),
brewer.pal... |
#Loading libraries
install.packages('ggplot2')
install.packages('countrycode')
install.packages('dplyr')
install.packages('car')
install.packages('corrplot')
library(ggplot2)
library(countrycode)
library(dplyr)
library(car)
library(corrplot)
#loading the data
df <- read.csv("C:/Users/jhans/OneDrive... | /R (Machine Learning)/Life Expectancy Prediction/MA317_group_10_que_123.R | no_license | Jhansi-27/Projects-Machinelearning-DeepLearning | R | false | false | 6,729 | r | #Loading libraries
install.packages('ggplot2')
install.packages('countrycode')
install.packages('dplyr')
install.packages('car')
install.packages('corrplot')
library(ggplot2)
library(countrycode)
library(dplyr)
library(car)
library(corrplot)
#loading the data
df <- read.csv("C:/Users/jhans/OneDrive... |
## The following functions use the cache to make matrix inversion less costly.
## The makeCacheMatrix function creates a special "matrix" object that can
## cache its inverse.
makeCacheMatrix <- function(x = matrix()) {
s <- NULL
set <- function(y) {
x <<- y
s <<- NULL... | /cachematrix.R | no_license | Mikelar/ProgrammingAssignment2 | R | false | false | 1,095 | r | ## The following functions use the cache to make matrix inversion less costly.
## The makeCacheMatrix function creates a special "matrix" object that can
## cache its inverse.
makeCacheMatrix <- function(x = matrix()) {
s <- NULL
set <- function(y) {
x <<- y
s <<- NULL... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Rmixmod.R
\name{learnMain}
\alias{learnMain}
\title{learnMain}
\description{
TODO: describe
}
| /fuzzedpackages/Rmixmod/man/learnMain.Rd | no_license | akhikolla/testpackages | R | false | true | 172 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Rmixmod.R
\name{learnMain}
\alias{learnMain}
\title{learnMain}
\description{
TODO: describe
}
|
#' Check if Stanford coreNLP is Installed and In Root
#'
#' Checks that Stanford coreNLP is installed and in root.
#'
#' @param stanford The version of Stanford's coreNLP.
#' @param download The download url for Stanford's coreNLP.
#' @param verbose If \code{TRUE} messages are printed even when everything is
#' install... | /R/check_stanford.R | no_license | iamkbpark/stansent | R | false | false | 2,152 | r | #' Check if Stanford coreNLP is Installed and In Root
#'
#' Checks that Stanford coreNLP is installed and in root.
#'
#' @param stanford The version of Stanford's coreNLP.
#' @param download The download url for Stanford's coreNLP.
#' @param verbose If \code{TRUE} messages are printed even when everything is
#' install... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{get_submission_one_region_via_trajectory_simulation}
\alias{get_submission_one_region_via_trajectory_simulation}
\title{Get log scores and full predictive distributions for each prediction target}
\usage{
get_submission_one_regi... | /man/get_submission_one_region_via_trajectory_simulation.Rd | no_license | reichlab/2017-2018-cdc-flu-contest | R | false | true | 3,308 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{get_submission_one_region_via_trajectory_simulation}
\alias{get_submission_one_region_via_trajectory_simulation}
\title{Get log scores and full predictive distributions for each prediction target}
\usage{
get_submission_one_regi... |
setwd("~/Downloads/UCI HAR Dataset")
# read in the files, merging test and training data
readings <- rbind(read.table("test/X_test.txt"), read.table("train/X_train.txt"))
activities <- rbind(read.table("test/y_test.txt"), read.table("train/y_train.txt"))
subjects <- rbind(read.table("test/subject_test.... | /data-cleaning-course-project/run_analysis.R | no_license | alvarl/datasciencecoursera | R | false | false | 1,550 | r | setwd("~/Downloads/UCI HAR Dataset")
# read in the files, merging test and training data
readings <- rbind(read.table("test/X_test.txt"), read.table("train/X_train.txt"))
activities <- rbind(read.table("test/y_test.txt"), read.table("train/y_train.txt"))
subjects <- rbind(read.table("test/subject_test.... |
### MULTIPLE USEFUL TESTS
# to use as sanity checks throughout analyses
# *Test number of samples.
# Input: global scalar (desired sample size)
test.n <- function( DF, sizeN ) {
if( dim(DF)[1] != sizeN )
stop( paste0('Data frame sample size: ', dim(DF)[1], ". Doesn't equal ", sizeN, ".") )
} | /r/tests/test_dimensions.r | no_license | elsaduplessis/edp_scripts_srcnotes | R | false | false | 313 | r | ### MULTIPLE USEFUL TESTS
# to use as sanity checks throughout analyses
# *Test number of samples.
# Input: global scalar (desired sample size)
test.n <- function( DF, sizeN ) {
if( dim(DF)[1] != sizeN )
stop( paste0('Data frame sample size: ', dim(DF)[1], ". Doesn't equal ", sizeN, ".") )
} |
# Read features
#561 measurement variables in one column
features <- read.table("features.txt",stringsAsFactors=FALSE,sep="")
# Read training data
# Training set data
train_set <- read.table("train/x_train.txt", , header=F,sep="")
# list of (7352) training labels by activity 1-6
train_labels <- read.table("train/... | /run_analysis.R | no_license | Allison-Miller/Coursera-GettingAndCleaningData | R | false | false | 3,383 | r | # Read features
#561 measurement variables in one column
features <- read.table("features.txt",stringsAsFactors=FALSE,sep="")
# Read training data
# Training set data
train_set <- read.table("train/x_train.txt", , header=F,sep="")
# list of (7352) training labels by activity 1-6
train_labels <- read.table("train/... |
plot.FAMD <- function (x, choix = c("ind","var","quanti","quali"), axes = c(1, 2),
lab.var = TRUE, lab.ind = TRUE, habillage = "none", col.lab = FALSE, col.hab = NULL,
invisible = NULL, lim.cos2.var = 0., xlim = NULL,
ylim = NULL, title = NULL, palette=NULL, autoLab = c("auto","yes","no"), new.plot = FALS... | /R/plot.FAMD.R | no_license | ntduc11/FactoMineR | R | false | false | 4,241 | r | plot.FAMD <- function (x, choix = c("ind","var","quanti","quali"), axes = c(1, 2),
lab.var = TRUE, lab.ind = TRUE, habillage = "none", col.lab = FALSE, col.hab = NULL,
invisible = NULL, lim.cos2.var = 0., xlim = NULL,
ylim = NULL, title = NULL, palette=NULL, autoLab = c("auto","yes","no"), new.plot = FALS... |
#!/usr/bin/env Rscript
######################
set.seed(777)
library(caret)
library(mgcv)
library(lme4)
library(dplyr)
library(ggplot2)
library(cowplot)
library(cowplot)
library(stringr)
library(corrplot)
library(ggeffects)
library(RColorBrewer)
library(data.table) ; library(tidyverse) ; library(plyr)
PDS<-read.csv("/... | /proj20-BrainAgeEval/Analyze_PrelimRetrain.R | no_license | ccplabwustl/RobertJirsaraie | R | false | false | 10,313 | r | #!/usr/bin/env Rscript
######################
set.seed(777)
library(caret)
library(mgcv)
library(lme4)
library(dplyr)
library(ggplot2)
library(cowplot)
library(cowplot)
library(stringr)
library(corrplot)
library(ggeffects)
library(RColorBrewer)
library(data.table) ; library(tidyverse) ; library(plyr)
PDS<-read.csv("/... |
# Notes
# * Scripts integrated from work by Cai John
# * Data taken from the Amp-AD Repositories
# Goal
# * Use LASSO to avoid overuse of Eigengenes
# * Run for multiple iterations for further analysis
#------------------------------------------------
# Static
#------------------------------------------------
# Clea... | /server_scripts/4_LASSO_mssm.R | no_license | TheJacksonLaboratory/AMPAD_Submodules | R | false | false | 4,400 | r | # Notes
# * Scripts integrated from work by Cai John
# * Data taken from the Amp-AD Repositories
# Goal
# * Use LASSO to avoid overuse of Eigengenes
# * Run for multiple iterations for further analysis
#------------------------------------------------
# Static
#------------------------------------------------
# Clea... |
rm(list=ls())
getwd()
setwd("G:\\Thesis\\march11 data 15\\complete gyro data")
directori<-list.dirs()
gps_dir<-list()
gyro_dir<-list()
gyro_data<-read.table("combined_gyro_data.csv", na.strings=c("","NA", " ", "0"), sep = " ", fill = TRUE, header = TRUE)
gps_data<-read.table("combined_gps_data.csv", na.strings=c... | /breaking_accumulated_datasets.R | no_license | umarshehzad12/RoadDataAnalysisMarch15 | R | false | false | 1,846 | r | rm(list=ls())
getwd()
setwd("G:\\Thesis\\march11 data 15\\complete gyro data")
directori<-list.dirs()
gps_dir<-list()
gyro_dir<-list()
gyro_data<-read.table("combined_gyro_data.csv", na.strings=c("","NA", " ", "0"), sep = " ", fill = TRUE, header = TRUE)
gps_data<-read.table("combined_gps_data.csv", na.strings=c... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/nmfs_cols.R
\name{nmfs_cols}
\alias{nmfs_cols}
\title{Function to extract nmfs colors as hex codes}
\usage{
nmfs_cols(...)
}
\arguments{
\item{...}{Character names of nmfs_colors}
}
\description{
Function to extract nmfs colors as hex codes
}... | /man/nmfs_cols.Rd | no_license | elizabethng/nmfspalette | R | false | true | 360 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/nmfs_cols.R
\name{nmfs_cols}
\alias{nmfs_cols}
\title{Function to extract nmfs colors as hex codes}
\usage{
nmfs_cols(...)
}
\arguments{
\item{...}{Character names of nmfs_colors}
}
\description{
Function to extract nmfs colors as hex codes
}... |
#This is the R programm for plot 1
## Getting full dataset
data_full <- read.csv("household_power_consumption.txt", header=T, sep=';', na.strings="?",
check.names=F, stringsAsFactors=F, comment.char="", quote='\"')
data_full$Date <- as.Date(data_full$Date, format="%d/%m/%Y")
## Subsetting the... | /plot1.R | no_license | zyntop2014/ExData_Plotting1 | R | false | false | 762 | r | #This is the R programm for plot 1
## Getting full dataset
data_full <- read.csv("household_power_consumption.txt", header=T, sep=';', na.strings="?",
check.names=F, stringsAsFactors=F, comment.char="", quote='\"')
data_full$Date <- as.Date(data_full$Date, format="%d/%m/%Y")
## Subsetting the... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/configure_caplter_project.R
\docType{data}
\name{projectTitle}
\alias{projectTitle}
\title{configure_caplter_project}
\format{An object of class \code{character} of length 1.}
\usage{
projectTitle
}
\value{
establishes in the R environment up... | /man/projectTitle.Rd | no_license | yvanlebras/capeml | R | false | true | 1,045 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/configure_caplter_project.R
\docType{data}
\name{projectTitle}
\alias{projectTitle}
\title{configure_caplter_project}
\format{An object of class \code{character} of length 1.}
\usage{
projectTitle
}
\value{
establishes in the R environment up... |
%
% Copyright 2007-2018 The OpenMx Project
%
% Licensed under the Apache License, Version 2.0 (the "License");
% you may not use this file except in compliance with the License.
% You may obtain a copy of the License at
%
% http://www.apache.org/licenses/LICENSE-2.0
%
% Unless required by applicable ... | /man/mxData.Rd | no_license | mileysmiley/OpenMx | R | false | false | 8,166 | rd | %
% Copyright 2007-2018 The OpenMx Project
%
% Licensed under the Apache License, Version 2.0 (the "License");
% you may not use this file except in compliance with the License.
% You may obtain a copy of the License at
%
% http://www.apache.org/licenses/LICENSE-2.0
%
% Unless required by applicable ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/poll.R
\name{poll}
\alias{poll}
\title{Poll for process I/O or termination}
\usage{
poll(processes, ms)
}
\arguments{
\item{processes}{A list of \code{process} objects to wait on. If this is a
named list, then the returned list will have the ... | /man/poll.Rd | permissive | t-kalinowski/processx | R | false | true | 2,712 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/poll.R
\name{poll}
\alias{poll}
\title{Poll for process I/O or termination}
\usage{
poll(processes, ms)
}
\arguments{
\item{processes}{A list of \code{process} objects to wait on. If this is a
named list, then the returned list will have the ... |
ROC3_5<-function(score,phe,timeCol,eventCol){
time<- as.numeric(phe[,timeCol])
event<- as.character(phe[,eventCol])
event<-ifelse(phe[,eventCol]=="Dead",1,0)
phe<-data.frame(time=time,event=event)
alone_roc3<-survivalROC(phe[,timeCol],phe[,eventCol] == 1,
(score),predict.ti... | /Code/ROC3_5.R | no_license | mywanuo/PLPPS-pipeline | R | false | false | 531 | r | ROC3_5<-function(score,phe,timeCol,eventCol){
time<- as.numeric(phe[,timeCol])
event<- as.character(phe[,eventCol])
event<-ifelse(phe[,eventCol]=="Dead",1,0)
phe<-data.frame(time=time,event=event)
alone_roc3<-survivalROC(phe[,timeCol],phe[,eventCol] == 1,
(score),predict.ti... |
#Count the number of reads for each gene
library(dplyr)
x=read.table("final_matrix.csv", sep=",", header=FALSE)
new_count = x %>%
group_by(V3) %>%
summarise(Frequency = sum(V5))
write.table(new_count, file="Sum_genes", sep="\t", quote=FALSE, row.names=FALSE)
| /Count.R | no_license | grigri2020/Count_total_rna-seq_genes | R | false | false | 265 | r | #Count the number of reads for each gene
library(dplyr)
x=read.table("final_matrix.csv", sep=",", header=FALSE)
new_count = x %>%
group_by(V3) %>%
summarise(Frequency = sum(V5))
write.table(new_count, file="Sum_genes", sep="\t", quote=FALSE, row.names=FALSE)
|
#Emissin Sources
library(DT)
library(shiny)
library(dplyr)
library(lubridate)
library(tidyverse)
library(leaflet)
library(patchwork)
library(ggpattern)
library(scales)
library(envreportutils)
library(plotly)
library(sf)
library(bcmaps)
library(envair)
dirs_location <- '../data/out' #local location, two dots for fina... | /level3_page/01_load_emission_sources.R | permissive | bcgov/air-zone-reports | R | false | false | 7,676 | r | #Emissin Sources
library(DT)
library(shiny)
library(dplyr)
library(lubridate)
library(tidyverse)
library(leaflet)
library(patchwork)
library(ggpattern)
library(scales)
library(envreportutils)
library(plotly)
library(sf)
library(bcmaps)
library(envair)
dirs_location <- '../data/out' #local location, two dots for fina... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/datasets.R
\docType{data}
\name{rx_adsl}
\alias{rx_adsl}
\title{An ADSL-flavored clinical trial toy dataset}
\format{
A tibble with 182 rows and 14 variables:
\describe{
\item{STUDYID, STUDYIDN}{The unique study identifier and its numeric
ver... | /man/rx_adsl.Rd | no_license | cran/gt | R | false | true | 4,749 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/datasets.R
\docType{data}
\name{rx_adsl}
\alias{rx_adsl}
\title{An ADSL-flavored clinical trial toy dataset}
\format{
A tibble with 182 rows and 14 variables:
\describe{
\item{STUDYID, STUDYIDN}{The unique study identifier and its numeric
ver... |
# Random Forest Classification
# Importing the dataset
dataset = read.csv('data/s18_Social_Network_Ads.csv')
dataset = dataset[3:5]
# Encoding the target feature as factor
dataset$Purchased = factor(dataset$Purchased, levels = c(0, 1))
# Splitting the dataset into the Training set and Test set
# install.packages('ca... | /s18_random_forest_classification.R | no_license | mbeveridge/SDS_MachineLearning | R | false | false | 2,528 | r | # Random Forest Classification
# Importing the dataset
dataset = read.csv('data/s18_Social_Network_Ads.csv')
dataset = dataset[3:5]
# Encoding the target feature as factor
dataset$Purchased = factor(dataset$Purchased, levels = c(0, 1))
# Splitting the dataset into the Training set and Test set
# install.packages('ca... |
# import storm-specific water quality data
wq <- read.csv(file.path('data_raw', wq_file), na.strings = c("", "NA"), stringsAsFactors = F, strip.white = TRUE)
# check to see if all required columns are in data frame
# use list in stickies to set this, not quite sure what the complete list is
must.haves <- c('storm_sta... | /scripts/data_processing/1_calc_storm_wq.R | no_license | limnoliver/MI_SW1 | R | false | false | 6,534 | r | # import storm-specific water quality data
wq <- read.csv(file.path('data_raw', wq_file), na.strings = c("", "NA"), stringsAsFactors = F, strip.white = TRUE)
# check to see if all required columns are in data frame
# use list in stickies to set this, not quite sure what the complete list is
must.haves <- c('storm_sta... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/util.ts.R
\name{SMAPE}
\alias{SMAPE}
\title{Symmetric mean absolute percentage error}
\usage{
SMAPE(ts1, ts2, Cent = 0, Sc = 1)
}
\description{
Symmetric mean absolute percentage error
}
\references{
\url{https://en.wikipedia.org/wiki/Symmetr... | /man/SMAPE.Rd | no_license | niuneo/gbcode | R | false | true | 412 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/util.ts.R
\name{SMAPE}
\alias{SMAPE}
\title{Symmetric mean absolute percentage error}
\usage{
SMAPE(ts1, ts2, Cent = 0, Sc = 1)
}
\description{
Symmetric mean absolute percentage error
}
\references{
\url{https://en.wikipedia.org/wiki/Symmetr... |
#==================================================================================
#==================================================================================
#==================================================================================
#' @title splitTimeSeries
#'
#' @description Takes a matrix with the... | /R/temperature.R | permissive | ChrisTrisos/githubforalex | R | false | false | 8,136 | r | #==================================================================================
#==================================================================================
#==================================================================================
#' @title splitTimeSeries
#'
#' @description Takes a matrix with the... |
## utility function to support matrix inverse with cache
## usage sample:
## mat<-makeCacheMatrix(matrix(c(4,3,3,2),nrow=2,ncol=2))
## cacheSolve(mm)
## cacheSolve(mm)
## utility function for matrix creation
makeCacheMatrix <- function(x = matrix()) {
inv <- NULL
set <- function(y) {
x <<- y
inv <<- NULL... | /cachematrix.R | no_license | maximbu/ProgrammingAssignment2 | R | false | false | 826 | r | ## utility function to support matrix inverse with cache
## usage sample:
## mat<-makeCacheMatrix(matrix(c(4,3,3,2),nrow=2,ncol=2))
## cacheSolve(mm)
## cacheSolve(mm)
## utility function for matrix creation
makeCacheMatrix <- function(x = matrix()) {
inv <- NULL
set <- function(y) {
x <<- y
inv <<- NULL... |
#plot2
file<-file("household_power_consumption.txt")
EPC<-read.table(text=grep("^[1,2]/2/2007",readLines(file),value=TRUE), header=T, sep=";", na.strings="?")
names(EPC)<- c("Date", "Time", "Global_active_power", "Global_reactive_power", "Voltage", "Global_intensity", "Sub_metering_1", "Sub_metering_2", "Sub_metering_... | /plot2.R | no_license | JingSylviaY/ExData_Plotting1 | R | false | false | 593 | r |
#plot2
file<-file("household_power_consumption.txt")
EPC<-read.table(text=grep("^[1,2]/2/2007",readLines(file),value=TRUE), header=T, sep=";", na.strings="?")
names(EPC)<- c("Date", "Time", "Global_active_power", "Global_reactive_power", "Voltage", "Global_intensity", "Sub_metering_1", "Sub_metering_2", "Sub_metering_... |
#2nd question, plot "plot2.png"
BaltimoreCityEmissions<-summarise(group_by(filter(NEI, fips == "24510"), year), Emissions=sum(Emissions))
colorstoplot <- c("red", "deeppink3", "indianred1", "greenyellow")
x2<-barplot(height=BaltimoreCityEmissions$Emissions/1000,
names.arg=BaltimoreCityEmissions$year,
... | /plot2.R | no_license | reyt1/AssignmentCourseProject2-ExploratoryAnalysis | R | false | false | 909 | r | #2nd question, plot "plot2.png"
BaltimoreCityEmissions<-summarise(group_by(filter(NEI, fips == "24510"), year), Emissions=sum(Emissions))
colorstoplot <- c("red", "deeppink3", "indianred1", "greenyellow")
x2<-barplot(height=BaltimoreCityEmissions$Emissions/1000,
names.arg=BaltimoreCityEmissions$year,
... |
timestamp <- Sys.time()
library(caret)
library(plyr)
library(recipes)
library(dplyr)
model <- "rpart1SE"
#########################################################################
set.seed(2)
training <- twoClassSim(50, linearVars = 2)
testing <- twoClassSim(500, linearVars = 2)
trainX <- training[, -ncol(training)... | /RegressionTests/Code/rpart1SE.R | no_license | topepo/caret | R | false | false | 5,439 | r | timestamp <- Sys.time()
library(caret)
library(plyr)
library(recipes)
library(dplyr)
model <- "rpart1SE"
#########################################################################
set.seed(2)
training <- twoClassSim(50, linearVars = 2)
testing <- twoClassSim(500, linearVars = 2)
trainX <- training[, -ncol(training)... |
\name{demo1}
\alias{demo1}
\title{Demo for XDATA inference in CharityNet via graph embedding.}
\usage{
demo1(method = 1)
}
\arguments{
\item{method}{1: methd1, 2: method2}
}
\description{
Demo for XDATA inference in CharityNet via graph
embedding.
}
\seealso{
\code{\link{demo2}} for XDATA Time Series of Graph... | /ScanStats/man/demo1.Rd | no_license | adalisan/XDATA | R | false | false | 380 | rd | \name{demo1}
\alias{demo1}
\title{Demo for XDATA inference in CharityNet via graph embedding.}
\usage{
demo1(method = 1)
}
\arguments{
\item{method}{1: methd1, 2: method2}
}
\description{
Demo for XDATA inference in CharityNet via graph
embedding.
}
\seealso{
\code{\link{demo2}} for XDATA Time Series of Graph... |
rc.plot.heatmap=function(Data, track.id, color.gradient=NULL, track.color=NA, track.border=NULL, polygon.border=NULL){
Data=as.matrix(Data)
rc.check.heatmapData(Data)
chromPar=rc.get.chrom()
if(!is.null(color.gradient)){
mx=max(Data,na.rm=TRUE)
cols=apply(Data,2,function(x,color.gradient,mx) color.gradien... | /R/rc.plot.heatmap.R | no_license | cran/NetWeaver | R | false | false | 1,356 | r | rc.plot.heatmap=function(Data, track.id, color.gradient=NULL, track.color=NA, track.border=NULL, polygon.border=NULL){
Data=as.matrix(Data)
rc.check.heatmapData(Data)
chromPar=rc.get.chrom()
if(!is.null(color.gradient)){
mx=max(Data,na.rm=TRUE)
cols=apply(Data,2,function(x,color.gradient,mx) color.gradien... |
#File to Recode 2015 CES Data
#recode Gender (RGENDER)
look_for(ces15phone, "gender")
ces15phone$male<-Recode(ces15phone$RGENDER, "1=1; 5=0")
val_labels(ces15phone$male)<-c(Female=0, Male=1)
#checks
val_labels(ces15phone$male)
table(ces15phone$male)
#recode Union Respondent (PES15_93)
look_for(ces15phone, "union")
... | /R_Scripts/2_13_ces15_recode.R | no_license | sjkiss/class_voting_canada_2019 | R | false | false | 22,320 | r |
#File to Recode 2015 CES Data
#recode Gender (RGENDER)
look_for(ces15phone, "gender")
ces15phone$male<-Recode(ces15phone$RGENDER, "1=1; 5=0")
val_labels(ces15phone$male)<-c(Female=0, Male=1)
#checks
val_labels(ces15phone$male)
table(ces15phone$male)
#recode Union Respondent (PES15_93)
look_for(ces15phone, "union")
... |
####This file contains the method comparison on the reduced unbalanced training and testing sets####
####(results found in table 1). Note that for the methods that contain some kind of random ####
####component (NN, RF), the results may not match exactly what is in the paper, but they should ####
####be close. ... | /R/UnbalancedMethodComparison.R | no_license | sharmasantosh/PlantSegmentationCode | R | false | false | 13,252 | r | ####This file contains the method comparison on the reduced unbalanced training and testing sets####
####(results found in table 1). Note that for the methods that contain some kind of random ####
####component (NN, RF), the results may not match exactly what is in the paper, but they should ####
####be close. ... |
setwd("C:/Users/mswatson/Documents/COURSERA/")
if(!file.exists("./fproject")) {dir.create("./fproject")}
fileUrl <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip?accessType=DOWNLOAD"
download.file(fileUrl,destfile="./fproject/getdata_projectfiles_UCI HAR Dataset.zip", mode = 'w... | /run_analysis.R | no_license | mswatson/gcd_week4_prog_assign | R | false | false | 37,095 | r | setwd("C:/Users/mswatson/Documents/COURSERA/")
if(!file.exists("./fproject")) {dir.create("./fproject")}
fileUrl <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip?accessType=DOWNLOAD"
download.file(fileUrl,destfile="./fproject/getdata_projectfiles_UCI HAR Dataset.zip", mode = 'w... |
\name{PSU_strat}
\Rdversion{1.0}
\alias{PSU_strat}
\docType{data}
\title{
Information on Primary Stage Units (PSUs) stratification
}
\description{
Example data frame containing information on Primary Stage Units (PSUs) stratification.
}
\usage{
data(beat.example)
}
\format{
The PSU_strat data frame con... | /man/PSU_strat.Rd | no_license | cran/R2BEAT | R | false | false | 850 | rd | \name{PSU_strat}
\Rdversion{1.0}
\alias{PSU_strat}
\docType{data}
\title{
Information on Primary Stage Units (PSUs) stratification
}
\description{
Example data frame containing information on Primary Stage Units (PSUs) stratification.
}
\usage{
data(beat.example)
}
\format{
The PSU_strat data frame con... |
# Load libraries
library(ggplot2)
library(dplyr)
library(tidyr)
# Set working directory
setwd("D:/R-4.0.2/ESE5023_Assignments/PS3")
#3
zinc_data <- read.csv(file = "zinc.csv", header = T)
zinc_data_tbl<-as_tibble(zinc_data)
#mean,sd
zinc_data_tbl %>%
group_by(group) %>%
summarise(mean=mean(zinc,na.r... | /Assignmengt03/PS3_3,R.R | no_license | cding-done/ESE5023_Assignments | R | false | false | 1,160 | r | # Load libraries
library(ggplot2)
library(dplyr)
library(tidyr)
# Set working directory
setwd("D:/R-4.0.2/ESE5023_Assignments/PS3")
#3
zinc_data <- read.csv(file = "zinc.csv", header = T)
zinc_data_tbl<-as_tibble(zinc_data)
#mean,sd
zinc_data_tbl %>%
group_by(group) %>%
summarise(mean=mean(zinc,na.r... |
#Takes in results from table_4.R to produce Table 4.
#Author: Yaoyuan Vincent, Tan
#Date created: 11 Jan 2019
#Date updated: 11 Jan 2019
rm(list=ls())
nsim=250
vec_CC_mean=numeric(nsim)
vec_MI_mean=numeric(nsim)
vec_PSPP_mean=numeric(nsim)
vec_AIPWT_mean=numeric(nsim)
vec_PSBPP_mean=numeric(nsim)
vec... | /Codes/table_4_merge.R | no_license | yaoyuanvincent/jssam_robust_squared | R | false | false | 11,846 | r | #Takes in results from table_4.R to produce Table 4.
#Author: Yaoyuan Vincent, Tan
#Date created: 11 Jan 2019
#Date updated: 11 Jan 2019
rm(list=ls())
nsim=250
vec_CC_mean=numeric(nsim)
vec_MI_mean=numeric(nsim)
vec_PSPP_mean=numeric(nsim)
vec_AIPWT_mean=numeric(nsim)
vec_PSBPP_mean=numeric(nsim)
vec... |
options(digits=12)
if(!require("optimx"))stop("this test requires package optimx.")
if(!require("setRNG"))stop("this test requires setRNG.")
# Use a preset seed so test values are reproducable.
test.rng <- list(kind="Wichmann-Hill", normal.kind="Box-Muller", seed=c(979,1479,1542))
old.seed <- setRNG(test.rng)
#####... | /optimx/demo/froth_test.R | permissive | solgenomics/R_libs | R | false | false | 1,241 | r | options(digits=12)
if(!require("optimx"))stop("this test requires package optimx.")
if(!require("setRNG"))stop("this test requires setRNG.")
# Use a preset seed so test values are reproducable.
test.rng <- list(kind="Wichmann-Hill", normal.kind="Box-Muller", seed=c(979,1479,1542))
old.seed <- setRNG(test.rng)
#####... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/blglml.R
\name{sigma.blbglm}
\alias{sigma.blbglm}
\title{compute sigma from fit}
\usage{
\method{sigma}{blbglm}(object, confidence = FALSE, level = 0.95, ...)
}
\arguments{
\item{object}{model}
\item{confidence}{boolean vector}
\item{level}... | /man/sigma.blbglm.Rd | permissive | Cinnamorollyi/blblm | R | false | true | 416 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/blglml.R
\name{sigma.blbglm}
\alias{sigma.blbglm}
\title{compute sigma from fit}
\usage{
\method{sigma}{blbglm}(object, confidence = FALSE, level = 0.95, ...)
}
\arguments{
\item{object}{model}
\item{confidence}{boolean vector}
\item{level}... |
## The first function, makeCacheMatrix, which is really a list containing a function to
##set the value of the matrix
##get the value of the matrix
##set the value of inverse of the matrix
##get the value of inverse of the matrix
makeCacheMatrix <- function(x = matrix())
{
inv_matrix <- NULL
set <... | /cachematrix.R | no_license | indra09-roy/ProgrammingAssignment2 | R | false | false | 1,410 | r | ## The first function, makeCacheMatrix, which is really a list containing a function to
##set the value of the matrix
##get the value of the matrix
##set the value of inverse of the matrix
##get the value of inverse of the matrix
makeCacheMatrix <- function(x = matrix())
{
inv_matrix <- NULL
set <... |
#' Separate one column into multiple columns.
#'
#' Given either regular expression or a vector of character positions,
#' \code{separate()} turns a single character column into multiple columns.
#'
#' @param col Bare column name.
#' @export
#' @inheritParams separate_
#' @examples
#' library(dplyr)
#' df <- data.frame... | /R/separate.R | no_license | marcds/tidyr | R | false | false | 4,676 | r | #' Separate one column into multiple columns.
#'
#' Given either regular expression or a vector of character positions,
#' \code{separate()} turns a single character column into multiple columns.
#'
#' @param col Bare column name.
#' @export
#' @inheritParams separate_
#' @examples
#' library(dplyr)
#' df <- data.frame... |
##The two functions are to caching the inverse of a matrix rather than computing it repeatedly.
## This function is to create the methods associated with an object(S4). These methods will be used in the function cacheSolve.
makeCacheMatrix <- function(x = matrix()) {
m <- NULL ## m will store the inverse an... | /cachematrix.R | no_license | ZYA1984/ProgrammingAssignment2 | R | false | false | 1,520 | r | ##The two functions are to caching the inverse of a matrix rather than computing it repeatedly.
## This function is to create the methods associated with an object(S4). These methods will be used in the function cacheSolve.
makeCacheMatrix <- function(x = matrix()) {
m <- NULL ## m will store the inverse an... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/oadoi_fetch.r
\name{oadoi_fetch_}
\alias{oadoi_fetch_}
\title{Get open access status information.}
\usage{
oadoi_fetch_(doi = NULL, email = NULL)
}
\arguments{
\item{doi}{character vector,a DOI}
\item{email}{character vector, mandatory!
Unpa... | /man/oadoi_fetch_.Rd | permissive | ropensci/roadoi | R | false | true | 1,021 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/oadoi_fetch.r
\name{oadoi_fetch_}
\alias{oadoi_fetch_}
\title{Get open access status information.}
\usage{
oadoi_fetch_(doi = NULL, email = NULL)
}
\arguments{
\item{doi}{character vector,a DOI}
\item{email}{character vector, mandatory!
Unpa... |
library(tidyverse)
library(koboquest) # manage kobo questionnairs
library(kobostandards) # check inputs for inconsistencies
library(hypegrammaR) # stats 4 complex samples
library(composr) # horziontal operations
library(lubridate)
library(parallel)
library(readxl)
source("R/functions/to_alphanumeric_lowercase.R") # f... | /R/run_analysis.R | no_license | nzfarhad/AFG_MSNA_19_Analysis | R | false | false | 4,852 | r |
library(tidyverse)
library(koboquest) # manage kobo questionnairs
library(kobostandards) # check inputs for inconsistencies
library(hypegrammaR) # stats 4 complex samples
library(composr) # horziontal operations
library(lubridate)
library(parallel)
library(readxl)
source("R/functions/to_alphanumeric_lowercase.R") # f... |
#' @title Cochran *C* Test
#' @description
#' \loadmathjax
#' Detects and removes replicate outliers in data series based on the Cochran
#' *C* test for homogeneity in variance.
#' @usage
#' cochranTest(X, id, fun = 'sum', alpha = 0.05)
#' @param X a a numeric matrix (optionally a data frame that can
#' be coerced to a... | /R/cochranTest.R | no_license | philipp-baumann/prospectr | R | false | false | 4,910 | r | #' @title Cochran *C* Test
#' @description
#' \loadmathjax
#' Detects and removes replicate outliers in data series based on the Cochran
#' *C* test for homogeneity in variance.
#' @usage
#' cochranTest(X, id, fun = 'sum', alpha = 0.05)
#' @param X a a numeric matrix (optionally a data frame that can
#' be coerced to a... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/Condense_file_info.R
\name{Condense.file.info}
\alias{Condense.file.info}
\title{Generate condensed information about files from dependency object}
\usage{
Condense.file.info(trees)
}
\arguments{
\item{trees}{dependency object}
}
\val... | /man/Condense.file.info.Rd | no_license | gelfondjal/IT2 | R | false | false | 464 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/Condense_file_info.R
\name{Condense.file.info}
\alias{Condense.file.info}
\title{Generate condensed information about files from dependency object}
\usage{
Condense.file.info(trees)
}
\arguments{
\item{trees}{dependency object}
}
\val... |
# calcFlashiness takes data from the stream database and calculates several stream flashiness metrics
require('plyr')
require('data.table')
require('Rmisc')
source('R/wtr_yr.R')
calcFlashiness <- function(data, min.days = 360){
# remove records where D_MeanDis is NA
flow <- data[complete.cases(data$D_MeanDis... | /wlRd/R/calcFlashiness.R | no_license | kingcountyspb/kingcounty-wlrd | R | false | false | 4,671 | r | # calcFlashiness takes data from the stream database and calculates several stream flashiness metrics
require('plyr')
require('data.table')
require('Rmisc')
source('R/wtr_yr.R')
calcFlashiness <- function(data, min.days = 360){
# remove records where D_MeanDis is NA
flow <- data[complete.cases(data$D_MeanDis... |
fileurl="https://d396qusza40orc.cloudfront.net/getdata%2Fjeff.jpg"
download.file(fileurl,destfile = "/Users/asad/datasciencecoursera/data/2.jpg", method = "curl")
restData<-readJPEG("/Users/asad/datasciencecoursera/data/2.jpg",native = TRUE)
head(restData)
summary(restData)
str(restData)
quantile(restData,probs = 0.8)... | /data-cleaning/question2.R | no_license | mdasadul/datasciencecoursera | R | false | false | 353 | r | fileurl="https://d396qusza40orc.cloudfront.net/getdata%2Fjeff.jpg"
download.file(fileurl,destfile = "/Users/asad/datasciencecoursera/data/2.jpg", method = "curl")
restData<-readJPEG("/Users/asad/datasciencecoursera/data/2.jpg",native = TRUE)
head(restData)
summary(restData)
str(restData)
quantile(restData,probs = 0.8)... |
context("parallel_all")
test_that("parallel resampling", {
doit = function(mode, level) {
lrn = makeLearner("classif.rpart")
rdesc = makeResampleDesc("CV", iters = 2L)
on.exit(parallelStop())
parallelStart(mode = mode, cpus = 2L, level = level, show.info = FALSE)
r = resample(lrn, multiclass.task... | /tests/testthat/test_parallel_all.R | no_license | Alven8816/mlr | R | false | false | 3,535 | r | context("parallel_all")
test_that("parallel resampling", {
doit = function(mode, level) {
lrn = makeLearner("classif.rpart")
rdesc = makeResampleDesc("CV", iters = 2L)
on.exit(parallelStop())
parallelStart(mode = mode, cpus = 2L, level = level, show.info = FALSE)
r = resample(lrn, multiclass.task... |
readIllumina <- function(dir= ".", useImages = FALSE, illuminaAnnotation = NULL, sectionNames = NULL, metricsFile = "Metrics.txt", forceIScan = FALSE, dec = ".", sampleSheet="sampleSheet.csv", ...)
{
haveSampleInfo <- FALSE
if(file.exists(sampleSheet)){
expInfo <- try(readSampleSheet(sample... | /R/readIllumina.R | no_license | markdunning/beadarray-devel | R | false | false | 10,643 | r | readIllumina <- function(dir= ".", useImages = FALSE, illuminaAnnotation = NULL, sectionNames = NULL, metricsFile = "Metrics.txt", forceIScan = FALSE, dec = ".", sampleSheet="sampleSheet.csv", ...)
{
haveSampleInfo <- FALSE
if(file.exists(sampleSheet)){
expInfo <- try(readSampleSheet(sample... |
\name{input_2016}
\docType{data}
\alias{input_2016}
\title{Input Data for the 2016 ACIC Competition}
\description{
Input data used in the 2016 Atlantic Causal Inference Competition, taken from the Collaborative Perinatal Project.
}
\usage{input_2016}
\format{A data frame consisting of 4802 observations and 58 covaria... | /2016/man/input_2016.Rd | no_license | cleeway/aciccomp | R | false | false | 2,836 | rd | \name{input_2016}
\docType{data}
\alias{input_2016}
\title{Input Data for the 2016 ACIC Competition}
\description{
Input data used in the 2016 Atlantic Causal Inference Competition, taken from the Collaborative Perinatal Project.
}
\usage{input_2016}
\format{A data frame consisting of 4802 observations and 58 covaria... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/datasets.R
\name{gcat_get_table_specs}
\alias{gcat_get_table_specs}
\title{Gets a table spec}
\usage{
gcat_get_table_specs(
projectId = gcat_project_get(),
locationId = gcat_region_get(),
displayName = gcat_get_global_dataset()
)
}
\arg... | /man/gcat_get_table_specs.Rd | no_license | justinjm/googleCloudAutoMLTablesR | R | false | true | 657 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/datasets.R
\name{gcat_get_table_specs}
\alias{gcat_get_table_specs}
\title{Gets a table spec}
\usage{
gcat_get_table_specs(
projectId = gcat_project_get(),
locationId = gcat_region_get(),
displayName = gcat_get_global_dataset()
)
}
\arg... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data_local.R
\name{loadLocalFiles}
\alias{loadLocalFiles}
\title{Load local files}
\usage{
loadLocalFiles(folder, ignore = c(".aux.", ".mage-tab."), name = "Data",
progress = echoProgress)
}
\arguments{
\item{folder}{Character: path to fold... | /man/loadLocalFiles.Rd | no_license | IlyaFinkelshteyn/psichomics | R | false | true | 833 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data_local.R
\name{loadLocalFiles}
\alias{loadLocalFiles}
\title{Load local files}
\usage{
loadLocalFiles(folder, ignore = c(".aux.", ".mage-tab."), name = "Data",
progress = echoProgress)
}
\arguments{
\item{folder}{Character: path to fold... |
# This code runs the information transfer IBM (info.transfer.IBM.R) and the plots the results
# Written by Zach Bell and Jerod Merkle
# June 2019
#source the function
source("C:/Users/Zach/Documents/GitHub/Memory_IBM/Memory_IBM/info.transfer.IBM.R")
info.transfer.IBM(h=0.20, #increase in probability of death for uni... | /Myotis bechsteinii/code2run_MyoBe.R | no_license | jmerkle1/Memory_IBM | R | false | false | 2,807 | r | # This code runs the information transfer IBM (info.transfer.IBM.R) and the plots the results
# Written by Zach Bell and Jerod Merkle
# June 2019
#source the function
source("C:/Users/Zach/Documents/GitHub/Memory_IBM/Memory_IBM/info.transfer.IBM.R")
info.transfer.IBM(h=0.20, #increase in probability of death for uni... |
setwd("/Volumes/1TB/Bailey/")
library(pbivnorm)
library(Matrix)
library(mvtnorm)
library(phangorn)
library(parallel)
library(doParallel)
library(foreach)
library(data.table)
library(readr)
library(microbenchmark)
library(TESS)
library(mvMORPH)
library(questionr)
library(tictoc)
library(gtools)
maha <- function(x1, x2,... | /ordinalProbit_approx_final.R | no_license | NikVetr/dissertation_work | R | false | false | 48,179 | r | setwd("/Volumes/1TB/Bailey/")
library(pbivnorm)
library(Matrix)
library(mvtnorm)
library(phangorn)
library(parallel)
library(doParallel)
library(foreach)
library(data.table)
library(readr)
library(microbenchmark)
library(TESS)
library(mvMORPH)
library(questionr)
library(tictoc)
library(gtools)
maha <- function(x1, x2,... |
####################################################################################
#' Normalized LHD Design
#'
#' Produces a normalized design and calculates the minimal distance
#' if required.
#' A design is a matrix with \code{dim} columns and \code{size} rows.
#' Distance can be calculated with respect to... | /R/designLHD.R | no_license | bartzbeielstein/SPOT | R | false | false | 7,672 | r | ####################################################################################
#' Normalized LHD Design
#'
#' Produces a normalized design and calculates the minimal distance
#' if required.
#' A design is a matrix with \code{dim} columns and \code{size} rows.
#' Distance can be calculated with respect to... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pedigree_consistency_checks.R
\name{check_parent_as_animal}
\alias{check_parent_as_animal}
\title{Check whether parents appear as animals}
\usage{
check_parent_as_animal(plPedigree)
}
\arguments{
\item{plPedigree}{input pedigree}
}
\value{
lC... | /man/check_parent_as_animal.Rd | no_license | pvrqualitasag/PedigreeFromTvdData | R | false | true | 576 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pedigree_consistency_checks.R
\name{check_parent_as_animal}
\alias{check_parent_as_animal}
\title{Check whether parents appear as animals}
\usage{
check_parent_as_animal(plPedigree)
}
\arguments{
\item{plPedigree}{input pedigree}
}
\value{
lC... |
# This web app uses the Global Biodiversity Information Facility (GBIF) API
# to map the geographic distribution of a particular species.
#
# Author: C.Ribeiro
# Last Modification: 14/09/2014
#
library(shiny)
suppressPackageStartupMessages(library(rgbif))
suppressPackageStartupMessages(library(Hmisc))
suppressPackage... | /server.R | no_license | galius/gbif_app | R | false | false | 1,970 | r | # This web app uses the Global Biodiversity Information Facility (GBIF) API
# to map the geographic distribution of a particular species.
#
# Author: C.Ribeiro
# Last Modification: 14/09/2014
#
library(shiny)
suppressPackageStartupMessages(library(rgbif))
suppressPackageStartupMessages(library(Hmisc))
suppressPackage... |
#takes a given consensus topology and assigns branch lengths based on the average of those source trees that have that branch
library(phylobase)
isClade<-function(phy,taxonlist) {
if (length(taxonlist)==1) {
return(TRUE)
}
if(length(descendants(phy,MRCA(phy,taxonlist),type="tips"))==length(taxonlist)) {
return(... | /trait_phylo_data_processing/consensusbranchlength.r | no_license | qdread/nasabio | R | false | false | 2,459 | r | #takes a given consensus topology and assigns branch lengths based on the average of those source trees that have that branch
library(phylobase)
isClade<-function(phy,taxonlist) {
if (length(taxonlist)==1) {
return(TRUE)
}
if(length(descendants(phy,MRCA(phy,taxonlist),type="tips"))==length(taxonlist)) {
return(... |
setwd("~/kdd_data/rda")
source("~/KDDCUP2013_SYSU/R\ code/GetFeatures/functions.R")
load("com.rda")
load("com_all.rda")
load("comJN.rda")
load("comCN.rda")
load("comJ.rda")
load("comC.rda")
load("comA_aff.rda")
##try to build the model using sparse matrix
## author with the same affiliation (exact relationship) ##
... | /R code/for_chaosuan/aut_pap_mat.R | no_license | KenithTian/KDDCUP2013_SYSU | R | false | false | 708 | r |
setwd("~/kdd_data/rda")
source("~/KDDCUP2013_SYSU/R\ code/GetFeatures/functions.R")
load("com.rda")
load("com_all.rda")
load("comJN.rda")
load("comCN.rda")
load("comJ.rda")
load("comC.rda")
load("comA_aff.rda")
##try to build the model using sparse matrix
## author with the same affiliation (exact relationship) ##
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/type.R
\name{as_data_type}
\alias{as_data_type}
\alias{as_data_type.DataType}
\alias{as_data_type.Field}
\alias{as_data_type.Schema}
\title{Convert an object to an Arrow DataType}
\usage{
as_data_type(x, ...)
\method{as_data_type}{DataType}(... | /r/man/as_data_type.Rd | permissive | apache/arrow | R | false | true | 666 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/type.R
\name{as_data_type}
\alias{as_data_type}
\alias{as_data_type.DataType}
\alias{as_data_type.Field}
\alias{as_data_type.Schema}
\title{Convert an object to an Arrow DataType}
\usage{
as_data_type(x, ...)
\method{as_data_type}{DataType}(... |
# Load Data
data(mite)
data(mite.env)
spe <- mite[1:30,1:25]
env1 <- mite.env[1:30,]
#add my original factors
env <- data.frame(matrix(NA,30,4))
colnames(env) <- c("field.ID", "age_class", "SamCam","crop")
env[,1] <- factor(c(seq(1,12,1),13,14,15,seq(1,12,1),16,17,18))
env[,2] <- factor(rep(rep(letters[1:5],each=3),... | /Analysis/Examples/ArtfDataUsingMiteData.R | no_license | BizarreRide/F2_Nematodes | R | false | false | 2,849 | r |
# Load Data
data(mite)
data(mite.env)
spe <- mite[1:30,1:25]
env1 <- mite.env[1:30,]
#add my original factors
env <- data.frame(matrix(NA,30,4))
colnames(env) <- c("field.ID", "age_class", "SamCam","crop")
env[,1] <- factor(c(seq(1,12,1),13,14,15,seq(1,12,1),16,17,18))
env[,2] <- factor(rep(rep(letters[1:5],each=3),... |
aggregate_all_data <- function(outind, ...){
files <- lapply(c(...), sc_retrieve, remake_file = "3_regroup_data.yml")
#load all the data
data_list <- lapply(X = files, readRDS)
all_data <- do.call(what = bind_rows, data_list)
lake_info <- read.csv("lib/crosswalks/lakes_master.csv",
... | /3_regroup_data/src/summary_functions.R | no_license | wdwatkins/pgml_temperature_prediction | R | false | false | 1,732 | r |
aggregate_all_data <- function(outind, ...){
files <- lapply(c(...), sc_retrieve, remake_file = "3_regroup_data.yml")
#load all the data
data_list <- lapply(X = files, readRDS)
all_data <- do.call(what = bind_rows, data_list)
lake_info <- read.csv("lib/crosswalks/lakes_master.csv",
... |
#######
HPIV1a = read.alignment("humanparainfluenzavirus1.fasta_pruned.mu.trim05", format = "fasta")
HPIVdf<-data.frame(Pos)
HPIVdf$WtNt=""
HPIVdf$WtNt<- seqinr::consensus(HPIV1a)
head(HPIVdf)
df <- HPIVdf
df
source("BioInfor11AMFunctions/meanFreq.R")
df <- meanFreq(df)
source("BioInfor11AMFunctions/getWTAA.R")
df <... | /group_11am_HPInflu_final_run!.R | no_license | pleunipennings/SharedDataBioinformatics | R | false | false | 1,568 | r | #######
HPIV1a = read.alignment("humanparainfluenzavirus1.fasta_pruned.mu.trim05", format = "fasta")
HPIVdf<-data.frame(Pos)
HPIVdf$WtNt=""
HPIVdf$WtNt<- seqinr::consensus(HPIV1a)
head(HPIVdf)
df <- HPIVdf
df
source("BioInfor11AMFunctions/meanFreq.R")
df <- meanFreq(df)
source("BioInfor11AMFunctions/getWTAA.R")
df <... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rrna.R
\name{rrna}
\alias{rrna}
\title{rrna}
\usage{
rrna(path, pattern, outdir = "rrna_out", subunit = "16S",
kingdom = "bacteria", align = TRUE)
}
\arguments{
\item{path}{is the full path to where genomes in fasta format are placed.}
\it... | /man/rrna.Rd | no_license | giraola/taxxo | R | false | true | 921 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rrna.R
\name{rrna}
\alias{rrna}
\title{rrna}
\usage{
rrna(path, pattern, outdir = "rrna_out", subunit = "16S",
kingdom = "bacteria", align = TRUE)
}
\arguments{
\item{path}{is the full path to where genomes in fasta format are placed.}
\it... |
\name{Backgrnd_Mortality_var}
\alias{Backgrnd_Mortality_var}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Backgrnd_Mortality_var
}
\description{ Background mortality function
%% ~~ A concise (1-5 lines) description of what the function does. ~~
}
\usage{
Backgrnd_Mortality_var(x)
}
%- maybe a... | /Simplatform/man/Backgrnd_Mortality_var.Rd | no_license | laurettemhlanga/Pure_birth_cohort | R | false | false | 1,334 | rd | \name{Backgrnd_Mortality_var}
\alias{Backgrnd_Mortality_var}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Backgrnd_Mortality_var
}
\description{ Background mortality function
%% ~~ A concise (1-5 lines) description of what the function does. ~~
}
\usage{
Backgrnd_Mortality_var(x)
}
%- maybe a... |
ExtractGene <-function(GeneSet.list, base=BSets){
index<- GeneSet.list$index
output<-data.frame()
for (i in 1:length(index)){
tmp.genes<- as.vector(base[[index[i]]]@geneIds)
tmp.setname<- as.vector(base[[index[i]]]@setName)
tmp<- cbind.data.frame(setname=tmp.setname, gene= tmp.genes)
output<-rbi... | /GSEA/ExtractGene.R | no_license | fredcommo/FredScript | R | false | false | 364 | r | ExtractGene <-function(GeneSet.list, base=BSets){
index<- GeneSet.list$index
output<-data.frame()
for (i in 1:length(index)){
tmp.genes<- as.vector(base[[index[i]]]@geneIds)
tmp.setname<- as.vector(base[[index[i]]]@setName)
tmp<- cbind.data.frame(setname=tmp.setname, gene= tmp.genes)
output<-rbi... |
# server.R
require("jsonlite")
require("RCurl")
require(ggplot2)
require(dplyr)
require(shiny)
shinyServer(function(input, output) {
output$distPlot <- renderPlot({
# Start your code here.
# The following is equivalent to KPI Story 2 Sheet 2 and Parameters Story 3 in "Crosstabs, KPIs, Barchart.twb"
KP... | /RWorkshop/09 Shiny/01Crosstab/server.R | no_license | TheRusBus/DataVisualization | R | false | false | 2,447 | r | # server.R
require("jsonlite")
require("RCurl")
require(ggplot2)
require(dplyr)
require(shiny)
shinyServer(function(input, output) {
output$distPlot <- renderPlot({
# Start your code here.
# The following is equivalent to KPI Story 2 Sheet 2 and Parameters Story 3 in "Crosstabs, KPIs, Barchart.twb"
KP... |
# https://github.com/abchapman93/info_3700_spring_2021/blob/main/week_6_clinical_data/01-admin_demographic_data.ipynb
install.packages("RMySQL")
install.packages("getPass")
library(RMySQL)
library(tidyverse)
library(getPass)
conn <- DBI::dbConnect(MySQL(),
user='uvu10919523', # Replace with your usern... | /00-admin-demographics.R | no_license | dbgwen/r-mimic | R | false | false | 2,945 | r | # https://github.com/abchapman93/info_3700_spring_2021/blob/main/week_6_clinical_data/01-admin_demographic_data.ipynb
install.packages("RMySQL")
install.packages("getPass")
library(RMySQL)
library(tidyverse)
library(getPass)
conn <- DBI::dbConnect(MySQL(),
user='uvu10919523', # Replace with your usern... |
\name{MRC.1000}
\docType{data}
\alias{MRC.1000}
\title{Values of the MRC statistic for 1,000 observations (all intervals)}
\description{
Simulated values of the MRC statistic with \code{penalty="sqrt"} based on all interval lengths computed from Gaussian white noise sequences of length 1,000.
\bold{Deprecation warni... | /fuzzedpackages/stepR/man/MRC1000.Rd | no_license | akhikolla/testpackages | R | false | false | 625 | rd | \name{MRC.1000}
\docType{data}
\alias{MRC.1000}
\title{Values of the MRC statistic for 1,000 observations (all intervals)}
\description{
Simulated values of the MRC statistic with \code{penalty="sqrt"} based on all interval lengths computed from Gaussian white noise sequences of length 1,000.
\bold{Deprecation warni... |
#' Get the geodata catalog of the Swiss Confederation
#'
#' Display geo-information catalog of the Swiss Confederation (\url{https://data.geo.admin.ch/}),
#' including some geographic datasets provided by the Swiss Federal Statistical Office.
#' Note that this geodata catalog is not hosted by the Swiss Federal St... | /R/bfs_get_catalog_geodata.R | no_license | cran/BFS | R | false | false | 2,645 | r | #' Get the geodata catalog of the Swiss Confederation
#'
#' Display geo-information catalog of the Swiss Confederation (\url{https://data.geo.admin.ch/}),
#' including some geographic datasets provided by the Swiss Federal Statistical Office.
#' Note that this geodata catalog is not hosted by the Swiss Federal St... |
### R code from vignette source 'ReproducingKN2020.Rnw'
###################################################
### code chunk number 1: ReproducingKN2020.Rnw:101-104
###################################################
library(apc)
data <- data.loss.XL()
data$response[,1:8]
####################################... | /inst/doc/ReproducingKN2020.R | no_license | cran/apc | R | false | false | 12,246 | r | ### R code from vignette source 'ReproducingKN2020.Rnw'
###################################################
### code chunk number 1: ReproducingKN2020.Rnw:101-104
###################################################
library(apc)
data <- data.loss.XL()
data$response[,1:8]
####################################... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/create_grattan_colours.R
\docType{data}
\name{grattan_darkblue6}
\alias{grattan_darkblue6}
\title{'}
\format{
An object of class \code{character} of length 1.
}
\usage{
grattan_darkblue6
}
\description{
'
}
\keyword{datasets}
| /man/grattan_darkblue6.Rd | permissive | MattCowgill/grattantheme | R | false | true | 304 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/create_grattan_colours.R
\docType{data}
\name{grattan_darkblue6}
\alias{grattan_darkblue6}
\title{'}
\format{
An object of class \code{character} of length 1.
}
\usage{
grattan_darkblue6
}
\description{
'
}
\keyword{datasets}
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{naics2017_isic4}
\alias{naics2017_isic4}
\title{NAICS2017-ISIC4 Concordance}
\format{
A data frame with 1653 rows and 7 variables:
\describe{
\item{NAICS2017_6d}{6-digit NAICS2017 Code}
\item{NAICS2017_4d}{4-di... | /man/naics2017_isic4.Rd | no_license | syyunn/concordance | R | false | true | 767 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{naics2017_isic4}
\alias{naics2017_isic4}
\title{NAICS2017-ISIC4 Concordance}
\format{
A data frame with 1653 rows and 7 variables:
\describe{
\item{NAICS2017_6d}{6-digit NAICS2017 Code}
\item{NAICS2017_4d}{4-di... |
# Until the version *following* httr 1.0.0 is available on CRAN, get the
# development version by uncommenting the following 2 lines
# library(devtools)
# install_github("hadley/httr")
library(httr)
library(dplyr)
library(lubridate)
library(magrittr)
library(foreach)
logging::basicConfig()
# Getting variables stored i... | /get_fitbit_data.R | no_license | jlopezarriaza/fitbit_analysis | R | false | false | 5,743 | r | # Until the version *following* httr 1.0.0 is available on CRAN, get the
# development version by uncommenting the following 2 lines
# library(devtools)
# install_github("hadley/httr")
library(httr)
library(dplyr)
library(lubridate)
library(magrittr)
library(foreach)
logging::basicConfig()
# Getting variables stored i... |
hpc_sub <- read.csv(file="hpc_sub.csv",
header = TRUE,
sep = ",",
quote = "\"")
# Plot 3 code
plot(x = hpc_sub$DateTime,
y = hpc_sub$Sub_metering_1,
main = "",
ylab = "Energy Sub Metering",
xlab = "",
col = "black",
type =... | /ExploreProject1/Plot4.R | no_license | rishaw/ExploreProject1 | R | false | false | 548 | r | hpc_sub <- read.csv(file="hpc_sub.csv",
header = TRUE,
sep = ",",
quote = "\"")
# Plot 3 code
plot(x = hpc_sub$DateTime,
y = hpc_sub$Sub_metering_1,
main = "",
ylab = "Energy Sub Metering",
xlab = "",
col = "black",
type =... |
ToDoList=c(
"CITATION file, ?CITATION",
"semiparametric effect size model",
"dncp.nparncpp implementation",
"fitted.nparncpp implementation",
"ncpest(nparncpp) documentation",
"dtn.mix accuracy check",
"compute gradient and hession of sparncpt",
"double check parncpt.momeff implementation"
)
| /R/ToDoList.R | no_license | gitlongor/pi0 | R | false | false | 293 | r | ToDoList=c(
"CITATION file, ?CITATION",
"semiparametric effect size model",
"dncp.nparncpp implementation",
"fitted.nparncpp implementation",
"ncpest(nparncpp) documentation",
"dtn.mix accuracy check",
"compute gradient and hession of sparncpt",
"double check parncpt.momeff implementation"
)
|
# Rattle: A GUI for Data Mining in R
#
# Time-stamp: <Saturday 2020-08-15 14:58:31 AEST Graham Williams>
#
# Copyright (c) 2009-2014 Togaware Pty Ltd
#
#' Plot rpart decision trees nicely.
#'
#' @param model an rpart object
#' @param main title for the plot
#' @param sub sub title for the plot (default is a Rattle stri... | /R/fancyRpartPlot.R | no_license | cran/rattle | R | false | false | 5,375 | r | # Rattle: A GUI for Data Mining in R
#
# Time-stamp: <Saturday 2020-08-15 14:58:31 AEST Graham Williams>
#
# Copyright (c) 2009-2014 Togaware Pty Ltd
#
#' Plot rpart decision trees nicely.
#'
#' @param model an rpart object
#' @param main title for the plot
#' @param sub sub title for the plot (default is a Rattle stri... |
##### SDMC2 #####
library(gridExtra) # the pacakge needed for this particular question to create multiple grid-level plots in a page
SDMC2= function(
title = "SDMC2", # Question-bank title that will be easily viewable in e-learning
n = 200, # Number of questions to generate
type = "MC", # The question type, one o... | /SDMC2.R | no_license | joseph950521/Stat1600-QGen | R | false | false | 5,108 | r | ##### SDMC2 #####
library(gridExtra) # the pacakge needed for this particular question to create multiple grid-level plots in a page
SDMC2= function(
title = "SDMC2", # Question-bank title that will be easily viewable in e-learning
n = 200, # Number of questions to generate
type = "MC", # The question type, one o... |
# basic ui params --------------------------------------------------------------
sidebar.width = 3
output.height = 640
# ui ---------------------------------------------------------------------------
gs_ui <- shiny::fluidPage(
shinyjs::useShinyjs(),
#tags$head(
# includeCSS("R/www/stylesheet.css")
... | /R/gs-app-dev/dev-ui.R | no_license | kmcd39/diVis | R | false | false | 1,613 | r |
# basic ui params --------------------------------------------------------------
sidebar.width = 3
output.height = 640
# ui ---------------------------------------------------------------------------
gs_ui <- shiny::fluidPage(
shinyjs::useShinyjs(),
#tags$head(
# includeCSS("R/www/stylesheet.css")
... |
# Import libraries & dataset ----
library(tidyverse)
library(timetk)
library(tidymodels)
library(modeltime.h2o)
library(rstudioapi)
df <- walmart_sales_weekly %>%
select(id, Date, Weekly_Sales)
df %>%
group_by(id) %>%
plot_time_series(
Date, Weekly_Sales,
.facet_ncol = 2,
.smooth ... | /Section15 - Time Series/Modeltime H2O.R | no_license | ssh352/R-training | R | false | false | 2,328 | r | # Import libraries & dataset ----
library(tidyverse)
library(timetk)
library(tidymodels)
library(modeltime.h2o)
library(rstudioapi)
df <- walmart_sales_weekly %>%
select(id, Date, Weekly_Sales)
df %>%
group_by(id) %>%
plot_time_series(
Date, Weekly_Sales,
.facet_ncol = 2,
.smooth ... |
dat <- read.table(pipe
('grep "^[1-2]/2/2007" "household_power_consumption.txt"')
, sep=";")
colnames(dat) <- c("Date","Time","Global_active_power","Global_reactive_power",
"Voltage","Global_intensity","Sub_metering_1",
"Sub_metering_2","Sub_met... | /plot4.R | no_license | rapolus/ExData_Plotting1 | R | false | false | 1,174 | r | dat <- read.table(pipe
('grep "^[1-2]/2/2007" "household_power_consumption.txt"')
, sep=";")
colnames(dat) <- c("Date","Time","Global_active_power","Global_reactive_power",
"Voltage","Global_intensity","Sub_metering_1",
"Sub_metering_2","Sub_met... |
createDrugEraTests <- function () {
patient <- createPatient()
encounter <- createEncounter()
declareTest("Two drugs with same ingredient within 30 days, should be one drug era", source_pid = patient$enrolid, cdm_pid = patient$person_id)
add_enrollment_detail(enrolid=patient$enrolid, dtend = '2012-12-31', dt... | /man/TRUVEN_CCAE_MDCR/ARCHIVE/TEST_CASES_2017_MDCD/Truven_TestingFramework/R/DrugEraTests.R | permissive | OHDSI/ETL-CDMBuilder | R | false | false | 3,141 | r | createDrugEraTests <- function () {
patient <- createPatient()
encounter <- createEncounter()
declareTest("Two drugs with same ingredient within 30 days, should be one drug era", source_pid = patient$enrolid, cdm_pid = patient$person_id)
add_enrollment_detail(enrolid=patient$enrolid, dtend = '2012-12-31', dt... |
## Reading libraries
library(dplyr)
library(ggplot2)
## Unzip the file
unzip("exdata-data-NEI_data.zip")
## Reading the dataframes
if(!exists("NEI")){
NEI <- readRDS("summarySCC_PM25.rds")
}
if(!exists("SCC")){
SCC <- readRDS("Source_Classification_Code.rds")
}
## Aggregate emissions over the four ... | /plot3.R | no_license | Coruscator/Exploratory-Analysis-Course-Project-2 | R | false | false | 1,030 | r |
## Reading libraries
library(dplyr)
library(ggplot2)
## Unzip the file
unzip("exdata-data-NEI_data.zip")
## Reading the dataframes
if(!exists("NEI")){
NEI <- readRDS("summarySCC_PM25.rds")
}
if(!exists("SCC")){
SCC <- readRDS("Source_Classification_Code.rds")
}
## Aggregate emissions over the four ... |
library(testthat)
library(minifying)
test_check("minifying")
| /step-2-prototype/tests/testthat.R | permissive | ColinFay/minifying | R | false | false | 62 | r | library(testthat)
library(minifying)
test_check("minifying")
|
/Aula 5/associacao.R | no_license | Marcelo391/Curso-R-Coti | R | false | false | 552 | r | ||
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/FIBond.R
\name{getPrice.FIBond}
\alias{getPrice.FIBond}
\title{Calculate clean price of FIBond}
\usage{
getPrice.FIBond(bond, yield, settleDate = nextBizDay())
}
\arguments{
\item{bond}{FIBond object (can be a list)}
\item{yield}{FIBond yiel... | /man/getPrice.FIBond.Rd | no_license | solavrov/fval | R | false | true | 513 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/FIBond.R
\name{getPrice.FIBond}
\alias{getPrice.FIBond}
\title{Calculate clean price of FIBond}
\usage{
getPrice.FIBond(bond, yield, settleDate = nextBizDay())
}
\arguments{
\item{bond}{FIBond object (can be a list)}
\item{yield}{FIBond yiel... |
library(dplyr)
library(ggplot2)
library(fbRanks)
getwd()
setwd("C:/Users/leona/Documents/Bedu/Tarea/Postworks/Postwork2")
Fut.com <- lapply(dir(), read.csv)
lapply(Fut.com, str)
View(Fut.com[[1]])
Fut.red<-lapply(Fut.com, select,Date, HomeTeam,HS,AwayTeam,AS)
SmallData = rbind(Fut.red[[1]],Fut.red[[2]],Fut.red[[3]... | /Postworks/Postwork5.R | no_license | LeonarZuma/Postworks | R | false | false | 653 | r | library(dplyr)
library(ggplot2)
library(fbRanks)
getwd()
setwd("C:/Users/leona/Documents/Bedu/Tarea/Postworks/Postwork2")
Fut.com <- lapply(dir(), read.csv)
lapply(Fut.com, str)
View(Fut.com[[1]])
Fut.red<-lapply(Fut.com, select,Date, HomeTeam,HS,AwayTeam,AS)
SmallData = rbind(Fut.red[[1]],Fut.red[[2]],Fut.red[[3]... |
# General_knowledge Test -----------------------------------------------
tmp1 <- as.data.frame(surveys_qrt$GK_A1 %>%
select(ResponseID, StartDate:Finished, uid, Itemnum, Question, Representativeness, Ind_Stimulus.CRESP,
Ind_Stimulus.RESP, Ind_Stimulus.RT, Ind_Stimulus.OnsetTime,
... | /R/survey_prep/gk.R | no_license | mattdblanchard/PhD-study-2 | R | false | false | 49,602 | r | # General_knowledge Test -----------------------------------------------
tmp1 <- as.data.frame(surveys_qrt$GK_A1 %>%
select(ResponseID, StartDate:Finished, uid, Itemnum, Question, Representativeness, Ind_Stimulus.CRESP,
Ind_Stimulus.RESP, Ind_Stimulus.RT, Ind_Stimulus.OnsetTime,
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/qnlogBlackList.R
\name{qnlog_logTag_writeDB}
\alias{qnlog_logTag_writeDB}
\title{日志打标信息写入数据库}
\usage{
qnlog_logTag_writeDB(
conn = tsda::conn_rds("nsic"),
FUser = "腊梅",
log_date = "2020-05-03",
dict_contain = qnlog_getBlackList(),
d... | /man/qnlog_logTag_writeDB.Rd | no_license | takewiki/caaspkg | R | false | true | 635 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/qnlogBlackList.R
\name{qnlog_logTag_writeDB}
\alias{qnlog_logTag_writeDB}
\title{日志打标信息写入数据库}
\usage{
qnlog_logTag_writeDB(
conn = tsda::conn_rds("nsic"),
FUser = "腊梅",
log_date = "2020-05-03",
dict_contain = qnlog_getBlackList(),
d... |
rm(list=ls())
source("../../functions.R")
uncurated <- read.csv("../uncurated/GSE3141_full_pdata.csv", as.is=TRUE,row.names=1)
celfile.dir <- "../../../DATA/GSE3141/RAW"
##initial creation of curated dataframe
curated <- initialCuratedDF(rownames(uncurated), template.filename="template_lung.csv")
##-----------------... | /curation/lung/src/GSE3141_curation.r | no_license | tgerke/catd | R | false | false | 1,268 | r | rm(list=ls())
source("../../functions.R")
uncurated <- read.csv("../uncurated/GSE3141_full_pdata.csv", as.is=TRUE,row.names=1)
celfile.dir <- "../../../DATA/GSE3141/RAW"
##initial creation of curated dataframe
curated <- initialCuratedDF(rownames(uncurated), template.filename="template_lung.csv")
##-----------------... |
## run TAGM
require(pRoloc)
load(file = "arabidposis_co3rep3.rda")
fData(arabidposis_co3rep3)$markers[fData(arabidposis_co3rep3)$markers %in% c("cytosolic ribosomes", "extracellular")] <- "unknown"
mcmc_arabidposis_co3rep3 <- tagmMcmcTrain(object = arabidposis_co3rep3, fcol = "markers",
... | /hpcscripts/araCO3rep3.R | no_license | ococrook/2020-Harriet-Arabidopsis | R | false | false | 501 | r | ## run TAGM
require(pRoloc)
load(file = "arabidposis_co3rep3.rda")
fData(arabidposis_co3rep3)$markers[fData(arabidposis_co3rep3)$markers %in% c("cytosolic ribosomes", "extracellular")] <- "unknown"
mcmc_arabidposis_co3rep3 <- tagmMcmcTrain(object = arabidposis_co3rep3, fcol = "markers",
... |
## Matrix inversion is usually a costly computation.
## Below functions cache the inverse of a matrix rather than computing it repeatedly.
## makeCacheMatrix creates a special "matrix" object that can cache its inverse.
makeCacheMatrix <- function(x = matrix()) {
matrix_inverse <- NULL ## initialize matrix
#... | /cachematrix.R | no_license | DestinationEpic/ProgrammingAssignment2 | R | false | false | 1,490 | r | ## Matrix inversion is usually a costly computation.
## Below functions cache the inverse of a matrix rather than computing it repeatedly.
## makeCacheMatrix creates a special "matrix" object that can cache its inverse.
makeCacheMatrix <- function(x = matrix()) {
matrix_inverse <- NULL ## initialize matrix
#... |
setwd("c:/export")
stocks <- read.csv("StocksCluster.csv")
str(stocks)
table(stocks$PositiveDec)
(6424)/nrow(stocks)
sort(cor(stocks))
summary(stocks)
library(caTools)
set.seed(144)
spl = sample.split(stocks$PositiveDec, SplitRatio = 0.7)
stocksTrain = subset(stocks, spl == TRUE)
stocksTest = subset(stocks, spl =... | /stock-cluster.R | no_license | nestalk/r-edx-scripts | R | false | false | 2,646 | r | setwd("c:/export")
stocks <- read.csv("StocksCluster.csv")
str(stocks)
table(stocks$PositiveDec)
(6424)/nrow(stocks)
sort(cor(stocks))
summary(stocks)
library(caTools)
set.seed(144)
spl = sample.split(stocks$PositiveDec, SplitRatio = 0.7)
stocksTrain = subset(stocks, spl == TRUE)
stocksTest = subset(stocks, spl =... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.