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{marginplot}
\alias{marginplot}
\title{Marginal Plot}
\usage{
marginplot(margins, xlab = "Marginal Effect", ylab = "",
expected)
}
\arguments{
\item{margins}{margin estimates as created by the margins
function}
\item{xlab}{(optional) label of the outcome variable
(default is 'Marginal Effect')}
\... | /man/marginplot.Rd | no_license | zoomby/margins | R | false | false | 712 | rd | \name{marginplot}
\alias{marginplot}
\title{Marginal Plot}
\usage{
marginplot(margins, xlab = "Marginal Effect", ylab = "",
expected)
}
\arguments{
\item{margins}{margin estimates as created by the margins
function}
\item{xlab}{(optional) label of the outcome variable
(default is 'Marginal Effect')}
\... |
library(rattle)
library(RColorBrewer)
library(rpart)
library(rpart.plot)
tree <- rpart(formula = num ~ . , data = train, method="class")
treePred <- predict(tree, test, type = "class")
fancyRpartPlot(tree)
print(eval(treePred,test$num))
accDT<-eval(treePred,test$num) | /decision_tree.r | no_license | AahanSingh/HeartDisease | R | false | false | 267 | r | library(rattle)
library(RColorBrewer)
library(rpart)
library(rpart.plot)
tree <- rpart(formula = num ~ . , data = train, method="class")
treePred <- predict(tree, test, type = "class")
fancyRpartPlot(tree)
print(eval(treePred,test$num))
accDT<-eval(treePred,test$num) |
.libPaths("C:/R-3.3.2/library")
#This is the proceedure use to take the raw data files (that are stored privately on the OSF) and process them in a way that allows all of the data to be publically available without revealing any identifying information about who took part in which practices.
#We are unable to share t... | /FraserEtAl/Fraser-orig-OSF-files/QRPdataprep.R | no_license | alexholcombe/ChinHolcombePickettVazireCrimSurvey | R | false | false | 2,801 | r | .libPaths("C:/R-3.3.2/library")
#This is the proceedure use to take the raw data files (that are stored privately on the OSF) and process them in a way that allows all of the data to be publically available without revealing any identifying information about who took part in which practices.
#We are unable to share t... |
## Description: Create basis for figure S5c showing COL4A4 mutations
library(readr)
library(dplyr)
library(stringr)
library(reshape2)
library(ggplot2)
get_region_element <- function(position) {
if (position < 39) {
return("Pre-7S Domain")
} else if (position >= 39 & position <= 64) {
return("7S Domain")
... | /src/figureS5c.R | no_license | tjbencomo/col11a1-manuscript | R | false | false | 2,026 | r | ## Description: Create basis for figure S5c showing COL4A4 mutations
library(readr)
library(dplyr)
library(stringr)
library(reshape2)
library(ggplot2)
get_region_element <- function(position) {
if (position < 39) {
return("Pre-7S Domain")
} else if (position >= 39 & position <= 64) {
return("7S Domain")
... |
## ----Stat_FACE_Extr_NPRatio_PostCO2
#############
# N:P ratio #
#############
# add NP ratio
extr$NP <- with(extr, (no + nh)/po)
# parcent change
extr$SumN <- with(extr, no + nh) # total of nitrate and ammonium
extr <- ddply(extr, .(ring, plot, co2, block, id),
function(x) {
... | /R/Stats_NPRatio.R | no_license | ShunHasegawa/FACE_Extractable | R | false | false | 6,146 | r | ## ----Stat_FACE_Extr_NPRatio_PostCO2
#############
# N:P ratio #
#############
# add NP ratio
extr$NP <- with(extr, (no + nh)/po)
# parcent change
extr$SumN <- with(extr, no + nh) # total of nitrate and ammonium
extr <- ddply(extr, .(ring, plot, co2, block, id),
function(x) {
... |
#Time Series Analysis for Store1 using package zoo
install.package("zoo")
library(zoo)
store1 <- train_sum1[,c(1,3,4)][train_sum1$Store==1,]
store1.Date <- as.Date(store1[,1])
store1ts <- zoo(store1[,c(2,3)],store1.Date)
class(store1ts)
plot(store1ts)
store1ts <- ts(store1,)
plot.ts(store1ts, main="Store_1")
decompose... | /FinalProject/R/draft.R | no_license | xiaoyaoyang/Applied-Data-Science | R | false | false | 331 | r | #Time Series Analysis for Store1 using package zoo
install.package("zoo")
library(zoo)
store1 <- train_sum1[,c(1,3,4)][train_sum1$Store==1,]
store1.Date <- as.Date(store1[,1])
store1ts <- zoo(store1[,c(2,3)],store1.Date)
class(store1ts)
plot(store1ts)
store1ts <- ts(store1,)
plot.ts(store1ts, main="Store_1")
decompose... |
CdataArray<-function(distanceMatrices,ineqmembers){
#CdataArray creates the dataArray. It uses ineqmembers and distanceMatrices
return(unlist(lapply(seq_along(ineqmembers),function(x) lapply(seq_along(ineqmembers[[x]][[1]]),function(y) ((Reduce("+",lapply(seq_along(ineqmembers[[x]][[1]][[y]]), function(k) colS... | /dataArray.R | permissive | tatlchri/MSE-R | R | false | false | 612 | r | CdataArray<-function(distanceMatrices,ineqmembers){
#CdataArray creates the dataArray. It uses ineqmembers and distanceMatrices
return(unlist(lapply(seq_along(ineqmembers),function(x) lapply(seq_along(ineqmembers[[x]][[1]]),function(y) ((Reduce("+",lapply(seq_along(ineqmembers[[x]][[1]][[y]]), function(k) colS... |
# Clear workspace, load libraries
rm(list=ls())
library(dplyr)
setwd("~/Study/2017/coursera/3_cleaningdata/project/RawData/UCI HAR Dataset/")
dir <- getwd()
# Load train data
trainX <- read.table(paste(dir,"/train/X_train.txt", sep =""))
trainy <- read.table(paste(dir,"/train/y_train.txt", sep =""))
subject_train <- r... | /run_analysis.R | no_license | zabelina/3_cleaningdata_project | R | false | false | 2,121 | r | # Clear workspace, load libraries
rm(list=ls())
library(dplyr)
setwd("~/Study/2017/coursera/3_cleaningdata/project/RawData/UCI HAR Dataset/")
dir <- getwd()
# Load train data
trainX <- read.table(paste(dir,"/train/X_train.txt", sep =""))
trainy <- read.table(paste(dir,"/train/y_train.txt", sep =""))
subject_train <- r... |
#Set working directory
#Laptop
setwd("/Users/athulapudhiyidath/Dropbox/Experiments/TesserScan/analyses/behavior")
##################################################################################################################################################################
#########################################... | /stats_scripts/behavior/ANOVA_scan_structlearn_Part2_run.R | no_license | prestonlab/tesser_successor | R | false | false | 6,743 | r | #Set working directory
#Laptop
setwd("/Users/athulapudhiyidath/Dropbox/Experiments/TesserScan/analyses/behavior")
##################################################################################################################################################################
#########################################... |
library(BoardGames)
### Name: get_cols
### Title: Get all column vectors of a matrix.
### Aliases: get_cols
### Keywords: column extract matrix vectors
### ** Examples
M = matrix(rnorm(9),3,3)
get_cols(M)
| /data/genthat_extracted_code/BoardGames/examples/get_cols.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 212 | r | library(BoardGames)
### Name: get_cols
### Title: Get all column vectors of a matrix.
### Aliases: get_cols
### Keywords: column extract matrix vectors
### ** Examples
M = matrix(rnorm(9),3,3)
get_cols(M)
|
\name{Forecasts.GP}
\alias{Forecasts.GP}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{one-step ahead forecast by Gaussian process fitting
%% ~~function to do ... ~~
}
\description{one-step ahead forecast by Gaussian process fitting, including: (i) point forecast, either conditional mean; (ii) ... | /man/Forecasts.GP.Rd | no_license | ChuangWAN1994/COST | R | false | false | 1,702 | rd | \name{Forecasts.GP}
\alias{Forecasts.GP}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{one-step ahead forecast by Gaussian process fitting
%% ~~function to do ... ~~
}
\description{one-step ahead forecast by Gaussian process fitting, including: (i) point forecast, either conditional mean; (ii) ... |
### INITIALIZE MODEL OBJECTS
initialize<- function(inputs)
{
# SET UP LIST FOR SIMULATION
dyn<- list(
k_H = matrix(0,inputs$daug_H,inputs$nreps),
k_N = matrix(0,inputs$daug_N,inputs$nreps),
Linf_H = matrix(0,inputs$daug_H,inputs$nreps),
Linf_N = matrix(0,inputs$daug_N,inputs$nreps),
LEN_H = matrix(0,inputs... | /pallid-sturgeon-population-model/src/initialize-model.R | no_license | mcolvin/Pallid-Sturgeon-Population-Model | R | false | false | 5,160 | r | ### INITIALIZE MODEL OBJECTS
initialize<- function(inputs)
{
# SET UP LIST FOR SIMULATION
dyn<- list(
k_H = matrix(0,inputs$daug_H,inputs$nreps),
k_N = matrix(0,inputs$daug_N,inputs$nreps),
Linf_H = matrix(0,inputs$daug_H,inputs$nreps),
Linf_N = matrix(0,inputs$daug_N,inputs$nreps),
LEN_H = matrix(0,inputs... |
#This code will generate a map of the Steigerwald,
#which shows the potential natural vegetation
#and the location of the Steigerwald in Germany.
#TODO:
#fix "-0.1" in line 135
#add a better code for scalebar and north arrow
#add the predone changes of the pnv-file from QGIS to R
library(rgdal)
library(ggplot2)
lib... | /reference_area_map.R | no_license | fpohl/steigerwald_pnv_map | R | false | false | 6,817 | r | #This code will generate a map of the Steigerwald,
#which shows the potential natural vegetation
#and the location of the Steigerwald in Germany.
#TODO:
#fix "-0.1" in line 135
#add a better code for scalebar and north arrow
#add the predone changes of the pnv-file from QGIS to R
library(rgdal)
library(ggplot2)
lib... |
#UK data
#Donor type of allograft
ukfull$DTYPE <-
recode(ukfull$DTYPE,
c(1 ~ 1, #"Deceased heartbeating"
2 ~ 2, #"Non-heartbeating"
5 ~ 5, #"Living related"
6 ~ 6, #"Living unrelated",
7 ~ 7, #"Domino",
9 ~ 9, #"Donor type unknown"
13 ~ 13... | /By dates/Feb 23/Increased_granularity.R | no_license | tivanics/MLA-International-registries | R | false | false | 15,291 | r | #UK data
#Donor type of allograft
ukfull$DTYPE <-
recode(ukfull$DTYPE,
c(1 ~ 1, #"Deceased heartbeating"
2 ~ 2, #"Non-heartbeating"
5 ~ 5, #"Living related"
6 ~ 6, #"Living unrelated",
7 ~ 7, #"Domino",
9 ~ 9, #"Donor type unknown"
13 ~ 13... |
#analysis_scoring.R
#Analyze processed datasets: scoring functions
#Author: Boyang Zhao
#REQUIRES (datasets): 1) MutSigCV TCGA files (from TCGA, and ran through MutSigCV)
# 2) datasets_analyzed.RData (generated from analyze_basic.R)
# 3) dProteinLengths (protein lengths, generate... | /source/analyze_scoring.R | no_license | boyangzhao/targetID | R | false | false | 32,376 | r | #analysis_scoring.R
#Analyze processed datasets: scoring functions
#Author: Boyang Zhao
#REQUIRES (datasets): 1) MutSigCV TCGA files (from TCGA, and ran through MutSigCV)
# 2) datasets_analyzed.RData (generated from analyze_basic.R)
# 3) dProteinLengths (protein lengths, generate... |
library(xlsx)
df1= read.xlsx(file.choose(),1, header= T)
df1= df1[,!apply(is.na(df1), 2,all)]
Age= 2017- df1$Mfg_Year
df1= cbind(df1,Age)
dffb= df1
df1= df1[,-c(1,2,3)]
head(df1)
str(df1)
df1$Transmission= as.factor(df1$Transmission)
df1$C_Price= as.factor(df1$C_Price)
str(df1)
summary(df1)
dfb=df1
df1=df1[-23,]
df... | /Visualization Techniques.R | no_license | harshitsaini/Business-Analytics-Data-Mining | R | false | false | 3,837 | r | library(xlsx)
df1= read.xlsx(file.choose(),1, header= T)
df1= df1[,!apply(is.na(df1), 2,all)]
Age= 2017- df1$Mfg_Year
df1= cbind(df1,Age)
dffb= df1
df1= df1[,-c(1,2,3)]
head(df1)
str(df1)
df1$Transmission= as.factor(df1$Transmission)
df1$C_Price= as.factor(df1$C_Price)
str(df1)
summary(df1)
dfb=df1
df1=df1[-23,]
df... |
install.packages("h2o")
install.packages("caret")
library(h2o)
library(caret)
final_data <- read.csv('./data/final_dataset.csv')
h2o.init(nthreads = 15, max_mem_size = "10g")
trainIndex <- createDataPartition(
y = final_data$price,
p = 0.8,
list = FALSE)
df_train <- as.h2o(final_data[ trainIndex,])
df_test ... | /Models.R | no_license | Shivi15/Airbnb-Data-Analysis | R | false | false | 3,566 | r | install.packages("h2o")
install.packages("caret")
library(h2o)
library(caret)
final_data <- read.csv('./data/final_dataset.csv')
h2o.init(nthreads = 15, max_mem_size = "10g")
trainIndex <- createDataPartition(
y = final_data$price,
p = 0.8,
list = FALSE)
df_train <- as.h2o(final_data[ trainIndex,])
df_test ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/add.R
\name{addPlots}
\alias{addPlots}
\title{Add custom plotting functions}
\usage{
addPlots(study, plots, reset = FALSE)
}
\arguments{
\item{study}{An OmicNavigator study created with \code{\link{createStudy}}}
\item{plots}{Custom plotting... | /man/addPlots.Rd | permissive | minghao2016/OmicNavigator | R | false | true | 2,814 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/add.R
\name{addPlots}
\alias{addPlots}
\title{Add custom plotting functions}
\usage{
addPlots(study, plots, reset = FALSE)
}
\arguments{
\item{study}{An OmicNavigator study created with \code{\link{createStudy}}}
\item{plots}{Custom plotting... |
#'Estimates conditional average treatment effects based on a trained causal forest and test data
#'
#'@param data a data frame with observations to predict and no NA
#'@param cf output of the rcf causal_forest function
#'@param predict_oob set to TRUE if you want to predict cates on the observations you used to fit the... | /R/predict_causal_forest.R | permissive | ehsanx/rcf | R | false | false | 1,376 | r | #'Estimates conditional average treatment effects based on a trained causal forest and test data
#'
#'@param data a data frame with observations to predict and no NA
#'@param cf output of the rcf causal_forest function
#'@param predict_oob set to TRUE if you want to predict cates on the observations you used to fit the... |
# ggplot2 examples
library(ggplot2)
library(readr)
library(dplyr)
library(jsonlite)
library(purrr)
library(tidyr)
#Pull in League Info
base = "http://fantasy.espn.com/apis/v3/games/ffl/seasons/"
year = "2020"
mid = "/segments/0/leagues/"
leagueID = "197350"
tail = "?view=mDraftDetail&view=mLiveScoring&view=mMatchupSc... | /IU Fantasy Football.R | no_license | tydarwick/Analytics-Files | R | false | false | 3,301 | r | # ggplot2 examples
library(ggplot2)
library(readr)
library(dplyr)
library(jsonlite)
library(purrr)
library(tidyr)
#Pull in League Info
base = "http://fantasy.espn.com/apis/v3/games/ffl/seasons/"
year = "2020"
mid = "/segments/0/leagues/"
leagueID = "197350"
tail = "?view=mDraftDetail&view=mLiveScoring&view=mMatchupSc... |
test_that("id_date_sequence works", {
seq1 <- seq(as.Date("2018-01-01"), as.Date("2025-01-01"), by = "year")
df1 <- data.frame(date = seq1)
df2 <- data.frame(date = seq1[-4])
expect_error(df1$id <- id_date_sequence(df1$date, "year"), NA)
expect_length(unique(df1$id), 1L)
expect_error(df2$id <- id_date_s... | /tests/testthat/test-misc.R | no_license | andybega/states | R | false | false | 1,378 | r |
test_that("id_date_sequence works", {
seq1 <- seq(as.Date("2018-01-01"), as.Date("2025-01-01"), by = "year")
df1 <- data.frame(date = seq1)
df2 <- data.frame(date = seq1[-4])
expect_error(df1$id <- id_date_sequence(df1$date, "year"), NA)
expect_length(unique(df1$id), 1L)
expect_error(df2$id <- id_date_s... |
# Adapted from: shinyREDCap: https://github.com/thewileylab/shinyREDCap/
# Helper Functions ----
#' Add external Resources to the Application
#'
#' This function is internally used to add external
#' resources inside the Shiny application.
#'
#' @import shiny
#' @importFrom golem add_resource_path activate_js favi... | /R/mod_REDCap.R | permissive | DrJohan/ReviewR | R | false | false | 96,379 | r | # Adapted from: shinyREDCap: https://github.com/thewileylab/shinyREDCap/
# Helper Functions ----
#' Add external Resources to the Application
#'
#' This function is internally used to add external
#' resources inside the Shiny application.
#'
#' @import shiny
#' @importFrom golem add_resource_path activate_js favi... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/structure.R
\name{js}
\alias{js}
\title{Add Javascript to any part of a sketch}
\usage{
js(sketch, ..., objn = "p.")
}
\arguments{
\item{sketch}{A p5 sketch.}
\item{...}{Strings of Javascript code to add to the sketch.}
\item{objn}{The name... | /man/js.Rd | no_license | bedantaguru/p5 | R | false | true | 551 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/structure.R
\name{js}
\alias{js}
\title{Add Javascript to any part of a sketch}
\usage{
js(sketch, ..., objn = "p.")
}
\arguments{
\item{sketch}{A p5 sketch.}
\item{...}{Strings of Javascript code to add to the sketch.}
\item{objn}{The name... |
##reading
features <- read.table("UCI HAR Dataset/features.txt", col.names = c("n","functions"))
activities <- read.table("UCI HAR Dataset/activity_labels.txt", col.names = c("code", "activity"))
subject_test <- read.table("UCI HAR Dataset/test/subject_test.txt", col.names = "subject")
x_test <- read.table("UCI HAR... | /run_analysis.R | no_license | axethor512/UCI-HAR-Dataset-peer-graded-assignment | R | false | false | 2,420 | r | ##reading
features <- read.table("UCI HAR Dataset/features.txt", col.names = c("n","functions"))
activities <- read.table("UCI HAR Dataset/activity_labels.txt", col.names = c("code", "activity"))
subject_test <- read.table("UCI HAR Dataset/test/subject_test.txt", col.names = "subject")
x_test <- read.table("UCI HAR... |
## indi_dist.R
## AENIEBLAS, 26/8/18
## DESCRIPTION: comparing the differences in the distances/lengths of individual trajectories between AIS and VMS data
## AEN TO DO: expand data frames for the inputTable, redo figures.
## add the logbook fishing locations on top of trajectory and gfw plots
library(ggp... | /indi_dist.R | no_license | aenieblas/AISvVMS | R | false | false | 8,517 | r | ## indi_dist.R
## AENIEBLAS, 26/8/18
## DESCRIPTION: comparing the differences in the distances/lengths of individual trajectories between AIS and VMS data
## AEN TO DO: expand data frames for the inputTable, redo figures.
## add the logbook fishing locations on top of trajectory and gfw plots
library(ggp... |
#############
# R script to #
# run simulation #
# of community tightness #
# an community distance metric #
##################################
# load libraries
library(ade4)
library(ggplot2)
library(gridExtra)
library(Matrix)
# now expand with positive or negative correlation
n_obs <- 53
n_col1 <- 10
n_col2 <- 10
n_... | /script/si_simulation.r | permissive | TerrestrialEcology-ugent/treeweb_community | R | false | false | 7,069 | r | #############
# R script to #
# run simulation #
# of community tightness #
# an community distance metric #
##################################
# load libraries
library(ade4)
library(ggplot2)
library(gridExtra)
library(Matrix)
# now expand with positive or negative correlation
n_obs <- 53
n_col1 <- 10
n_col2 <- 10
n_... |
require(ggplot2)
require(grid)
theme_set(theme_bw())
bw_update <- theme_bw() +
theme(plot.background = element_blank(),
panel.background = element_rect(colour = NA, fill = NA),
panel.border = element_rect(colour = "black",
fill = NA, size = 0.8),
panel.grid.minor = el... | /map/theme.R | no_license | RossCoppin/PhD | R | false | false | 1,169 | r | require(ggplot2)
require(grid)
theme_set(theme_bw())
bw_update <- theme_bw() +
theme(plot.background = element_blank(),
panel.background = element_rect(colour = NA, fill = NA),
panel.border = element_rect(colour = "black",
fill = NA, size = 0.8),
panel.grid.minor = el... |
##This function creates special "matrix" object that can cache its inverse.
makeCacheMatrix <- function(x = matrix()) {
Inv <- matrix() #set up empty matrix to hold inverse
#define x and Inv so that they can be referenced outside of this environment
set <- function(J){
x <<- J
Inv <<- ma... | /cachematrix.R | no_license | lmkuni/ProgrammingAssignment2 | R | false | false | 1,553 | r | ##This function creates special "matrix" object that can cache its inverse.
makeCacheMatrix <- function(x = matrix()) {
Inv <- matrix() #set up empty matrix to hold inverse
#define x and Inv so that they can be referenced outside of this environment
set <- function(J){
x <<- J
Inv <<- ma... |
\name{splitfactor}
\alias{splitfactor}
\alias{unsplitfactor}
\title{Split and Unsplit Factors into Dummy Variables}
\description{
\code{splitfactor()} splits factor variables into dummy (0/1) variables. This can be useful when functions do not process factor variables well or require numeric matrices to operate. \code{... | /man/splitfactor.Rd | no_license | Zchristian955/cobalt | R | false | false | 5,913 | rd | \name{splitfactor}
\alias{splitfactor}
\alias{unsplitfactor}
\title{Split and Unsplit Factors into Dummy Variables}
\description{
\code{splitfactor()} splits factor variables into dummy (0/1) variables. This can be useful when functions do not process factor variables well or require numeric matrices to operate. \code{... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/compute_bettis.R
\name{meetNumber}
\alias{meetNumber}
\title{Counting correct result}
\usage{
meetNumber(result, correct)
}
\arguments{
\item{result}{estimated Betti numbers}
\item{correct}{correct Betti numbers}
}
\description{
Counting cor... | /man/meetNumber.Rd | permissive | jetstreamokayasu/usephacm | R | false | true | 334 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/compute_bettis.R
\name{meetNumber}
\alias{meetNumber}
\title{Counting correct result}
\usage{
meetNumber(result, correct)
}
\arguments{
\item{result}{estimated Betti numbers}
\item{correct}{correct Betti numbers}
}
\description{
Counting cor... |
testlist <- list(AgeVector = c(-4.73074171454048e-167, 2.2262381097027e-76, -9.12990429452974e-204, 5.97087417427845e-79, 4.7390525269307e-300, 6.58361441690132e-121, 3.58611068565168e-154, -2.94504776827523e-186, 2.62380314702636e-116, -6.78950518864266e+23, 6.99695749856012e-167, 86485.676793021, 1.11271562183704... | /myTAI/inst/testfiles/cpp_bootMatrix/AFL_cpp_bootMatrix/cpp_bootMatrix_valgrind_files/1615764451-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 1,803 | r | testlist <- list(AgeVector = c(-4.73074171454048e-167, 2.2262381097027e-76, -9.12990429452974e-204, 5.97087417427845e-79, 4.7390525269307e-300, 6.58361441690132e-121, 3.58611068565168e-154, -2.94504776827523e-186, 2.62380314702636e-116, -6.78950518864266e+23, 6.99695749856012e-167, 86485.676793021, 1.11271562183704... |
#Загрузите данные о землятресениях
anss <- readLines("https://raw.githubusercontent.com/SergeyMirvoda/MD-DA-2017/master/data/earthquakes_2011.html", warn=FALSE)
#Выберите строки, которые содержат данные с помощью регулярных выражений и функции grep
data <- anss[grep(pattern="^[0-9]{4}/[01][0-9]/[0-9]{2}", anss)]
#Про... | /classwork3/regex.R | no_license | OrehovP/DA-2018 | R | false | false | 638 | r | #Загрузите данные о землятресениях
anss <- readLines("https://raw.githubusercontent.com/SergeyMirvoda/MD-DA-2017/master/data/earthquakes_2011.html", warn=FALSE)
#Выберите строки, которые содержат данные с помощью регулярных выражений и функции grep
data <- anss[grep(pattern="^[0-9]{4}/[01][0-9]/[0-9]{2}", anss)]
#Про... |
plotAll = function(data,folder,filepath_data,sample_name,sampleParam,label_TF,
integrate_TF = FALSE,DE_perm_TF = FALSE,clusterTF = F,markersTF = TRUE,keepOldLabels = F,groupBy = NA,
PCA_dim = NA, resolution_val = NA){
require(gtools)
browser()
print(folder)
print(paste0('la... | /Integration/PlotAll_old.R | no_license | sylvia-science/Ghobrial_EloRD | R | false | false | 8,124 | r | plotAll = function(data,folder,filepath_data,sample_name,sampleParam,label_TF,
integrate_TF = FALSE,DE_perm_TF = FALSE,clusterTF = F,markersTF = TRUE,keepOldLabels = F,groupBy = NA,
PCA_dim = NA, resolution_val = NA){
require(gtools)
browser()
print(folder)
print(paste0('la... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/compare_names.R
\name{compare_names}
\alias{compare_names}
\title{Compares the proportion of children with a given name between 1996 and 2015}
\usage{
compare_names(given_names)
}
\arguments{
\item{given_names}{A string vector containing the ... | /man/compare_names.Rd | no_license | cpetrocheilos/package10593795104317421059735710480219 | R | false | true | 1,148 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/compare_names.R
\name{compare_names}
\alias{compare_names}
\title{Compares the proportion of children with a given name between 1996 and 2015}
\usage{
compare_names(given_names)
}
\arguments{
\item{given_names}{A string vector containing the ... |
# Function taken from the directlabels package that it is in the public domain
autoLab <- function(x, y = NULL, labels = seq(along = x), cex = 1,
method = c("SANN", "GA"),
allowSmallOverlap = FALSE,
trace = FALSE, shadotext = FALSE,
... | /R/autoLab.R | no_license | Rpython1/FactoMineR | R | false | false | 6,486 | r | # Function taken from the directlabels package that it is in the public domain
autoLab <- function(x, y = NULL, labels = seq(along = x), cex = 1,
method = c("SANN", "GA"),
allowSmallOverlap = FALSE,
trace = FALSE, shadotext = FALSE,
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ml_recommendation_als.R
\name{ml_als}
\alias{ml_als}
\alias{ml_recommend}
\alias{ml_als_factorization}
\title{Spark ML -- ALS}
\usage{
ml_als(x, rating_col = "rating", user_col = "user",
item_col = "item", rank = 10, reg_param = 0.1,
impl... | /man/ml_als.Rd | permissive | awblocker/sparklyr | R | false | true | 6,768 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ml_recommendation_als.R
\name{ml_als}
\alias{ml_als}
\alias{ml_recommend}
\alias{ml_als_factorization}
\title{Spark ML -- ALS}
\usage{
ml_als(x, rating_col = "rating", user_col = "user",
item_col = "item", rank = 10, reg_param = 0.1,
impl... |
#Get data
elecdat_all<- read.table("household_power_consumption.txt", sep= ";", header = TRUE,
na.strings = "?", stringsAsFactors = FALSE,
colClasses = c("character", "character", rep("numeric",7)))
#Save data of the relevant days
elecdat <-elecdat_all[elecdat_all$Da... | /plot1.R | no_license | tguldager/ExData_Plotting1 | R | false | false | 850 | r | #Get data
elecdat_all<- read.table("household_power_consumption.txt", sep= ";", header = TRUE,
na.strings = "?", stringsAsFactors = FALSE,
colClasses = c("character", "character", rep("numeric",7)))
#Save data of the relevant days
elecdat <-elecdat_all[elecdat_all$Da... |
for (datasetId in names(seuratObjects)) {
printName(datasetId)
seuratObj <- readRDS(seuratObjects[[datasetId]])
newList <- CellMembrane::SplitSeurat(seuratObj, splitField = splitField, minCellsToKeep = minCellsToKeep, excludedClasses = excludedClasses, alwaysRetainOtherClass = alwaysRetainOtherClass)
f... | /singlecell/resources/chunks/SplitSeurat.R | no_license | BimberLab/DiscvrLabKeyModules | R | false | false | 463 | r | for (datasetId in names(seuratObjects)) {
printName(datasetId)
seuratObj <- readRDS(seuratObjects[[datasetId]])
newList <- CellMembrane::SplitSeurat(seuratObj, splitField = splitField, minCellsToKeep = minCellsToKeep, excludedClasses = excludedClasses, alwaysRetainOtherClass = alwaysRetainOtherClass)
f... |
install.packages('ggplot2')
install.packages('DataExplorer')
install.packages('Hmisc')
install.packages('dplyr')
install.packages("lubridate")
install.packages("cowplot")
install.packages("tidyr")
install.packages("data.table")
install.packages('DAAG')
install.packages('lmvar')
install.packages("klaR")
insta... | /Ecomm_Capstone_prj_HA_modeling.R | no_license | shivanirgv/IIIT_B-Assignments | R | false | false | 60,482 | r | install.packages('ggplot2')
install.packages('DataExplorer')
install.packages('Hmisc')
install.packages('dplyr')
install.packages("lubridate")
install.packages("cowplot")
install.packages("tidyr")
install.packages("data.table")
install.packages('DAAG')
install.packages('lmvar')
install.packages("klaR")
insta... |
#' Survival
#'
#' Density, distribution function, hazard function, quantile function,
#' and random generation for the survival distribution.
#'
#' @param x,q vector of quantiles.
#' @param p vector of probabilities.
#' @param n number of observations.
#' @param arm o... | /R/dist_surv.R | no_license | godwinyyung/npsurvSS | R | false | false | 4,083 | r | #' Survival
#'
#' Density, distribution function, hazard function, quantile function,
#' and random generation for the survival distribution.
#'
#' @param x,q vector of quantiles.
#' @param p vector of probabilities.
#' @param n number of observations.
#' @param arm o... |
library("triangle")
source('jpopmodel.functions.R')
Elicitation <- read.csv("input_data/elicited_parameters.csv",header=T)
JCUs <- read.csv("input_data/jcu_hunting_start_pop.csv",header=T)
Distance <- read.csv("input_data/distmatrix.csv",header=F)
Test <- get.parameters(Elicitation,JCUs,Distances,reps=5)
... | /sample.expert.input.values.tmp.R | no_license | ascelin/jaguar-pva | R | false | false | 658 | r | library("triangle")
source('jpopmodel.functions.R')
Elicitation <- read.csv("input_data/elicited_parameters.csv",header=T)
JCUs <- read.csv("input_data/jcu_hunting_start_pop.csv",header=T)
Distance <- read.csv("input_data/distmatrix.csv",header=F)
Test <- get.parameters(Elicitation,JCUs,Distances,reps=5)
... |
library(rtweet)
library(tidyverse)
library(tidytext)
library(stopwords)
library(scales)
library(lubridate)
library(corrplot)
theme_set(theme_light())
color1 <- c("#EC7063", "#5DADE2", "#58D68D", "#AF7AC5")
### Importing tweets
# api keys
# create_token(app = 'tw_recent',
# consumer_key = "XXX",
# ... | /tw_textmining_part1.R | no_license | gra-vel/twitter-sa | R | false | false | 10,016 | r | library(rtweet)
library(tidyverse)
library(tidytext)
library(stopwords)
library(scales)
library(lubridate)
library(corrplot)
theme_set(theme_light())
color1 <- c("#EC7063", "#5DADE2", "#58D68D", "#AF7AC5")
### Importing tweets
# api keys
# create_token(app = 'tw_recent',
# consumer_key = "XXX",
# ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mo.R
\name{mo_billType_stockIn_reWork}
\alias{mo_billType_stockIn_reWork}
\title{生产订单单据类型-直接入库返工生产}
\usage{
mo_billType_stockIn_reWork()
}
\value{
返回单据类型代码
}
\description{
生产订单单据类型-直接入库返工生产
}
\examples{
mo_billType_stockIn_reWork()
}
| /man/mo_billType_stockIn_reWork.Rd | no_license | takewiki/kdcr | R | false | true | 392 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mo.R
\name{mo_billType_stockIn_reWork}
\alias{mo_billType_stockIn_reWork}
\title{生产订单单据类型-直接入库返工生产}
\usage{
mo_billType_stockIn_reWork()
}
\value{
返回单据类型代码
}
\description{
生产订单单据类型-直接入库返工生产
}
\examples{
mo_billType_stockIn_reWork()
}
|
###
# A function for pre-processing documents
###
prepDocuments <- function(documents, vocab, meta=NULL,
lower.thresh=1, upper.thresh=Inf,
subsample=NULL,
verbose=TRUE) {
#Functions:
# 1) Detect and renumber zero-indexed data.
# 2)... | /stmpy/R/prepDocuments.R | permissive | AntonioCoppola/stmpy | R | false | false | 3,742 | r | ###
# A function for pre-processing documents
###
prepDocuments <- function(documents, vocab, meta=NULL,
lower.thresh=1, upper.thresh=Inf,
subsample=NULL,
verbose=TRUE) {
#Functions:
# 1) Detect and renumber zero-indexed data.
# 2)... |
library(tidyverse)
library(readxl)
library(openxlsx)
library(kableExtra)
library(knitr)
library(mice)
library(pander) | /requirements.R | no_license | MercyCorpsNW/microtest | R | false | false | 117 | r | library(tidyverse)
library(readxl)
library(openxlsx)
library(kableExtra)
library(knitr)
library(mice)
library(pander) |
#' Oil prices
#'
#' Oil prices in constant 1997 dollars: 1870--1997.
#'
#'
#' @format Time series data
#' @source Makridakis, Wheelwright and Hyndman (1998) \emph{Forecasting:
#' methods and applications}, John Wiley & Sons: New York. Chapter 10.
#' @keywords datasets
#' @examples
#' plot(oilprice)
#' @expor... | /timeseries/R/oilprice.R | no_license | somnath1077/ML | R | false | false | 1,273 | r | #' Oil prices
#'
#' Oil prices in constant 1997 dollars: 1870--1997.
#'
#'
#' @format Time series data
#' @source Makridakis, Wheelwright and Hyndman (1998) \emph{Forecasting:
#' methods and applications}, John Wiley & Sons: New York. Chapter 10.
#' @keywords datasets
#' @examples
#' plot(oilprice)
#' @expor... |
### =========================================================================
### The maskMotif() generic & methods
### -------------------------------------------------------------------------
setGeneric("maskMotif", signature=c("x", "motif"),
function(x, motif, min.block.width=1, ...) standardGeneric("maskMotif... | /R/maskMotif.R | no_license | Bioconductor/Biostrings | R | false | false | 2,715 | r | ### =========================================================================
### The maskMotif() generic & methods
### -------------------------------------------------------------------------
setGeneric("maskMotif", signature=c("x", "motif"),
function(x, motif, min.block.width=1, ...) standardGeneric("maskMotif... |
library(qtlcharts)
### Name: setScreenSize
### Title: Set default maximum screen size
### Aliases: setScreenSize
### Keywords: utilities
### ** Examples
setScreenSize("large")
| /data/genthat_extracted_code/qtlcharts/examples/setScreenSize.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 184 | r | library(qtlcharts)
### Name: setScreenSize
### Title: Set default maximum screen size
### Aliases: setScreenSize
### Keywords: utilities
### ** Examples
setScreenSize("large")
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/diff_align.R
\name{diff_align}
\alias{diff_align}
\title{algining texts}
\usage{
diff_align(text1 = NULL, text2 = NULL, tokenizer = NULL,
ignore = NULL, clean = NULL, distance = c("lv", "osa", "dl",
"hamming", "lcs", "qgram", "cos... | /man/diff_align.Rd | permissive | petermeissner/diffrprojects | R | false | true | 2,931 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/diff_align.R
\name{diff_align}
\alias{diff_align}
\title{algining texts}
\usage{
diff_align(text1 = NULL, text2 = NULL, tokenizer = NULL,
ignore = NULL, clean = NULL, distance = c("lv", "osa", "dl",
"hamming", "lcs", "qgram", "cos... |
data_source <- url("https://archive.ics.uci.edu/ml/machine-learning-databases/statlog/german/german.data")
read.table(data_source, header = F, sep = " ", stringsAsFactors = F) -> dane
names(dane) <- c("check_acc_status", "duration", "credit_history", "purpose",
"credit_amount", "savings", "unemploym... | /load_webdata.R | no_license | kubasmolik/shiny_EDA | R | false | false | 3,669 | r | data_source <- url("https://archive.ics.uci.edu/ml/machine-learning-databases/statlog/german/german.data")
read.table(data_source, header = F, sep = " ", stringsAsFactors = F) -> dane
names(dane) <- c("check_acc_status", "duration", "credit_history", "purpose",
"credit_amount", "savings", "unemploym... |
data<-read.table("household_power_consumption.txt",header=TRUE,na.strings = "?", sep = ";")
data<-subset(data,Date %in% c("1/2/2007","2/2/2007"))
data$DateTime <- paste(data$Date,data$Time)
data$Date <- NULL
data$Time <- NULL
data <- data[c(8,1:7)]
data$DateTime <- strptime(data$DateTime,"%d/%m/%Y %H:%M:%S")
png(filena... | /plot1.R | no_license | lesdeuxmagots/ExData_Plotting1 | R | false | false | 454 | r | data<-read.table("household_power_consumption.txt",header=TRUE,na.strings = "?", sep = ";")
data<-subset(data,Date %in% c("1/2/2007","2/2/2007"))
data$DateTime <- paste(data$Date,data$Time)
data$Date <- NULL
data$Time <- NULL
data <- data[c(8,1:7)]
data$DateTime <- strptime(data$DateTime,"%d/%m/%Y %H:%M:%S")
png(filena... |
IJK2MNI <- function(a,b)
{
# Function to compute IJK (Voxel) coordinates to MNI (mm)
A=rbind(matrix(a,c(3,4),byrow=T),c(0,0,0,1))
d=c(b,1)
VoxCor=round(A %*% d) # A*d
VoxCor[1:2,1]=-VoxCor[1:2,1]
return(VoxCor[1:3]-abs(A[1,1])) # AFNI order is different
} | /IJK2MNI.R | no_license | OliverMount/AutocorrfMRI | R | false | false | 281 | r | IJK2MNI <- function(a,b)
{
# Function to compute IJK (Voxel) coordinates to MNI (mm)
A=rbind(matrix(a,c(3,4),byrow=T),c(0,0,0,1))
d=c(b,1)
VoxCor=round(A %*% d) # A*d
VoxCor[1:2,1]=-VoxCor[1:2,1]
return(VoxCor[1:3]-abs(A[1,1])) # AFNI order is different
} |
testlist <- list(G = numeric(0), Rn = numeric(0), atmp = c(3.97314911878724e-307, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), relh = c(1.46950620900256e+302, 4.11932782999429e-175, -3.8... | /meteor/inst/testfiles/ET0_PriestleyTaylor/AFL_ET0_PriestleyTaylor/ET0_PriestleyTaylor_valgrind_files/1615844212-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 2,232 | r | testlist <- list(G = numeric(0), Rn = numeric(0), atmp = c(3.97314911878724e-307, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), relh = c(1.46950620900256e+302, 4.11932782999429e-175, -3.8... |
#' Nearest Value Index
#'
#' Function to find the index of the nearest value from within a set of values
#'
#' @param value The value to be matched
#' @param values The set of values with which the value is being compared
#'
#' @return Index of the nearest value
#'
#' @examples
#' a <- runif()
#' nearestN(50, a)
#'
#' ... | /R/nearestN.R | no_license | mathesong/granviller | R | false | false | 426 | r | #' Nearest Value Index
#'
#' Function to find the index of the nearest value from within a set of values
#'
#' @param value The value to be matched
#' @param values The set of values with which the value is being compared
#'
#' @return Index of the nearest value
#'
#' @examples
#' a <- runif()
#' nearestN(50, a)
#'
#' ... |
numPerPatch4988 <- c(2537,2463)
| /NatureEE-data-archive/Run202971/JAFSdata/JAFSnumPerPatch4988.R | no_license | flaxmans/NatureEE2017 | R | false | false | 32 | r | numPerPatch4988 <- c(2537,2463)
|
testlist <- list(AgeVector = c(-4.73074171454048e-167, 2.2262381097027e-76, -9.12990429452974e-204, 5.97087417427845e-79, 4.7390525269307e-300, 6.58361441690132e-121, 3.58611068565168e-154, -2.94497763037606e-186, 2.62380314702636e-116, -6.78950518864266e+23, 6.99695749856012e-167, 86485.676793021, 1.11271562183704... | /myTAI/inst/testfiles/cpp_bootMatrix/AFL_cpp_bootMatrix/cpp_bootMatrix_valgrind_files/1615768324-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 1,803 | r | testlist <- list(AgeVector = c(-4.73074171454048e-167, 2.2262381097027e-76, -9.12990429452974e-204, 5.97087417427845e-79, 4.7390525269307e-300, 6.58361441690132e-121, 3.58611068565168e-154, -2.94497763037606e-186, 2.62380314702636e-116, -6.78950518864266e+23, 6.99695749856012e-167, 86485.676793021, 1.11271562183704... |
#' Write output
#'
#' Write the score data frame and plots of actual vs. predicted age for all reported gene sets to disk.
#'
#' @param results The results object returned by \code{\link{tempo.runInstance}}.
#' @param filename The prefix for the filename. Writes filename.pdf and filename.table (a tab-delimited te... | /R/tempoOutput.R | no_license | cran/tempoR | R | false | false | 2,519 | r | #' Write output
#'
#' Write the score data frame and plots of actual vs. predicted age for all reported gene sets to disk.
#'
#' @param results The results object returned by \code{\link{tempo.runInstance}}.
#' @param filename The prefix for the filename. Writes filename.pdf and filename.table (a tab-delimited te... |
paramNames <- c("start_capital", "annual_mean_return", "annual_ret_std_dev",
"annual_inflation", "annual_inf_std_dev", "monthly_withdrawals", "n_obs",
"n_sim")
simulate_nav <- function(start_capital = 2000000, annual_mean_return = 5.0,
annual_ret_std_dev = 7.0, ... | /server_original.R | no_license | R-Computing-Lab/enumR_interface | R | false | false | 4,249 | r | paramNames <- c("start_capital", "annual_mean_return", "annual_ret_std_dev",
"annual_inflation", "annual_inf_std_dev", "monthly_withdrawals", "n_obs",
"n_sim")
simulate_nav <- function(start_capital = 2000000, annual_mean_return = 5.0,
annual_ret_std_dev = 7.0, ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ucls.R
\name{add_fe_nopool}
\alias{add_fe_nopool}
\title{Add fe (factor_exceeding) based on no-pooling UCL to data frame}
\usage{
add_fe_nopool(d)
}
\arguments{
\item{d}{Initialized data frame with UCLs}
}
\value{
Data frame with values for \... | /man/add_fe_nopool.Rd | permissive | jmeydam/countcheck | R | false | true | 682 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ucls.R
\name{add_fe_nopool}
\alias{add_fe_nopool}
\title{Add fe (factor_exceeding) based on no-pooling UCL to data frame}
\usage{
add_fe_nopool(d)
}
\arguments{
\item{d}{Initialized data frame with UCLs}
}
\value{
Data frame with values for \... |
\name{beta_func}
\alias{beta_func}
\title{
Beta Moments Function
}
\description{
Function that contains the moment functions for Beta distributed random variables. Uses the gmm() function to estimate sample parameters based on sample data.
\usage{
beta_density(theta, x)
}
\arguments{
\item{theta}{
Theta ... | /man/beta_func.Rd | no_license | guichengwu/R_mmfit | R | false | false | 600 | rd | \name{beta_func}
\alias{beta_func}
\title{
Beta Moments Function
}
\description{
Function that contains the moment functions for Beta distributed random variables. Uses the gmm() function to estimate sample parameters based on sample data.
\usage{
beta_density(theta, x)
}
\arguments{
\item{theta}{
Theta ... |
if(!require(pacman)){install.packages("pacman"); library(pacman)}
p_load(devtools, sf, tigris, glue, dplyr)
options(tigris_class = "sf")
install_github("jamgreen/lehdr")
library(lehdr)
nitc_lehd <- function(years, target_state, target_county, target_place) {
state_lehd <- grab_lodes(state = target_state, year = ... | /Code/grab_place_lehd_func.R | no_license | shiweipsu/Street-Improvement-Impact | R | false | false | 2,370 | r | if(!require(pacman)){install.packages("pacman"); library(pacman)}
p_load(devtools, sf, tigris, glue, dplyr)
options(tigris_class = "sf")
install_github("jamgreen/lehdr")
library(lehdr)
nitc_lehd <- function(years, target_state, target_county, target_place) {
state_lehd <- grab_lodes(state = target_state, year = ... |
models_dir <- "shopperml_pr_points"
models <- dir(parent_dir, full.names = T)
df_list <- lapply(models, function(path){
files <- dir(path, full.names = T, pattern="\\.csv$")
temp_list <- imap(files, ~read.table(file = .x, stringsAsFactors = F, sep = ",", header = T) %>% select(-X) %>%
mutate... | /compare5foldprauc.R | no_license | gcameron89777/gd_task_completion | R | false | false | 392 | r | models_dir <- "shopperml_pr_points"
models <- dir(parent_dir, full.names = T)
df_list <- lapply(models, function(path){
files <- dir(path, full.names = T, pattern="\\.csv$")
temp_list <- imap(files, ~read.table(file = .x, stringsAsFactors = F, sep = ",", header = T) %>% select(-X) %>%
mutate... |
context("split column type")
data("diamonds", package = "ggplot2")
test_that("test data.table return object", {
dt <- data.table(diamonds)
dt_output <- SplitColType(dt)
expect_equal(
names(dt_output)[order(names(dt_output))],
c("continuous", "discrete", "num_all_missing", "num_continuous", "num_discrete"... | /tests/testthat/test-split-col-type.r | no_license | Raelili/DataExplorer | R | false | false | 1,017 | r | context("split column type")
data("diamonds", package = "ggplot2")
test_that("test data.table return object", {
dt <- data.table(diamonds)
dt_output <- SplitColType(dt)
expect_equal(
names(dt_output)[order(names(dt_output))],
c("continuous", "discrete", "num_all_missing", "num_continuous", "num_discrete"... |
#' Global test of clustering using log ratio of spatial
#' densities
#'
#' \code{logrr.test} performs a global test of clustering
#' for comparing cases and controls using the log ratio of
#' spatial densities based on the method of Kelsall and
#' Diggle (1995).
#'
#' @param x An \code{logrrenv} object from the... | /R/logrr.test.R | no_license | cran/smacpod | R | false | false | 2,630 | r | #' Global test of clustering using log ratio of spatial
#' densities
#'
#' \code{logrr.test} performs a global test of clustering
#' for comparing cases and controls using the log ratio of
#' spatial densities based on the method of Kelsall and
#' Diggle (1995).
#'
#' @param x An \code{logrrenv} object from the... |
## ----echo = FALSE, message = FALSE---------------------------------------
options(digits = 2)
library(strataG)
## ------------------------------------------------------------------------
library(ape)
data(dolph.seqs)
i <- sample(1:10, 1)
j <- sample(1:10, 1)
x <- c(rep("n", i), dolph.seqs[[1]], rep("n", j))
x
x.tri... | /data/genthat_extracted_code/strataG/vignettes/sequences.R | no_license | surayaaramli/typeRrh | R | false | false | 2,227 | r | ## ----echo = FALSE, message = FALSE---------------------------------------
options(digits = 2)
library(strataG)
## ------------------------------------------------------------------------
library(ape)
data(dolph.seqs)
i <- sample(1:10, 1)
j <- sample(1:10, 1)
x <- c(rep("n", i), dolph.seqs[[1]], rep("n", j))
x
x.tri... |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Do not modify this file since it was automatically generated from:
%
% MicroarrayData.R
%
% on Tue Jan 15 18:34:03 2008.
%
% by the Rdoc compiler part of the R.oo package.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%... | /man/getExtra.MicroarrayData.Rd | no_license | HenrikBengtsson/aroma | R | false | false | 937 | rd | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Do not modify this file since it was automatically generated from:
%
% MicroarrayData.R
%
% on Tue Jan 15 18:34:03 2008.
%
% by the Rdoc compiler part of the R.oo package.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%... |
#Execute below code to generate three new vectors
Country_Code <- c("ABW","AFG","AGO","ALB","ARE","ARG","ARM","ATG","AUS","AUT","AZE","BDI","BEL","BEN","BFA","BGD","BGR","BHR","BHS","BIH","BLR","BLZ","BOL","BRA","BRB","BRN","BTN","BWA","CAF","CAN","CHE","CHL","CHN","CIV","CMR","COG","COL","COM","CPV","CRI","CUB","CYP",... | /Section5-Homework-Vectors.R | no_license | abhijthp180/from-R-udemy | R | false | false | 7,553 | r | #Execute below code to generate three new vectors
Country_Code <- c("ABW","AFG","AGO","ALB","ARE","ARG","ARM","ATG","AUS","AUT","AZE","BDI","BEL","BEN","BFA","BGD","BGR","BHR","BHS","BIH","BLR","BLZ","BOL","BRA","BRB","BRN","BTN","BWA","CAF","CAN","CHE","CHL","CHN","CIV","CMR","COG","COL","COM","CPV","CRI","CUB","CYP",... |
spark_data_build_types <- function(sc, columns) {
names <- names(columns)
fields <- lapply(names, function(name) {
invoke_static(sc, "org.apache.spark.sql.api.r.SQLUtils", "createStructField", name, columns[[name]], TRUE)
})
invoke_static(sc, "org.apache.spark.sql.api.r.SQLUtils", "createStructType", fiel... | /R/data_copy.R | permissive | land23/sparklyr | R | false | false | 3,778 | r |
spark_data_build_types <- function(sc, columns) {
names <- names(columns)
fields <- lapply(names, function(name) {
invoke_static(sc, "org.apache.spark.sql.api.r.SQLUtils", "createStructField", name, columns[[name]], TRUE)
})
invoke_static(sc, "org.apache.spark.sql.api.r.SQLUtils", "createStructType", fiel... |
#Import data:
dat<-read.table('household_power_consumption 2.txt',header=TRUE,sep=";",na.strings="?")
#Convert "Date" and "Time" variables type:
datetime<-paste(dat$Date,dat$Time)
dat$Datetime<-strptime(datetime,format="%d/%m/%Y %H:%M:%S")
head(dat$Datetime)
#Subset data using "2007-02-01" and "2007-02-02":
dat$Date<... | /plot2.R | no_license | miller222111/ExData_Plotting1 | R | false | false | 698 | r | #Import data:
dat<-read.table('household_power_consumption 2.txt',header=TRUE,sep=";",na.strings="?")
#Convert "Date" and "Time" variables type:
datetime<-paste(dat$Date,dat$Time)
dat$Datetime<-strptime(datetime,format="%d/%m/%Y %H:%M:%S")
head(dat$Datetime)
#Subset data using "2007-02-01" and "2007-02-02":
dat$Date<... |
# ETL Script for Vehicle Recall Data for DV_RProject2
require(dplyr)
file_path <- ("~/DataVisualization/DV_RProject2/01 Data/vrdb_full_monthly.csv")
# read raw csv into dataframe df
df <- read.csv(file_path, stringsAsFactors = FALSE)
# scrub column names for periods, replace with underscore
names(df) <- gsub("\\.+",... | /01 Data/ETL_script.R | no_license | spradling/DV_RProject2 | R | false | false | 2,155 | r | # ETL Script for Vehicle Recall Data for DV_RProject2
require(dplyr)
file_path <- ("~/DataVisualization/DV_RProject2/01 Data/vrdb_full_monthly.csv")
# read raw csv into dataframe df
df <- read.csv(file_path, stringsAsFactors = FALSE)
# scrub column names for periods, replace with underscore
names(df) <- gsub("\\.+",... |
library(testthat)
library(alextest)
test_check("alextest")
| /tests/testthat.R | no_license | alexwhan/alextest | R | false | false | 60 | r | library(testthat)
library(alextest)
test_check("alextest")
|
Hol800 <- read.table("~/Genotipi/Genotipi_DATA/Holstein/Genotipi_09082016/GenotypedInd")
pedigreCB <- read.csv("~/Genotipi/Genotipi_DATA/Holstein/Pedigre_All.csv", header=T)
#when you strip at 8
Hol800$V3 <- substring(Hol800$V1, 8)
length(intersect(Hol800$V3, pedigreCB$STEV_ORIG_ZIVAL))
Hol8 <- Hol800[which(Hol800$... | /InterbullID_seq_CB.R | no_license | andrejaopara/Genotype_CODES | R | false | false | 3,137 | r | Hol800 <- read.table("~/Genotipi/Genotipi_DATA/Holstein/Genotipi_09082016/GenotypedInd")
pedigreCB <- read.csv("~/Genotipi/Genotipi_DATA/Holstein/Pedigre_All.csv", header=T)
#when you strip at 8
Hol800$V3 <- substring(Hol800$V1, 8)
length(intersect(Hol800$V3, pedigreCB$STEV_ORIG_ZIVAL))
Hol8 <- Hol800[which(Hol800$... |
#INDEX 1 Countries
#
TARGET_COUNTRY<-tolower(countrycode_data$country.name.en)
TARGET_COUNTRY<-c(TARGET_COUNTRY,"south-korean","vietnam","usa","unitedstates")
TARGET_WORDS<-TARGET_COUNTRY
#Number of appearance of theses words per day
TARGET_WORDS.count<-Text.word %>%
anti_join(stop_words) %>%
group_by(time)%>%
... | /Sentiment Engines/junk/Indexes Sources.R | no_license | Ubiqum-Project/project | R | false | false | 11,425 | r |
#INDEX 1 Countries
#
TARGET_COUNTRY<-tolower(countrycode_data$country.name.en)
TARGET_COUNTRY<-c(TARGET_COUNTRY,"south-korean","vietnam","usa","unitedstates")
TARGET_WORDS<-TARGET_COUNTRY
#Number of appearance of theses words per day
TARGET_WORDS.count<-Text.word %>%
anti_join(stop_words) %>%
group_by(time)%>%
... |
#' Make matrix for use with ramclustR.df
#'
#' @param profiles A profiles object from enviMass
#' @param type `ramclust` or `graphviz`, in the latter case the retention time is inserted as a first row (not only in the column names).
#' @param addIndex If `TRUE`, add a sample index column in front of the table, as requi... | /R/ramclustRdf.R | no_license | tsufz/RMassScreening | R | false | false | 10,550 | r | #' Make matrix for use with ramclustR.df
#'
#' @param profiles A profiles object from enviMass
#' @param type `ramclust` or `graphviz`, in the latter case the retention time is inserted as a first row (not only in the column names).
#' @param addIndex If `TRUE`, add a sample index column in front of the table, as requi... |
#Examples and exercises from Bioconductor Case studies
#Florian Hahne, Wolfgang Huber, Robert Gentleman, and Seth Falcon
source("http://www.bioconductor.org/biocLite.R")
library("Biobase")
library("ALL") #load ALL package and attach the data
library("genefilter")
data("ALL")
#select sample originating from B-cell ... | /BioConductor Case Studies.R | no_license | csetraynor/BioConductorSchool | R | false | false | 2,561 | r | #Examples and exercises from Bioconductor Case studies
#Florian Hahne, Wolfgang Huber, Robert Gentleman, and Seth Falcon
source("http://www.bioconductor.org/biocLite.R")
library("Biobase")
library("ALL") #load ALL package and attach the data
library("genefilter")
data("ALL")
#select sample originating from B-cell ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Layout.R
\name{LayoutFormat}
\alias{LayoutFormat}
\title{Format Log Events as Text}
\description{
Format Log Events as Text
Format Log Events as Text
}
\details{
Format a \link{LogEvent} as human readable text using \code{\link[=format.LogEv... | /man/LayoutFormat.Rd | permissive | s-fleck/lgr | R | false | true | 7,265 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Layout.R
\name{LayoutFormat}
\alias{LayoutFormat}
\title{Format Log Events as Text}
\description{
Format Log Events as Text
Format Log Events as Text
}
\details{
Format a \link{LogEvent} as human readable text using \code{\link[=format.LogEv... |
testlist <- list(pts = integer(0), ends = NULL, starts = NULL, sorted_ends = c(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... | /IntervalSurgeon/inst/testfiles/rcpp_depth/AFL_rcpp_depth/rcpp_depth_valgrind_files/1609858488-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 713 | r | testlist <- list(pts = integer(0), ends = NULL, starts = NULL, sorted_ends = c(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... |
context("roc_plot")
test_that("base functionality works", {
df = data.frame(y = c(1, 0, 1),
yhat = c(0.5, 0.8, 0.9),
letter = c("a", "b", "b"))
g = roc_plot(df, "yhat", "y")
expect_equal(g[["data"]]$y, c(0, 0.5, 0.5, 1))
expect_equal(g[["data"]]$x, c(0, 0, 1, 1))
g = roc_plot(df,... | /tests/testthat/test-roc_plot.R | permissive | wkostelecki/ezplot | R | false | false | 630 | r | context("roc_plot")
test_that("base functionality works", {
df = data.frame(y = c(1, 0, 1),
yhat = c(0.5, 0.8, 0.9),
letter = c("a", "b", "b"))
g = roc_plot(df, "yhat", "y")
expect_equal(g[["data"]]$y, c(0, 0.5, 0.5, 1))
expect_equal(g[["data"]]$x, c(0, 0, 1, 1))
g = roc_plot(df,... |
## Plot 3 ##
# read in the data
hpc <- read.table("household_power_consumption.txt", header = TRUE, sep = ";", na.strings = "?")
# generate datetime as a merge of the "Date" and "Time" variable
hpc$Datetime <- paste(hpc$Date, hpc$Time, sep = " ")
hpc$Datetime <- strptime(hpc$Datetime, format = "%d/%m/%Y %H:%M:%S")
#... | /plot3.R | no_license | SchillVi/ExData_Plotting1 | R | false | false | 1,097 | r | ## Plot 3 ##
# read in the data
hpc <- read.table("household_power_consumption.txt", header = TRUE, sep = ";", na.strings = "?")
# generate datetime as a merge of the "Date" and "Time" variable
hpc$Datetime <- paste(hpc$Date, hpc$Time, sep = " ")
hpc$Datetime <- strptime(hpc$Datetime, format = "%d/%m/%Y %H:%M:%S")
#... |
GetDataAndMakePlot <- function()
{
SourceDataFile <- "household_power_consumption.txt"
Data <- read.table(SourceDataFile, header=TRUE, sep=";", stringsAsFactors=FALSE, dec=".")
subSetData <- Data[Data$Date %in% c("1/2/2007","2/2/2007") ,]
datetime <- strptime(paste(subSetData$Date, subSetData... | /Plot2.R | no_license | sutapalli/datasciencecoursera | R | false | false | 618 | r | GetDataAndMakePlot <- function()
{
SourceDataFile <- "household_power_consumption.txt"
Data <- read.table(SourceDataFile, header=TRUE, sep=";", stringsAsFactors=FALSE, dec=".")
subSetData <- Data[Data$Date %in% c("1/2/2007","2/2/2007") ,]
datetime <- strptime(paste(subSetData$Date, subSetData... |
## Inverse a matrix and store it into the cache.
##
## makeCacheVector and cacheSolve are able to inverse a matrix;
## when the inverse of a matrix is calculated, it is stored in the cache.
## When the same matrix is inversed again, the inverse will be
## getten from the cache instead of recalculated.
##
## Example s... | /cachematrix.R | no_license | Johhei/ProgrammingAssignment2 | R | false | false | 1,573 | r | ## Inverse a matrix and store it into the cache.
##
## makeCacheVector and cacheSolve are able to inverse a matrix;
## when the inverse of a matrix is calculated, it is stored in the cache.
## When the same matrix is inversed again, the inverse will be
## getten from the cache instead of recalculated.
##
## Example s... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/error.R
\name{error}
\alias{error}
\title{Create error-messages.}
\usage{
error(..., .argument = NULL, n = 1, fun_stack = TRUE,
quoted = FALSE, width = 80, indent = 4, exdent = 4,
call. = FALSE, domain = NULL)
}
\arguments{
\item{...}{A c... | /man/error.Rd | no_license | LAJordanger/leanRcoding | R | false | true | 3,441 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/error.R
\name{error}
\alias{error}
\title{Create error-messages.}
\usage{
error(..., .argument = NULL, n = 1, fun_stack = TRUE,
quoted = FALSE, width = 80, indent = 4, exdent = 4,
call. = FALSE, domain = NULL)
}
\arguments{
\item{...}{A c... |
library(knitr)
library(kableExtra)
library(formattable)
year <- c("1983","2001", "2007", "2012")
nombre <- c("Ley Orgánica 11/1983 de Reforma Universitaria (LRU)", "Ley Orgánica 6/2001 de Universidades (LOU)","Ley Orgánica 4/2007,de 12 de abril, por la que se modifica la Ley Orgánica 6/2001 de Universidades","Real... | /code/tabla1.R | no_license | MonicaCortinas/ProyectoDocente | R | false | false | 807 | r | library(knitr)
library(kableExtra)
library(formattable)
year <- c("1983","2001", "2007", "2012")
nombre <- c("Ley Orgánica 11/1983 de Reforma Universitaria (LRU)", "Ley Orgánica 6/2001 de Universidades (LOU)","Ley Orgánica 4/2007,de 12 de abril, por la que se modifica la Ley Orgánica 6/2001 de Universidades","Real... |
### TERN LANDSCAPES
# CEC modelling [coobs]
# Author: Brendan Malone
# Email: brendan.malone@csiro.au
# created: 21.9.22
# modified: 21.9.22
# CODE PURPOSE
# Figure out the hyperparameters to use
# Depth 3
# All data geometry
# fixed parameters
vart<- "ph_4b"
depth<- 3
# general root directory
g.root<- "/dataset... | /Production/DSM/pH/digital_soil_mapping/model_space/ph4b/d3/rangerModelling_getfit_parameters_ph_4b_geom_alldat_d3.R | permissive | AusSoilsDSM/SLGA | R | false | false | 2,138 | r | ### TERN LANDSCAPES
# CEC modelling [coobs]
# Author: Brendan Malone
# Email: brendan.malone@csiro.au
# created: 21.9.22
# modified: 21.9.22
# CODE PURPOSE
# Figure out the hyperparameters to use
# Depth 3
# All data geometry
# fixed parameters
vart<- "ph_4b"
depth<- 3
# general root directory
g.root<- "/dataset... |
# Copyright (C) Tal Galili
#
# This file is part of installr.
#
# installr is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# installr... | /R/is.x.R | no_license | TFrene/installr | R | false | false | 4,558 | r | # Copyright (C) Tal Galili
#
# This file is part of installr.
#
# installr is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# installr... |
# lec3_3.r
# Data handling using dplyr
# Data analysis with autompg.txt
# set working directory
# change working directory
setwd("D:/tempstore/moocr")
library(dplyr)
# 2.Read txt file with variable name
# http://archive.ics.uci.edu/ml/datasets/Auto+MPG
# 1. Data reading in R
car<-read.table(file="autompg.txt", na="... | /Postech_AI_Big_Data_MOOC_/빅데이터분석과 R프로그래밍 I/빅데이터분석과 R프로그래밍 I/R프로그래밍 기초1/week3_3/lec3_3.R | no_license | neip313/Study | R | false | false | 2,173 | r | # lec3_3.r
# Data handling using dplyr
# Data analysis with autompg.txt
# set working directory
# change working directory
setwd("D:/tempstore/moocr")
library(dplyr)
# 2.Read txt file with variable name
# http://archive.ics.uci.edu/ml/datasets/Auto+MPG
# 1. Data reading in R
car<-read.table(file="autompg.txt", na="... |
# Connect MongoDB
library("mongolite")
uri <- "mongodb://Test_User:pega#1234@172.30.3.120:27017/TG2492s"
con <- mongo(collection = "PKS_train", db = "TG2492s", url = uri)
print(con) # print environment
dataframe <- con$find()
| /mongoDB_connect.R | no_license | JiangGuanMing/Data_Analyze_R | R | false | false | 228 | r | # Connect MongoDB
library("mongolite")
uri <- "mongodb://Test_User:pega#1234@172.30.3.120:27017/TG2492s"
con <- mongo(collection = "PKS_train", db = "TG2492s", url = uri)
print(con) # print environment
dataframe <- con$find()
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sims.R
\name{convert.fn}
\alias{convert.fn}
\title{Convert genotype calls, as output from hapgen2, to a genotype score matrix}
\usage{
convert.fn(gcalls)
}
\arguments{
\item{gcalls}{data.frame of genotype calls where rows are SNPs and columns... | /man/convert.fn.Rd | no_license | jennasimit/MFMextra | R | false | true | 534 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sims.R
\name{convert.fn}
\alias{convert.fn}
\title{Convert genotype calls, as output from hapgen2, to a genotype score matrix}
\usage{
convert.fn(gcalls)
}
\arguments{
\item{gcalls}{data.frame of genotype calls where rows are SNPs and columns... |
#' Merge eye files from a ufolder
#' if filetype is from sr renames column variables and makes them lower case
#' Places time in ms
#' if edf files just reads them in
#'@import tidyverse
#'@import data.table
#' @param file_list path to .xls files
#' @param blink_colname name of your blink colname:AVERAGE_IN_BLINK, LEFT... | /R/merge_gazer_files.R | no_license | jaharris/gazer | R | false | false | 1,760 | r | #' Merge eye files from a ufolder
#' if filetype is from sr renames column variables and makes them lower case
#' Places time in ms
#' if edf files just reads them in
#'@import tidyverse
#'@import data.table
#' @param file_list path to .xls files
#' @param blink_colname name of your blink colname:AVERAGE_IN_BLINK, LEFT... |
library(shiny)
shinyServer(function(input, output) {
#Payment variables
monthPay <- reactive({
input$sliderPrincipal*1000*(input$sliderRate/1200)*
(1+(input$sliderRate/1200))^(input$sliderTerm*12)/
((1+(input$sliderRate/1200))^(input$sliderTerm*12)-1)
})
overallRepayment<- react... | /server.R | no_license | AnaP2018/DevelopingDataProducts | R | false | false | 1,826 | r |
library(shiny)
shinyServer(function(input, output) {
#Payment variables
monthPay <- reactive({
input$sliderPrincipal*1000*(input$sliderRate/1200)*
(1+(input$sliderRate/1200))^(input$sliderTerm*12)/
((1+(input$sliderRate/1200))^(input$sliderTerm*12)-1)
})
overallRepayment<- react... |
testlist <- list(rates = c(8.31143311567173e-310, 0, -2.95841658691758e-188, 1.94693962620681e-307, 1.0451773909944e-308, -3.02879630252661e-288, -2.94023802184288e-306, -5.46354690058282e-108, -5.46354689384944e-108, -5.46354690059085e-108, -5.46354690059085e-108, -5.46354690059085e-108, -5.46354690059085e-108, -5... | /grattan/inst/testfiles/IncomeTax/libFuzzer_IncomeTax/IncomeTax_valgrind_files/1610051930-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 3,766 | r | testlist <- list(rates = c(8.31143311567173e-310, 0, -2.95841658691758e-188, 1.94693962620681e-307, 1.0451773909944e-308, -3.02879630252661e-288, -2.94023802184288e-306, -5.46354690058282e-108, -5.46354689384944e-108, -5.46354690059085e-108, -5.46354690059085e-108, -5.46354690059085e-108, -5.46354690059085e-108, -5... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Class-LagOperator.R
\name{getValues-LagOperator}
\alias{getValues-LagOperator}
\alias{getValues,LagOperator-method}
\title{Get attribute \code{values} from a \code{LagOperator}.}
\usage{
\S4method{getValues}{LagOperator}(object, levels.1, lev... | /man/getValues-LagOperator.Rd | no_license | shizelong1985/quantspec | R | false | true | 706 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Class-LagOperator.R
\name{getValues-LagOperator}
\alias{getValues-LagOperator}
\alias{getValues,LagOperator-method}
\title{Get attribute \code{values} from a \code{LagOperator}.}
\usage{
\S4method{getValues}{LagOperator}(object, levels.1, lev... |
parseTextFile = function(){
setwd('C:/Users/knoh1/Documents/qValue_product')
link_table = read.table('p_to_np.txt',sep='\t',header=TRUE)
link_df=data.frame(link_table)
rownames(link_df)<-link_df[,2]
write.table(link_df,file="link_df.txt",sep="\t",quote=FALSE)
return(link_df)
}
parseFileHelper = function(fi... | /qValue_workingCopy/qValue.r | no_license | SquareDorito/qValue | R | false | false | 15,565 | r | parseTextFile = function(){
setwd('C:/Users/knoh1/Documents/qValue_product')
link_table = read.table('p_to_np.txt',sep='\t',header=TRUE)
link_df=data.frame(link_table)
rownames(link_df)<-link_df[,2]
write.table(link_df,file="link_df.txt",sep="\t",quote=FALSE)
return(link_df)
}
parseFileHelper = function(fi... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R
\name{bearings}
\alias{bearings}
\title{Calculating bearings between two sets of points}
\usage{
bearings(a, b)
}
\arguments{
\item{a}{matrix containing a set of coordinates.}
\item{b}{matrix containing another set of coordinat... | /man/bearings.Rd | no_license | b-steve/ascr | R | false | true | 561 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R
\name{bearings}
\alias{bearings}
\title{Calculating bearings between two sets of points}
\usage{
bearings(a, b)
}
\arguments{
\item{a}{matrix containing a set of coordinates.}
\item{b}{matrix containing another set of coordinat... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/EPFR.r
\name{txt.anagram.underlying}
\alias{txt.anagram.underlying}
\title{txt.anagram.underlying}
\usage{
txt.anagram.underlying(x, y, n)
}
\arguments{
\item{x}{= a SINGLE string}
\item{y}{= potentially-usable capitalized words}
\item{n}{=... | /man/txt.anagram.underlying.Rd | no_license | vsrimurthy/EPFR | R | false | true | 1,437 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/EPFR.r
\name{txt.anagram.underlying}
\alias{txt.anagram.underlying}
\title{txt.anagram.underlying}
\usage{
txt.anagram.underlying(x, y, n)
}
\arguments{
\item{x}{= a SINGLE string}
\item{y}{= potentially-usable capitalized words}
\item{n}{=... |
#!/usr/bin/env Rscript
#QCplot.R $OUTPUTFOLDER trimming.stats
args <- commandArgs(trailingOnly = TRUE)
print(args[1])
work_dir <- (args[1])
inputfile <- (args[2])
setwd(work_dir)
#list.files(path = work_dir)
#library(extrafontdb)
library(extrafont)
#library(cowplot)
library(dplyr)
#library(tidyr)
library(ggplot2)
... | /filter_QCplot_no-sickle_no-clumpify.R | no_license | estolle/ngs_popgen | R | false | false | 8,424 | r | #!/usr/bin/env Rscript
#QCplot.R $OUTPUTFOLDER trimming.stats
args <- commandArgs(trailingOnly = TRUE)
print(args[1])
work_dir <- (args[1])
inputfile <- (args[2])
setwd(work_dir)
#list.files(path = work_dir)
#library(extrafontdb)
library(extrafont)
#library(cowplot)
library(dplyr)
#library(tidyr)
library(ggplot2)
... |
\name{f2}
\alias{f2}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{ ~~function to do ... ~~ }
\description{
~~ A concise (1-5 lines) description of what the function does. ~~
}
\usage{
f2(x)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
\item{x}{ ~~Describe \code{x} ... | /R/QTLtree/man/f2.Rd | no_license | ijwilson/QTLtree | R | false | false | 1,701 | rd | \name{f2}
\alias{f2}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{ ~~function to do ... ~~ }
\description{
~~ A concise (1-5 lines) description of what the function does. ~~
}
\usage{
f2(x)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
\item{x}{ ~~Describe \code{x} ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/reporter-minimal.R
\docType{data}
\name{MinimalReporter}
\alias{MinimalReporter}
\title{Test reporter: minimal.}
\format{An object of class \code{R6ClassGenerator} of length 24.}
\usage{
MinimalReporter
}
\description{
The minimal test report... | /man/MinimalReporter.Rd | no_license | bedatadriven/testthat | R | false | true | 992 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/reporter-minimal.R
\docType{data}
\name{MinimalReporter}
\alias{MinimalReporter}
\title{Test reporter: minimal.}
\format{An object of class \code{R6ClassGenerator} of length 24.}
\usage{
MinimalReporter
}
\description{
The minimal test report... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/database.R
\name{databaseGetChairs}
\alias{databaseGetChairs}
\title{Returns list of chairs on a specified faculty}
\usage{
databaseGetChairs(
faculty_id = "",
offset = "",
count = "100",
v = getAPIVersion()
)
}
\arguments{
\item{facu... | /man/databaseGetChairs.Rd | no_license | cran/vkR | R | false | true | 609 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/database.R
\name{databaseGetChairs}
\alias{databaseGetChairs}
\title{Returns list of chairs on a specified faculty}
\usage{
databaseGetChairs(
faculty_id = "",
offset = "",
count = "100",
v = getAPIVersion()
)
}
\arguments{
\item{facu... |
vcf2txt <-
function(vcf.file, normal.col=10, tumor.col=11, MQ.cutoff=30)
{
inputFile <- file(vcf.file, "r")
## skip some definition lines
while(length(lines <- readLines(inputFile, n = 1, warn = FALSE)) > 0) {
##message(lines)
if (length(grep("\\#CHROM",lines))==1) break
}
header <- su... | /R/vcf2txt.R | no_license | cran/saasCNV | R | false | false | 2,594 | r | vcf2txt <-
function(vcf.file, normal.col=10, tumor.col=11, MQ.cutoff=30)
{
inputFile <- file(vcf.file, "r")
## skip some definition lines
while(length(lines <- readLines(inputFile, n = 1, warn = FALSE)) > 0) {
##message(lines)
if (length(grep("\\#CHROM",lines))==1) break
}
header <- su... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.