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 |
|---|---|---|---|---|---|---|---|---|---|
testlist <- list(x = structure(c(2.87034528687764e-306, 2.69356484133005e-164, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = 7:6))
result <- do.call(bravo:::colSumSq_matrix,testlist)
str(result) | /bravo/inst/testfiles/colSumSq_matrix/libFuzzer_colSumSq_matrix/colSumSq_matrix_valgrind_files/1609959437-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 278 | r | testlist <- list(x = structure(c(2.87034528687764e-306, 2.69356484133005e-164, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = 7:6))
result <- do.call(bravo:::colSumSq_matrix,testlist)
str(result) |
# macd strategies on all series
maxRows <- 1100 # used to initialize a matrix to store closing prices
getOrders <- function(store, newRowList, currentPos, params) {
allzero <- rep(0,length(newRowList))
pos <- allzero
if (is.null(store))
store <- initStore(newRowList,params$series)
else
... | /strategies/macd.R | no_license | happy369300/R-project-1 | R | false | false | 2,317 | r | # macd strategies on all series
maxRows <- 1100 # used to initialize a matrix to store closing prices
getOrders <- function(store, newRowList, currentPos, params) {
allzero <- rep(0,length(newRowList))
pos <- allzero
if (is.null(store))
store <- initStore(newRowList,params$series)
else
... |
start=189
end=260
longplot=FALSE
tower.raw.syv<-read.csv('Syv_TowerData_2015.csv',skip=1, header=TRUE)
tower.names.syv<-colnames(read.csv('Syv_TowerData_2015.csv'))
names(tower.raw.syv)<-tower.names.syv
tower.match.syv<-tower.raw.syv[tower.raw.syv$DTIME>=start & tower.raw.syv$DTIME<end,]
#Ustar filter
#tower.match.s... | /OlderCode/Tower_vs_sap.R | no_license | bblakely/SapFlux | R | false | false | 9,018 | r | start=189
end=260
longplot=FALSE
tower.raw.syv<-read.csv('Syv_TowerData_2015.csv',skip=1, header=TRUE)
tower.names.syv<-colnames(read.csv('Syv_TowerData_2015.csv'))
names(tower.raw.syv)<-tower.names.syv
tower.match.syv<-tower.raw.syv[tower.raw.syv$DTIME>=start & tower.raw.syv$DTIME<end,]
#Ustar filter
#tower.match.s... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sample_data_info.R
\docType{data}
\name{candidate_ffls_mirna_all_part2}
\alias{candidate_ffls_mirna_all_part2}
\title{candidate_ffls_mirna_all_part2}
\format{
A DataFrame (13240974 x 9) with the following columns:
\describe{
\item{mirna}{miRN... | /man/candidate_ffls_mirna_all_part2.Rd | no_license | th789/fflmediation | R | false | true | 1,253 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sample_data_info.R
\docType{data}
\name{candidate_ffls_mirna_all_part2}
\alias{candidate_ffls_mirna_all_part2}
\title{candidate_ffls_mirna_all_part2}
\format{
A DataFrame (13240974 x 9) with the following columns:
\describe{
\item{mirna}{miRN... |
library(dplyr)
library(ggplot2)
library(plotly)
library(DT)
## Import and read data
setwd("~/Documents/bootcamp007_project/Project3-WebScraping/ReganYee/Wayback/")
reddit = read.csv("wayback.csv")
#reddit[reddit$snapshot_datetime == '20161109103912',]
reddit$upvotes = as.numeric(as.character(reddit$upvotes))
reddit$up... | /Project3-WebScraping/ReganYee/Analysis.R | no_license | vuchau/bootcamp007_project | R | false | false | 7,525 | r | library(dplyr)
library(ggplot2)
library(plotly)
library(DT)
## Import and read data
setwd("~/Documents/bootcamp007_project/Project3-WebScraping/ReganYee/Wayback/")
reddit = read.csv("wayback.csv")
#reddit[reddit$snapshot_datetime == '20161109103912',]
reddit$upvotes = as.numeric(as.character(reddit$upvotes))
reddit$up... |
library(ape)
library(geiger)
#####################
# solve for moments #
#####################
get_params_for_var = function(process_var=1,process_kurt=0,frac_of_var=0,halflife=0,decay=0,tip=0) {
ret = list()
ret$bm = list(sigma.bm=sqrt(process_var))
ret$ou = get_params_OU(process_var,halflife)
ret$eb... | /R/levy_pruning_tools.r | no_license | Schraiber/pulsR | R | false | false | 10,354 | r | library(ape)
library(geiger)
#####################
# solve for moments #
#####################
get_params_for_var = function(process_var=1,process_kurt=0,frac_of_var=0,halflife=0,decay=0,tip=0) {
ret = list()
ret$bm = list(sigma.bm=sqrt(process_var))
ret$ou = get_params_OU(process_var,halflife)
ret$eb... |
# Dependencies
library(tidyverse)
library(igraph)
library(ggraph)
library(boot)
library(ergm)
# Load socio matrix
load('data/socio_matrix.RData')
# Load datasets
users <- read_csv('data/users.csv', col_types='ncnccccclcnnn') %>%
filter(!is.na(id)) %>%
distinct
friendship <- read_csv('data/friendship.csv', col_ty... | /inference.R | permissive | damiclem/smhdd_network | R | false | false | 21,415 | r | # Dependencies
library(tidyverse)
library(igraph)
library(ggraph)
library(boot)
library(ergm)
# Load socio matrix
load('data/socio_matrix.RData')
# Load datasets
users <- read_csv('data/users.csv', col_types='ncnccccclcnnn') %>%
filter(!is.na(id)) %>%
distinct
friendship <- read_csv('data/friendship.csv', col_ty... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tracked_environment.R
\name{force_push}
\alias{force_push}
\title{Force push a tracked environment to a given commit.}
\usage{
force_push(env, commit)
}
\arguments{
\item{env}{tracked_environment.}
\item{commit}{integer or character. If char... | /man/force_push.Rd | permissive | robertzk/objectdiff | R | false | true | 912 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tracked_environment.R
\name{force_push}
\alias{force_push}
\title{Force push a tracked environment to a given commit.}
\usage{
force_push(env, commit)
}
\arguments{
\item{env}{tracked_environment.}
\item{commit}{integer or character. If char... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rangevoting.R
\name{proportional}
\alias{proportional}
\title{Proportional system calculator}
\usage{
proportional(seats, counter)
}
\arguments{
\item{seats}{"Number of seats assigned to the analyzed costituency"}
\item{counter}{"Named vecto... | /man/proportional.Rd | no_license | unimi-dse/1a62ddfc | R | false | true | 744 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rangevoting.R
\name{proportional}
\alias{proportional}
\title{Proportional system calculator}
\usage{
proportional(seats, counter)
}
\arguments{
\item{seats}{"Number of seats assigned to the analyzed costituency"}
\item{counter}{"Named vecto... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/empiricalCopula.R
\docType{class}
\name{empiricalCopula-class}
\alias{empiricalCopula-class}
\alias{dim,empiricalCopula-method}
\title{Empirical Copula class (virtual mother class)}
\usage{
\S4method{dim}{empiricalCopula}(x)
}
\argu... | /man/empiricalCopula-class.Rd | permissive | ayotoasset/empCop | R | false | true | 636 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/empiricalCopula.R
\docType{class}
\name{empiricalCopula-class}
\alias{empiricalCopula-class}
\alias{dim,empiricalCopula-method}
\title{Empirical Copula class (virtual mother class)}
\usage{
\S4method{dim}{empiricalCopula}(x)
}
\argu... |
library(KSD)
### Name: scorefunctiongmm
### Title: Score function for given GMM : calculates score function
### dlogp(x)/dx for a given Gaussian Mixture Model
### Aliases: scorefunctiongmm
### ** Examples
# Compute score for a given gaussianmixture model and dataset
model <- gmm()
X <- rgmm(model)
score <- scoref... | /data/genthat_extracted_code/KSD/examples/scorefunctiongmm.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 352 | r | library(KSD)
### Name: scorefunctiongmm
### Title: Score function for given GMM : calculates score function
### dlogp(x)/dx for a given Gaussian Mixture Model
### Aliases: scorefunctiongmm
### ** Examples
# Compute score for a given gaussianmixture model and dataset
model <- gmm()
X <- rgmm(model)
score <- scoref... |
setMethod('fit', signature(object='FLsz'),
function(object, package="FLsz", exeNm="seine", dir=tempdir(),...)
runExe(object, package, exeNm, dir,...))
writeFn=function(object,exeNm="seine") {
## Data
ObsLength = object@obs
SampleSize = object@n
ObsLength[ is.na(ObsLength)]=mean(ObsLe... | /R/runExe.R | no_license | laurieKell/FLsz | R | false | false | 5,014 | r | setMethod('fit', signature(object='FLsz'),
function(object, package="FLsz", exeNm="seine", dir=tempdir(),...)
runExe(object, package, exeNm, dir,...))
writeFn=function(object,exeNm="seine") {
## Data
ObsLength = object@obs
SampleSize = object@n
ObsLength[ is.na(ObsLength)]=mean(ObsLe... |
# region data layers----
# a list of possible id fields used in datalayers (most will use rgn_id, but not always)
layers_id_fields <- c('rgn_id')
# the official list of regions (and corresponding names)
layer_region_labels <- 'rgn_labels'
# the official ocean areas of each region (used to weight each subre... | /calc_ohibc/master/config_master.R | no_license | seifertjenny/ohibc | R | false | false | 3,162 | r | # region data layers----
# a list of possible id fields used in datalayers (most will use rgn_id, but not always)
layers_id_fields <- c('rgn_id')
# the official list of regions (and corresponding names)
layer_region_labels <- 'rgn_labels'
# the official ocean areas of each region (used to weight each subre... |
#' @title shift 5' ends
#' @description shift the GAlignmentsLists by 5' ends.
#' All reads aligning to the positive strand will be offset by +4bp,
#' and all reads aligning to the negative strand will be offset -5bp by default.
#' @param gal An object of \link[GenomicAlignments]{GAlignmentsList}.
#' @param positive ... | /R/shiftGAlignmentsList.R | no_license | jaime11/Transcription-Factor-Footprinting | R | false | false | 2,110 | r | #' @title shift 5' ends
#' @description shift the GAlignmentsLists by 5' ends.
#' All reads aligning to the positive strand will be offset by +4bp,
#' and all reads aligning to the negative strand will be offset -5bp by default.
#' @param gal An object of \link[GenomicAlignments]{GAlignmentsList}.
#' @param positive ... |
# source('/ihme/code/geospatial/temperature/exposure/launch_exposure_calc_by_year.R', echo =T)
#set up smart sensing of os
if(Sys.info()[1]=='Windows'){
j = "J:/"
} else{
j = '/home/j/'
}
#set variables for parallelization
code.dir = paste0('/ihme/code/geospatial/temperature/exposure/')
slots = 30
years = seq(199... | /temperature/archive/exposure/launch_exposure_calc_by_year.R | no_license | wgodwin28/ihme_code | R | false | false | 2,227 | r | # source('/ihme/code/geospatial/temperature/exposure/launch_exposure_calc_by_year.R', echo =T)
#set up smart sensing of os
if(Sys.info()[1]=='Windows'){
j = "J:/"
} else{
j = '/home/j/'
}
#set variables for parallelization
code.dir = paste0('/ihme/code/geospatial/temperature/exposure/')
slots = 30
years = seq(199... |
# Pijuan-Sala et al. A single-cell molecular map of mouse gastrulation and early organogenesis. Nature. 2019
# PMID:
# https://github.com/MarioniLab/EmbryoTimecourse2018
# 10X
# QC - >=1,000 expressed genes, mito < 2%, mean log2(norm) >= 10^-3, exclude chrY, Xist, tdTomato construct
# Normalization: scran - quickClus... | /PijuanSala.R | no_license | yingstat/scDatasets | R | false | false | 2,607 | r | # Pijuan-Sala et al. A single-cell molecular map of mouse gastrulation and early organogenesis. Nature. 2019
# PMID:
# https://github.com/MarioniLab/EmbryoTimecourse2018
# 10X
# QC - >=1,000 expressed genes, mito < 2%, mean log2(norm) >= 10^-3, exclude chrY, Xist, tdTomato construct
# Normalization: scran - quickClus... |
library(coneproj)
### Name: conv
### Title: Specify a Convex Shape-Restriction in a SHAPEREG Formula
### Aliases: conv
### Keywords: shape routine
### ** Examples
# generate y
x <- seq(-1, 2, by = 0.1)
n <- length(x)
y <- x^2 + rnorm(n, .3)
# regress y on x under the shape-restriction: "convex"
ans <-... | /data/genthat_extracted_code/coneproj/examples/conv.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 483 | r | library(coneproj)
### Name: conv
### Title: Specify a Convex Shape-Restriction in a SHAPEREG Formula
### Aliases: conv
### Keywords: shape routine
### ** Examples
# generate y
x <- seq(-1, 2, by = 0.1)
n <- length(x)
y <- x^2 + rnorm(n, .3)
# regress y on x under the shape-restriction: "convex"
ans <-... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/embeddr.R
\name{predicted_expression}
\alias{predicted_expression}
\title{Create a predicted expression matrix}
\usage{
predicted_expression(sce, models = NULL, n_cores = 2)
}
\arguments{
\item{sce}{An object of class \code{SCESet}}
... | /man/predicted_expression.Rd | no_license | bjstewart1/embeddr | R | false | false | 1,291 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/embeddr.R
\name{predicted_expression}
\alias{predicted_expression}
\title{Create a predicted expression matrix}
\usage{
predicted_expression(sce, models = NULL, n_cores = 2)
}
\arguments{
\item{sce}{An object of class \code{SCESet}}
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/vip.R
\name{vip}
\alias{vip}
\alias{vip.default}
\title{Variable Importance Plots}
\usage{
vip(object, ...)
\method{vip}{default}(object, bar = TRUE, width = 0.75, horizontal = TRUE,
alpha = 1, color = "grey35", fill = "grey35", ...)
}
\ar... | /man/vip.Rd | no_license | guhjy/vip | R | false | true | 1,510 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/vip.R
\name{vip}
\alias{vip}
\alias{vip.default}
\title{Variable Importance Plots}
\usage{
vip(object, ...)
\method{vip}{default}(object, bar = TRUE, width = 0.75, horizontal = TRUE,
alpha = 1, color = "grey35", fill = "grey35", ...)
}
\ar... |
data(satsolvers)
vbsp = sum(parscores(satsolvers, vbs))
vbsm = sum(misclassificationPenalties(satsolvers, vbs))
vbss = sum(successes(satsolvers, vbs))
test_that("singleBest and vbs", {
skip.expensive()
vbsse = sum(apply(satsolvers$data[satsolvers$success], 1, max))
expect_equal(vbsse, 2125)
expect_eq... | /tests/testthat/test.satsolvers.R | no_license | alincc/llama | R | false | false | 8,019 | r | data(satsolvers)
vbsp = sum(parscores(satsolvers, vbs))
vbsm = sum(misclassificationPenalties(satsolvers, vbs))
vbss = sum(successes(satsolvers, vbs))
test_that("singleBest and vbs", {
skip.expensive()
vbsse = sum(apply(satsolvers$data[satsolvers$success], 1, max))
expect_equal(vbsse, 2125)
expect_eq... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/dRezyserowie.R
\name{dRezyserowie}
\alias{dRezyserowie}
\title{Liczenie odleglosci dla rezyserow}
\usage{
dRezyserowie(IDFilm1, IDFilm2, sciezkaDoBazy)
}
\arguments{
\item{IDFilm1}{- id pierwszego filmu}
\item{IDFilm2}{- id drugiego ... | /WyszynskaRudasIMDB/man/dRezyserowie.Rd | no_license | Wyszynskak/Projekty | R | false | false | 913 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/dRezyserowie.R
\name{dRezyserowie}
\alias{dRezyserowie}
\title{Liczenie odleglosci dla rezyserow}
\usage{
dRezyserowie(IDFilm1, IDFilm2, sciezkaDoBazy)
}
\arguments{
\item{IDFilm1}{- id pierwszego filmu}
\item{IDFilm2}{- id drugiego ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{bedloss}
\alias{bedloss}
\title{Mean Squared Error for Genomewide prediction}
\usage{
bedloss(bed, y, weights, pred = NULL, ...)
}
\arguments{
\item{bed}{an rbed object, or a mergedrbed object}
\item{y}{vector of length bed$no.... | /man/bedloss.Rd | no_license | danjlawson/bedlm | R | false | true | 886 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{bedloss}
\alias{bedloss}
\title{Mean Squared Error for Genomewide prediction}
\usage{
bedloss(bed, y, weights, pred = NULL, ...)
}
\arguments{
\item{bed}{an rbed object, or a mergedrbed object}
\item{y}{vector of length bed$no.... |
library(Rdbi)
library(RdbiPgSQL)
#
conn <- dbConnect(PgSQL(), host="", dbname="bioenergy", user="ptittmann", password="")
#dbListTables(conn)
#r_baseline results
query <- dbSendQuery(conn, "select * from crosstab('select price_point, fstk_type||f_type as pathway , sum(quant_mgy*c.gal_per_bdt*d.energy_density_gge_per... | /make-db/results/r/doe_fuelpw_sc.r | no_license | qjhart/wga-biorefinery-study | R | false | false | 10,541 | r | library(Rdbi)
library(RdbiPgSQL)
#
conn <- dbConnect(PgSQL(), host="", dbname="bioenergy", user="ptittmann", password="")
#dbListTables(conn)
#r_baseline results
query <- dbSendQuery(conn, "select * from crosstab('select price_point, fstk_type||f_type as pathway , sum(quant_mgy*c.gal_per_bdt*d.energy_density_gge_per... |
#plot4.R
# Project 1.. Exploratory Data for Making Plots
###################################################
setwd("E:/R1/ExData_Plotting1_test/data")
unzip("exdata_data_household_power_consumption.zip")
data <- read.table("household_power_consumption.txt", header = TRUE, sep = ";", na.string = "?")
#
#test add date a... | /plot4.R | no_license | huskyr/ExData_Plotting1 | R | false | false | 1,754 | r | #plot4.R
# Project 1.. Exploratory Data for Making Plots
###################################################
setwd("E:/R1/ExData_Plotting1_test/data")
unzip("exdata_data_household_power_consumption.zip")
data <- read.table("household_power_consumption.txt", header = TRUE, sep = ";", na.string = "?")
#
#test add date a... |
#!/usr/bin/env Rscript
args = commandArgs(trailingOnly=TRUE)
batch = args[1] #batch variable in the metadata slot if no batch fill in empty string
QC_feature_min = as.numeric(args[2]) #Minimal features threshold
QC_mt_max = as.numeric(args[3]) #Maximum mitochondrial content threshold
pca_dims = as.numeric(args[4]) #Amo... | /scProcessor_1.R | no_license | soumelis-lab/IMMUcan | R | false | false | 9,402 | r | #!/usr/bin/env Rscript
args = commandArgs(trailingOnly=TRUE)
batch = args[1] #batch variable in the metadata slot if no batch fill in empty string
QC_feature_min = as.numeric(args[2]) #Minimal features threshold
QC_mt_max = as.numeric(args[3]) #Maximum mitochondrial content threshold
pca_dims = as.numeric(args[4]) #Amo... |
#Q3
data_got=read.csv("character-deaths.csv")
#Q4
colnames(data_got)
#Q5
summary(data_got)
#random comments on descriptive statistics:
#All characters die between the years 297 and 299,
#the median death year is 299 and the mean 299.2
#Out of 917 characters 612 are still alive, that's only about 2/3!
#Considering ... | /HW_7.R | no_license | daniel-barreto/Programming-SCPO | R | false | false | 6,180 | r | #Q3
data_got=read.csv("character-deaths.csv")
#Q4
colnames(data_got)
#Q5
summary(data_got)
#random comments on descriptive statistics:
#All characters die between the years 297 and 299,
#the median death year is 299 and the mean 299.2
#Out of 917 characters 612 are still alive, that's only about 2/3!
#Considering ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/interval2criterio.R
\name{interval2criterio}
\alias{interval2criterio}
\title{Title}
\usage{
interval2criterio(ts, intervalos)
}
\arguments{
\item{ts}{}
\item{intervalos}{}
}
\description{
Title
}
| /man/interval2criterio.Rd | no_license | fjbaron/accelerator | R | false | true | 276 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/interval2criterio.R
\name{interval2criterio}
\alias{interval2criterio}
\title{Title}
\usage{
interval2criterio(ts, intervalos)
}
\arguments{
\item{ts}{}
\item{intervalos}{}
}
\description{
Title
}
|
.libPaths()
.libPaths("E:/R")
getwd()
setwd("E:/bungae")
install.packages("tree")
library(tree)
library(ISLR)
attach(Carseats)#자료 carseats사용->NAs introduced by coercion
library(MASS)
attach(Boston)# 대체 자료 Boston 사용
head(Boston)
summary(Boston$medv)
High=ifelse(medv<=22,"NO","Yes")#8을 초과하면 yes, 그렇지 않으면... | /ISLR_tree_reg_classification.R | no_license | Jangsehawn/ISLR | R | false | false | 1,938 | r |
.libPaths()
.libPaths("E:/R")
getwd()
setwd("E:/bungae")
install.packages("tree")
library(tree)
library(ISLR)
attach(Carseats)#자료 carseats사용->NAs introduced by coercion
library(MASS)
attach(Boston)# 대체 자료 Boston 사용
head(Boston)
summary(Boston$medv)
High=ifelse(medv<=22,"NO","Yes")#8을 초과하면 yes, 그렇지 않으면... |
df1<-read.csv('winequality-red.csv',sep = ';')
df2<-read.csv('winequality-white.csv',sep = ';')
head(df1)
head(df2)
df1$label<-sapply(df1$pH,function(x){'red'})
df2$label<-sapply(df2$pH,function(x){'white'})
head(df1)
head(df2)
wine<-rbind(df1,df2)
head(wine)
str(wine)
##Exploring Data
##Histogram of residual sug... | /Script.R | no_license | imrvj/K-Clustering | R | false | false | 1,346 | r | df1<-read.csv('winequality-red.csv',sep = ';')
df2<-read.csv('winequality-white.csv',sep = ';')
head(df1)
head(df2)
df1$label<-sapply(df1$pH,function(x){'red'})
df2$label<-sapply(df2$pH,function(x){'white'})
head(df1)
head(df2)
wine<-rbind(df1,df2)
head(wine)
str(wine)
##Exploring Data
##Histogram of residual sug... |
# saviosampaio - 20170215-0019
# - plot1.R do course-project-1 de exploratory-data-analysis / coursera
# aqui fiz uma melhoria, para realizar o download dos dados direto da fonte
# - salvei uma copia desse arquivo ZIP dentro do diretorio raiz desse course-project-1
url <- "https://d396qusza40orc.cloudfront.net/ex... | /plot1.R | no_license | saviosampaio/ExData_Plotting1 | R | false | false | 1,368 | r | # saviosampaio - 20170215-0019
# - plot1.R do course-project-1 de exploratory-data-analysis / coursera
# aqui fiz uma melhoria, para realizar o download dos dados direto da fonte
# - salvei uma copia desse arquivo ZIP dentro do diretorio raiz desse course-project-1
url <- "https://d396qusza40orc.cloudfront.net/ex... |
get_args_weighted <- function(weights, new_x, processed_lavaan) {
b <- matrix(processed_lavaan$beta$est, ncol = 1)
sigma_beta <- processed_lavaan$sigma_beta
x_long <- create_x_matrix(new_x, processed_lavaan$beta)
adjusted_weights <- adjust_weights(weights, processed_lavaan$rescale_df, processed_lavaan$beta)
... | /R/get_args_.R | permissive | GForb/mopi | R | false | false | 2,463 | r | get_args_weighted <- function(weights, new_x, processed_lavaan) {
b <- matrix(processed_lavaan$beta$est, ncol = 1)
sigma_beta <- processed_lavaan$sigma_beta
x_long <- create_x_matrix(new_x, processed_lavaan$beta)
adjusted_weights <- adjust_weights(weights, processed_lavaan$rescale_df, processed_lavaan$beta)
... |
################################################################################
#### ####
#### This script fits the MMPP model. ####
#### #... | /analysis-alpha-mmpp.R | no_license | jeffeaton/hivsubfertility-mmpp | R | false | false | 2,049 | r | ################################################################################
#### ####
#### This script fits the MMPP model. ####
#### #... |
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 7693
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 7693
c
c Input Parameter (command line, file):
c input filename QBFLIB/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/q... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/query07_query45_1344/query07_query45_1344.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 711 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 7693
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 7693
c
c Input Parameter (command line, file):
c input filename QBFLIB/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/q... |
## version: 1.31
## method: get
## path: /distribution/{name}/json
## code: 200
## response: {"Descriptor":{"MediaType":"application/vnd.docker.distribution.manifest.v2+json","Digest":"sha256:c0537ff6a5218ef531ece93d4984efc99bbf3f7497c0a7726c88e2bb7584dc96","Size":3987495,"URLs":""},"Platforms":[{"Architecture":"amd64"... | /tests/testthat/sample_responses/v1.31/system_distribution.R | no_license | cran/stevedore | R | false | false | 822 | r | ## version: 1.31
## method: get
## path: /distribution/{name}/json
## code: 200
## response: {"Descriptor":{"MediaType":"application/vnd.docker.distribution.manifest.v2+json","Digest":"sha256:c0537ff6a5218ef531ece93d4984efc99bbf3f7497c0a7726c88e2bb7584dc96","Size":3987495,"URLs":""},"Platforms":[{"Architecture":"amd64"... |
#run_analysis.R
# the main script to perform the analysis from Human Activity Recognition
#Using Smartphones Dataset.
#The analysis generates a tidy dataset from the original training and test datasets
#Read the featuring label
setwd("cleaningdata")
featlabel <- read.csv("UCIHARDataset//features.txt", sep=" ",header... | /run_analysis.R | no_license | mderose/cleaningdata | R | false | false | 2,706 | r | #run_analysis.R
# the main script to perform the analysis from Human Activity Recognition
#Using Smartphones Dataset.
#The analysis generates a tidy dataset from the original training and test datasets
#Read the featuring label
setwd("cleaningdata")
featlabel <- read.csv("UCIHARDataset//features.txt", sep=" ",header... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/merge-styles.R
\name{css_merge}
\alias{css_merge}
\title{Merge multiple stylesheets given in priority order}
\usage{
css_merge(...)
}
\arguments{
\item{...}{multiple
CSS objects. The order in which these arguments are given reflect the
priori... | /man/css_merge.Rd | permissive | coolbutuseless/cssparser | R | false | true | 701 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/merge-styles.R
\name{css_merge}
\alias{css_merge}
\title{Merge multiple stylesheets given in priority order}
\usage{
css_merge(...)
}
\arguments{
\item{...}{multiple
CSS objects. The order in which these arguments are given reflect the
priori... |
"predict.bsamdpm" <- function(object, newp, newnp, alpha = 0.05, HPD = TRUE, ...) {
smcmc <- object$mcmc$smcmc
nbasis <- object$nbasis
nint <- object$nint + 1
nfun <- object$nfun
fmodel <- object$fmodel
fpm <- object$fpm
xmin <- object$xmin
xmax <- object$xmax
if (missing(newp) && missing(newnp)) {
... | /R/predict.bsamdpm.R | no_license | jourdy345/bsamGP | R | false | false | 4,949 | r | "predict.bsamdpm" <- function(object, newp, newnp, alpha = 0.05, HPD = TRUE, ...) {
smcmc <- object$mcmc$smcmc
nbasis <- object$nbasis
nint <- object$nint + 1
nfun <- object$nfun
fmodel <- object$fmodel
fpm <- object$fpm
xmin <- object$xmin
xmax <- object$xmax
if (missing(newp) && missing(newnp)) {
... |
# Exercise 2: advanced ggplot2 practice
# Install and load the `ggplot2` package
#install.packages('ggplot2')
library("ggplot2")
# For this exercise you will again be working with the `diamonds` data set.
# Use `?diamonds` to review details about this data set
?diamonds
## Position Adjustments
# Draw a column (bar)... | /chapter-16-exercises/exercise-2/exercise.R | permissive | samuel-lindsay/book-exercises | R | false | false | 3,810 | r | # Exercise 2: advanced ggplot2 practice
# Install and load the `ggplot2` package
#install.packages('ggplot2')
library("ggplot2")
# For this exercise you will again be working with the `diamonds` data set.
# Use `?diamonds` to review details about this data set
?diamonds
## Position Adjustments
# Draw a column (bar)... |
OptSig.2p2n <-
function(ncp=NULL,h=NULL,n1=NULL,n2=NULL,p=0.5,k=1,alternative="two.sided",Figure=TRUE){
alphavec = seq(1e-05, 1, 1e-05)
if (!is.null(ncp) & is.null(h)){
if (alternative=="less") betavec=1-pnorm(qnorm(alphavec),mean=ncp)
if (alternative=="greater") betavec=pnorm(-qnorm(alphavec)... | /R/OptSig.2p2n.R | no_license | cran/OptSig | R | false | false | 729 | r | OptSig.2p2n <-
function(ncp=NULL,h=NULL,n1=NULL,n2=NULL,p=0.5,k=1,alternative="two.sided",Figure=TRUE){
alphavec = seq(1e-05, 1, 1e-05)
if (!is.null(ncp) & is.null(h)){
if (alternative=="less") betavec=1-pnorm(qnorm(alphavec),mean=ncp)
if (alternative=="greater") betavec=pnorm(-qnorm(alphavec)... |
dupInfo <-
function(x, useNA="ifany"){
# this looks for duplicates
dupdat <- data.frame(table(x, useNA = useNA))
dupdat <- dupdat[dupdat$Freq > 1,]
dupdat$position <-
lapply(dupdat$x, function(y){which(x %in% y)})
dupdat
}
construct.all <- function(..., cycle.order = NULL){
# construct.... | /R/utility.functions.R | no_license | jmobrien/PsychMisc | R | false | false | 2,033 | r | dupInfo <-
function(x, useNA="ifany"){
# this looks for duplicates
dupdat <- data.frame(table(x, useNA = useNA))
dupdat <- dupdat[dupdat$Freq > 1,]
dupdat$position <-
lapply(dupdat$x, function(y){which(x %in% y)})
dupdat
}
construct.all <- function(..., cycle.order = NULL){
# construct.... |
\name{plotbeta}
\alias{plotbeta}
\title{
Plot a functional parameter object with confidence limits
}
\description{
Plot a functional parameter object with confidence limits
}
\usage{
plotbeta(betaestlist, betastderrlist, argvals=NULL, xlab="", ...)
}
\arguments{
\item{betaestlist}{
a list containing one or mo... | /man/plotbeta.Rd | no_license | cran/fda | R | false | false | 913 | rd | \name{plotbeta}
\alias{plotbeta}
\title{
Plot a functional parameter object with confidence limits
}
\description{
Plot a functional parameter object with confidence limits
}
\usage{
plotbeta(betaestlist, betastderrlist, argvals=NULL, xlab="", ...)
}
\arguments{
\item{betaestlist}{
a list containing one or mo... |
# Within subjects ANOVA (general case)
#' Necessary sample size to reach desired power for a within-subjects ANOVA with
#' any number of factors using an uncertainty and publication bias correction
#' procedure
#'
#' @description \code{ss.power.wa.general} returns the necessary per-group
#' sample size to ach... | /R/ss.power.wa.general.R | no_license | cran/BUCSS | R | false | false | 10,244 | r | # Within subjects ANOVA (general case)
#' Necessary sample size to reach desired power for a within-subjects ANOVA with
#' any number of factors using an uncertainty and publication bias correction
#' procedure
#'
#' @description \code{ss.power.wa.general} returns the necessary per-group
#' sample size to ach... |
testlist <- list(type = 1869636974L, z = 1.32515051110006e-105)
result <- do.call(esreg::G1_fun,testlist)
str(result) | /esreg/inst/testfiles/G1_fun/libFuzzer_G1_fun/G1_fun_valgrind_files/1609891926-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 117 | r | testlist <- list(type = 1869636974L, z = 1.32515051110006e-105)
result <- do.call(esreg::G1_fun,testlist)
str(result) |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/white-center-place.R
\name{prepare_white_center_place}
\alias{prepare_white_center_place}
\alias{make_white_center_place}
\title{Make White Center Place}
\usage{
prepare_white_center_place(path)
make_white_center_place(path)
}
\value{
a MULT... | /man/white-center-place.Rd | permissive | tiernanmartin/NeighborhoodChangeTypology | R | false | true | 413 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/white-center-place.R
\name{prepare_white_center_place}
\alias{prepare_white_center_place}
\alias{make_white_center_place}
\title{Make White Center Place}
\usage{
prepare_white_center_place(path)
make_white_center_place(path)
}
\value{
a MULT... |
#Script to get distribution of FST values under neutral model using MSMS simulated genos
#103012019
setwd("~/ms_sims/extra_sims/Quart_Founder/")
#Loading packages
x <- c("adegenet", "hierfstat")
lapply(x, FUN = function(X) {
do.call("library", list(X))
})
#function to paste alleles 1 and 2 together on same line... | /msms_sim_analysis_FSTvalsPart10.R | no_license | mcadamme/GA_and_GAR | R | false | false | 1,092 | r | #Script to get distribution of FST values under neutral model using MSMS simulated genos
#103012019
setwd("~/ms_sims/extra_sims/Quart_Founder/")
#Loading packages
x <- c("adegenet", "hierfstat")
lapply(x, FUN = function(X) {
do.call("library", list(X))
})
#function to paste alleles 1 and 2 together on same line... |
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# This is a bundled copy of
# https://github.com/satijalab/seurat/blob/master/R/differential_expression.R
# only to over-write the behaviour of FindMarkers and derivatives ...
# this addition is intended to preserve compatibility in the o... | /R/seurat_utils.R | permissive | jspaezp/sctree | R | false | false | 59,332 | r |
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# This is a bundled copy of
# https://github.com/satijalab/seurat/blob/master/R/differential_expression.R
# only to over-write the behaviour of FindMarkers and derivatives ...
# this addition is intended to preserve compatibility in the o... |
library(plyr)
library(dplyr)
df1 <- read.table("X_test.txt", stringsAsFactors = FALSE)
df2 <- read.table("features.txt", stringsAsFactors = FALSE)
vec1 <- df2[,2]
names(df1) <- vec1
df3 <- read.table("y_test.txt", stringsAsFactors = FALSE)
act_lab <- read.table("activity_labels.txt", stringsAsFactors = FALSE)
df5 <... | /run_analysis.R | no_license | TarunSin/TidyData | R | false | false | 1,169 | r | library(plyr)
library(dplyr)
df1 <- read.table("X_test.txt", stringsAsFactors = FALSE)
df2 <- read.table("features.txt", stringsAsFactors = FALSE)
vec1 <- df2[,2]
names(df1) <- vec1
df3 <- read.table("y_test.txt", stringsAsFactors = FALSE)
act_lab <- read.table("activity_labels.txt", stringsAsFactors = FALSE)
df5 <... |
#' Sample-mean Estimation
#'
#' Cluster cells using SNN and a list of given genes, estimate missing expression
#' values for each cell-gene combination with the within-cluster non-zero expression
#' mean
#'
#'
#' @param expression_matrix Row by column log-normalized expression matrix
#' @param subset_genes A vector of... | /R/imputation.R | no_license | RubD/rescue | R | false | false | 10,250 | r |
#' Sample-mean Estimation
#'
#' Cluster cells using SNN and a list of given genes, estimate missing expression
#' values for each cell-gene combination with the within-cluster non-zero expression
#' mean
#'
#'
#' @param expression_matrix Row by column log-normalized expression matrix
#' @param subset_genes A vector of... |
#!usr/bin/env Rscript
library(methods)
library(Matrix)
library(MASS)
#library(Rcpp)
library(lme4)
# Read in your data as an R dataframe
basedir <- c("/seastor/helenhelen/ISR_2015")
resultdir <- paste(basedir,"/me/tmap/results/mem",sep="/")
setwd(resultdir)
r.itemInfo <- matrix(data=NA, nr=2, nc=4)
## read data
#get dat... | /ROI_based/me/mem/itemInfo_DG_RANG.R | no_license | QQXiao/ISR_2015 | R | false | false | 1,618 | r | #!usr/bin/env Rscript
library(methods)
library(Matrix)
library(MASS)
#library(Rcpp)
library(lme4)
# Read in your data as an R dataframe
basedir <- c("/seastor/helenhelen/ISR_2015")
resultdir <- paste(basedir,"/me/tmap/results/mem",sep="/")
setwd(resultdir)
r.itemInfo <- matrix(data=NA, nr=2, nc=4)
## read data
#get dat... |
# SSF, Alaska, cygwin, RCP: 8.5
# split catch by taxa and store in global env
split_Alaska <- split(alaska_ssf_cygwin, alaska_ssf_cygwin$taxonID)
list2env(split_Alaska, envir = .GlobalEnv)
cygwin_RCP85 <- read.csv("C:/Users/angmel/Documents/MSc-small-scale-fisheries/DBEM x SAU/cygwin_RCP85.csv", header = FALSE) %>%
... | /DBEM x SAU/ssf_al_cygwin_85.R | no_license | angmelanie/small-scale-fisheries | R | false | false | 4,233 | r | # SSF, Alaska, cygwin, RCP: 8.5
# split catch by taxa and store in global env
split_Alaska <- split(alaska_ssf_cygwin, alaska_ssf_cygwin$taxonID)
list2env(split_Alaska, envir = .GlobalEnv)
cygwin_RCP85 <- read.csv("C:/Users/angmel/Documents/MSc-small-scale-fisheries/DBEM x SAU/cygwin_RCP85.csv", header = FALSE) %>%
... |
library(methods)
setClass("ecr.summary",
# ==== Inheritance
# ==== Properties
representation (
varname = "character",
detail = "logical",
type = "character",
by = "character",
to = "character",
summary = "data.frame"
)
)
... | /R/ecr.summary.class.R | no_license | Epiconcept-Paris/Epiconcepts | R | false | false | 2,079 | r | library(methods)
setClass("ecr.summary",
# ==== Inheritance
# ==== Properties
representation (
varname = "character",
detail = "logical",
type = "character",
by = "character",
to = "character",
summary = "data.frame"
)
)
... |
\name{s_summarise}
\alias{s_summarise}
\title{Modified version of dplyr's summarise that uses string arguments}
\usage{
s_summarise(.data, ...)
}
\description{
Modified version of dplyr's summarise that uses string
arguments
}
| /man/s_summarise.Rd | no_license | arturochian/modify | R | false | false | 228 | rd | \name{s_summarise}
\alias{s_summarise}
\title{Modified version of dplyr's summarise that uses string arguments}
\usage{
s_summarise(.data, ...)
}
\description{
Modified version of dplyr's summarise that uses string
arguments
}
|
#!/usr/bin/R
# ---------------------------------------------------------------------------- #
library("optparse")
option_list <- list(
make_option(c("-r", "--reference_csv"), type="character", default=NULL,
help="csv ID locations", metavar="character"),
make_option(c("-d", "--rates"), type="charact... | /02-alignments_and_rates/bin/dn_ds_measurements_mouse_coord.R | permissive | roddypr/divergent_gerbil_genes | R | false | false | 1,670 | r | #!/usr/bin/R
# ---------------------------------------------------------------------------- #
library("optparse")
option_list <- list(
make_option(c("-r", "--reference_csv"), type="character", default=NULL,
help="csv ID locations", metavar="character"),
make_option(c("-d", "--rates"), type="charact... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/park_wait_time.R
\name{park_wait_times}
\alias{park_wait_times}
\title{Get park wait times}
\usage{
park_wait_times(park)
}
\arguments{
\item{park}{Park ID, see \code{parks()}}
}
\description{
Return a list of park wait times.
}
\examples{
pa... | /man/park_wait_times.Rd | permissive | r4fun/themeparks | R | false | true | 368 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/park_wait_time.R
\name{park_wait_times}
\alias{park_wait_times}
\title{Get park wait times}
\usage{
park_wait_times(park)
}
\arguments{
\item{park}{Park ID, see \code{parks()}}
}
\description{
Return a list of park wait times.
}
\examples{
pa... |
# CM3050 - An?lise de S?ries Temporais
# Encontro 04 - 18/09/2019 - Series temporais e scripts
# script "qualidade_do_ar.R
# Desenha o grafico da serie temporal interna "AirPassenger", da
# biblioteca "datasets". Emseguida, insere no grafico a linha
# de valor medio da serie e sua linha de tendencia
data("AirPassenger... | /files/qualidade_do_ar.R | no_license | matheusmf1/TimeSeriesAnalysis | R | false | false | 1,269 | r | # CM3050 - An?lise de S?ries Temporais
# Encontro 04 - 18/09/2019 - Series temporais e scripts
# script "qualidade_do_ar.R
# Desenha o grafico da serie temporal interna "AirPassenger", da
# biblioteca "datasets". Emseguida, insere no grafico a linha
# de valor medio da serie e sua linha de tendencia
data("AirPassenger... |
#' Load entries of the sidb
#'
#' @param path character string with the path where isdb is stored
#' @return R list with all entries
#' @export
#' @examples
#' sidb=loadEntries()
loadEntries <- function(path="~/sidb/data/") {
entryNames=list.dirs(path, full.names=FALSE, recursive=FALSE)
sidbList=lapply(entryNames,... | /Rpkg/R/loadEntries.R | no_license | GHGModels/sidb | R | false | false | 368 | r | #' Load entries of the sidb
#'
#' @param path character string with the path where isdb is stored
#' @return R list with all entries
#' @export
#' @examples
#' sidb=loadEntries()
loadEntries <- function(path="~/sidb/data/") {
entryNames=list.dirs(path, full.names=FALSE, recursive=FALSE)
sidbList=lapply(entryNames,... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/test_coverage.R
\name{test_coverage}
\alias{test_coverage}
\title{Test coverage of package}
\usage{
test_coverage(from_tags = TRUE, from_desc = TRUE)
}
\arguments{
\item{from_tags}{\code{logical} scalar. Checks the files if your test director... | /man/test_coverage.Rd | no_license | jimsforks/testthis | R | false | true | 1,583 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/test_coverage.R
\name{test_coverage}
\alias{test_coverage}
\title{Test coverage of package}
\usage{
test_coverage(from_tags = TRUE, from_desc = TRUE)
}
\arguments{
\item{from_tags}{\code{logical} scalar. Checks the files if your test director... |
###Step 1###
library(tree)
crx = read.csv("crx.csv")
#View(crx)
n=dim(crx)[1]
set.seed(12345)
id=sample(1:n, floor(n*0.8))
training=crx[id,]
test=crx[-id,]
# id = n*0.8
# training=crx[1:id,]
# test=crx[id+1:n,]
training.modified = training
training.modified[,ncol(training.modified)] = as.factor(training.modified[,ncol... | /ML-Labs/Annalisa/tenta1/Assignment_1.R | no_license | Aroonii/MachineLearning_TDDE01 | R | false | false | 2,398 | r | ###Step 1###
library(tree)
crx = read.csv("crx.csv")
#View(crx)
n=dim(crx)[1]
set.seed(12345)
id=sample(1:n, floor(n*0.8))
training=crx[id,]
test=crx[-id,]
# id = n*0.8
# training=crx[1:id,]
# test=crx[id+1:n,]
training.modified = training
training.modified[,ncol(training.modified)] = as.factor(training.modified[,ncol... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/SR_plot_true_y_VS_predicted_y.R
\name{SR_plot_true_y_VS_predicted_y}
\alias{SR_plot_true_y_VS_predicted_y}
\title{Plot true y vs. predicted y}
\usage{
SR_plot_true_y_VS_predicted_y(
true_y,
predicted_y,
path_output = NULL,
save = FALS... | /man/SR_plot_true_y_VS_predicted_y.Rd | permissive | samuelreuther/SRfunctions | R | false | true | 795 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/SR_plot_true_y_VS_predicted_y.R
\name{SR_plot_true_y_VS_predicted_y}
\alias{SR_plot_true_y_VS_predicted_y}
\title{Plot true y vs. predicted y}
\usage{
SR_plot_true_y_VS_predicted_y(
true_y,
predicted_y,
path_output = NULL,
save = FALS... |
source("Metropolis Hastings - Random walk example.R", echo=F)
getwd()
setwd("C:/Users/Jaehwan M/Dropbox/Bayesian Statistics")
## example of good traceplot
set.seed(61)
post0 = mh(n=n, ybar=ybar, n_iter=4e3, mu_init=0, cand_sd=0.9)
library("coda")
traceplot(as.mcmc(post0$mu[-c(1:500)]))
start_indx = 1
nsim ... | /lesson_06.R | no_license | troym91/Bayesian-Statistics | R | false | false | 2,011 | r | source("Metropolis Hastings - Random walk example.R", echo=F)
getwd()
setwd("C:/Users/Jaehwan M/Dropbox/Bayesian Statistics")
## example of good traceplot
set.seed(61)
post0 = mh(n=n, ybar=ybar, n_iter=4e3, mu_init=0, cand_sd=0.9)
library("coda")
traceplot(as.mcmc(post0$mu[-c(1:500)]))
start_indx = 1
nsim ... |
library(RSQLite)
library(tidyverse)
library(tm)
library("XML")
library("rvest")
db <- dbConnect(RSQLite::SQLite(), dbname="news_saturation (research).sqlite")
news <- dbGetQuery(db, "SELECT * FROM top_news")
sources <- c("associated-press","al-jazeera-english","bbc-news","bloomberg",
"business-insider"... | /news_scraper.R | no_license | rampje/News-Saturation | R | false | false | 1,683 | r | library(RSQLite)
library(tidyverse)
library(tm)
library("XML")
library("rvest")
db <- dbConnect(RSQLite::SQLite(), dbname="news_saturation (research).sqlite")
news <- dbGetQuery(db, "SELECT * FROM top_news")
sources <- c("associated-press","al-jazeera-english","bbc-news","bloomberg",
"business-insider"... |
################################################################################
# Utilities for extracting features from the original data
################################################################################
#' @title Get prefixes up to a character in a vector of strings
#' @importFrom stringr str_extrac... | /R/featurizing.R | no_license | krisrs1128/cleanUtils | R | false | false | 915 | r |
################################################################################
# Utilities for extracting features from the original data
################################################################################
#' @title Get prefixes up to a character in a vector of strings
#' @importFrom stringr str_extrac... |
\name{sw}
\alias{sw}
\docType{data}
\title{A dataset of grids for producing spatial predictions of seabed mud content in the southwest Australia Exclusive Economic Zone}
\description{This dataset contains 500703 rows of 2 variables including
longitude (long), latitude (lat).}
\usage{data("sw")}
\format{
A dat... | /man/sw.Rd | no_license | cran/spm | R | false | false | 837 | rd | \name{sw}
\alias{sw}
\docType{data}
\title{A dataset of grids for producing spatial predictions of seabed mud content in the southwest Australia Exclusive Economic Zone}
\description{This dataset contains 500703 rows of 2 variables including
longitude (long), latitude (lat).}
\usage{data("sw")}
\format{
A dat... |
#load gwas results
df<-read.table('/data/g***/z***/hihost_gwas/manh_plot/pooled/sig.txt',header = T,stringsAsFactors = F)
#only keeps pheno with genome-wide sig
gwsig<-aggregate(df$P,list(df$phecode),function(x) min(x,na.rm = T))
gwsig<-gwsig[gwsig[,2]<5e-8,]
df<-df[which(df$phecode %in% gwsig[,1]),]
df<-df[!is... | /src/BioVU_EA_23k_ID_GWAS_Manhattan_plot.r | permissive | gamazonlab/InfectiousDiseaseResource | R | false | false | 3,524 | r | #load gwas results
df<-read.table('/data/g***/z***/hihost_gwas/manh_plot/pooled/sig.txt',header = T,stringsAsFactors = F)
#only keeps pheno with genome-wide sig
gwsig<-aggregate(df$P,list(df$phecode),function(x) min(x,na.rm = T))
gwsig<-gwsig[gwsig[,2]<5e-8,]
df<-df[which(df$phecode %in% gwsig[,1]),]
df<-df[!is... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{Illumina_to_REFSEQ_MRNA}
\alias{Illumina_to_REFSEQ_MRNA}
\title{Illumina to REFSEQ_MRNA tabel
GEOD.adf <- fread('Illumina HumanHT-12_V4.0_A-GEOD-13475.adf.txt')
setnames(GEOD.adf,'Reporter Database Entry [genbank]... | /man/Illumina_to_REFSEQ_MRNA.Rd | no_license | GrosseLab/BGSC | R | false | true | 1,319 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{Illumina_to_REFSEQ_MRNA}
\alias{Illumina_to_REFSEQ_MRNA}
\title{Illumina to REFSEQ_MRNA tabel
GEOD.adf <- fread('Illumina HumanHT-12_V4.0_A-GEOD-13475.adf.txt')
setnames(GEOD.adf,'Reporter Database Entry [genbank]... |
library(tidyverse)
library(data.table)
library(writexl)
library(segmented)
library(MASS)
library(caret)
rm(list=ls())
set.seed(123)
###--- Set parameters
# setting the working directory and select the datasets
#### Settings
sspp= "MUT"
gsa="17" #assign gsa code to input file name (i.e. 9_11_ for two GSAs)
sel="tot... | /step_3_piecewise_and_spearman_sim.R | no_license | EnricoNArmelloni/MSFD | R | false | false | 10,680 | r | library(tidyverse)
library(data.table)
library(writexl)
library(segmented)
library(MASS)
library(caret)
rm(list=ls())
set.seed(123)
###--- Set parameters
# setting the working directory and select the datasets
#### Settings
sspp= "MUT"
gsa="17" #assign gsa code to input file name (i.e. 9_11_ for two GSAs)
sel="tot... |
likelihood_vl <- function(obs, predicted, sd, min_vl=0, limit_quantification=2){
normal_vl <- which(obs > limit_quantification)
unquantified_vl <- which(obs <= limit_quantification & obs > min_vl)
low_vl <- which(obs <= min_vl)
#liks <- dnorm(obs, predicted, sd, TRUE)
liks <- numeric(length(obs))
liks... | /code/viral_kinetics/functions/model_funcs_multivariate_hinge.R | permissive | cleary-lab/covid19-group-tests | R | false | false | 4,767 | r | likelihood_vl <- function(obs, predicted, sd, min_vl=0, limit_quantification=2){
normal_vl <- which(obs > limit_quantification)
unquantified_vl <- which(obs <= limit_quantification & obs > min_vl)
low_vl <- which(obs <= min_vl)
#liks <- dnorm(obs, predicted, sd, TRUE)
liks <- numeric(length(obs))
liks... |
## for single embryo diapause RNA-Seq data files made by Kallisto
library(sleuth)
library(Biobase)
## to set the "Diapause_transcritome" as the working directory
setwd("/Users/Chi-Kuo/Dropbox/Diapause_transcriptome") # Set it to your current working directory
##### ========================================... | /DE/seDE_analysis_with_sleuth.R | no_license | oplz/African_Killifish_Diapause | R | false | false | 6,919 | r | ## for single embryo diapause RNA-Seq data files made by Kallisto
library(sleuth)
library(Biobase)
## to set the "Diapause_transcritome" as the working directory
setwd("/Users/Chi-Kuo/Dropbox/Diapause_transcriptome") # Set it to your current working directory
##### ========================================... |
library(BuenColors)
library(data.table)
library(dplyr)
neighbors <- c("NFASC", "CNTN2", "RBBP5", "DSTYK", "NUAK2", "KLHDC8A", "LEMD1", "CDK18", "TMEM81")
df <- fread("output/RNAseq-g1_NC_Padj01.tsv") %>% data.frame()
df$color <- ifelse(df$gene == "TMCC2", "TMCC2", ifelse(df$gene %in% neighbors, "Neighbor", "other"))
... | /tmcc2/crispri_DE/03_plot.R | no_license | sankaranlab/erythroid-profiling | R | false | false | 716 | r | library(BuenColors)
library(data.table)
library(dplyr)
neighbors <- c("NFASC", "CNTN2", "RBBP5", "DSTYK", "NUAK2", "KLHDC8A", "LEMD1", "CDK18", "TMEM81")
df <- fread("output/RNAseq-g1_NC_Padj01.tsv") %>% data.frame()
df$color <- ifelse(df$gene == "TMCC2", "TMCC2", ifelse(df$gene %in% neighbors, "Neighbor", "other"))
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/logLik.R
\name{logLik.grpreg}
\alias{logLik.grpreg}
\alias{logLik}
\alias{logLik.grpsurv}
\title{logLik method for grpreg}
\usage{
\method{logLik}{grpreg}(object, df.method = c("default", "active"), REML = FALSE, ...)
\method{logLik}{grpsurv... | /man/logLik.grpreg.Rd | no_license | pbreheny/grpreg | R | false | true | 1,804 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/logLik.R
\name{logLik.grpreg}
\alias{logLik.grpreg}
\alias{logLik}
\alias{logLik.grpsurv}
\title{logLik method for grpreg}
\usage{
\method{logLik}{grpreg}(object, df.method = c("default", "active"), REML = FALSE, ...)
\method{logLik}{grpsurv... |
#Polynomial Linear Regression
#Importing the dataset
dataset = read.csv('Position_Salaries.csv')
dataset= dataset[2:3]
#Fitting linear regression to the dataset
linreg=lm(formula=Salary~.,
data=dataset)
#Fittin polynomial linear regression to the dataset
dataset$Level2=dataset$Level^2
dataset$Level3=dataset$... | /Polynomial Regression.R | no_license | srees16/ML-Deep-Learning-R | R | false | false | 1,362 | r | #Polynomial Linear Regression
#Importing the dataset
dataset = read.csv('Position_Salaries.csv')
dataset= dataset[2:3]
#Fitting linear regression to the dataset
linreg=lm(formula=Salary~.,
data=dataset)
#Fittin polynomial linear regression to the dataset
dataset$Level2=dataset$Level^2
dataset$Level3=dataset$... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/encoding_methods.R
\name{encode_one_hot}
\alias{encode_one_hot}
\title{One-hot encoder}
\usage{
encode_one_hot(sequence, max_length = 4034)
}
\arguments{
\item{sequence}{Sequence in a string format.}
\item{max_length}{Maximum length of seque... | /man/encode_one_hot.Rd | no_license | cran/deepredeff | R | false | true | 612 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/encoding_methods.R
\name{encode_one_hot}
\alias{encode_one_hot}
\title{One-hot encoder}
\usage{
encode_one_hot(sequence, max_length = 4034)
}
\arguments{
\item{sequence}{Sequence in a string format.}
\item{max_length}{Maximum length of seque... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pub01_utilityFuncs.R
\name{rtn.lastperiods}
\alias{rtn.lastperiods}
\title{rtn.lastperiods}
\usage{
rtn.lastperiods(rtn, periods = list(months(1), months(3), months(6), years(1),
years(3), years(5)))
}
\arguments{
\item{rtn}{an xts, vector,... | /man/rtn.lastperiods.Rd | no_license | raphael210/QUtility | R | false | true | 866 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pub01_utilityFuncs.R
\name{rtn.lastperiods}
\alias{rtn.lastperiods}
\title{rtn.lastperiods}
\usage{
rtn.lastperiods(rtn, periods = list(months(1), months(3), months(6), years(1),
years(3), years(5)))
}
\arguments{
\item{rtn}{an xts, vector,... |
## Format sample data prepared in <Calculate_AlternateSumPCBs.R> for
## Table S4, sample data:
## 1. add replicate letters
## 2. covert pct.det to percentages
## 3. round pcb sums to one dec place
## 4. reorder columns/remove sys_smp_code and stn_id
##
## Input: <AllSampleData_CompareSums.csv>
##
## Output: <TabVa... | /PrepareTables_S3_SampleData.R | no_license | ppgibson/MSQ_DataPaper_Anl | R | false | false | 2,489 | r | ## Format sample data prepared in <Calculate_AlternateSumPCBs.R> for
## Table S4, sample data:
## 1. add replicate letters
## 2. covert pct.det to percentages
## 3. round pcb sums to one dec place
## 4. reorder columns/remove sys_smp_code and stn_id
##
## Input: <AllSampleData_CompareSums.csv>
##
## Output: <TabVa... |
#######################################################################
# seriation - Infrastructure for seriation
# Copyright (C) 2011 Michael Hahsler, Christian Buchta and Kurt Hornik
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as pub... | /R/permute.R | no_license | cran/seriation | R | false | false | 10,629 | r | #######################################################################
# seriation - Infrastructure for seriation
# Copyright (C) 2011 Michael Hahsler, Christian Buchta and Kurt Hornik
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as pub... |
# Data for Feb 1, 2007 and Feb 2, 2007 was extracted from
# household_power_consumption.txt using two grep commands:
#
# grep "^1/2/2007" household_power_consumption.txt > 20070201
# grep "^2/2/2007" household_power_consumption.txt > 20070202
#
# The header line was extracted from household_power_consumption.txt
# by ... | /plot1.R | no_license | spamsickle/ExData_Plotting1 | R | false | false | 1,020 | r | # Data for Feb 1, 2007 and Feb 2, 2007 was extracted from
# household_power_consumption.txt using two grep commands:
#
# grep "^1/2/2007" household_power_consumption.txt > 20070201
# grep "^2/2/2007" household_power_consumption.txt > 20070202
#
# The header line was extracted from household_power_consumption.txt
# by ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tclustreg.R
\name{tclustreg}
\alias{tclustreg}
\title{Computes robust linear grouping analysis}
\usage{
tclustreg(
y,
x,
k,
alphaLik,
alphaX,
restrfactor = 12,
intercept = TRUE,
plot = FALSE,
nsamp,
refstep... | /man/tclustreg.Rd | no_license | cran/fsdaR | R | false | true | 12,123 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tclustreg.R
\name{tclustreg}
\alias{tclustreg}
\title{Computes robust linear grouping analysis}
\usage{
tclustreg(
y,
x,
k,
alphaLik,
alphaX,
restrfactor = 12,
intercept = TRUE,
plot = FALSE,
nsamp,
refstep... |
library(tidyverse)
library(gggenes)
library(data.table)
library(RColorBrewer)
target_cluster = "aminocoumarin"
clusters = list.files(path = sprintf("data/antismash/%s//",target_cluster),
pattern = ".gff.1", recursive = T, full.names = T)
clusters = lapply(clusters,
rtracklayer::read... | /src/plot_cluster_aminocoumarin.R | no_license | rajwanir/flongle_actinomycetes_paper | R | false | false | 5,367 | r | library(tidyverse)
library(gggenes)
library(data.table)
library(RColorBrewer)
target_cluster = "aminocoumarin"
clusters = list.files(path = sprintf("data/antismash/%s//",target_cluster),
pattern = ".gff.1", recursive = T, full.names = T)
clusters = lapply(clusters,
rtracklayer::read... |
library(e1071)
dataset <- datasetbyday
rmse <- function(error)
{
sqrt(mean(error^2))
}
endmethod <- function()
{
print("---------------------")
}
k_cross_valid_svm_setup <- 1
print_mse <- FALSE
ren_dataset <- dataset
#dataset$DiaHora <- (dataset$Dia * 24) + dataset$Hora
names(dataset) <- c("Dia", "Global", "S... | /regressional.R | no_license | lquatrin/ihepcds-MLRegression | R | false | false | 4,067 | r | library(e1071)
dataset <- datasetbyday
rmse <- function(error)
{
sqrt(mean(error^2))
}
endmethod <- function()
{
print("---------------------")
}
k_cross_valid_svm_setup <- 1
print_mse <- FALSE
ren_dataset <- dataset
#dataset$DiaHora <- (dataset$Dia * 24) + dataset$Hora
names(dataset) <- c("Dia", "Global", "S... |
##############################################################
## USE LCA TO GROUP STUDENTS BASED ON THE PATHS THEY FOLLOWED
## THROUGHOUT THE COURSE (WEEKS 2-13)
##############################################################
clusters.w213 <- read.csv(file = "Intermediate_files/original_weekly_clusters_w2_to_w13_(feb... | /USYD_14_d2u/LCA_with_weekly_clusters.R | no_license | abelardopardo/Flipped_course_analysis | R | false | false | 6,305 | r | ##############################################################
## USE LCA TO GROUP STUDENTS BASED ON THE PATHS THEY FOLLOWED
## THROUGHOUT THE COURSE (WEEKS 2-13)
##############################################################
clusters.w213 <- read.csv(file = "Intermediate_files/original_weekly_clusters_w2_to_w13_(feb... |
## FAST TOOL Targets COP FY18
## A.Chafetz, USAID
## Purpose: targets to populate FAST Tool
## Date: Dec 22, 2017
## DEPENDENCIES
# ICPI Fact View PSNUxIM w/FY18 Targets
# COP MATRIX REPORT from FACTSInfo
library(tidyverse)
## IMPORT -----------------------------------------------------------------------... | /Other/FAST_Tool_targets.R | no_license | cadelson/ICPI_Projects | R | false | false | 4,668 | r | ## FAST TOOL Targets COP FY18
## A.Chafetz, USAID
## Purpose: targets to populate FAST Tool
## Date: Dec 22, 2017
## DEPENDENCIES
# ICPI Fact View PSNUxIM w/FY18 Targets
# COP MATRIX REPORT from FACTSInfo
library(tidyverse)
## IMPORT -----------------------------------------------------------------------... |
context('Join')
p0 <- list(param = data.frame(p0 = 3.2))
p1 <- list(param = data.frame(p1 = c(4)))
p2 <- list(param = data.frame(p2 = c(TRUE, FALSE)))
p3 <- list(param = data.frame(p3a = 'foo',
p3b = c(5, 7)))
pv1 <- list(param = data.frame(p4 = TRUE),
value = list(list(v1 = ... | /tests/testthat/test_join.R | permissive | kostrzewa/paramvalf | R | false | false | 1,115 | r | context('Join')
p0 <- list(param = data.frame(p0 = 3.2))
p1 <- list(param = data.frame(p1 = c(4)))
p2 <- list(param = data.frame(p2 = c(TRUE, FALSE)))
p3 <- list(param = data.frame(p3a = 'foo',
p3b = c(5, 7)))
pv1 <- list(param = data.frame(p4 = TRUE),
value = list(list(v1 = ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/personalize_operations.R
\name{personalize_get_solution_metrics}
\alias{personalize_get_solution_metrics}
\title{Gets the metrics for the specified solution version}
\usage{
personalize_get_solution_metrics(solutionVersionArn)
}
\arguments{
\... | /paws/man/personalize_get_solution_metrics.Rd | permissive | johnnytommy/paws | R | false | true | 633 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/personalize_operations.R
\name{personalize_get_solution_metrics}
\alias{personalize_get_solution_metrics}
\title{Gets the metrics for the specified solution version}
\usage{
personalize_get_solution_metrics(solutionVersionArn)
}
\arguments{
\... |
#' @name comma
#' @title Shortcut to add comma formatting
#' @author Gene Leynes
#'
#' @param x Number or vector of numbers
#' @param nDigits Number of trailing digits. Default is 2
#'
#' @description
#' Simple shortcut to make numbers into text with commas and some
#' trailing decmimal digits. Just a ... | /R/comma.R | no_license | geneorama/geneorama | R | false | false | 1,361 | r | #' @name comma
#' @title Shortcut to add comma formatting
#' @author Gene Leynes
#'
#' @param x Number or vector of numbers
#' @param nDigits Number of trailing digits. Default is 2
#'
#' @description
#' Simple shortcut to make numbers into text with commas and some
#' trailing decmimal digits. Just a ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plotResult.R
\name{plotResult}
\alias{plotResult}
\title{This function has been created to plot PROCESSED data results
It is very Module-specific}
\usage{
plotResult(data, toPubblish, pathToSave)
}
\arguments{
\item{toPubblish}{}
\item{pathT... | /man/plotResult.Rd | no_license | ncwanner/Production_Validation | R | false | true | 437 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plotResult.R
\name{plotResult}
\alias{plotResult}
\title{This function has been created to plot PROCESSED data results
It is very Module-specific}
\usage{
plotResult(data, toPubblish, pathToSave)
}
\arguments{
\item{toPubblish}{}
\item{pathT... |
#' @useDynLib biClassify
#' @importFrom Rcpp evalCpp
#' @export KOS
#' @export SelectParams
NULL | /biClassify/R/biClassifyArmadillo.R | no_license | akhikolla/InformationHouse | R | false | false | 101 | r | #' @useDynLib biClassify
#' @importFrom Rcpp evalCpp
#' @export KOS
#' @export SelectParams
NULL |
#################################
### FRE7241 Homework #3 due Oct 27, 2015
#################################
# Max score 100pts
# Please write in this file the R code needed to perform the tasks below,
# rename it to your_name_hw4.R
# and upload the file to NYU Classes
############## Part I
# Summary: Simulate a tr... | /lecture_slides/FRE7241_HW4.R | no_license | fdoperezi/lecture_slides | R | false | false | 11,332 | r | #################################
### FRE7241 Homework #3 due Oct 27, 2015
#################################
# Max score 100pts
# Please write in this file the R code needed to perform the tasks below,
# rename it to your_name_hw4.R
# and upload the file to NYU Classes
############## Part I
# Summary: Simulate a tr... |
#Comencemos a ver algunos datos de béisbol y tratemos de responder sus preguntas utilizando estos datos.
#Primero, ¿los equipos que batean más jonrones anotan más carreras?
#Sabemos cuál será la respuesta a esto, pero veamos los datos de todos modos.
#Vamos a examinar los datos de 1961 a 2001.
#Terminamos en 2001... | /HC_BB_SB.R | no_license | wparedesgt/Regresiones | R | false | false | 3,144 | r | #Comencemos a ver algunos datos de béisbol y tratemos de responder sus preguntas utilizando estos datos.
#Primero, ¿los equipos que batean más jonrones anotan más carreras?
#Sabemos cuál será la respuesta a esto, pero veamos los datos de todos modos.
#Vamos a examinar los datos de 1961 a 2001.
#Terminamos en 2001... |
path <- system.file("extdata", package = "dslabs")
filename <- "life-expectancy-and-fertility-two-countries-example.csv"
filename <- file.path(path, filename)
raw_dat <- read_csv(filename)
select(raw_dat, 1:5)
# we gather all columns into one, call it key
dat <- raw_dat %>% gather(key, value,-country)
dat
# separ... | /PH125.6 Data Wrangling/R code/separate.R | no_license | alvarobarbera/HarvardX-PH125-DataScience | R | false | false | 639 | r | path <- system.file("extdata", package = "dslabs")
filename <- "life-expectancy-and-fertility-two-countries-example.csv"
filename <- file.path(path, filename)
raw_dat <- read_csv(filename)
select(raw_dat, 1:5)
# we gather all columns into one, call it key
dat <- raw_dat %>% gather(key, value,-country)
dat
# separ... |
pthres <- c(5E-08,1E-07,5E-07,1E-06,5E-06,1E-05,5E-05,1E-04,1E-03,1E-02,1E-01)
load("/data/zhangh24/MR_MA/result/simulation/prs/summary_gwas_our.rdata")
alpha_est_mat = result[[1]]
alpha_sd_mat = result[[2]]
alpha_p_mat = result[[3]]
gamma_est_mat = result[[4]]
gamma_sd_mat = result[[5]]
gamma_p_mat = result[[6]]
load... | /code/simulation/PRS/MR_analysis.R | no_license | andrewhaoyu/MR_MA | R | false | false | 7,962 | r | pthres <- c(5E-08,1E-07,5E-07,1E-06,5E-06,1E-05,5E-05,1E-04,1E-03,1E-02,1E-01)
load("/data/zhangh24/MR_MA/result/simulation/prs/summary_gwas_our.rdata")
alpha_est_mat = result[[1]]
alpha_sd_mat = result[[2]]
alpha_p_mat = result[[3]]
gamma_est_mat = result[[4]]
gamma_sd_mat = result[[5]]
gamma_p_mat = result[[6]]
load... |
## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
makeCacheMatrix <- function(x = matrix()) {
m <- NULL
set <- function(y) {
x <<- y
m <<- NULL
}
get <- function() x
setInverse <- function(inverse) m <<- inverse
get... | /cachematrix.R | no_license | Paulominandy/ProgrammingAssignment2 | R | false | false | 742 | r | ## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
makeCacheMatrix <- function(x = matrix()) {
m <- NULL
set <- function(y) {
x <<- y
m <<- NULL
}
get <- function() x
setInverse <- function(inverse) m <<- inverse
get... |
.onLoad <- function(libname, pkgname) {
shiny::registerInputHandler("echarts4rParse", function(data, ...) {
jsonlite::fromJSON(jsonlite::toJSON(data, auto_unbox = TRUE))
}, force = TRUE)
} | /R/zzz.R | no_license | elefank/echarts4r | R | false | false | 196 | r | .onLoad <- function(libname, pkgname) {
shiny::registerInputHandler("echarts4rParse", function(data, ...) {
jsonlite::fromJSON(jsonlite::toJSON(data, auto_unbox = TRUE))
}, force = TRUE)
} |
## single sample MPI
test.anno_single <- function() {
# if(require("Rmpi", quietly=TRUE)){
file <- system.file('mzdata/MM14.mzdata', package = "CAMERA")
xs <- xcmsSet(file, method="centWave", ppm=30, peakwidth=c(5,10))
an <- xsAnnotate(xs) # ,nSlaves=2) Disabled because of unconfigured RMPI on BioC B... | /inst/unitTests/test_findAdductsMPI.R | no_license | samsonjm/CAMERA | R | false | false | 2,110 | r | ## single sample MPI
test.anno_single <- function() {
# if(require("Rmpi", quietly=TRUE)){
file <- system.file('mzdata/MM14.mzdata', package = "CAMERA")
xs <- xcmsSet(file, method="centWave", ppm=30, peakwidth=c(5,10))
an <- xsAnnotate(xs) # ,nSlaves=2) Disabled because of unconfigured RMPI on BioC B... |
myfunction <- function () {
x <- rnorm (100)
mean(x)
]
second <- function (y){
y + rnorm (length(y))
}
myfunction <- function () {
}
| /Programmjng-R/Intro.R | no_license | farazrehman/datasciencecoursera | R | false | false | 149 | r | myfunction <- function () {
x <- rnorm (100)
mean(x)
]
second <- function (y){
y + rnorm (length(y))
}
myfunction <- function () {
}
|
mrn1 <-
read_csv(paste0(path, "/M2GEN/Garrick_raw data/10R20000134_2020-05-05_avatar_v2_clinical-with-events/MRN.csv")) %>%
rename(avatar_id = "AvatarKey")
mrn2 <-
read_csv(paste0(path, "/M2GEN/Garrick_raw data/10R20000134_2020-05-05_avatar_v4_clinical-with-events/MRN.csv")) %>%
rename(avatar_id = "AvatarKey"... | /R/04.sanity_check.R | no_license | GillisLabAtMoffitt/CHIP-Avatar | R | false | false | 14,690 | r | mrn1 <-
read_csv(paste0(path, "/M2GEN/Garrick_raw data/10R20000134_2020-05-05_avatar_v2_clinical-with-events/MRN.csv")) %>%
rename(avatar_id = "AvatarKey")
mrn2 <-
read_csv(paste0(path, "/M2GEN/Garrick_raw data/10R20000134_2020-05-05_avatar_v4_clinical-with-events/MRN.csv")) %>%
rename(avatar_id = "AvatarKey"... |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See LICENSE.txt in the project root for license information.
# --------------------------------------------------------------------... | /R/collaboration_fizz.R | permissive | Global19/wpa | R | false | false | 1,391 | r | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See LICENSE.txt in the project root for license information.
# --------------------------------------------------------------------... |
#Read data to workspace
data <- read.csv("household_power_consumption.txt", header = TRUE, sep = ";", na.strings = "?", check.names=F, stringsAsFactors=F, comment.char="", quote='\"')
# Convert date to R date format
data$Date <- as.Date(data$Date, format="%d/%m/%Y")
#Get the subset of data which is between 2007-02... | /plot3.R | no_license | olcaysah/ExData_Plotting1 | R | false | false | 1,058 | r |
#Read data to workspace
data <- read.csv("household_power_consumption.txt", header = TRUE, sep = ";", na.strings = "?", check.names=F, stringsAsFactors=F, comment.char="", quote='\"')
# Convert date to R date format
data$Date <- as.Date(data$Date, format="%d/%m/%Y")
#Get the subset of data which is between 2007-02... |
#' Create a traffic light plot
#'
#' This function creates for multiple time series an image plot where the color
#' code is based on selected quantiles or evenly spaced intervals.
#'
#' @name trafficlight
#' @param x matrix or data frame containing time series of multiple variables.
#' @param time vector of time units... | /R/trafficlight.R | no_license | saskiaotto/IEAtools | R | false | false | 9,599 | r | #' Create a traffic light plot
#'
#' This function creates for multiple time series an image plot where the color
#' code is based on selected quantiles or evenly spaced intervals.
#'
#' @name trafficlight
#' @param x matrix or data frame containing time series of multiple variables.
#' @param time vector of time units... |
rm(list=ls())
setwd("~")
####################
# Machine Learning #
# Decision Trees #
# #
####################
#install.packages(c("C50", "gmodels"))
library(tidyverse)
library(gmodels) # Herramientas para evaluar árbol de decisión
library('C50') # Genera el árbol de decisión
## ---------- Decisiones d... | /cancer.R | no_license | IVANRA7714/dataScience | R | false | false | 3,141 | r | rm(list=ls())
setwd("~")
####################
# Machine Learning #
# Decision Trees #
# #
####################
#install.packages(c("C50", "gmodels"))
library(tidyverse)
library(gmodels) # Herramientas para evaluar árbol de decisión
library('C50') # Genera el árbol de decisión
## ---------- Decisiones d... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/paws.comprehend_operations.R
\name{delete_document_classifier}
\alias{delete_document_classifier}
\title{Deletes a previously created document classifier}
\usage{
delete_document_classifier(DocumentClassifierArn)
}
\arguments{
\item{DocumentC... | /service/paws.comprehend/man/delete_document_classifier.Rd | permissive | CR-Mercado/paws | R | false | true | 1,018 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/paws.comprehend_operations.R
\name{delete_document_classifier}
\alias{delete_document_classifier}
\title{Deletes a previously created document classifier}
\usage{
delete_document_classifier(DocumentClassifierArn)
}
\arguments{
\item{DocumentC... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.