content large_stringlengths 0 6.46M | path large_stringlengths 3 331 | license_type large_stringclasses 2
values | repo_name large_stringlengths 5 125 | language large_stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 4 6.46M | extension large_stringclasses 75
values | text stringlengths 0 6.46M |
|---|---|---|---|---|---|---|---|---|---|
\name{runPMEDDS.demo}
\alias{runPMEDDS.demo}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
P-MEDDS MCMC demonstration using included ILI data.
}
\description{
This function is intended to demonstrate the output of a PMEDDS MCMC optimization with a minimal amount of user input. Using the use... | /SummerInern/p-medds-master/pmedds.core/man/runPMEDDS.demo.Rd | no_license | yinzhuoding/Internship | R | false | false | 2,470 | rd | \name{runPMEDDS.demo}
\alias{runPMEDDS.demo}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
P-MEDDS MCMC demonstration using included ILI data.
}
\description{
This function is intended to demonstrate the output of a PMEDDS MCMC optimization with a minimal amount of user input. Using the use... |
rm(list = ls())
gc()
# ------------
# DATA ANALYSIS ISSUE #33
#
# Study (working title): Need based decision making in a reinforcement learning task.
#
# Authors:
# - Markus D. Steiner (markus.d.steiner@gmail.com)
# - Nathaniel D. Phillips (Nathaniel.D.Phillips.is@gmail.com)
#
# I just told Jana abou... | /graveyard/S1_03_issue33.R | no_license | mdsteiner/GoalDirectedDecisionMaking | R | false | false | 4,788 | r | rm(list = ls())
gc()
# ------------
# DATA ANALYSIS ISSUE #33
#
# Study (working title): Need based decision making in a reinforcement learning task.
#
# Authors:
# - Markus D. Steiner (markus.d.steiner@gmail.com)
# - Nathaniel D. Phillips (Nathaniel.D.Phillips.is@gmail.com)
#
# I just told Jana abou... |
# $Id: ci.balance.R 453 2005-11-09 17:04:02Z warnes $
ci.balance <- function(x, est, confidence=0.95, alpha=1-confidence,
minval, maxval, na.rm=TRUE)
{
if( any(is.na(x) ) )
{
if( na.rm)
x <- na.omit(x)
else
stop("Missing values and NaN's not allowe... | /R/ci.balance.R | no_license | cran/genetics | R | false | false | 1,767 | r | # $Id: ci.balance.R 453 2005-11-09 17:04:02Z warnes $
ci.balance <- function(x, est, confidence=0.95, alpha=1-confidence,
minval, maxval, na.rm=TRUE)
{
if( any(is.na(x) ) )
{
if( na.rm)
x <- na.omit(x)
else
stop("Missing values and NaN's not allowe... |
CreateDTICohort <- function(...) {
.Call("CreateDTICohort", as.character(c(...)))
}
| /R/CreateDTICohort.R | no_license | stnava/itkImageR | R | false | false | 87 | r | CreateDTICohort <- function(...) {
.Call("CreateDTICohort", as.character(c(...)))
}
|
if(Sys.info()['user']=='s7m' | Sys.info()['user']=='janus829'){
source('~/Research/ForeignAid/RCode/setup.R') }
if(Sys.info()['user']=='cindycheng'){
source('~/Documents/Papers/ForeignAid/RCode/setup.R') }
#
loadPkg(c('lme4'))
################################################################
########################... | /RCode/Analysis/robustChecks/aidDependence.R | no_license | s7minhas/ForeignAid | R | false | false | 16,429 | r | if(Sys.info()['user']=='s7m' | Sys.info()['user']=='janus829'){
source('~/Research/ForeignAid/RCode/setup.R') }
if(Sys.info()['user']=='cindycheng'){
source('~/Documents/Papers/ForeignAid/RCode/setup.R') }
#
loadPkg(c('lme4'))
################################################################
########################... |
###
### R routines for the R package mvmeta (c)
#
par2Psi <-
function(par, k, bscov, control) {
#
################################################################################
#
Psi <- switch(bscov,
# IF UNSTRUCTURED, CROSSPRODUCT FROM CHOLESKY
unstr = {
L <- diag(0,k)
L[lower.tri... | /R/par2Psi.R | no_license | cran/mvmeta | R | false | false | 1,587 | r | ###
### R routines for the R package mvmeta (c)
#
par2Psi <-
function(par, k, bscov, control) {
#
################################################################################
#
Psi <- switch(bscov,
# IF UNSTRUCTURED, CROSSPRODUCT FROM CHOLESKY
unstr = {
L <- diag(0,k)
L[lower.tri... |
/gnome1/third_party_lib/qt libraries/RIncludes/InputSprocket.r | permissive | NOAA-ORR-ERD/PyGnome | R | false | false | 7,483 | r | ||
high <- fit_cbe[abs(fit_cbe$logFC)>1000,] %>% rownames()
highRna <- rna$CBE[high,]
highdf <- highRna$edata %>%
t() %>%
cbind(diagnosis = highRna$pdata$Diagnosis)
highdf_long <- highdf %>%
as.data.frame() %>%
tibble::rownames_to_column("subj") %>%
tidyr::pivot_longer(2:... | /data/preprocessNotes.R | no_license | XYCynthiaT/Alzheimer | R | false | false | 1,801 | r | high <- fit_cbe[abs(fit_cbe$logFC)>1000,] %>% rownames()
highRna <- rna$CBE[high,]
highdf <- highRna$edata %>%
t() %>%
cbind(diagnosis = highRna$pdata$Diagnosis)
highdf_long <- highdf %>%
as.data.frame() %>%
tibble::rownames_to_column("subj") %>%
tidyr::pivot_longer(2:... |
HPCFile <- "SourceData/household_power_consumption.txt"
HoldData <- read.table(HPCFile, header=TRUE, sep=";", stringsAsFactors=FALSE, dec=".")
TwoDays <- HoldData[HoldData$Date %in% c("1/2/2007","2/2/2007") ,]
GlobalActivePower <- as.numeric(TwoDays$Global_active_power)
png("Plot1.png", width=480, height=480)
hist(... | /Plot1.R | no_license | acinct/ExData_Plotting1 | R | false | false | 428 | r | HPCFile <- "SourceData/household_power_consumption.txt"
HoldData <- read.table(HPCFile, header=TRUE, sep=";", stringsAsFactors=FALSE, dec=".")
TwoDays <- HoldData[HoldData$Date %in% c("1/2/2007","2/2/2007") ,]
GlobalActivePower <- as.numeric(TwoDays$Global_active_power)
png("Plot1.png", width=480, height=480)
hist(... |
context("Tsallis")
# Load Paracou data (number of trees per species in two 1-ha plot of a tropical forest)
data(Paracou618)
# Ns is the total number of trees per species
Ns <- as.AbdVector(Paracou618.MC$Ns)
# Species probabilities
Ps <- as.ProbaVector(Paracou618.MC$Ns)
# Check Tsallis limit at 1 equals Shann... | /data/genthat_extracted_code/entropart/tests/testTsallis.R | no_license | surayaaramli/typeRrh | R | false | false | 1,015 | r | context("Tsallis")
# Load Paracou data (number of trees per species in two 1-ha plot of a tropical forest)
data(Paracou618)
# Ns is the total number of trees per species
Ns <- as.AbdVector(Paracou618.MC$Ns)
# Species probabilities
Ps <- as.ProbaVector(Paracou618.MC$Ns)
# Check Tsallis limit at 1 equals Shann... |
randomGUID <- function(n, length){
randomString <- c(1:n)
for (i in 1:n)
{
randomString[i] <- paste(sample(c(0:9, letters, LETTERS), length,
replace = TRUE), collapse = "")
}
return(randomString)
}
# Example creates a random GUID
randomGUID(n = 1, length ... | /randomGUID.R | no_license | chipoglesby/rSnippets | R | false | false | 326 | r | randomGUID <- function(n, length){
randomString <- c(1:n)
for (i in 1:n)
{
randomString[i] <- paste(sample(c(0:9, letters, LETTERS), length,
replace = TRUE), collapse = "")
}
return(randomString)
}
# Example creates a random GUID
randomGUID(n = 1, length ... |
2+2
1:100
#1. x assignment:
x<-1:5
x #[1] 1 2 3 4 5
#2. y assignment:
y <- c(6,7,8,9,10) # load data into a vector using the "c"ombine function
y <- a(16,7,8,9,10) #Error in a(16, 7, 8, 9, 10) : could not find function "a"
y #[1] 6 7 8 9 10
#3. x+y:
x+y #7 9 11 13 15
y<-c(10,11,12,13)
y #10 11 12 13
x+y # War... | /[Learning and Exercise] Data Science/R/code/foundation_lynda.R | no_license | ziweifan177/Data_Science_Pilot | R | false | false | 10,729 | r | 2+2
1:100
#1. x assignment:
x<-1:5
x #[1] 1 2 3 4 5
#2. y assignment:
y <- c(6,7,8,9,10) # load data into a vector using the "c"ombine function
y <- a(16,7,8,9,10) #Error in a(16, 7, 8, 9, 10) : could not find function "a"
y #[1] 6 7 8 9 10
#3. x+y:
x+y #7 9 11 13 15
y<-c(10,11,12,13)
y #10 11 12 13
x+y # War... |
#' Title
#'
#' @param model input model
#' @param type type of parameters to export
#'
#' @return a tibble
#' @export
#' @importFrom magrittr %>% %<>%
#' @import dplyr
format_fixef_table = function(model, type = "cond")
{
coef(summary(fit4))[[type]] %>%
as_tibble() %>%
select(-`z value`) %>%
bind_cols(
... | /R/format_fixef_table.R | permissive | ROBAS-UCLA/Brushing-Behavior | R | false | false | 750 | r | #' Title
#'
#' @param model input model
#' @param type type of parameters to export
#'
#' @return a tibble
#' @export
#' @importFrom magrittr %>% %<>%
#' @import dplyr
format_fixef_table = function(model, type = "cond")
{
coef(summary(fit4))[[type]] %>%
as_tibble() %>%
select(-`z value`) %>%
bind_cols(
... |
mat <- matrix(11:20, nrow = 2, byrow = TRUE)
mat
dim(mat) | /dsia_demo_codes/ch0623.R | no_license | jtlai0921/AEL018600_codes | R | false | false | 57 | r | mat <- matrix(11:20, nrow = 2, byrow = TRUE)
mat
dim(mat) |
cr_onehot <- function(predictors, matrix = TRUE, complete = TRUE) {
# convert to data.table if necessary
if (!is.data.table(predictors)) {
predictors <- copy(predictors)
setDT(predictors)
}
# select names of factor variables
factor_vars <- sapply(predictors, function(x) { length(levels(x))})
fa... | /cr_onehot.R | no_license | Dahbid/Scripts | R | false | false | 1,057 | r | cr_onehot <- function(predictors, matrix = TRUE, complete = TRUE) {
# convert to data.table if necessary
if (!is.data.table(predictors)) {
predictors <- copy(predictors)
setDT(predictors)
}
# select names of factor variables
factor_vars <- sapply(predictors, function(x) { length(levels(x))})
fa... |
##Load the data from the file 7.R.RData, and plot it using plot(x,y).
#Q1. What is the slope coefficient in a linear regression of y on x (to within 10%)? -0.67483
load("/Users/karenyang/Desktop/Statisical_Learning_Rcode/7.R.RData")
ls()
x
y
plot(x,y) # shows a negative relationship
model1 <- lm(y ~ x)
summary(model1... | /HW_Nonlinearity.R | no_license | manjunathprasad82/StatisticalLearning_classnotesHW | R | false | false | 1,644 | r | ##Load the data from the file 7.R.RData, and plot it using plot(x,y).
#Q1. What is the slope coefficient in a linear regression of y on x (to within 10%)? -0.67483
load("/Users/karenyang/Desktop/Statisical_Learning_Rcode/7.R.RData")
ls()
x
y
plot(x,y) # shows a negative relationship
model1 <- lm(y ~ x)
summary(model1... |
<?xml version="1.0" encoding="utf-8"?>
<serviceModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="ThreeInOneCloudService" generation="1" functional="0" release="0" Id="a1112409-2c41-456b-a852-89c99f7ce2fd" dslVersion="1.2.0.0" xmlns="http://schemas.microsoft.... | /ThreeInOneCloudService/csx/Release/ServiceDefinition.rd | no_license | LaughingBlue/ThreeInOneCloudService | R | false | false | 14,635 | rd | <?xml version="1.0" encoding="utf-8"?>
<serviceModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="ThreeInOneCloudService" generation="1" functional="0" release="0" Id="a1112409-2c41-456b-a852-89c99f7ce2fd" dslVersion="1.2.0.0" xmlns="http://schemas.microsoft.... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/log-tools.R
\name{slctn_log}
\alias{slctn_log}
\title{Log the GenBank selection made by a user}
\usage{
slctn_log(selection)
}
\arguments{
\item{selection}{selected GenBank sequences, named vector}
}
\description{
This function is called when... | /man/slctn_log.Rd | permissive | ropensci/restez | R | false | true | 2,564 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/log-tools.R
\name{slctn_log}
\alias{slctn_log}
\title{Log the GenBank selection made by a user}
\usage{
slctn_log(selection)
}
\arguments{
\item{selection}{selected GenBank sequences, named vector}
}
\description{
This function is called when... |
#' Normal Discriminant Function Approach for Estimating Odds Ratio with Exposure
#' Measured in Pools and Potentially Subject to Additive Normal Errors
#'
#' Assumes exposure given covariates and outcome is a normal-errors linear
#' regression. Pooled exposure measurements can be assumed precise or subject to
#' additi... | /R/p_ndfa.R | no_license | vandomed/pooling | R | false | false | 9,324 | r | #' Normal Discriminant Function Approach for Estimating Odds Ratio with Exposure
#' Measured in Pools and Potentially Subject to Additive Normal Errors
#'
#' Assumes exposure given covariates and outcome is a normal-errors linear
#' regression. Pooled exposure measurements can be assumed precise or subject to
#' additi... |
# Exercise 5: dplyr grouped operations
# Install the `"nycflights13"` package. Load (`library()`) the package.
# You'll also need to load `dplyr`
#install.packages("nycflights13") # should be done already
library("nycflights13")
library("dplyr")
# What was the average departure delay in each month?
# Save this as a ... | /chapter-11-exercises/exercise-5/exercise.R | permissive | Daniel-Penkov/book-exercises | R | false | false | 1,575 | r | # Exercise 5: dplyr grouped operations
# Install the `"nycflights13"` package. Load (`library()`) the package.
# You'll also need to load `dplyr`
#install.packages("nycflights13") # should be done already
library("nycflights13")
library("dplyr")
# What was the average departure delay in each month?
# Save this as a ... |
#' Create a data frame of mean expression of genes per cluster
#'
#' This function takes an object of class iCellR and creates an average gene expression for every cluster.
#' @param x An object of class iCellR.
#' @return An object of class iCellR.
#' @examples
#' demo.obj <- clust.avg.exp(demo.obj)
#'
#' head(demo.ob... | /R/F021.clust.avg.exp.R | no_license | Lelouchzhu/iCellR | R | false | false | 1,746 | r | #' Create a data frame of mean expression of genes per cluster
#'
#' This function takes an object of class iCellR and creates an average gene expression for every cluster.
#' @param x An object of class iCellR.
#' @return An object of class iCellR.
#' @examples
#' demo.obj <- clust.avg.exp(demo.obj)
#'
#' head(demo.ob... |
testlist <- list(a = 0L, b = 0L, x = c(786944L, 32768L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 128L, 8192L, -1L, 1560281088L, 0L, 0L, 0L, 0L))
result <- do.call(grattan:::anyOutside,testlist)
str(result) | /grattan/inst/testfiles/anyOutside/libFuzzer_anyOutside/anyOutside_valgrind_files/1610129993-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 246 | r | testlist <- list(a = 0L, b = 0L, x = c(786944L, 32768L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 128L, 8192L, -1L, 1560281088L, 0L, 0L, 0L, 0L))
result <- do.call(grattan:::anyOutside,testlist)
str(result) |
testlist <- list(a = 522133279L, b = 522133279L, x = c(1482184792L, 1482184792L, 1482184792L, 1482170143L, 522133279L, 522133279L, 522133279L, 522133279L, 522133279L, 522133279L, 522133279L, 522133279L, 522133279L, 522133279L))
result <- do.call(grattan:::anyOutside,testlist)
str(result) | /grattan/inst/testfiles/anyOutside/libFuzzer_anyOutside/anyOutside_valgrind_files/1610054717-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 291 | r | testlist <- list(a = 522133279L, b = 522133279L, x = c(1482184792L, 1482184792L, 1482184792L, 1482170143L, 522133279L, 522133279L, 522133279L, 522133279L, 522133279L, 522133279L, 522133279L, 522133279L, 522133279L, 522133279L))
result <- do.call(grattan:::anyOutside,testlist)
str(result) |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/vis_som.R
\name{vis_som_labeldist}
\alias{vis_som_labeldist}
\title{Visualize the distribution of labels in each RF}
\usage{
vis_som_labeldist(SOM, add = FALSE, subset = NULL, change.par = TRUE)
}
\arguments{
\item{SOM}{a SOM object}
\item{a... | /man/vis_som_labeldist.Rd | no_license | somdisco/SOMDisco | R | false | true | 1,367 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/vis_som.R
\name{vis_som_labeldist}
\alias{vis_som_labeldist}
\title{Visualize the distribution of labels in each RF}
\usage{
vis_som_labeldist(SOM, add = FALSE, subset = NULL, change.par = TRUE)
}
\arguments{
\item{SOM}{a SOM object}
\item{a... |
### obtained from qmedist function
set.seed(1)
pars.abx = c(2.7350040,0.1709258)
gammaA = 0.1964637
gammaAbx = 1/(1/gammaA - 1.1*rnorm(5e3,pars.abx[1],pars.abx[2]))
varnames = c('PK',
'S1a','S1b','S2',
'Ea1a','Ea1b','Ea2',
'Es1a','Es1b','Es2',
'Ia1a','Ia1b','Ia2',
... | /code/Simulations/vaxabx/abxboost/phi75vax/abx10.phi75vax.chol3sim.R | no_license | joelewnard/choleraHaiti | R | false | false | 10,104 | r | ### obtained from qmedist function
set.seed(1)
pars.abx = c(2.7350040,0.1709258)
gammaA = 0.1964637
gammaAbx = 1/(1/gammaA - 1.1*rnorm(5e3,pars.abx[1],pars.abx[2]))
varnames = c('PK',
'S1a','S1b','S2',
'Ea1a','Ea1b','Ea2',
'Es1a','Es1b','Es2',
'Ia1a','Ia1b','Ia2',
... |
library(ggplot2)
library(gg.gap)
library("RColorBrewer")
args = commandArgs(trailingOnly=TRUE)
DRAGEN_summary_data = read.csv2(args[1],sep=",",header=T,dec= '.')
DRAGEN_X_summary_data = read.csv2(args[2],sep=",",header=T,dec= '.')
outdir=args[3]
giab_snp_all<-data.frame(categary=c('DRAGEN_TRUTH_TP', 'DRA... | /draw_compareBarplot2.r | no_license | zsanli/docker_hap_roc | R | false | false | 10,444 | r | library(ggplot2)
library(gg.gap)
library("RColorBrewer")
args = commandArgs(trailingOnly=TRUE)
DRAGEN_summary_data = read.csv2(args[1],sep=",",header=T,dec= '.')
DRAGEN_X_summary_data = read.csv2(args[2],sep=",",header=T,dec= '.')
outdir=args[3]
giab_snp_all<-data.frame(categary=c('DRAGEN_TRUTH_TP', 'DRA... |
#######################
## DA2 and Coding ##
## Assignment ##
## Analysis of ##
## registered case & ##
## registered death ##
## ##
## NO. 2 ##
## Clean data ##
## ##
#######################
# Clear memory and call packages
rm(list=ls())
library(... | /codes/clean_covid_data.R | no_license | abdu95/da2-assignment_1 | R | false | false | 4,840 | r | #######################
## DA2 and Coding ##
## Assignment ##
## Analysis of ##
## registered case & ##
## registered death ##
## ##
## NO. 2 ##
## Clean data ##
## ##
#######################
# Clear memory and call packages
rm(list=ls())
library(... |
# Self Organizing Map (Kohonen)
# load the library
library("kohonen")
# load the dataset
data(iris)
# split input and output
x <- data.matrix(iris[,1:4])
y <- iris[,5]
# set the random seed for repetable results
set.seed(7)
# create a map of the x values
iris_map <- som(x, grid=somgrid(5, 5, "hexagonal"))
# plot the m... | /08_Machine_Learning_Mastery_with_R/01_AnalyzeData/03_-DataVisualization/3-Projection/som.R | no_license | jggrimesdc-zz/MachineLearningExercises | R | false | false | 340 | r | # Self Organizing Map (Kohonen)
# load the library
library("kohonen")
# load the dataset
data(iris)
# split input and output
x <- data.matrix(iris[,1:4])
y <- iris[,5]
# set the random seed for repetable results
set.seed(7)
# create a map of the x values
iris_map <- som(x, grid=somgrid(5, 5, "hexagonal"))
# plot the m... |
#' The application User-Interface
#'
#' @param request Internal parameter for `{shiny}`.
#' DO NOT REMOVE.
#' @import shiny
#' @noRd
app_ui <- function(request) {
tagList(
# Leave this function for adding external resources
golem_add_external_resources(),
# List the first level UI elements here
... | /R/app_ui.R | no_license | jixing475/GBMscRNASeq | R | false | false | 953 | r | #' The application User-Interface
#'
#' @param request Internal parameter for `{shiny}`.
#' DO NOT REMOVE.
#' @import shiny
#' @noRd
app_ui <- function(request) {
tagList(
# Leave this function for adding external resources
golem_add_external_resources(),
# List the first level UI elements here
... |
rm(list=ls())
#options(error = recover);
commandarg <- commandArgs(trailingOnly=T)
i1 <- as.numeric(commandarg[1])
library(rstan);
library(NlcOptim)
library(MASS)
library(mvtnorm)
CI95_empircal <- function(post.bounds){
x <- post.bounds[,1]
y <- post.bounds[,2]
max_x <- quantile(x,probs = 0.05)
x.seq <- seq(mi... | /simulation_multi_NA.R | no_license | andrewhaoyu/optimization_project | R | false | false | 4,873 | r |
rm(list=ls())
#options(error = recover);
commandarg <- commandArgs(trailingOnly=T)
i1 <- as.numeric(commandarg[1])
library(rstan);
library(NlcOptim)
library(MASS)
library(mvtnorm)
CI95_empircal <- function(post.bounds){
x <- post.bounds[,1]
y <- post.bounds[,2]
max_x <- quantile(x,probs = 0.05)
x.seq <- seq(mi... |
############ Colors ###############
############ Constants ##############
#This structure contains the different color schemas used in karyoploteR
.karyoploter.colors <- list(
cytobands=list(
schemas=list(
circos=c(gneg="#FFFFFF",
gpos25="#C8C8C8",
gpos33="#D2D2D2",
... | /R/color.R | no_license | ditag/karyoploteR | R | false | false | 30,885 | r | ############ Colors ###############
############ Constants ##############
#This structure contains the different color schemas used in karyoploteR
.karyoploter.colors <- list(
cytobands=list(
schemas=list(
circos=c(gneg="#FFFFFF",
gpos25="#C8C8C8",
gpos33="#D2D2D2",
... |
############################
#CRC info
############################
args = commandArgs(TRUE)
input = as.numeric(args[1])
##########################
#LOAD PARAMETERS AND INITIAL CONDITIONS
##########################
library(deSolve)
load("parms.mat.simp_model_NO_TRAVEL.RData")
new.table <- list()
for(i in 1:21){
ne... | /FIGURE_8/basic_model_spec.R | no_license | mwalte10/intra-urban_dengue_vaccination_impact | R | false | false | 44,675 | r | ############################
#CRC info
############################
args = commandArgs(TRUE)
input = as.numeric(args[1])
##########################
#LOAD PARAMETERS AND INITIAL CONDITIONS
##########################
library(deSolve)
load("parms.mat.simp_model_NO_TRAVEL.RData")
new.table <- list()
for(i in 1:21){
ne... |
numPerPatch66154 <- c(2501,2499)
| /NatureEE-data-archive/Run203021/JAFSdata/JAFSnumPerPatch66154.R | no_license | flaxmans/NatureEE2017 | R | false | false | 33 | r | numPerPatch66154 <- c(2501,2499)
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/print.survFitCstExp.R
\name{print.survFitCstExp}
\alias{print.survFitCstExp}
\title{Print of \code{survFit} object}
\usage{
\method{print}{survFitCstExp}(x, ...)
}
\arguments{
\item{x}{An object of class \code{survFitCstExp}}
\item{\dots}{Fu... | /man/print.survFitCstExp.Rd | no_license | cran/morse | R | false | true | 942 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/print.survFitCstExp.R
\name{print.survFitCstExp}
\alias{print.survFitCstExp}
\title{Print of \code{survFit} object}
\usage{
\method{print}{survFitCstExp}(x, ...)
}
\arguments{
\item{x}{An object of class \code{survFitCstExp}}
\item{\dots}{Fu... |
# version 2016-08-17
# Comments
# - after download run:
# Rscript setup.R
# - convert timestamp to date & time:
# as.POSIXct(ts, origin="1970-01-01")
# - call script:
# Rscript import_nagios.R --ip=abbb::ba27:ebff:fef1:8e19 --host=climateplus_6540 --service=temp --pia=http://localhost:8080 --key=eu.ownyourdata.n... | /import_nagios.R | permissive | DrRoad/app-room | R | false | false | 8,256 | r | # version 2016-08-17
# Comments
# - after download run:
# Rscript setup.R
# - convert timestamp to date & time:
# as.POSIXct(ts, origin="1970-01-01")
# - call script:
# Rscript import_nagios.R --ip=abbb::ba27:ebff:fef1:8e19 --host=climateplus_6540 --service=temp --pia=http://localhost:8080 --key=eu.ownyourdata.n... |
library(numbers)
### Name: Sigma
### Title: Divisor Functions
### Aliases: Sigma tau
### ** Examples
sapply(1:16, Sigma, k = 0)
sapply(1:16, Sigma, k = 1)
sapply(1:16, Sigma, proper = TRUE)
| /data/genthat_extracted_code/numbers/examples/sigma.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 197 | r | library(numbers)
### Name: Sigma
### Title: Divisor Functions
### Aliases: Sigma tau
### ** Examples
sapply(1:16, Sigma, k = 0)
sapply(1:16, Sigma, k = 1)
sapply(1:16, Sigma, proper = TRUE)
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/skeleton.R
\name{rocco_skeleton}
\alias{rocco_skeleton}
\title{Create a Skeleton for Rocco Documentation.}
\usage{
rocco_skeleton(directory, output)
}
\arguments{
\item{directory}{character. The directory Rocco is running in.}
\item{output}{... | /man/rocco_skeleton.Rd | permissive | robertzk/rocco | R | false | true | 496 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/skeleton.R
\name{rocco_skeleton}
\alias{rocco_skeleton}
\title{Create a Skeleton for Rocco Documentation.}
\usage{
rocco_skeleton(directory, output)
}
\arguments{
\item{directory}{character. The directory Rocco is running in.}
\item{output}{... |
div('aaa', style='clear:both, display:block; z-index:1000000000000') | /includes/methodsUI.R | permissive | oucru-biostats/dataCleaner | R | false | false | 68 | r | div('aaa', style='clear:both, display:block; z-index:1000000000000') |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R
\name{ex2}
\alias{ex2}
\title{Second Example}
\usage{
ex2(verbose = TRUE)
}
\arguments{
\item{verbose}{A boolean variable indicating whether verbose output is desired.}
}
\description{
Second Example for 'xtensor'
}
| /man/ex2.Rd | no_license | eddelbuettel/xtensorExamples | R | false | true | 308 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R
\name{ex2}
\alias{ex2}
\title{Second Example}
\usage{
ex2(verbose = TRUE)
}
\arguments{
\item{verbose}{A boolean variable indicating whether verbose output is desired.}
}
\description{
Second Example for 'xtensor'
}
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/predictor.R
\name{Predictor}
\alias{Predictor}
\title{Predictor Class}
\description{
Make prediction requests to an Amazon SageMaker endpoint.
}
\section{Public fields}{
\if{html}{\out{<div class="r6-fields">}}
\describe{
\item{\code{endpoint... | /man/Predictor.Rd | permissive | OwenGarrity/sagemaker-r-sdk | R | false | true | 9,696 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/predictor.R
\name{Predictor}
\alias{Predictor}
\title{Predictor Class}
\description{
Make prediction requests to an Amazon SageMaker endpoint.
}
\section{Public fields}{
\if{html}{\out{<div class="r6-fields">}}
\describe{
\item{\code{endpoint... |
dataFile <- "./household_power_consumption.txt"
data <- read.table(dataFile, header=TRUE, sep=";", stringsAsFactors=FALSE, dec=".")
##subSetData <- data[data$Date %in% c("1/2/2007","2/2/2007") ,]
data2007 <- subset(data,data$Date %in% c("1/2/2007","2/2/2007"))
data2007$Global_active_power <- as.numeric(data... | /plot2.R | no_license | cinth76/ExData_Plotting1 | R | false | false | 678 | r |
dataFile <- "./household_power_consumption.txt"
data <- read.table(dataFile, header=TRUE, sep=";", stringsAsFactors=FALSE, dec=".")
##subSetData <- data[data$Date %in% c("1/2/2007","2/2/2007") ,]
data2007 <- subset(data,data$Date %in% c("1/2/2007","2/2/2007"))
data2007$Global_active_power <- as.numeric(data... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/hex.R
\name{parse_hex_between}
\alias{parse_hex_between}
\title{Parse a block of data between addresses}
\usage{
parse_hex_between(path, start, end, split)
}
\arguments{
\item{path}{File path.}
\item{start}{Integer or character string repres... | /man/parse_hex_between.Rd | no_license | andbamp/hexutils | R | false | true | 877 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/hex.R
\name{parse_hex_between}
\alias{parse_hex_between}
\title{Parse a block of data between addresses}
\usage{
parse_hex_between(path, start, end, split)
}
\arguments{
\item{path}{File path.}
\item{start}{Integer or character string repres... |
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 14168
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 14168
c
c Input Parameter (command line, file):
c input filename QBFLIB/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/query42_query05_1344n/query42_query05_1344n.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 720 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 14168
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 14168
c
c Input Parameter (command line, file):
c input filename QBFLIB/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/helpers.R
\name{gehan.fit}
\alias{gehan.fit}
\title{Naive Gehan estimator for multiple studies}
\usage{
gehan.fit(y, delta, matX, study, wt = rep(1, length(y)), beta.ini = NULL)
}
\arguments{
\item{y}{length-n ceonsored log time-to-event vari... | /man/gehan.fit.Rd | no_license | syma-research/AFT_meta | R | false | true | 713 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/helpers.R
\name{gehan.fit}
\alias{gehan.fit}
\title{Naive Gehan estimator for multiple studies}
\usage{
gehan.fit(y, delta, matX, study, wt = rep(1, length(y)), beta.ini = NULL)
}
\arguments{
\item{y}{length-n ceonsored log time-to-event vari... |
sce0 <- prepData(PBMC_fs, PBMC_panel, PBMC_md)
sce <- cluster(sce0, verbose = FALSE)
test_that("extractClusters() - without having run cluster()", {
expect_error(extractClusters(sce0))
})
test_that("extractClusters()", {
# check vebosity
expect_message(extractClusters(sce, NULL))
expect_silent(extract... | /tests/testthat/test_extractClusters.R | no_license | HelenaLC/CATALYST | R | false | false | 1,787 | r | sce0 <- prepData(PBMC_fs, PBMC_panel, PBMC_md)
sce <- cluster(sce0, verbose = FALSE)
test_that("extractClusters() - without having run cluster()", {
expect_error(extractClusters(sce0))
})
test_that("extractClusters()", {
# check vebosity
expect_message(extractClusters(sce, NULL))
expect_silent(extract... |
##vote prediction
##linear regression
##read data
vote = read.csv(file.choose())
vote
##fitting linear regression
lm.sol=lm(Y~X1+X2+X3+X4+X5+X6+X7,data = vote)
##extraction of model calculation results
summary(lm.sol)
| /VoteLinearPrediction.R | no_license | SilenceLavigne/WinterIsComing | R | false | false | 220 | r | ##vote prediction
##linear regression
##read data
vote = read.csv(file.choose())
vote
##fitting linear regression
lm.sol=lm(Y~X1+X2+X3+X4+X5+X6+X7,data = vote)
##extraction of model calculation results
summary(lm.sol)
|
write.flux.measurements.table <-
function(env=NULL,filename) {
#Write out a table containing the flux results for each galaxy
# Load Parameter Space
if(!is.null(env)) {
attach(env, warn.conflicts=FALSE)
}
sz=length(cat.ra)
janskyConv<-10^(-(mag.zp-8.9)/2.5)
#Get distance from image edge {{{
#X-axi... | /R/write.flux.measurements.table.R | no_license | AngusWright/LAMBDAR | R | false | false | 41,727 | r | write.flux.measurements.table <-
function(env=NULL,filename) {
#Write out a table containing the flux results for each galaxy
# Load Parameter Space
if(!is.null(env)) {
attach(env, warn.conflicts=FALSE)
}
sz=length(cat.ra)
janskyConv<-10^(-(mag.zp-8.9)/2.5)
#Get distance from image edge {{{
#X-axi... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/m2h.R
\name{m2h}
\alias{m2h}
\title{Heading from accelerometer and magnetometer data}
\usage{
m2h(M, A, sampling_rate = NULL, fc = NULL)
}
\arguments{
\item{M}{A sensor data structure or matrix, M=[mx,my,mz] in any consistent unit (e.g., in u... | /R/tagtools/man/m2h.Rd | no_license | FlukeAndFeather/TagTools | R | false | true | 2,808 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/m2h.R
\name{m2h}
\alias{m2h}
\title{Heading from accelerometer and magnetometer data}
\usage{
m2h(M, A, sampling_rate = NULL, fc = NULL)
}
\arguments{
\item{M}{A sensor data structure or matrix, M=[mx,my,mz] in any consistent unit (e.g., in u... |
################################
## Plasticity and bet-hedging ##
#### (C) T. R. Haaland 2019 ####
################################
#### Preamble ####
rm(list=ls())
library(RColorBrewer)
setwd("C:\\Users\\Thomas\\Documents\\Plasticity and bet-hedging\\Output\\")
# Set directory: Use find-and-replace-all on 'C... | /plasticity bet-hedging code JEB for github.R | no_license | thomasrayhaaland/plasticity-bethedging | R | false | false | 21,899 | r | ################################
## Plasticity and bet-hedging ##
#### (C) T. R. Haaland 2019 ####
################################
#### Preamble ####
rm(list=ls())
library(RColorBrewer)
setwd("C:\\Users\\Thomas\\Documents\\Plasticity and bet-hedging\\Output\\")
# Set directory: Use find-and-replace-all on 'C... |
#The following script reads datasets which contain accelerometer measurements from a Samsung Galaxy S smartphone, and outputs an
#independent tidy data set with the average of each variable for each activity and each subject from the original data.
#Reading in the relevant training data
trainSet <- read.table("X_tra... | /run_analysis.R | no_license | lacistijo/Getting_and_Cleaning_Data | R | false | false | 2,444 | r | #The following script reads datasets which contain accelerometer measurements from a Samsung Galaxy S smartphone, and outputs an
#independent tidy data set with the average of each variable for each activity and each subject from the original data.
#Reading in the relevant training data
trainSet <- read.table("X_tra... |
# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
loc <- function(data) {
.Call(`_dplyr_loc`, data)
}
dfloc <- function(df) {
.Call(`_dplyr_dfloc`, df)
}
plfloc <- function(data) {
.Call(`_dplyr_plfloc`, data)
}
strings_addresse... | /R/RcppExports.R | permissive | dirkschumacher/dplyr | R | false | false | 7,718 | r | # Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
loc <- function(data) {
.Call(`_dplyr_loc`, data)
}
dfloc <- function(df) {
.Call(`_dplyr_dfloc`, df)
}
plfloc <- function(data) {
.Call(`_dplyr_plfloc`, data)
}
strings_addresse... |
setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f")))
source('../../h2o-runit.R')
check.deeplearning_autoencoder <- function() {
Log.info("Deep Learning Autoencoder MNIST)")
train_hex = h2o.uploadFile(locate("bigdata/laptop/mnist/train.csv.gz"))
test_hex = h2o.uploadFile(locate("bigda... | /h2o-r/tests/testdir_algos/deeplearning/runit_deeplearning_autoencoder_large.R | permissive | tamseo/h2o-3 | R | false | false | 2,845 | r | setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f")))
source('../../h2o-runit.R')
check.deeplearning_autoencoder <- function() {
Log.info("Deep Learning Autoencoder MNIST)")
train_hex = h2o.uploadFile(locate("bigdata/laptop/mnist/train.csv.gz"))
test_hex = h2o.uploadFile(locate("bigda... |
modelInfo <- list(label = "CART",
library = "rpart",
type = c("Regression", "Classification"),
parameters = data.frame(parameter = c('cp'),
class = c("numeric"),
label = c("Complexit... | /models/files/rpart.R | no_license | blueskypie/caret | R | false | false | 8,134 | r | modelInfo <- list(label = "CART",
library = "rpart",
type = c("Regression", "Classification"),
parameters = data.frame(parameter = c('cp'),
class = c("numeric"),
label = c("Complexit... |
## These functions will create a matrix which caches its inverse
makeCacheMatrix <- function(x = matrix()) {
m <- NULL
set <- function(y) {
x <<- y
m <<- NULL
}
#stored matrix
get <- function() x
#Inverse matrix and set to store in setcachinverse
setcachedinverse <- function(inverse) m <<- inverse
... | /cachematrix.R | no_license | waewma/ProgrammingAssignment2 | R | false | false | 1,014 | r | ## These functions will create a matrix which caches its inverse
makeCacheMatrix <- function(x = matrix()) {
m <- NULL
set <- function(y) {
x <<- y
m <<- NULL
}
#stored matrix
get <- function() x
#Inverse matrix and set to store in setcachinverse
setcachedinverse <- function(inverse) m <<- inverse
... |
# This script creates a sample submission using Random Forests
# and also plots the feature importance from the trained model.
#
# To submit the sample, download 1_random_forest_submission.csv
# from the Output tab and submit it as normal to the competition
# (through https://www.kaggle.com/c/bike-sharing-demand/submis... | /kaggle-bike-sharing-demand/Random Forest Benchmark.R | no_license | wannasmile/DM-Competition-Getting-Started | R | false | false | 2,440 | r | # This script creates a sample submission using Random Forests
# and also plots the feature importance from the trained model.
#
# To submit the sample, download 1_random_forest_submission.csv
# from the Output tab and submit it as normal to the competition
# (through https://www.kaggle.com/c/bike-sharing-demand/submis... |
#' getTableWithCustomTypes Function
#'
#' Retrieve RAMM table and force column types - the schema type listing from the RAMM API is not always correct!
#' You need to get the headers using the getHeaders() function
#'
#' @param headers Authorised access headers created using getHeaders(...).
#' @param table_name The n... | /R/getTableWithCustomTypes.R | no_license | petehilljnr/rramm | R | false | false | 3,530 | r | #' getTableWithCustomTypes Function
#'
#' Retrieve RAMM table and force column types - the schema type listing from the RAMM API is not always correct!
#' You need to get the headers using the getHeaders() function
#'
#' @param headers Authorised access headers created using getHeaders(...).
#' @param table_name The n... |
####################################################
###### The volatility updating rule ##
####################################################
ht<-function(para_h,Data.ret){
rt=Data.ret$rt/250 #### Interest rate Data : Data.BSJ$rt
ret =Data.ret$ret #### Returns : Data.BSJ$ret
Z1=len... | /estimationJob/HN_GARCH/G_HN_RET_Ess/RMSE_HN_Gaussian.R | no_license | Fanirisoa/dynamic_pricing | R | false | false | 8,207 | r | ####################################################
###### The volatility updating rule ##
####################################################
ht<-function(para_h,Data.ret){
rt=Data.ret$rt/250 #### Interest rate Data : Data.BSJ$rt
ret =Data.ret$ret #### Returns : Data.BSJ$ret
Z1=len... |
# File R/export.pajek.net.R in package ndtv, part of the Statnet suite
# of packages for network analysis, http://statnet.org .
#
# This software is distributed under the GPL-3 license. It is free,
# open source, and has the attribution requirements (GPL Section 7) at
# http://statnet.org/attribution
#
# Copyrig... | /ndtv/R/export.pajek.net.R | no_license | ingted/R-Examples | R | false | false | 4,429 | r | # File R/export.pajek.net.R in package ndtv, part of the Statnet suite
# of packages for network analysis, http://statnet.org .
#
# This software is distributed under the GPL-3 license. It is free,
# open source, and has the attribution requirements (GPL Section 7) at
# http://statnet.org/attribution
#
# Copyrig... |
library(calibrate)
library(gplots)
library(genefilter)
library(dendextend)
library(xlsx)
library("beeswarm")
perform_pcas <- function(data,sample_data) {
re <- prcomp(t(data))
pcs=re$sdev**2
pcs = pcs/sum(pcs) * 100
pdf("PC-percent-variance.pdf")
par(mar=c(5.1, 4.1, 4.1, 4.1), xpd=TRUE,cex=1.2)
barplot(
pcs... | /results/RNAseq/ClusteringVST/plots.R | no_license | murphycj/0617_yuxiang | R | false | false | 2,581 | r | library(calibrate)
library(gplots)
library(genefilter)
library(dendextend)
library(xlsx)
library("beeswarm")
perform_pcas <- function(data,sample_data) {
re <- prcomp(t(data))
pcs=re$sdev**2
pcs = pcs/sum(pcs) * 100
pdf("PC-percent-variance.pdf")
par(mar=c(5.1, 4.1, 4.1, 4.1), xpd=TRUE,cex=1.2)
barplot(
pcs... |
# Title : TODO
# Objective : TODO
# Created by: KIIT
# Created on: 01-09-2020
queue <- list(0)
rear <- 0
front <- 0
enqueue <- function(value) {
if (front == 0)
front <<- 1;
rear <<- rear + 1;
queue[rear] <<- value;
}
dequeue<- function (){
if(front==0 || front >rear){
return;
}
v<-queue[fr... | /test/abhishekq1.R | no_license | preetanurag/R-Lab-Kiit | R | false | false | 648 | r | # Title : TODO
# Objective : TODO
# Created by: KIIT
# Created on: 01-09-2020
queue <- list(0)
rear <- 0
front <- 0
enqueue <- function(value) {
if (front == 0)
front <<- 1;
rear <<- rear + 1;
queue[rear] <<- value;
}
dequeue<- function (){
if(front==0 || front >rear){
return;
}
v<-queue[fr... |
setwd('~/Documents/Personal Projects/Baseball/')
batting_stats$X1B <- (batting_stats$H - batting_stats$X2B - batting_stats$X3B - batting_stats$HR) #Singles
#below is the total fantasy points in a game judged by Fan Duel's scoring system for batters
batting_stats$Fantasy_Points <- ((batting_stats$HR*4)+(batting_stats$X1... | /Baseball Final Project/baseball_script.R | no_license | sordal/CSCI-183-Ordered | R | false | false | 3,809 | r | setwd('~/Documents/Personal Projects/Baseball/')
batting_stats$X1B <- (batting_stats$H - batting_stats$X2B - batting_stats$X3B - batting_stats$HR) #Singles
#below is the total fantasy points in a game judged by Fan Duel's scoring system for batters
batting_stats$Fantasy_Points <- ((batting_stats$HR*4)+(batting_stats$X1... |
library(inTrees)
### Name: extractRules
### Title: Extract rules from a list of trees
### Aliases: extractRules
### Keywords: extract
### ** Examples
library(RRF)
data(iris)
X <- iris[,1:(ncol(iris)-1)]
target <- iris[,"Species"]
rf <- RRF(X,as.factor(target),ntree=100) # build an ordinary RF
... | /data/genthat_extracted_code/inTrees/examples/extractRules.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 468 | r | library(inTrees)
### Name: extractRules
### Title: Extract rules from a list of trees
### Aliases: extractRules
### Keywords: extract
### ** Examples
library(RRF)
data(iris)
X <- iris[,1:(ncol(iris)-1)]
target <- iris[,"Species"]
rf <- RRF(X,as.factor(target),ntree=100) # build an ordinary RF
... |
########################################################################
#=======================================================================
# ODETransmissionParameters.R
# Contains the functions that deal with the transmission of a disease
#
#=======================================================================... | /VCOM-Vectors-Humans/SIMPLE/ODETransmissionParameters.R | no_license | IHI-Data-science/VCOM | R | false | false | 1,611 | r | ########################################################################
#=======================================================================
# ODETransmissionParameters.R
# Contains the functions that deal with the transmission of a disease
#
#=======================================================================... |
#this routine computes correlations between smc and vv or vh, respectively
source("Aquarius/readAquInfo.R")
library("scales")
library("ggplot2")
#get the file list
files <- list.files("X:/ProjectData/EUMETSAT_SCA Cross-pol/TUW_aquarius_global_v2/beam2/", pattern="[[:digit:]].nc", full.names=T)
#initialise data frame... | /Aquarius/R2_map.R | no_license | felixgreifeneder/EURAC_R | R | false | false | 4,722 | r | #this routine computes correlations between smc and vv or vh, respectively
source("Aquarius/readAquInfo.R")
library("scales")
library("ggplot2")
#get the file list
files <- list.files("X:/ProjectData/EUMETSAT_SCA Cross-pol/TUW_aquarius_global_v2/beam2/", pattern="[[:digit:]].nc", full.names=T)
#initialise data frame... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Driver.R
\docType{class}
\name{duckdb_driver}
\alias{duckdb_driver}
\alias{duckdb}
\alias{duckdb_driver-class}
\alias{show,duckdb_driver-method}
\alias{dbConnect,duckdb_driver-method}
\alias{dbDataType,duckdb_driver-method}
\alias{dbIsValid,d... | /tools/rpkg/man/duckdb_driver.Rd | permissive | pat-s/duckdb | R | false | true | 1,721 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Driver.R
\docType{class}
\name{duckdb_driver}
\alias{duckdb_driver}
\alias{duckdb}
\alias{duckdb_driver-class}
\alias{show,duckdb_driver-method}
\alias{dbConnect,duckdb_driver-method}
\alias{dbDataType,duckdb_driver-method}
\alias{dbIsValid,d... |
#read data
powerdata <- read.csv("./R/project4/power1/household_power_consumption.txt", sep=";")
#subset by year
powerdata <- subset(powerdata, Date=="1/2/2007" | Date=="2/2/2007")
#make variables numeric
powerdata$Sub_metering_1 <- as.numeric(powerdata$Sub_metering_1)
powerdata$Sub_metering_2 <- as.numeric(powerda... | /plot3.R | no_license | simitpatel/Exploratory-Data-Analysis-Project-I | R | false | false | 1,026 | r | #read data
powerdata <- read.csv("./R/project4/power1/household_power_consumption.txt", sep=";")
#subset by year
powerdata <- subset(powerdata, Date=="1/2/2007" | Date=="2/2/2007")
#make variables numeric
powerdata$Sub_metering_1 <- as.numeric(powerdata$Sub_metering_1)
powerdata$Sub_metering_2 <- as.numeric(powerda... |
# Fix for NOTEs from R CMD check (no visible binding for global variable)
if(getRversion() >= "2.15.1") {
utils::globalVariables(c('SNPprobes', 'ProbeAnnotation', 'BatchData'))
}
#' BIMEGA: Bivariate Gaussian Mixture model for DNA methylation and gene expression data in cancer.
#'
#' BIMEGA identifies DNA methyl... | /R/BIMEGA.R | no_license | mpru/BIMEGA | R | false | false | 34,020 | r | # Fix for NOTEs from R CMD check (no visible binding for global variable)
if(getRversion() >= "2.15.1") {
utils::globalVariables(c('SNPprobes', 'ProbeAnnotation', 'BatchData'))
}
#' BIMEGA: Bivariate Gaussian Mixture model for DNA methylation and gene expression data in cancer.
#'
#' BIMEGA identifies DNA methyl... |
### Model comparisons ====
# Julie Turner and Alec Robitaille
# Revisions started: March 31 2020
### Packages ----
# remotes::install_github('bbolker/broom.mixed')
libs <- c('lme4', 'data.table', 'broom.mixed', 'ggplot2', 'bbmle', 'car', 'performance')
lapply(libs, require, character.only = TRUE)
### Function ----
... | /R/7-Model-Comparisons.R | no_license | billspat/HyenaEarlyRelationshipsFitness | R | false | false | 35,753 | r | ### Model comparisons ====
# Julie Turner and Alec Robitaille
# Revisions started: March 31 2020
### Packages ----
# remotes::install_github('bbolker/broom.mixed')
libs <- c('lme4', 'data.table', 'broom.mixed', 'ggplot2', 'bbmle', 'car', 'performance')
lapply(libs, require, character.only = TRUE)
### Function ----
... |
setwd("C:/Users/Darcy/Documents/Coursera/GetAndClean/Project2")
## 1
## load the test and train data sets to R
testresults<-read.table("UCI HAR Dataset/test/X_test.txt")
trainresults<-read.table("UCI HAR Dataset/train/X_train.txt")
## 2
## load the activity corresponding to each row and the names of the activities
test... | /run_analysis.R | no_license | darcyl/Coursera-Get-Clean---Project2 | R | false | false | 2,472 | r | setwd("C:/Users/Darcy/Documents/Coursera/GetAndClean/Project2")
## 1
## load the test and train data sets to R
testresults<-read.table("UCI HAR Dataset/test/X_test.txt")
trainresults<-read.table("UCI HAR Dataset/train/X_train.txt")
## 2
## load the activity corresponding to each row and the names of the activities
test... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/NucDyn-class.R
\docType{class}
\name{NucDyn-class}
\alias{NucDyn-class}
\alias{NucDyn}
\title{Nucleosome Dynamics calculation.}
\value{
An instance of the class \code{NucDyn} representing the output of
\code{\link[=nucleosomeDynamics]{nucleos... | /man/NucDyn-class.Rd | permissive | nucleosome-dynamics/NucDyn | R | false | true | 2,916 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/NucDyn-class.R
\docType{class}
\name{NucDyn-class}
\alias{NucDyn-class}
\alias{NucDyn}
\title{Nucleosome Dynamics calculation.}
\value{
An instance of the class \code{NucDyn} representing the output of
\code{\link[=nucleosomeDynamics]{nucleos... |
#!/usr/bin/env Rscript
source('getdata.R')
png(filename='plots/plot4.png')
par(mfrow=c(2,2))
# Top left
plot(power.df$date.time, power.df$Global_active_power,
ylab='Global Active Power', xlab='', type='l')
# Top right
plot(power.df$date.time, power.df$Voltage,
xlab='datetime', ylab='Voltage', type='l')
# Botto... | /plot4.R | no_license | fordindin/ExData_Plotting1 | R | false | false | 854 | r | #!/usr/bin/env Rscript
source('getdata.R')
png(filename='plots/plot4.png')
par(mfrow=c(2,2))
# Top left
plot(power.df$date.time, power.df$Global_active_power,
ylab='Global Active Power', xlab='', type='l')
# Top right
plot(power.df$date.time, power.df$Voltage,
xlab='datetime', ylab='Voltage', type='l')
# Botto... |
##############################
#### Feature Selection########
##############################
rfe.train <- readRDS("rfe.train.RDS")
boruta.train<- readRDS("boruta.train.RDS")
Select_Features = function(method = c("RF", "Boruta_Tentative","Boruta_Final")){
require(Boruta)
require(randomForest)
if(method == "RF... | /trial3/varselection.r | no_license | coldbear/CLAVIS-project1 | R | false | false | 2,257 | r | ##############################
#### Feature Selection########
##############################
rfe.train <- readRDS("rfe.train.RDS")
boruta.train<- readRDS("boruta.train.RDS")
Select_Features = function(method = c("RF", "Boruta_Tentative","Boruta_Final")){
require(Boruta)
require(randomForest)
if(method == "RF... |
# Limpa variaveis
rm(list=ls())
# Carrega dados do exercicio
load("./ExercicioSite/ExercicioSite1.RData")
# define um vetor de 1's
one = as.matrix(rep(1, length(ret)))
gamma = as.numeric(t(one) %*% solve(omega) %*% ret)
lambda = solve((t(one) %*% solve(omega) %*% one)) %*% (t(one) %*% solve(omega) %*% ret - gamma)
... | /GestaoDeRiqueza/ExercicioSite/AtivoRiskFree.R | no_license | btebaldi/AssetManagement | R | false | false | 918 | r | # Limpa variaveis
rm(list=ls())
# Carrega dados do exercicio
load("./ExercicioSite/ExercicioSite1.RData")
# define um vetor de 1's
one = as.matrix(rep(1, length(ret)))
gamma = as.numeric(t(one) %*% solve(omega) %*% ret)
lambda = solve((t(one) %*% solve(omega) %*% one)) %*% (t(one) %*% solve(omega) %*% ret - gamma)
... |
% Generated by roxygen2 (4.0.1): do not edit by hand
\name{phylomatic_format}
\alias{phylomatic_format}
\title{Get family names to make Phylomatic input object, and output input string
to Phylomatic for use in the function phylomatic_tree.}
\usage{
phylomatic_format(taxa = NA, format = "isubmit", db = "ncbi")
}
\arg... | /man/phylomatic_format.Rd | permissive | fmichonneau/taxize | R | false | false | 981 | rd | % Generated by roxygen2 (4.0.1): do not edit by hand
\name{phylomatic_format}
\alias{phylomatic_format}
\title{Get family names to make Phylomatic input object, and output input string
to Phylomatic for use in the function phylomatic_tree.}
\usage{
phylomatic_format(taxa = NA, format = "isubmit", db = "ncbi")
}
\arg... |
#������Ʈ ���� = C:/R_programming
#����2_7
library(ggplot2)
mpg <- as.data.frame(ggplot2::mpg)
# qplot()�� ���
qplot(data = mpg, x = hwy)
# x �� cty
qplot(data = mpg, x = cty)
# x �� drv
qplot(data = mpg, x = drv)
# x �� drv, y �� hwy
qplot(data = mpg, x = drv, y = hwy)
# x �� drv, y �� hwy, ���� �� ����
qplot(data = m... | /실습과제2_2171010_김채린.R | no_license | decentra1ized/R_programming | R | false | false | 7,301 | r | #������Ʈ ���� = C:/R_programming
#����2_7
library(ggplot2)
mpg <- as.data.frame(ggplot2::mpg)
# qplot()�� ���
qplot(data = mpg, x = hwy)
# x �� cty
qplot(data = mpg, x = cty)
# x �� drv
qplot(data = mpg, x = drv)
# x �� drv, y �� hwy
qplot(data = mpg, x = drv, y = hwy)
# x �� drv, y �� hwy, ���� �� ����
qplot(data = m... |
\name{display_rgb}
\alias{display_rgb}
\title{
Plot RGB (RGBA) color composition in the PNG format.
}
\description{
Raster images are forced to be interpreted as color composition with 3 (RGB) or 4 (RGBA) channels. Values should be in the range between 0 and 255.
}
\usage{
display_rgb(obj, ...)
}
%- maybe also 'usage' ... | /man/display_rgb.Rd | no_license | nplatonov/ursa | R | false | false | 2,666 | rd | \name{display_rgb}
\alias{display_rgb}
\title{
Plot RGB (RGBA) color composition in the PNG format.
}
\description{
Raster images are forced to be interpreted as color composition with 3 (RGB) or 4 (RGBA) channels. Values should be in the range between 0 and 255.
}
\usage{
display_rgb(obj, ...)
}
%- maybe also 'usage' ... |
context("Kamada-Kawai layouts")
test_that("Kamada-Kawai layout generator works", {
skip_on_cran()
skip_on_ci()
library(igraph)
g <- make_ring(10)
l <- layout_with_kk(g, maxiter=50)
if (Sys.info()["sysname"] == "Darwin") {
expect_that(sum(l), equals(-1.13071769106689))
} else if (Sys.info()["sysname... | /tests/testthat/test_layout.kk.R | no_license | gvegayon/rigraph | R | false | false | 1,750 | r |
context("Kamada-Kawai layouts")
test_that("Kamada-Kawai layout generator works", {
skip_on_cran()
skip_on_ci()
library(igraph)
g <- make_ring(10)
l <- layout_with_kk(g, maxiter=50)
if (Sys.info()["sysname"] == "Darwin") {
expect_that(sum(l), equals(-1.13071769106689))
} else if (Sys.info()["sysname... |
#####################################################################################################
## Matrix inversion is usually a costly computation.
## The following pair of functions(makeCacheMatrix, cacheSolve) caches this
## potentially time-consuming computations i.e. inverse of a matrix.
###################... | /cachematrix.R | no_license | boonboh/ProgrammingAssignment2 | R | false | false | 2,749 | r | #####################################################################################################
## Matrix inversion is usually a costly computation.
## The following pair of functions(makeCacheMatrix, cacheSolve) caches this
## potentially time-consuming computations i.e. inverse of a matrix.
###################... |
#Funkcje konwertujące plansze do liczb i liczby do plansz
boardToId <- function(board){
id = 0
exponent = 0;
for(i in 1:nrow(board)){
for(j in 1:ncol(board)){
id = (id + board[i,j]*(3^exponent))
exponent = exponent + 1
}
}
return(id)
}
idToBoard <- function(id, dim){
board = matrix(0... | /src/CoevolutionaryTicTacToe/Converter.R | no_license | matkaczmarski/Coevolutionary-Tic-Tac-Toe-learning- | R | false | false | 470 | r | #Funkcje konwertujące plansze do liczb i liczby do plansz
boardToId <- function(board){
id = 0
exponent = 0;
for(i in 1:nrow(board)){
for(j in 1:ncol(board)){
id = (id + board[i,j]*(3^exponent))
exponent = exponent + 1
}
}
return(id)
}
idToBoard <- function(id, dim){
board = matrix(0... |
\name{print.roc}
\alias{print.roc}
\title{
Print function for S3 class "roc"
}
\description{
Print the information about true positive rates, false positive rates, the area under curve and maximum F1 score
}
\usage{
\method{print}{roc}(x, ...)
}
\arguments{
\item{x}{
An object with S3 class \code{"roc"}
}
\item{\do... | /man/print.roc.Rd | no_license | cran/camel | R | false | false | 534 | rd | \name{print.roc}
\alias{print.roc}
\title{
Print function for S3 class "roc"
}
\description{
Print the information about true positive rates, false positive rates, the area under curve and maximum F1 score
}
\usage{
\method{print}{roc}(x, ...)
}
\arguments{
\item{x}{
An object with S3 class \code{"roc"}
}
\item{\do... |
library(dplyr)
library(DESeq2)
library(ggplot2)
library(ggrepel)
library(RColorBrewer)
library(pheatmap)
library(tibble)
parallel <- FALSE
if (snakemake@threads > 1) {
library("BiocParallel")
# setup parallelization
register(MulticoreParam(snakemake@threads))
parallel <- TRUE
}
# import snakemake ... | /scripts/deseq2.R | no_license | yasharw/atac_seq2 | R | false | false | 5,342 | r | library(dplyr)
library(DESeq2)
library(ggplot2)
library(ggrepel)
library(RColorBrewer)
library(pheatmap)
library(tibble)
parallel <- FALSE
if (snakemake@threads > 1) {
library("BiocParallel")
# setup parallelization
register(MulticoreParam(snakemake@threads))
parallel <- TRUE
}
# import snakemake ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/metadata.R
\name{metadata_write_annotations_table_template}
\alias{metadata_write_annotations_table_template}
\title{To write an annotations table template}
\usage{
metadata_write_annotations_table_template(ANNOTATIONS_TABLE_FILE_PATH_STR,
... | /man/metadata_write_annotations_table_template.Rd | no_license | sanmai-NL/feat | R | false | true | 617 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/metadata.R
\name{metadata_write_annotations_table_template}
\alias{metadata_write_annotations_table_template}
\title{To write an annotations table template}
\usage{
metadata_write_annotations_table_template(ANNOTATIONS_TABLE_FILE_PATH_STR,
... |
#'
#' @title tests whether an object is NULL
#' @description this function is similar to R function \code{is.null}
#' @param datasources a list of opal object(s) obtained after login in to opal servers;
#' these objects hold also the data assign to R, as \code{dataframe}, from opal datasources.
#' @param xvect a vecto... | /R/ji.ds.is.null.R | no_license | datashield/ji.dev.cl | R | false | false | 1,502 | r | #'
#' @title tests whether an object is NULL
#' @description this function is similar to R function \code{is.null}
#' @param datasources a list of opal object(s) obtained after login in to opal servers;
#' these objects hold also the data assign to R, as \code{dataframe}, from opal datasources.
#' @param xvect a vecto... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/thesis.R
\name{thesis_gitbook}
\alias{thesis_gitbook}
\title{Creates an R Markdown gitbook Thesis document}
\usage{
thesis_gitbook(...)
}
\arguments{
\item{...}{other arguments to bookdown::gitbook}
}
\value{
A gitbook webpage
}
\description{... | /man/thesis_gitbook.Rd | no_license | jbelmiro/MarkdownUalgPhD | R | false | true | 515 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/thesis.R
\name{thesis_gitbook}
\alias{thesis_gitbook}
\title{Creates an R Markdown gitbook Thesis document}
\usage{
thesis_gitbook(...)
}
\arguments{
\item{...}{other arguments to bookdown::gitbook}
}
\value{
A gitbook webpage
}
\description{... |
if(FALSE) {
rm(list = ls())
source("~/.Rprofile")
}
system("scp kikapp@sherlock:/scratch/PI/manishad/PCORI/power/modelFit/* ~/shexport/PCORI/power/modelFit/",
intern = TRUE, ignore.stdout = FALSE, ignore.stderr = FALSE)
setwd("~/shexport/PCORI/power/")
library(plyr)
library(dplyr)
library(ggplot2)
library... | /R/parseResults.R | permissive | qsuProjects/CERPower | R | false | false | 6,067 | r | if(FALSE) {
rm(list = ls())
source("~/.Rprofile")
}
system("scp kikapp@sherlock:/scratch/PI/manishad/PCORI/power/modelFit/* ~/shexport/PCORI/power/modelFit/",
intern = TRUE, ignore.stdout = FALSE, ignore.stderr = FALSE)
setwd("~/shexport/PCORI/power/")
library(plyr)
library(dplyr)
library(ggplot2)
library... |
context("renaming functions")
test_that("rename.cols function works", {
df <- data.frame(a=1, b=2, c=3, d=4)
expect_that(names(rename.cols(df, a="letter_a", b="letter_b")),
equals(c("letter_a", "letter_b", "c", "d")))
})
test_that("rename.cols.qtag function renames id.vars/tags/values attributes", ... | /tests/testthat/test_rename.R | no_license | cran/mudata | R | false | false | 2,829 | r |
context("renaming functions")
test_that("rename.cols function works", {
df <- data.frame(a=1, b=2, c=3, d=4)
expect_that(names(rename.cols(df, a="letter_a", b="letter_b")),
equals(c("letter_a", "letter_b", "c", "d")))
})
test_that("rename.cols.qtag function renames id.vars/tags/values attributes", ... |
pla <- function(x, y, ratio, method) {
rs <- nrow(x)
cs <- ncol(x)
X <- cbind(as.matrix(rep(1, rs)), x)
w <- as.matrix(rep(0, cs + 1))
times <- 0
while (any((Y <- sign(X %*% w)) != y)) {
index <- which(Y != y)
if (method == "order") {
r = min(index)
} else {
r = sample(index, size = ... | /homework1/pla.R | no_license | naosense/lfd | R | false | false | 422 | r | pla <- function(x, y, ratio, method) {
rs <- nrow(x)
cs <- ncol(x)
X <- cbind(as.matrix(rep(1, rs)), x)
w <- as.matrix(rep(0, cs + 1))
times <- 0
while (any((Y <- sign(X %*% w)) != y)) {
index <- which(Y != y)
if (method == "order") {
r = min(index)
} else {
r = sample(index, size = ... |
testlist <- list(genotype = c(-1L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0... | /detectRUNS/inst/testfiles/genoConvertCpp/libFuzzer_genoConvertCpp/genoConvertCpp_valgrind_files/1609875050-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 436 | r | testlist <- list(genotype = c(-1L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0... |
% Generated by roxygen2 (4.0.1): do not edit by hand
\name{plotChrCov}
\alias{plotChrCov}
\title{plotChrCov}
\usage{
plotChrCov(peak, weightCol = NULL, xlab = "Chromosome Size (bp)",
ylab = "", title = "ChIP Peaks over Chromosomes")
}
\arguments{
\item{peak}{peak file or GRanges object}
\item{weightCol}{weight colum... | /2X/2.14/ChIPseeker/man/plotChrCov.Rd | no_license | GuangchuangYu/bioc-release | R | false | false | 489 | rd | % Generated by roxygen2 (4.0.1): do not edit by hand
\name{plotChrCov}
\alias{plotChrCov}
\title{plotChrCov}
\usage{
plotChrCov(peak, weightCol = NULL, xlab = "Chromosome Size (bp)",
ylab = "", title = "ChIP Peaks over Chromosomes")
}
\arguments{
\item{peak}{peak file or GRanges object}
\item{weightCol}{weight colum... |
# Project: microsamplingDesign
#
# Author: ablommaert
###############################################################################
### directories
#testDataDirectory <- "/home/ablommaert/git/microsamplingDesign/microsamplingDesign/tests/dataForTesting"
testDataDirectory <- "../dataForTesting"
### ... | /inst/dataForTesting/beforeTesting.R | no_license | cran/microsamplingDesign | R | false | false | 906 | r | # Project: microsamplingDesign
#
# Author: ablommaert
###############################################################################
### directories
#testDataDirectory <- "/home/ablommaert/git/microsamplingDesign/microsamplingDesign/tests/dataForTesting"
testDataDirectory <- "../dataForTesting"
### ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/findCandidates.R
\name{findCandidates}
\alias{findCandidates}
\title{Search of lipid candidates of a certain class.}
\usage{
findCandidates(MS1, db, ppm, rt, adducts, rttol = 3, dbs,
rawData = data.frame(), coelCutoff = 0)
}
\argum... | /man/findCandidates.Rd | no_license | MetabolomicsHK/LipidMS | R | false | true | 2,887 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/findCandidates.R
\name{findCandidates}
\alias{findCandidates}
\title{Search of lipid candidates of a certain class.}
\usage{
findCandidates(MS1, db, ppm, rt, adducts, rttol = 3, dbs,
rawData = data.frame(), coelCutoff = 0)
}
\argum... |
library(rgl)
n = 20
s = 0
xmax = 55.125
ymax = 17.0
zmax = 43.375
amax = max(xmax, ymax, zmax)
oldcol = 'blue'
newcol = 'red'
plot3d(0, 0, 0, xlim = c(0-s, amax+s), ylim = c(0-s, amax+s), zlim = c(0-s, amax+s),
type='n', ax = FALSE, xlab = "x", ylab = "y", zlab = "z")
#a = rbind(cbind(seq(0, 1.375, length = n), 0... | /sandbox/desk.R | no_license | mickwar/r-sandbox | R | false | false | 3,896 | r | library(rgl)
n = 20
s = 0
xmax = 55.125
ymax = 17.0
zmax = 43.375
amax = max(xmax, ymax, zmax)
oldcol = 'blue'
newcol = 'red'
plot3d(0, 0, 0, xlim = c(0-s, amax+s), ylim = c(0-s, amax+s), zlim = c(0-s, amax+s),
type='n', ax = FALSE, xlab = "x", ylab = "y", zlab = "z")
#a = rbind(cbind(seq(0, 1.375, length = n), 0... |
# Title : Twitter API Scraping
# Objective : Scrap Twitter with API
# Autuhor : Muhammad Alvin Rezani
# Date : September 2019
# Step 1: Install and load rtweet package
install.packages("rtweet")
library(rtweet)
install.packages("devtools")
library(devtools)
# Step 2: API Authorization
# W... | /Twitter Scraping Alvin Rezani.R | no_license | alvinrezani/Tugas-Web-and-Twitter-Scraping | R | false | false | 2,456 | r | # Title : Twitter API Scraping
# Objective : Scrap Twitter with API
# Autuhor : Muhammad Alvin Rezani
# Date : September 2019
# Step 1: Install and load rtweet package
install.packages("rtweet")
library(rtweet)
install.packages("devtools")
library(devtools)
# Step 2: API Authorization
# W... |
#' Arc length matching for kernel density estimators.
#'
#' Bootstrap estimates, along with standard errors and confidence intervals, of a linear model, resulting from arc length matching of kernel density estimates.
#'
#' @param formula An LHS ~ RHS formula, specifying the linear model to be estimated.
#' @param... | /R/alKDEboot.R | no_license | cran/alR | R | false | false | 8,977 | r | #' Arc length matching for kernel density estimators.
#'
#' Bootstrap estimates, along with standard errors and confidence intervals, of a linear model, resulting from arc length matching of kernel density estimates.
#'
#' @param formula An LHS ~ RHS formula, specifying the linear model to be estimated.
#' @param... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/wordlist.R
\name{get_groups}
\alias{get_groups}
\title{Extract the Names of All the Groups in a Wordlist}
\usage{
get_groups(wl)
}
\arguments{
\item{wl}{a \code{wordlist} object}
}
\value{
a character vector giving the names of the groups.
Ea... | /man/get_groups.Rd | permissive | stibu81/WordBox | R | false | true | 459 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/wordlist.R
\name{get_groups}
\alias{get_groups}
\title{Extract the Names of All the Groups in a Wordlist}
\usage{
get_groups(wl)
}
\arguments{
\item{wl}{a \code{wordlist} object}
}
\value{
a character vector giving the names of the groups.
Ea... |
install.packages("tidyr")
library(tidyr)
data = read.csv("../data/tema1/USArrests.csv",
header = TRUE,
stringsAsFactors = FALSE)
summary(data)
View(data) # Ver el contenido del dataframe
data = cbind(state = rownames(data),data) #Agregar una columna
#Esto es para hacer dic... | /scripts/13_DataCorrection.R | no_license | soullest/R | R | false | false | 1,431 | r | install.packages("tidyr")
library(tidyr)
data = read.csv("../data/tema1/USArrests.csv",
header = TRUE,
stringsAsFactors = FALSE)
summary(data)
View(data) # Ver el contenido del dataframe
data = cbind(state = rownames(data),data) #Agregar una columna
#Esto es para hacer dic... |
# !diagnostics off
#Function that splits the twitter api output
#Into non/quote/retweet and preps
prep.twitter.output <- function(.data) {
list(
.data %>%
filter(is_quote == T) %>%
mutate(tweet_flag = 'quoted') %>%
dplyr::select(tweet_flag, status_id = status_id, user_id = user_id, user = scree... | /data_preprocessing/twitter/parsing/parse_tweet_extracts.R | no_license | jasonandrewramsey/twitter_tout_consensus | R | false | false | 3,803 | r | # !diagnostics off
#Function that splits the twitter api output
#Into non/quote/retweet and preps
prep.twitter.output <- function(.data) {
list(
.data %>%
filter(is_quote == T) %>%
mutate(tweet_flag = 'quoted') %>%
dplyr::select(tweet_flag, status_id = status_id, user_id = user_id, user = scree... |
rm(list = ls())
# loading the required libraries, if not install
library(tidyverse)
library(stringr)
library(tidytext)
library(data.table)
library(ggplot2)
pck <- c("tidytext")
for (p in pck){
if(!(p %in% rownames(installed.packages())))
{install.packages(p)}
require(p)
}
rm(pck,p)
# loa... | /Trump_speech.R | no_license | ashishtele/Text_Mining | R | false | false | 4,687 | r |
rm(list = ls())
# loading the required libraries, if not install
library(tidyverse)
library(stringr)
library(tidytext)
library(data.table)
library(ggplot2)
pck <- c("tidytext")
for (p in pck){
if(!(p %in% rownames(installed.packages())))
{install.packages(p)}
require(p)
}
rm(pck,p)
# loa... |
hclust_color <- function(hclust, lab=hclust$labels,
lab.col=rep(1,length(hclust$labels)), hang=0.1, ... )
{
y <- rep(hclust$height,2)
x <- as.numeric(hclust$merge)
y <- y[which(x<0)]
x <- x[which(x<0)]
x <- abs(x)
y <- y[order(x)]
x <- x[order(x)]
plot( hclust,... | /R/hclust_color.R | no_license | ygu427/mnmr | R | false | false | 524 | r | hclust_color <- function(hclust, lab=hclust$labels,
lab.col=rep(1,length(hclust$labels)), hang=0.1, ... )
{
y <- rep(hclust$height,2)
x <- as.numeric(hclust$merge)
y <- y[which(x<0)]
x <- x[which(x<0)]
x <- abs(x)
y <- y[order(x)]
x <- x[order(x)]
plot( hclust,... |
## Package: jicmr
##
## Definitions of datasets included with the package
## (all data are synthetic, i.e. computer generated)
##
## #######################################################################
## Datasets with 2 groups
#' Toy dataset for multiple regression analysis
#'
#' System wherein y is related to... | /R/datasets.R | no_license | tkonopka/famr | R | false | false | 1,707 | r | ## Package: jicmr
##
## Definitions of datasets included with the package
## (all data are synthetic, i.e. computer generated)
##
## #######################################################################
## Datasets with 2 groups
#' Toy dataset for multiple regression analysis
#'
#' System wherein y is related to... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.