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 |
|---|---|---|---|---|---|---|---|---|---|
install.packages("wordcloud")
library(wordcloud)
word = c("LILO","BIRO","SCOOBY","LOKI","WENDY","DILMINHA","PELOTAS","BIT")
freq = c(2,3,7,3,1,4,3,1)
x = data.frame(word=word,freq=freq)
wordcloud(words=word,freq=freq)
| /07_cosmos_blue_software/wordcloud.R | no_license | nabsonp/Data_Science_R | R | false | false | 222 | r | install.packages("wordcloud")
library(wordcloud)
word = c("LILO","BIRO","SCOOBY","LOKI","WENDY","DILMINHA","PELOTAS","BIT")
freq = c(2,3,7,3,1,4,3,1)
x = data.frame(word=word,freq=freq)
wordcloud(words=word,freq=freq)
|
context("fetchSDA() -- requires internet connection")
## sample data: these should run in < 3 seconds
test_that("fetchSDA() works", {
skip_if_offline()
skip_on_cran()
# single component
x <<- suppressMessages(fetchSDA(WHERE="nationalmusym = 'kzc4'"))
# basic test
expect_true(inherits(x... | /tests/testthat/test-fetchSDA_component.R | no_license | cran/soilDB | R | false | false | 1,578 | r | context("fetchSDA() -- requires internet connection")
## sample data: these should run in < 3 seconds
test_that("fetchSDA() works", {
skip_if_offline()
skip_on_cran()
# single component
x <<- suppressMessages(fetchSDA(WHERE="nationalmusym = 'kzc4'"))
# basic test
expect_true(inherits(x... |
# Simple Queue Service examples
# Create a queue.
sqs <- paws.sqs::create_queue(
QueueName = "ExampleQueue"
)
# Add a message to the queue.
paws.sqs::send_message(
QueueUrl = sqs$QueueUrl,
MessageBody = "foo"
)
# Get the queue's attributes.
paws.sqs::get_queue_attributes(
QueueUrl = sqs$QueueUrl,
Attribute... | /examples/sqs.R | permissive | CR-Mercado/paws | R | false | false | 639 | r | # Simple Queue Service examples
# Create a queue.
sqs <- paws.sqs::create_queue(
QueueName = "ExampleQueue"
)
# Add a message to the queue.
paws.sqs::send_message(
QueueUrl = sqs$QueueUrl,
MessageBody = "foo"
)
# Get the queue's attributes.
paws.sqs::get_queue_attributes(
QueueUrl = sqs$QueueUrl,
Attribute... |
# Checks requested by devtools::release()
library(devtools)
spell_check()
# R CMD check
check(cran=TRUE, remote=TRUE, manual=TRUE, run_dont_test=TRUE)
# devtools checks
release_checks()
check_rhub()
check_win_devel()
# Update NEWS
# Update DESCRIPTION
# Update cran-comments.md
# Update website
devtools:::git_che... | /tools/release_checks.R | no_license | akoyabio/rtree | R | false | false | 351 | r | # Checks requested by devtools::release()
library(devtools)
spell_check()
# R CMD check
check(cran=TRUE, remote=TRUE, manual=TRUE, run_dont_test=TRUE)
# devtools checks
release_checks()
check_rhub()
check_win_devel()
# Update NEWS
# Update DESCRIPTION
# Update cran-comments.md
# Update website
devtools:::git_che... |
setwd("D:/Rdata")
library(e1071)
accidents.df <- read.csv("accidents.csv")
str(accidents.df)
accidents.df$INJURY <- ifelse(accidents.df$MAX_SEV_IR>0, "yes", "no")
for (i in c(1:dim(accidents.df)[2])){
accidents.df[,i] <- as.factor(accidents.df[,i])
}
str(accidents.df)
selected.var <- c(3,7,8,14,15,16,17,19,25)
s... | /Assignment/열번째 과제/accidents.R | no_license | hea-teck/Data_Mining_2019 | R | false | false | 698 | r | setwd("D:/Rdata")
library(e1071)
accidents.df <- read.csv("accidents.csv")
str(accidents.df)
accidents.df$INJURY <- ifelse(accidents.df$MAX_SEV_IR>0, "yes", "no")
for (i in c(1:dim(accidents.df)[2])){
accidents.df[,i] <- as.factor(accidents.df[,i])
}
str(accidents.df)
selected.var <- c(3,7,8,14,15,16,17,19,25)
s... |
library(causaldrf)
### Name: iptw_est
### Title: The inverse probability of treatment weighting (iptw) estimator
### Aliases: iptw_est
### ** Examples
## Example from Schafer (2015).
example_data <- sim_data
iptw_list <- iptw_est(Y = Y,
treat = T,
treat_formula = T ~ B.1 + B.2 + B.3 + ... | /data/genthat_extracted_code/causaldrf/examples/iptw_est.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 1,728 | r | library(causaldrf)
### Name: iptw_est
### Title: The inverse probability of treatment weighting (iptw) estimator
### Aliases: iptw_est
### ** Examples
## Example from Schafer (2015).
example_data <- sim_data
iptw_list <- iptw_est(Y = Y,
treat = T,
treat_formula = T ~ B.1 + B.2 + B.3 + ... |
rm(list = ls())
library(ggsim)
library(tidyverse)
library(cowplot)
data <- readRDS("data/simulations.rds")
data <- data %>% filter(scaleI == "1 0 0" & mutation == 0.001)
head(data)
colors <- c("brown", "gold", "goldenrod", "coral", "red")
p1 <- ggdensityplot(data, "EI", "hsymmetry", colors = colors)
p2 <- ggdensi... | /scratchpad.R | no_license | TheoPannetier/ggsim | R | false | false | 571 | r | rm(list = ls())
library(ggsim)
library(tidyverse)
library(cowplot)
data <- readRDS("data/simulations.rds")
data <- data %>% filter(scaleI == "1 0 0" & mutation == 0.001)
head(data)
colors <- c("brown", "gold", "goldenrod", "coral", "red")
p1 <- ggdensityplot(data, "EI", "hsymmetry", colors = colors)
p2 <- ggdensi... |
library("aroma.affymetrix");
verbose <- Arguments$getVerbose(-4, timestamp=TRUE);
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Setup
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
dataSet <- "GSE12019,testset";
chipType <- "Mapping250K_Sty";
csR <- Affyme... | /aroma.affymetrix/inst/testScripts/system/chipTypes/Mapping250K_Sty/22.doASCRMAv2,singleArray.R | no_license | ingted/R-Examples | R | false | false | 1,523 | r | library("aroma.affymetrix");
verbose <- Arguments$getVerbose(-4, timestamp=TRUE);
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Setup
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
dataSet <- "GSE12019,testset";
chipType <- "Mapping250K_Sty";
csR <- Affyme... |
################################################################################
#Set these variables to access Differential Methylation Data files
# in the subfolders created by RnBeads pipeline
#file pathe will be: 'pathroot/analysisFolder/datFolder/comps'
#
pathRoot <- './RnBeads/analysis/'
analysisFolder <- c('n... | /analysis/Process_DMRs/src/ggplots_histograms_of_dmr_by_comparisons.R | no_license | RoccoDLucero/bkfld_gbm_ev | R | false | false | 2,064 | r |
################################################################################
#Set these variables to access Differential Methylation Data files
# in the subfolders created by RnBeads pipeline
#file pathe will be: 'pathroot/analysisFolder/datFolder/comps'
#
pathRoot <- './RnBeads/analysis/'
analysisFolder <- c('n... |
library(PReMiuM)
inputs <- generateSampleDataFile(clusSummaryNormalNormal())
runInfoObj <- profRegr(yModel=inputs$yModel, xModel=inputs$xModel, nSweeps=100, nClusInit=15, nBurn=300, data=inputs$inputData, output="output", covNames = inputs$covNames,fixedEffectsNames = inputs$fixedEffectNames, seed=12345)
disSimObj ... | /sandbox/pam_alternatives/foreachCalcOptimalClusters.R | no_license | TACC/EnviroTyping | R | false | false | 404 | r | library(PReMiuM)
inputs <- generateSampleDataFile(clusSummaryNormalNormal())
runInfoObj <- profRegr(yModel=inputs$yModel, xModel=inputs$xModel, nSweeps=100, nClusInit=15, nBurn=300, data=inputs$inputData, output="output", covNames = inputs$covNames,fixedEffectsNames = inputs$fixedEffectNames, seed=12345)
disSimObj ... |
################################################################################
# External Libraries
#
require(reshape); require(SecDb); require(RODBC)
source("H:/user/R/RMG/Utilities/RLogger.R")
source("H:/user/R/RMG/Energy/VaR/Base/get.portfolio.book.R")
source("H:/user/R/RMG/Energy/VaR/Base/aggregate.run.positions... | /R Extension/RMG/Energy/Trading/Liquidate.Positions/liquidate.Positions.R | no_license | uhasan1/QLExtension-backup | R | false | false | 8,179 | r | ################################################################################
# External Libraries
#
require(reshape); require(SecDb); require(RODBC)
source("H:/user/R/RMG/Utilities/RLogger.R")
source("H:/user/R/RMG/Energy/VaR/Base/get.portfolio.book.R")
source("H:/user/R/RMG/Energy/VaR/Base/aggregate.run.positions... |
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{startSearch}
\alias{startSearch}
\title{Starts the parallelized greedy design search. Once begun, this function cannot be run again.}
\usage{
startSearch(obj)
}
\arguments{
\item{obj}{The \code{experimental_design} object that will be running the search}
}
\des... | /GreedyExperimentalDesign/man/startSearch.Rd | no_license | marchandpatrick/GreedyExperimentalDesign | R | false | false | 451 | rd | % Generated by roxygen2 (4.0.2): do not edit by hand
\name{startSearch}
\alias{startSearch}
\title{Starts the parallelized greedy design search. Once begun, this function cannot be run again.}
\usage{
startSearch(obj)
}
\arguments{
\item{obj}{The \code{experimental_design} object that will be running the search}
}
\des... |
# BEING_SOURCED_FROM_SOMEWHERE = T
source("global.R")
source("./R/scoper.R")
library(dashboardthemes)
# Define UI for data upload app ----
library(shinydashboard)
ui <- dashboardPagePlus(
header = dashboardHeaderPlus(title = span(img(src = "dig_logo.png", height = "60%"),
... | /R/app_archived.R | no_license | michaelgaunt404/ODOT-Value-Pricing | R | false | false | 9,389 | r | # BEING_SOURCED_FROM_SOMEWHERE = T
source("global.R")
source("./R/scoper.R")
library(dashboardthemes)
# Define UI for data upload app ----
library(shinydashboard)
ui <- dashboardPagePlus(
header = dashboardHeaderPlus(title = span(img(src = "dig_logo.png", height = "60%"),
... |
#' Google Directions
#'
#' The Google Maps Directions API is a service that calculates directions between
#' locations. You can search for directions for several modes of transportation,
#' including transit, driving, walking, or cycling.
#'
#' @param origin \code{numeric} vector of lat/lon coordinates, or an address ... | /R/google_directions.R | no_license | applied-statistic-using-r/googleway | R | false | false | 7,543 | r | #' Google Directions
#'
#' The Google Maps Directions API is a service that calculates directions between
#' locations. You can search for directions for several modes of transportation,
#' including transit, driving, walking, or cycling.
#'
#' @param origin \code{numeric} vector of lat/lon coordinates, or an address ... |
library(incadata)
### Name: lt
### Title: Lead time from one date to another
### Aliases: lt
### ** Examples
lt("2017-02-10", "2017-02-16") # 6
lt("2017-02-16", "2017-02-10") # negative lead times ignored by default
lt("2017-02-16", "2017-02-10", TRUE) # -6
| /data/genthat_extracted_code/incadata/examples/lt.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 265 | r | library(incadata)
### Name: lt
### Title: Lead time from one date to another
### Aliases: lt
### ** Examples
lt("2017-02-10", "2017-02-16") # 6
lt("2017-02-16", "2017-02-10") # negative lead times ignored by default
lt("2017-02-16", "2017-02-10", TRUE) # -6
|
install.packages(c("reshape2",
"seqinr"),
repos='http://cran.us.r-project.org') | /install_R_dependencies.R | no_license | philarevalo/dnds_COGenT | R | false | false | 93 | r | install.packages(c("reshape2",
"seqinr"),
repos='http://cran.us.r-project.org') |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pipeline_func.R
\docType{methods}
\name{generateCoorM}
\alias{generateCoorM}
\title{Generate patterns in simulations}
\usage{
generateCoorM(N_dup)
}
\arguments{
\item{N_dup}{how many duplicates to generate}
}
\value{
a list contaning nine D^2... | /man/generateCoorM.Rd | permissive | OliverXUZY/waveST | R | false | true | 439 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pipeline_func.R
\docType{methods}
\name{generateCoorM}
\alias{generateCoorM}
\title{Generate patterns in simulations}
\usage{
generateCoorM(N_dup)
}
\arguments{
\item{N_dup}{how many duplicates to generate}
}
\value{
a list contaning nine D^2... |
############### BIAS & VARIANCE ###############
#
# Bias-variance analysis is a method for quantifying approximation-generalization tradeoff that is particularly
# well suited for analyzing the approximation of real-values targets. It decomposes E_out as follows:
#
# The expected value of of E_out with respect to al... | /3. Approximation-Generalization Tradeoff/biasVariance.R | no_license | niutyut/Learning-From-Data | R | false | false | 11,651 | r | ############### BIAS & VARIANCE ###############
#
# Bias-variance analysis is a method for quantifying approximation-generalization tradeoff that is particularly
# well suited for analyzing the approximation of real-values targets. It decomposes E_out as follows:
#
# The expected value of of E_out with respect to al... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ciMean.R
\name{ciMean}
\alias{ciMean}
\title{Confidence interval around the mean}
\usage{
ciMean(x, conf = 0.95, na.rm = FALSE)
}
\arguments{
\item{x}{A numeric vector, data frame or matrix containing the observations.}
\item{conf}{The level... | /man/ciMean.Rd | permissive | djnavarro/lsr | R | false | true | 1,492 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ciMean.R
\name{ciMean}
\alias{ciMean}
\title{Confidence interval around the mean}
\usage{
ciMean(x, conf = 0.95, na.rm = FALSE)
}
\arguments{
\item{x}{A numeric vector, data frame or matrix containing the observations.}
\item{conf}{The level... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/maak.vuur.R
\name{pl}
\alias{pl}
\title{Strip function}
\usage{
pl(x = 1:nrow(dpca$ind$contrib), y = dpca$call$X[, sstf], tp = "p",
sdif = "sdif", sdifval = 3, pcadf = cluscont, cl, clII, mn, nm, nmII,
envr = zz, qplot = TRUE, verbose = T... | /man/pl.Rd | no_license | Boshoffsmit/novaFire | R | false | true | 1,698 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/maak.vuur.R
\name{pl}
\alias{pl}
\title{Strip function}
\usage{
pl(x = 1:nrow(dpca$ind$contrib), y = dpca$call$X[, sstf], tp = "p",
sdif = "sdif", sdifval = 3, pcadf = cluscont, cl, clII, mn, nm, nmII,
envr = zz, qplot = TRUE, verbose = T... |
# This test will fail
app <- ShinyDriver$new("../")
app$snapshotInit("test_cyper_NOEC_boot")
# Input 'contents_rows_current' was set, but doesn't have an input binding.
# Input 'contents_rows_all' was set, but doesn't have an input binding.
app$setInputs(navbar = "SSD", timeout_ = 10000)
app$setInputs(tabsetpanel = "... | /shinyssd/shinytest/test_cyper_NOEC_boot.R | permissive | sunsun-ux/shinyssd | R | false | false | 517 | r | # This test will fail
app <- ShinyDriver$new("../")
app$snapshotInit("test_cyper_NOEC_boot")
# Input 'contents_rows_current' was set, but doesn't have an input binding.
# Input 'contents_rows_all' was set, but doesn't have an input binding.
app$setInputs(navbar = "SSD", timeout_ = 10000)
app$setInputs(tabsetpanel = "... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/granovaGG-package.R
\docType{data}
\name{anorexia.sub}
\alias{anorexia.sub}
\title{Family Treatment Weight change data for young female anorexia patients (subset).}
\format{A dataframe with 17 observations on the following 2 variables, no
N... | /man/anorexia.sub.Rd | no_license | cran/granovaGG | R | false | true | 1,012 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/granovaGG-package.R
\docType{data}
\name{anorexia.sub}
\alias{anorexia.sub}
\title{Family Treatment Weight change data for young female anorexia patients (subset).}
\format{A dataframe with 17 observations on the following 2 variables, no
N... |
### VARIANT-SPECIFIC DP AND GQ PLOTS ###
### Argument 1: the begining of file from a plink analysis which then gets read for the following extensions: hwe, het, imiss, lmiss
### Argument 2: Directory location where the plots should be saved
library(ggplot2)
library(data.table)
options(warn=-1)
multiplot <- function... | /scripts/plot_het_hardy_miss.R | no_license | Palotie-lab/Finnish-Whole-genomes | R | false | false | 11,357 | r | ### VARIANT-SPECIFIC DP AND GQ PLOTS ###
### Argument 1: the begining of file from a plink analysis which then gets read for the following extensions: hwe, het, imiss, lmiss
### Argument 2: Directory location where the plots should be saved
library(ggplot2)
library(data.table)
options(warn=-1)
multiplot <- function... |
#' Simulate Fantasy Seasons
#'
#' The main function of the package
#'
#' @param conn an connection to a league made with `ff_connect()` and friends (required)
#' @param n_seasons number of seasons to simulate, default = 100
#' @param weeks_per_season number of weeks per season, default = 14
#' @param best_ball a logica... | /R/0_ff_simulate.R | permissive | mrcaseb/ffsimulator | R | false | false | 4,222 | r | #' Simulate Fantasy Seasons
#'
#' The main function of the package
#'
#' @param conn an connection to a league made with `ff_connect()` and friends (required)
#' @param n_seasons number of seasons to simulate, default = 100
#' @param weeks_per_season number of weeks per season, default = 14
#' @param best_ball a logica... |
rm(list=ls())
# 1.Data and packages -----------------------------------------------------
library(quantmod)
library(dygraphs)
library(tseries)
library(tidyverse)
getSymbols(Symbols = "DELL",from='2016-08-17',auto.assign = T)
tail(DELL)
str(DELL)
# 2. Graphics --------------------------------------------------------... | /UFE/VaR limitation/DELL price.R | no_license | lhagwasuren/Youtube-channel | R | false | false | 1,552 | r | rm(list=ls())
# 1.Data and packages -----------------------------------------------------
library(quantmod)
library(dygraphs)
library(tseries)
library(tidyverse)
getSymbols(Symbols = "DELL",from='2016-08-17',auto.assign = T)
tail(DELL)
str(DELL)
# 2. Graphics --------------------------------------------------------... |
library(magrittr)
library(dplyr)
library(Matrix)
setwd('C:\\Users\\Jung-Chen\\Desktop\\20210527_10x_format_Ptr_Osa')
#Read in the gff table for CDS2gene ID conversion
Osa_gff_table = read.table('Oryza_sativa.IRGSP-1.0.51.chr.gff3',
sep='\t',header=F,skip=20,quote='')
dim(Osa_gff_table) # 5... | /Part1/6S_SC_Integration_with_Seurat/10x_format_Ptr_Osa/matrix_generation.R | permissive | Woodformation1136/SingleCell | R | false | false | 8,716 | r | library(magrittr)
library(dplyr)
library(Matrix)
setwd('C:\\Users\\Jung-Chen\\Desktop\\20210527_10x_format_Ptr_Osa')
#Read in the gff table for CDS2gene ID conversion
Osa_gff_table = read.table('Oryza_sativa.IRGSP-1.0.51.chr.gff3',
sep='\t',header=F,skip=20,quote='')
dim(Osa_gff_table) # 5... |
LTMember <- c("Here presenters of LT as character.")
roulette <- function(vec){
x <- length(vec)
vec2 <- sample(vec,x,replace = FALSE, rep(1/x,x))
return(vec2)
}
roulette(LTMember) | /roulettefunction.R | no_license | 8-u8/sandbox | R | false | false | 188 | r | LTMember <- c("Here presenters of LT as character.")
roulette <- function(vec){
x <- length(vec)
vec2 <- sample(vec,x,replace = FALSE, rep(1/x,x))
return(vec2)
}
roulette(LTMember) |
library(cmpprocess)
### Name: cmpproc
### Title: COM Poisson Process Parameter Estimation.
### Aliases: cmpproc
### ** Examples
## Standard usage
data(floodcount)
cmpproc(floodcount$Counts)
| /data/genthat_extracted_code/cmpprocess/examples/cmpproc.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 198 | r | library(cmpprocess)
### Name: cmpproc
### Title: COM Poisson Process Parameter Estimation.
### Aliases: cmpproc
### ** Examples
## Standard usage
data(floodcount)
cmpproc(floodcount$Counts)
|
library(Observation)
### Name: Observation
### Title: Collect and Process Physical Activity Direct Observation Data
### Aliases: Observation Observation-package
### ** Examples
# Example of non-interactive use
data(example_data)
compendium_reference(example_data, FALSE, kids = "yes", mvpa = "yes")
# Example of in... | /data/genthat_extracted_code/Observation/examples/Observation.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 463 | r | library(Observation)
### Name: Observation
### Title: Collect and Process Physical Activity Direct Observation Data
### Aliases: Observation Observation-package
### ** Examples
# Example of non-interactive use
data(example_data)
compendium_reference(example_data, FALSE, kids = "yes", mvpa = "yes")
# Example of in... |
data1 <- read.csv("household_power_consumption.txt", header=T, sep=';', na.strings="?", check.names=F, stringsAsFactors=F, quote='\"')
data1$Date <- as.Date(data1$Date, format="%d/%m/%Y")
data <- subset(data1, subset=(Date >= "2007-02-01" & Date <= "2007-02-02"))
rm(data1)
datetime <- paste(as.Date(data$Date), da... | /Solution2.R | no_license | snvk444/Exploratory-Analysis | R | false | false | 551 | r | data1 <- read.csv("household_power_consumption.txt", header=T, sep=';', na.strings="?", check.names=F, stringsAsFactors=F, quote='\"')
data1$Date <- as.Date(data1$Date, format="%d/%m/%Y")
data <- subset(data1, subset=(Date >= "2007-02-01" & Date <= "2007-02-02"))
rm(data1)
datetime <- paste(as.Date(data$Date), da... |
az_data <- read.table("/home/chetan/Downloads/az-5000.txt", header=TRUE)
az_data <- az_data[,-1]
withArray <- c()
kmValue <- list()
for(i in 2:26){
kmValue[[i]] <- kmeans(az_data, centers = i)
withArray[i] <- sum(kmValue[[i]]$withinss)/i
}
withArray
plot(2:26 , withArray[2:26])
plot(15:26, withArray[15:26])
| /k-means.R | no_license | Chetan21/R-Scripts | R | false | false | 314 | r | az_data <- read.table("/home/chetan/Downloads/az-5000.txt", header=TRUE)
az_data <- az_data[,-1]
withArray <- c()
kmValue <- list()
for(i in 2:26){
kmValue[[i]] <- kmeans(az_data, centers = i)
withArray[i] <- sum(kmValue[[i]]$withinss)/i
}
withArray
plot(2:26 , withArray[2:26])
plot(15:26, withArray[15:26])
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/opts.R
\name{opt_table_lines}
\alias{opt_table_lines}
\title{Option to set table lines to different extents}
\usage{
opt_table_lines(data, extent = c("all", "none", "default"))
}
\arguments{
\item{data}{A table object that is created using th... | /man/opt_table_lines.Rd | permissive | jooyoungseo/gt | R | false | true | 2,600 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/opts.R
\name{opt_table_lines}
\alias{opt_table_lines}
\title{Option to set table lines to different extents}
\usage{
opt_table_lines(data, extent = c("all", "none", "default"))
}
\arguments{
\item{data}{A table object that is created using th... |
##' @description compute the Sharpe ratio based upon daily returns
##'
##' @param x a matrix of daily returns for the stocks of interest
##' @param weights a matrix of weights for the stocks of interest
##'
##' @export
compute_sharpe = function(data,
preds,
price... | /R/compute_sharpe.R | no_license | jmoss13148/sandpr | R | false | false | 3,962 | r | ##' @description compute the Sharpe ratio based upon daily returns
##'
##' @param x a matrix of daily returns for the stocks of interest
##' @param weights a matrix of weights for the stocks of interest
##'
##' @export
compute_sharpe = function(data,
preds,
price... |
setwd("/home/sun-gou/Dropbox/Insight/Sage_Biosciences_Consulting_Project/miRNA/")
library(limma)
library(edgeR)
data <- read.csv("mirna_sorted2.csv",header=T,row.names=1)
ref <- read.csv("mirna_clin2.csv",header=T)
rownames(ref) <- ref$projid
# option 1
ref$az <- NA
ref$az[ref$cogdx == 4] <- 1
ref$az[ref$cogdx != 4... | /run_limma_miRNA.R | no_license | jinomics/project-alzheimers | R | false | false | 1,357 | r | setwd("/home/sun-gou/Dropbox/Insight/Sage_Biosciences_Consulting_Project/miRNA/")
library(limma)
library(edgeR)
data <- read.csv("mirna_sorted2.csv",header=T,row.names=1)
ref <- read.csv("mirna_clin2.csv",header=T)
rownames(ref) <- ref$projid
# option 1
ref$az <- NA
ref$az[ref$cogdx == 4] <- 1
ref$az[ref$cogdx != 4... |
#Global variables
.tblmatchedIndex2 ="matchedIndex2"
################################################################################
#Returns the query to get stocks that belong to S&P along with days
#for which it was valid in index
################################################################################
g... | /R/WrdsIndex.R | no_license | arorar/WRDS | R | false | false | 1,346 | r | #Global variables
.tblmatchedIndex2 ="matchedIndex2"
################################################################################
#Returns the query to get stocks that belong to S&P along with days
#for which it was valid in index
################################################################################
g... |
% Generated by roxygen2 (4.1.0.9000): do not edit by hand
% Please edit documentation in R/treestat.R
\name{treestat}
\alias{treestat}
\title{Significance test of user defined phylogenetic metric}
\usage{
treestat(phy, stlist = NULL, state = NULL, func, par = NULL,
traitevol = NULL, a = NULL, alternative = "two.sided... | /code/phylometrics/man/treestat.Rd | no_license | huaxia1985/Phylometrics | R | false | false | 3,062 | rd | % Generated by roxygen2 (4.1.0.9000): do not edit by hand
% Please edit documentation in R/treestat.R
\name{treestat}
\alias{treestat}
\title{Significance test of user defined phylogenetic metric}
\usage{
treestat(phy, stlist = NULL, state = NULL, func, par = NULL,
traitevol = NULL, a = NULL, alternative = "two.sided... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R
\name{growing_days_this_season}
\alias{growing_days_this_season}
\title{Count growing days within a day interval}
\usage{
growing_days_this_season(from, to, plant_date, harvest_date)
}
\arguments{
\item{from}{first day in range}... | /wsim.agriculture/man/growing_days_this_season.Rd | permissive | isciences/wsim | R | false | true | 745 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R
\name{growing_days_this_season}
\alias{growing_days_this_season}
\title{Count growing days within a day interval}
\usage{
growing_days_this_season(from, to, plant_date, harvest_date)
}
\arguments{
\item{from}{first day in range}... |
# load packages -----------------------------------------------------------
# check if tidyverse is installed and if not then install it
if (!require("tidyverse")) install.packages("tidyverse")
# run every time you restart RStudio
library(readxl) # load readxl, for reading Excel files
library(tidyverse) # load ... | /Graphs.R | no_license | Ree2Pandey/Presentation-Neuro | R | false | false | 3,825 | r |
# load packages -----------------------------------------------------------
# check if tidyverse is installed and if not then install it
if (!require("tidyverse")) install.packages("tidyverse")
# run every time you restart RStudio
library(readxl) # load readxl, for reading Excel files
library(tidyverse) # load ... |
#' Partial Least Squares and predict second dataset
#'
#' Builds PLS model from training dataset and Writes out loadings.
#' Predicts classifications of test dataset and returns dataframe of predictions
#'
#' @param file file for X matirx
#' @param sample.names Vector of sample names in X matrix
#' @param response.valu... | /R/PLSDA_from_file_and_predict_second_dataset.R | no_license | niko-balanis/small.cell.project | R | false | false | 10,055 | r | #' Partial Least Squares and predict second dataset
#'
#' Builds PLS model from training dataset and Writes out loadings.
#' Predicts classifications of test dataset and returns dataframe of predictions
#'
#' @param file file for X matirx
#' @param sample.names Vector of sample names in X matrix
#' @param response.valu... |
#' Merge spectra with m/z tolerance
#'
#' \code{mergeTolerance()} merges two spectra by identifying common peaks with
#' a given m/z tolerance. It can be used with \code{Reduce()} to merge more
#' than two spectra.
#'
#' @param x,y MS2 spectra as objects of class \code{matrix} with m/z in the
#' first column and inte... | /R/extract_merge.R | permissive | kelly-sovacool/CluMSID | R | false | false | 16,653 | r | #' Merge spectra with m/z tolerance
#'
#' \code{mergeTolerance()} merges two spectra by identifying common peaks with
#' a given m/z tolerance. It can be used with \code{Reduce()} to merge more
#' than two spectra.
#'
#' @param x,y MS2 spectra as objects of class \code{matrix} with m/z in the
#' first column and inte... |
## read in emissions data and classification code
NEI <- readRDS("C:/Users/Administrator/Desktop/Exploratory-Data-Analysis-Week-4-course-project-2/summarySCC_PM25.rds")
SCC <- readRDS("C:/Users/Administrator/Desktop/Exploratory-Data-Analysis-Week-4-course-project-2/Source_Classification_Code.rds")
# merge the two data... | /Plot5.R | no_license | joarango10/Exploratory-Data-Analysis-Week-4-course-project-2 | R | false | false | 1,043 | r | ## read in emissions data and classification code
NEI <- readRDS("C:/Users/Administrator/Desktop/Exploratory-Data-Analysis-Week-4-course-project-2/summarySCC_PM25.rds")
SCC <- readRDS("C:/Users/Administrator/Desktop/Exploratory-Data-Analysis-Week-4-course-project-2/Source_Classification_Code.rds")
# merge the two data... |
url <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
zname <- "hpc.zip"
download.file(url, zname)
fname <- as.character(unzip(zname, list = TRUE)[1])
unzip(zname)
d <- read.csv(fname, sep = ";")
## First column (Date) is read in as factor. Change to date class.
d[, 1] <- as.Da... | /plot2.R | no_license | ersinm3/ExData_Plotting1 | R | false | false | 1,415 | r | url <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
zname <- "hpc.zip"
download.file(url, zname)
fname <- as.character(unzip(zname, list = TRUE)[1])
unzip(zname)
d <- read.csv(fname, sep = ";")
## First column (Date) is read in as factor. Change to date class.
d[, 1] <- as.Da... |
##Exploratory Data Analysis Assignment 1
#Download data
setwd("C:\\coursera\\ExploratoryDataAnalysis\\assignment1")
dataurl<-"https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
download.file(dataurl,destfile = "data.zip")
datedownload<-Sys.Date()
hpc<-read.table(unzip("data.zip",f... | /plot1.R | no_license | oljees/ExData_Plotting1 | R | false | false | 925 | r | ##Exploratory Data Analysis Assignment 1
#Download data
setwd("C:\\coursera\\ExploratoryDataAnalysis\\assignment1")
dataurl<-"https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
download.file(dataurl,destfile = "data.zip")
datedownload<-Sys.Date()
hpc<-read.table(unzip("data.zip",f... |
"direct2" <-
function(coord, listout=FALSE) {
deg <- function(x){(x * 180)/pi}
x <- coord[,1]
y <- coord[,2]
anz <- nrow(coord)
rn <- rownames(coord)
tmp1 <- outer(x,x,"-")
tmp2 <- outer(y,y,"-")
tmp3 <- round(deg(atan(tmp2/tmp1)), 1)
tmp3[(tmp3 <= 0)&(tmp3 >= -30)] <- 100
tmp3[(tmp3 <= -30)&(tmp3 >= -60)... | /simba/R/direct2.R | no_license | ingted/R-Examples | R | false | false | 964 | r | "direct2" <-
function(coord, listout=FALSE) {
deg <- function(x){(x * 180)/pi}
x <- coord[,1]
y <- coord[,2]
anz <- nrow(coord)
rn <- rownames(coord)
tmp1 <- outer(x,x,"-")
tmp2 <- outer(y,y,"-")
tmp3 <- round(deg(atan(tmp2/tmp1)), 1)
tmp3[(tmp3 <= 0)&(tmp3 >= -30)] <- 100
tmp3[(tmp3 <= -30)&(tmp3 >= -60)... |
#!/usr/bin/env Rscript
###############################################################################
library('getopt');
params=c(
"input_file", "i", 1, "character",
"factor_file", "f", 2, "character",
"output_file", "o", 2, "character"
);
opt=getopt(spec=matrix(params, ncol=4, byrow=TRUE), debug=... | /CMM_AnalysisTools/Compare_Names_Two_Sheets.r | no_license | fitchad/fitchad.github.io | R | false | false | 3,474 | r | #!/usr/bin/env Rscript
###############################################################################
library('getopt');
params=c(
"input_file", "i", 1, "character",
"factor_file", "f", 2, "character",
"output_file", "o", 2, "character"
);
opt=getopt(spec=matrix(params, ncol=4, byrow=TRUE), debug=... |
# (Hidden) General function to set names
.setNames <- function(object, values, dimensionality, views="all") {
nodes <- names(object@Expectations)
if (paste0(views,collapse="") == "all") {
views <- names(object@Dimensions$D)
} else {
stopifnot(all(views%in%names(object@Dimensions$D) ))
}
# Loop ... | /MOFAtools/R/setMethods.R | no_license | vd4mmind/MOFA | R | false | false | 12,164 | r |
# (Hidden) General function to set names
.setNames <- function(object, values, dimensionality, views="all") {
nodes <- names(object@Expectations)
if (paste0(views,collapse="") == "all") {
views <- names(object@Dimensions$D)
} else {
stopifnot(all(views%in%names(object@Dimensions$D) ))
}
# Loop ... |
library(RSpectra)
library(Matrix)
n = 1000
k = 5
## Set up test matrices
set.seed(123)
x = matrix(rnorm(n^2), n)
x[sample(n^2, floor(n^2 / 2))] = 0
# General matrices
gen = list(x,
as(x, "dgeMatrix"),
as(x, "dgCMatrix"),
as(x, "dgRMatrix"))
# Symmetric matrices
y = x + t(x)
sym1 = list... | /RSpectra/examples/eigs.R | permissive | solgenomics/R_libs | R | false | false | 3,520 | r | library(RSpectra)
library(Matrix)
n = 1000
k = 5
## Set up test matrices
set.seed(123)
x = matrix(rnorm(n^2), n)
x[sample(n^2, floor(n^2 / 2))] = 0
# General matrices
gen = list(x,
as(x, "dgeMatrix"),
as(x, "dgCMatrix"),
as(x, "dgRMatrix"))
# Symmetric matrices
y = x + t(x)
sym1 = list... |
#####################################################################
#
# PLINKBINjob.R
#
# copyright (c) 2009-2012, Joeri van der Velde & Danny Arends
# last modified Apr, 2012
# first written Apr, 2012
#
# Part of the ClusterJobs package
# Contains: run_PLINKBIN
#
#########################################... | /modules/xgap/plugins/cluster/R/ClusterJobs/R/PLINKBINjob.R | permissive | erwinwinder/molgenis_apps | R | false | false | 1,858 | r | #####################################################################
#
# PLINKBINjob.R
#
# copyright (c) 2009-2012, Joeri van der Velde & Danny Arends
# last modified Apr, 2012
# first written Apr, 2012
#
# Part of the ClusterJobs package
# Contains: run_PLINKBIN
#
#########################################... |
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 28149
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 28149
c
c Input Parameter (command line, file):
c input filename QBFLIB/Miller-Marin/trafficlight-controller/tlc01-uniform-dep... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Miller-Marin/trafficlight-controller/tlc01-uniform-depth-29/tlc01-uniform-depth-29.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 688 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 28149
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 28149
c
c Input Parameter (command line, file):
c input filename QBFLIB/Miller-Marin/trafficlight-controller/tlc01-uniform-dep... |
#!/usr/bin/env Rscript
args = commandArgs(trailingOnly=TRUE)
if(length(args)==0){
year1 <- 1992
year2 <- 2015
grid <- "ecmwf" # "gfed4s"
sanityCheck <- FALSE
} else{
year1 <- args[1]
year2 <- args[2]
grid <- args[3]
sanityCheck <- as.logical(args[4])
}
# grid_FPA_FOD_burn_area.R
# e.g. for running fr... | /R/grid_FPA_FOD_burn_area.R | permissive | CSUTroposphericChemistry/PMFutures | R | false | false | 10,710 | r | #!/usr/bin/env Rscript
args = commandArgs(trailingOnly=TRUE)
if(length(args)==0){
year1 <- 1992
year2 <- 2015
grid <- "ecmwf" # "gfed4s"
sanityCheck <- FALSE
} else{
year1 <- args[1]
year2 <- args[2]
grid <- args[3]
sanityCheck <- as.logical(args[4])
}
# grid_FPA_FOD_burn_area.R
# e.g. for running fr... |
library(testthat)
library(timeR)
test_check("timeR")
| /tests/testthat.R | permissive | cran/timeR | R | false | false | 58 | r | library(testthat)
library(timeR)
test_check("timeR")
|
## SEurat functions###
library(Seurat)
library(cowplot)
####average expression table
AvgExTable<-AverageExpression(YOUROBJECT,slot="data",assays = "RNA")
## Violin plot ##
pdf(file="Myviolin.pdf")
plots <- VlnPlot(object = a1, features = c("Genes of Interest list"), split.by = 'group', pt.size = 0, combine = FALSE... | /SeuratFunctions.R | no_license | yong-jiang/SingleCellSequencinginR | R | false | false | 1,588 | r | ## SEurat functions###
library(Seurat)
library(cowplot)
####average expression table
AvgExTable<-AverageExpression(YOUROBJECT,slot="data",assays = "RNA")
## Violin plot ##
pdf(file="Myviolin.pdf")
plots <- VlnPlot(object = a1, features = c("Genes of Interest list"), split.by = 'group', pt.size = 0, combine = FALSE... |
#distance model
cat("
model{
#################
#Detection model#
#################
pi <- 3.141593
# priors for fixed effect parms for half-normal detection parm sigma
b.df.0 ~ dunif(0,20)
b.group.size ~ dnorm(0,0.001)
for( i in 1:N){
#linear predictor
mu.df[i] ... | /models/combined_model_weather_interaction_rodent_additiveG.R | permissive | bowlerbear/NorskPtarmigan | R | false | false | 6,894 | r | #distance model
cat("
model{
#################
#Detection model#
#################
pi <- 3.141593
# priors for fixed effect parms for half-normal detection parm sigma
b.df.0 ~ dunif(0,20)
b.group.size ~ dnorm(0,0.001)
for( i in 1:N){
#linear predictor
mu.df[i] ... |
\name{ex12.46}
\alias{ex12.46}
\docType{data}
\title{R Data set: ex12.46}
\description{
The \code{ex12.46} data frame has 13 rows and 2 columns.
}
\usage{data(ex12.46)}
\format{
A data frame with 13 observations on the following 2 variables.
\describe{
\item{\code{x}}{a numeric vector}
\item{\code{y}}{a num... | /man/ex12.46.Rd | no_license | cran/Devore7 | R | false | false | 707 | rd | \name{ex12.46}
\alias{ex12.46}
\docType{data}
\title{R Data set: ex12.46}
\description{
The \code{ex12.46} data frame has 13 rows and 2 columns.
}
\usage{data(ex12.46)}
\format{
A data frame with 13 observations on the following 2 variables.
\describe{
\item{\code{x}}{a numeric vector}
\item{\code{y}}{a num... |
library(Matrix)
source(system.file("test-tools.R", package = "Matrix"))# identical3() etc
#### Automatically display the class inheritance structure
#### possibly augmented with methods
allCl <- getClasses("package:Matrix")
## Really nice would be to construct an inheritance graph and display
## it. The following i... | /branches/Matrix-mer2/tests/Class+Meth.R | no_license | LTLA/Matrix | R | false | false | 3,591 | r | library(Matrix)
source(system.file("test-tools.R", package = "Matrix"))# identical3() etc
#### Automatically display the class inheritance structure
#### possibly augmented with methods
allCl <- getClasses("package:Matrix")
## Really nice would be to construct an inheritance graph and display
## it. The following i... |
# NOTE: this is now defunct - data_manipulator_complete.py has assumed the function of this script
library(tidyverse)
setwd('~/Desktop/WORK/Monash/Thesis/Data collection')
user_records <- read_csv('user_records.csv') %>% filter(subreddit != 'PoliticalCompassMemes')
# not distinguishing between posts and comments, re... | /data_collection/user_footprint_matrix_script.R | no_license | MichaelKitchener98/RedditIdeology-Honours2021 | R | false | false | 1,766 | r | # NOTE: this is now defunct - data_manipulator_complete.py has assumed the function of this script
library(tidyverse)
setwd('~/Desktop/WORK/Monash/Thesis/Data collection')
user_records <- read_csv('user_records.csv') %>% filter(subreddit != 'PoliticalCompassMemes')
# not distinguishing between posts and comments, re... |
if(!file.exists("Human Activity Analysis")){dir.create("Human Activity Analysis")}
setwd("Human Activity Analysis")
fileurl<-"https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip"
download.file(fileurl,destfile="./getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip")
unzip("getdata%2Fproj... | /run_analysis_correction2.R | no_license | sandrogmb/Getting-cleaning-data-Correction-Assignment | R | false | false | 2,517 | r | if(!file.exists("Human Activity Analysis")){dir.create("Human Activity Analysis")}
setwd("Human Activity Analysis")
fileurl<-"https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip"
download.file(fileurl,destfile="./getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip")
unzip("getdata%2Fproj... |
GSEgRNA <- ReadAffy() | /server-readAffy.R | no_license | beasir/GEOprogram | R | false | false | 21 | r | GSEgRNA <- ReadAffy() |
#processing small fish per large fish biomass indicator
library(dplyr)
library(tidyr)
library(ggplot2)
raw.dir <- here::here("data-raw")
load(file.path(raw.dir,"dat_spec_rec_forSOE.Rdata"))
load(file.path(raw.dir,"dat_spec_rec_epu_forSOE.Rdata"))
#Select and rename
epu_rec_anom <- dat_spec_rec_epu_forSOE %>%
dpl... | /data-raw/get_productivity_anomaly.R | no_license | BrendanWhittle/ecodata | R | false | false | 654 | r | #processing small fish per large fish biomass indicator
library(dplyr)
library(tidyr)
library(ggplot2)
raw.dir <- here::here("data-raw")
load(file.path(raw.dir,"dat_spec_rec_forSOE.Rdata"))
load(file.path(raw.dir,"dat_spec_rec_epu_forSOE.Rdata"))
#Select and rename
epu_rec_anom <- dat_spec_rec_epu_forSOE %>%
dpl... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/composition_metrics.R
\name{pct_plecoptera}
\alias{pct_plecoptera}
\title{Percentage of Plecopteran Individuals}
\usage{
pct_plecoptera(order.wide)
}
\arguments{
\item{order.wide}{= Taxonomic counts aggregated at the order level
classificatio... | /man/pct_plecoptera.Rd | no_license | InterstateCommissionPotomacRiverBasin/BIBI | R | false | true | 533 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/composition_metrics.R
\name{pct_plecoptera}
\alias{pct_plecoptera}
\title{Percentage of Plecopteran Individuals}
\usage{
pct_plecoptera(order.wide)
}
\arguments{
\item{order.wide}{= Taxonomic counts aggregated at the order level
classificatio... |
context("themes")
test_that("background grids match across themes", {
# background_grid() vs. theme_minimal_grid() grid lines
e1 <- calc_element("panel.grid.major.x", theme_half_open() + background_grid())
e2 <- calc_element("panel.grid.major.x", theme_minimal_grid())
e1$inherit.blank <- e2$inherit.blank # the... | /tests/testthat/test_themes.R | no_license | johnlocker/cowplot | R | false | false | 3,397 | r | context("themes")
test_that("background grids match across themes", {
# background_grid() vs. theme_minimal_grid() grid lines
e1 <- calc_element("panel.grid.major.x", theme_half_open() + background_grid())
e2 <- calc_element("panel.grid.major.x", theme_minimal_grid())
e1$inherit.blank <- e2$inherit.blank # the... |
context("types-coercion")
test_that("no method dispatch", {
as.logical.foo <- function(x) "wrong"
expect_identical(as_integer(structure(TRUE, class = "foo")), 1L)
as.list.foo <- function(x) "wrong"
expect_identical(as_list(structure(1:10, class = "foo")), as.list(1:10))
})
test_that("input is left intact", {... | /packrat/lib/x86_64-w64-mingw32/3.4.3/rlang/tests/testthat/test-types-coercion.R | permissive | UBC-MDS/Karl | R | false | false | 1,549 | r | context("types-coercion")
test_that("no method dispatch", {
as.logical.foo <- function(x) "wrong"
expect_identical(as_integer(structure(TRUE, class = "foo")), 1L)
as.list.foo <- function(x) "wrong"
expect_identical(as_list(structure(1:10, class = "foo")), as.list(1:10))
})
test_that("input is left intact", {... |
\name{getAIC}
\alias{getAIC}
\title{Extract the Akaike Information Criterion}
\description{Methods for function \code{getAIC} extracting the Akaike information criterion of the fitted model object from class \code{\link{cold}}. }
\usage{getAIC(object)}
\arguments{
\item{object}{an object of class \code{\link[=col... | /man/getAIC.Rd | no_license | cran/cold | R | false | false | 441 | rd | \name{getAIC}
\alias{getAIC}
\title{Extract the Akaike Information Criterion}
\description{Methods for function \code{getAIC} extracting the Akaike information criterion of the fitted model object from class \code{\link{cold}}. }
\usage{getAIC(object)}
\arguments{
\item{object}{an object of class \code{\link[=col... |
generate.normal.statistics <- function(resp.var, null, raw.geno, pathway, family, lambda, options){
pathway <- pathway[pathway$SNP %in% colnames(raw.geno), ]
chr <- sort(unique(pathway$Chr))
G <- list()
for(i in 1:length(chr)){
snps <- pathway$SNP[pathway$Chr == chr[i]]
id <- which(colnames(raw.g... | /R/generate.normal.statistics.R | no_license | YaohuiZeng/ARTP2 | R | false | false | 2,772 | r |
generate.normal.statistics <- function(resp.var, null, raw.geno, pathway, family, lambda, options){
pathway <- pathway[pathway$SNP %in% colnames(raw.geno), ]
chr <- sort(unique(pathway$Chr))
G <- list()
for(i in 1:length(chr)){
snps <- pathway$SNP[pathway$Chr == chr[i]]
id <- which(colnames(raw.g... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ansi.R
\name{ansi}
\alias{ansi}
\title{Graphics device for ANSI output}
\usage{
ansi(
filename = NULL,
width = NULL,
height = NULL,
colour_depth = 8,
plain_ascii = FALSE,
pow = 1,
char_lookup_table = 1,
font_aspect = 0.45,
.... | /man/ansi.Rd | permissive | coolbutuseless/devoutansi | R | false | true | 1,477 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ansi.R
\name{ansi}
\alias{ansi}
\title{Graphics device for ANSI output}
\usage{
ansi(
filename = NULL,
width = NULL,
height = NULL,
colour_depth = 8,
plain_ascii = FALSE,
pow = 1,
char_lookup_table = 1,
font_aspect = 0.45,
.... |
#######################################################################################
### Date: 21st June 2019
### Purpose: Age-split estimates for GBD 2019
#######################################################################################
bundle_id <- "BUNDLE ID"
acause <- "ACAUSE"
bundle_version <- "BUND... | /gbd_2019/nonfatal_code/mental_anxiety/age_sex_splitting/age_split_gbd2019_cleaned.R | no_license | Nermin-Ghith/ihme-modeling | R | false | false | 11,469 | r | #######################################################################################
### Date: 21st June 2019
### Purpose: Age-split estimates for GBD 2019
#######################################################################################
bundle_id <- "BUNDLE ID"
acause <- "ACAUSE"
bundle_version <- "BUND... |
library(plyr) # for rename, revalue
# read the raw input
dat <- read.csv("globalterrorismdb.csv", header = TRUE, na.strings = c("", "."))
# sanity check that import was ok (there should be ~105k rows and 123 columns)
dim(dat)
# only keep the relevant columns that we are going to use
columnsKeep <- c("iyear", "imon... | /01_preprocessData.R | permissive | RishiSankineni/statsTerrorismProject | R | false | false | 2,712 | r | library(plyr) # for rename, revalue
# read the raw input
dat <- read.csv("globalterrorismdb.csv", header = TRUE, na.strings = c("", "."))
# sanity check that import was ok (there should be ~105k rows and 123 columns)
dim(dat)
# only keep the relevant columns that we are going to use
columnsKeep <- c("iyear", "imon... |
#New function: identify all other users who reciprocate
#at least two mentions (including reply or retweet)
#with the given user: requires gettweets and getmentionees
#note that this version can only be used within the sociogram builder (with replies)
#note that this has been tested and found to achieve the exact same... | /recipmentioners.R | no_license | christlc/twittnet | R | false | false | 3,822 | r | #New function: identify all other users who reciprocate
#at least two mentions (including reply or retweet)
#with the given user: requires gettweets and getmentionees
#note that this version can only be used within the sociogram builder (with replies)
#note that this has been tested and found to achieve the exact same... |
###############################################################################
## Please source the `1-umg.R`, `2-ukl.R`, and `3-ukl-2020-2021.R` first
## if the dataset should be regenerated.
###############################################################################
library("data.table")
full <- rbind(
rea... | /inst/scripts/4-combine.R | permissive | ampel-leipzig/sbcdata | R | false | false | 535 | r | ###############################################################################
## Please source the `1-umg.R`, `2-ukl.R`, and `3-ukl-2020-2021.R` first
## if the dataset should be regenerated.
###############################################################################
library("data.table")
full <- rbind(
rea... |
######################################
## Synthea OMOP Builder code to run ##
######################################
library("ETLSyntheaBuilder")
library("SqlRender")
library("DatabaseConnector")
## Create connectionDetails object to postgres (or other db)
connectionDetails <- DatabaseConnector::createConnectionDeta... | /extras/codeToRun.R | permissive | thehyve/OHDSI-ETL-Synthea | R | false | false | 2,706 | r | ######################################
## Synthea OMOP Builder code to run ##
######################################
library("ETLSyntheaBuilder")
library("SqlRender")
library("DatabaseConnector")
## Create connectionDetails object to postgres (or other db)
connectionDetails <- DatabaseConnector::createConnectionDeta... |
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/get_xpath.R
\name{get_xpath}
\alias{get_xpath}
\title{Assemble XPath expressions for header and body}
\usage{
get_xpath(table.Node, header, body)
}
\arguments{
\item{table.Node}{the table node}
\item{header}{a vector that contains in... | /man/get_xpath.Rd | no_license | fototo/htmltab | R | false | false | 1,075 | rd | % Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/get_xpath.R
\name{get_xpath}
\alias{get_xpath}
\title{Assemble XPath expressions for header and body}
\usage{
get_xpath(table.Node, header, body)
}
\arguments{
\item{table.Node}{the table node}
\item{header}{a vector that contains in... |
boolSkip=F
test_that("Check 40.1 - getNumberOfPlayers - 3 players",{
if(boolSkip){
skip("Test was skipped")
}
A <- c(0,0,0,60,60,60,72)
result = getNumberOfPlayers(A)
expect_equal(result, NumberOfPlayers(3))
})
test_that("Check 40.2 - getNumberOfPlayers - 4 players",{
if(boolSkip){
sk... | /CoopGame/tests/testthat/test_40_getNumbersOfPlayers.R | no_license | anwanjohannes/CoopGame | R | false | false | 655 | r | boolSkip=F
test_that("Check 40.1 - getNumberOfPlayers - 3 players",{
if(boolSkip){
skip("Test was skipped")
}
A <- c(0,0,0,60,60,60,72)
result = getNumberOfPlayers(A)
expect_equal(result, NumberOfPlayers(3))
})
test_that("Check 40.2 - getNumberOfPlayers - 4 players",{
if(boolSkip){
sk... |
library(glmnet)
mydata = read.table("./TrainingSet/ReliefF/NSCLC.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mse",alpha=0.4,family="gaussian",standardize=FALSE)
sink('./Model/EN/ReliefF/NSCLC/NSCLC_050.txt',append=TRUE)
... | /Model/EN/ReliefF/NSCLC/NSCLC_050.R | no_license | leon1003/QSMART | R | false | false | 349 | r | library(glmnet)
mydata = read.table("./TrainingSet/ReliefF/NSCLC.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mse",alpha=0.4,family="gaussian",standardize=FALSE)
sink('./Model/EN/ReliefF/NSCLC/NSCLC_050.txt',append=TRUE)
... |
\name{kinobject}
\Rdversion{1.1}
\alias{kinobject}
\title{
Creates list representing a kinetic experiment or trial
}
\description{
Function to initialise an object representing a kinetic experiment or trial.
}
\usage{
kinobject(parent, type, system, layers = NA, sampling_times = NA, replicates = 1)
}
\arg... | /man/kinobject.Rd | no_license | cran/kinfit | R | false | false | 1,017 | rd | \name{kinobject}
\Rdversion{1.1}
\alias{kinobject}
\title{
Creates list representing a kinetic experiment or trial
}
\description{
Function to initialise an object representing a kinetic experiment or trial.
}
\usage{
kinobject(parent, type, system, layers = NA, sampling_times = NA, replicates = 1)
}
\arg... |
# Student Name - Julio Claros
#install.packages("stats",dependencies = TRUE)
library(readxl)
## Read spreadsheet
corpbonds <- read_excel("C:/Users/Julio/Downloads/Lab 5 dataset - CorporateBonds.xlsx")
# Verify data
print (corpbonds)
##
## Sample size
#
Samplesize <- nrow(corpbonds)
print (Samplesize)
## ---------... | /Programming Coursework/R Coursework(UMD)/Lab 5 Q1 - R code.R | no_license | JulioClaros321/JulioClaros321.github.io | R | false | false | 1,181 | r |
# Student Name - Julio Claros
#install.packages("stats",dependencies = TRUE)
library(readxl)
## Read spreadsheet
corpbonds <- read_excel("C:/Users/Julio/Downloads/Lab 5 dataset - CorporateBonds.xlsx")
# Verify data
print (corpbonds)
##
## Sample size
#
Samplesize <- nrow(corpbonds)
print (Samplesize)
## ---------... |
###############################
#DATA ERROR SCRIPT
###############################
#Author: Dave Callaghan
#Date Created:07-04-2014
#Date Edited:05-12-2014
#
###############################
#Libraries
library(chron)
library(rgdal)
library(vgma)
library(rgeos)
library(maptools)
###############################
#Set Vari... | /Functions/DataError.R | no_license | DavieCal/LT_Reproduction | R | false | false | 3,107 | r | ###############################
#DATA ERROR SCRIPT
###############################
#Author: Dave Callaghan
#Date Created:07-04-2014
#Date Edited:05-12-2014
#
###############################
#Libraries
library(chron)
library(rgdal)
library(vgma)
library(rgeos)
library(maptools)
###############################
#Set Vari... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/papa.R
\docType{data}
\name{papa}
\alias{papa}
\title{OWS Papa hydrographic record during 2010}
\usage{
data(papa, package="ocedata")
}
\description{
\code{papa} holds the temperature and salinity measured at Ocean Weather Station
Papa (50N, ... | /man/papa.Rd | no_license | cran/ocedata | R | false | true | 2,673 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/papa.R
\docType{data}
\name{papa}
\alias{papa}
\title{OWS Papa hydrographic record during 2010}
\usage{
data(papa, package="ocedata")
}
\description{
\code{papa} holds the temperature and salinity measured at Ocean Weather Station
Papa (50N, ... |
# Loads library reshape2
library(reshape2)
# reads the X_test.txt and X_train.txt files into X_test and X_train
X_test <- read.table("./UCI HAR Dataset/test/X_test.txt")
X_train <- read.table("./UCI HAR Dataset/train/X_train.txt")
# Binds X_train and X_test into the joinedDatadet object
... | /run_analysis.R | no_license | JacquesKerguelenLopez/gettingandcleaningproject | R | false | false | 3,753 | r | # Loads library reshape2
library(reshape2)
# reads the X_test.txt and X_train.txt files into X_test and X_train
X_test <- read.table("./UCI HAR Dataset/test/X_test.txt")
X_train <- read.table("./UCI HAR Dataset/train/X_train.txt")
# Binds X_train and X_test into the joinedDatadet object
... |
#' @rdname mex
#' @export
`predict.mex` <-
function(object, which, pqu = .99, nsim = 1000, trace=10, smoothZdistribution=FALSE, ...){
theCall <- match.call()
# Class can be either mex or bootmex
theClass <- class(object)
theClass <- theClass[1] # Avoid R CMD check that doesn't like indexing class(x) at 1
if (... | /fuzzedpackages/texmex/R/predict.mex.R | no_license | akhikolla/testpackages | R | false | false | 4,780 | r | #' @rdname mex
#' @export
`predict.mex` <-
function(object, which, pqu = .99, nsim = 1000, trace=10, smoothZdistribution=FALSE, ...){
theCall <- match.call()
# Class can be either mex or bootmex
theClass <- class(object)
theClass <- theClass[1] # Avoid R CMD check that doesn't like indexing class(x) at 1
if (... |
## ## test wgdx.lst wrapper
## read from target GDX file, reproduce it in different ways using the
## wgdx.lst wrapper
if (! require(gdxrrwMIRO)) stop ("gdxrrw package is not available")
if (0 == igdx(silent=TRUE)) stop ("the gdx shared library has not been loaded")
testName <- 'wgdx.lst wrapper'
errFunc <- fun... | /inst/tests/tWriteLst.R | no_license | GAMS-dev/gdxrrw-miro | R | false | false | 3,138 | r | ## ## test wgdx.lst wrapper
## read from target GDX file, reproduce it in different ways using the
## wgdx.lst wrapper
if (! require(gdxrrwMIRO)) stop ("gdxrrw package is not available")
if (0 == igdx(silent=TRUE)) stop ("the gdx shared library has not been loaded")
testName <- 'wgdx.lst wrapper'
errFunc <- fun... |
library(ggplot2)
library(reshape2)
library(cowplot2)
theme_set(theme_cowplot(font_size = 18, line_size = 1))
LCL <- read.table("Zall3.txt", header=T)
WB <- read.table("WB_Zall3.txt", header = T)
colnames(LCL)[5] <- "genename"
LCL$diff=LCL$greater0-LCL$less0
LCL2 <- LCL[,c(2,3,5)]
LCL3 <- melt(LCL2, id="genename")
LCL... | /bin/QC/WBreplication.R | permissive | smozaffari/ASE_PO | R | false | false | 1,545 | r | library(ggplot2)
library(reshape2)
library(cowplot2)
theme_set(theme_cowplot(font_size = 18, line_size = 1))
LCL <- read.table("Zall3.txt", header=T)
WB <- read.table("WB_Zall3.txt", header = T)
colnames(LCL)[5] <- "genename"
LCL$diff=LCL$greater0-LCL$less0
LCL2 <- LCL[,c(2,3,5)]
LCL3 <- melt(LCL2, id="genename")
LCL... |
#' @title Model Scores computations
#'
#' @description This function provides several scores for model validation and performance assessment.
#' Scores can be also used to compare models.
#'
#' @param object An object of class 'explainer' created with function \code{\link[DALEX]{explain}} from the DALEX package.
#' @pa... | /R/score.R | no_license | sbaram1/auditor | R | false | false | 3,600 | r | #' @title Model Scores computations
#'
#' @description This function provides several scores for model validation and performance assessment.
#' Scores can be also used to compare models.
#'
#' @param object An object of class 'explainer' created with function \code{\link[DALEX]{explain}} from the DALEX package.
#' @pa... |
library(BIOdry)
### Name: frametoLme
### Title: LME modeling
### Aliases: frametoLme
### ** Examples
##Multilevel data frame of tree-ring widths:
data(Prings05,envir = environment())
## Radial increments measured on 2003:
data(Pradii03,envir = environment())
## Monthly precipitation sums and average temperatur... | /data/genthat_extracted_code/BIOdry/examples/frametoLme.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 1,322 | r | library(BIOdry)
### Name: frametoLme
### Title: LME modeling
### Aliases: frametoLme
### ** Examples
##Multilevel data frame of tree-ring widths:
data(Prings05,envir = environment())
## Radial increments measured on 2003:
data(Pradii03,envir = environment())
## Monthly precipitation sums and average temperatur... |
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/1615843567-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... |
#Apply Family
#Apply functions
#lapply() Sapply() vapply() tapply() rapply() mapply() rep() Sweep() aggregate()
#aplly() function
# used for arrays and matrices
data= trunc(rnorm(30, mean=50, sd=5))
x= matrix(data, nrow=6, byrow=F)
x
apply(x, MARGIN=2, FUN = mean)
#lapply() function
#apply for data frame, vector, li... | /apply.R | no_license | kanikatiwari/Data-Analytics-R- | R | false | false | 737 | r | #Apply Family
#Apply functions
#lapply() Sapply() vapply() tapply() rapply() mapply() rep() Sweep() aggregate()
#aplly() function
# used for arrays and matrices
data= trunc(rnorm(30, mean=50, sd=5))
x= matrix(data, nrow=6, byrow=F)
x
apply(x, MARGIN=2, FUN = mean)
#lapply() function
#apply for data frame, vector, li... |
\name{spfoc}
\alias{spfoc}
\docType{data}
\title{
%% ~~ data name/kind ... ~~
}
\description{
%% ~~ A concise (1-5 lines) description of the dataset. ~~
}
\usage{data("spfoc")}
\format{
A data frame with 74071 observations on the following 2 variables.
\describe{
\item{\code{NAME_CN}}{a character vector}
... | /herblabel/man/spfoc.Rd | no_license | helixcn/herblabel_data | R | false | false | 691 | rd | \name{spfoc}
\alias{spfoc}
\docType{data}
\title{
%% ~~ data name/kind ... ~~
}
\description{
%% ~~ A concise (1-5 lines) description of the dataset. ~~
}
\usage{data("spfoc")}
\format{
A data frame with 74071 observations on the following 2 variables.
\describe{
\item{\code{NAME_CN}}{a character vector}
... |
## Mehrnoosh Oghbaie
## 07/24/2019
## ANOVA test between cases and controls
## 1. Filter proteins with less than two peptides (I'll skip this one for now)
## 2. Perform t-test between cases and controls
## 3. Adjust pvalueswith Benjamin Hochberg correction test
## 4. Select significant proteins with (p.adj ... | /src/functions/Anova.R | no_license | moghbaie/L1_mouse | R | false | false | 6,577 | r | ## Mehrnoosh Oghbaie
## 07/24/2019
## ANOVA test between cases and controls
## 1. Filter proteins with less than two peptides (I'll skip this one for now)
## 2. Perform t-test between cases and controls
## 3. Adjust pvalueswith Benjamin Hochberg correction test
## 4. Select significant proteins with (p.adj ... |
VectorSum <- function(x) {
.Call('GiniDistance_VectorSum', PACKAGE = 'GiniDistance', x)
}
orderc <- function(x) {
.Call('GiniDistance_orderc', PACKAGE = 'GiniDistance', x)
}
ParallelVectorSum <- function(x) {
.Call('GiniDistance_ParallelVectorSum', PACKAGE = 'GiniDistance', x)
}
rcpp_Eu_distance <- funct... | /R/RcppExports.R | no_license | cran/GiniDistance | R | false | false | 3,561 | r | VectorSum <- function(x) {
.Call('GiniDistance_VectorSum', PACKAGE = 'GiniDistance', x)
}
orderc <- function(x) {
.Call('GiniDistance_orderc', PACKAGE = 'GiniDistance', x)
}
ParallelVectorSum <- function(x) {
.Call('GiniDistance_ParallelVectorSum', PACKAGE = 'GiniDistance', x)
}
rcpp_Eu_distance <- funct... |
library(shiny)
library(shinythemes)
library(dplyr)
library(hashids)
source('src/lightbox.R')
source('src/photoswipe.R')
images <<- data.frame(src = list.files('www/img')) %>%
tidyr::separate(col = 'src', c('txt', 'date', 'time', 'msec'), sep = '_|\\.', remove = FALSE) %>%
rowwise() %>%
mutate(date = lubridate... | /app.R | no_license | mrjoh3/shiny-gallery-example | R | false | false | 1,736 | r |
library(shiny)
library(shinythemes)
library(dplyr)
library(hashids)
source('src/lightbox.R')
source('src/photoswipe.R')
images <<- data.frame(src = list.files('www/img')) %>%
tidyr::separate(col = 'src', c('txt', 'date', 'time', 'msec'), sep = '_|\\.', remove = FALSE) %>%
rowwise() %>%
mutate(date = lubridate... |
library(testthat)
library(IMMAN)
test_check("IMMAN")
| /tests/testthat.R | no_license | Minoo-Ashtiani/IMMAN | R | false | false | 54 | r | library(testthat)
library(IMMAN)
test_check("IMMAN")
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/vsf.R
\name{SphFuncK_NKP}
\alias{SphFuncK_NKP}
\title{Calculation of the spherical harmonic value with indexes n, k and p in the point (l, b)}
\usage{
SphFuncK_NKP(n, k, p, l, b, where = WHOLE_SPHERE)
}
\arguments{
\item{n}{- index, integer}
... | /man/SphFuncK_NKP.Rd | permissive | flyeye/VSF | R | false | true | 724 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/vsf.R
\name{SphFuncK_NKP}
\alias{SphFuncK_NKP}
\title{Calculation of the spherical harmonic value with indexes n, k and p in the point (l, b)}
\usage{
SphFuncK_NKP(n, k, p, l, b, where = WHOLE_SPHERE)
}
\arguments{
\item{n}{- index, integer}
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Hellinger.R
\name{HellingerDist}
\alias{HellingerDist}
\title{Hellinger Distance}
\usage{
HellingerDist(P, Q, dx)
}
\arguments{
\item{P}{y-values of a distribution}
\item{Q}{y-values of another distribution}
\item{dx}{delta x}
}
\descriptio... | /man/HellingerDist.Rd | no_license | j1wan/dendist | R | false | true | 502 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Hellinger.R
\name{HellingerDist}
\alias{HellingerDist}
\title{Hellinger Distance}
\usage{
HellingerDist(P, Q, dx)
}
\arguments{
\item{P}{y-values of a distribution}
\item{Q}{y-values of another distribution}
\item{dx}{delta x}
}
\descriptio... |
\name{CIE.Whiteness}
\alias{CIE.Whiteness}
\title{CIE Whiteness}
\description{\code{CIE.Whiteness} The CIE Whiteness index is widely used
in the industry for D65 for 2 or 10 deg observer.
}
\usage{CIE.Whiteness(xyYmatrix, illuminant = "D65", observer = 2, RefWhite
= get("XYZperfectreflectingdiffuser", ... | /man/CIE.Whiteness.Rd | no_license | playwar/colorscience | R | false | false | 839 | rd | \name{CIE.Whiteness}
\alias{CIE.Whiteness}
\title{CIE Whiteness}
\description{\code{CIE.Whiteness} The CIE Whiteness index is widely used
in the industry for D65 for 2 or 10 deg observer.
}
\usage{CIE.Whiteness(xyYmatrix, illuminant = "D65", observer = 2, RefWhite
= get("XYZperfectreflectingdiffuser", ... |
library(sqldf)
pc <- read.csv.sql("household_power_consumption.txt","select * from file where Date='1/2/2007' OR Date='2/2/2007' ",sep=";")
#pc <- read.csv("household_power_consumption_filtered2.txt",sep=";")
library(lubridate)
png(file="plot2.png",width = 480, height=480)
pc$Dtstr <- paste(pc$Date, pc$Time)
pc$Date2 <... | /plot2.R | no_license | pacificera/ExData_Plotting1 | R | false | false | 464 | r | library(sqldf)
pc <- read.csv.sql("household_power_consumption.txt","select * from file where Date='1/2/2007' OR Date='2/2/2007' ",sep=";")
#pc <- read.csv("household_power_consumption_filtered2.txt",sep=";")
library(lubridate)
png(file="plot2.png",width = 480, height=480)
pc$Dtstr <- paste(pc$Date, pc$Time)
pc$Date2 <... |
plot.ContSupVarsBiplot <- function(x, F1=1, F2=2, xmin = -3, xmax = 3, ymin = -3, ymax = 3, TypeScale = "Complete",
ValuesScale = "Original", mode="s", dp = 0, PredPoints=0, PchVar=1, ColorVar=NULL, ...){
if (is.null(ColorVar)) ColorVar=3
B=x$ColCoordinates[,c(F1,F2)]
b0=x$b0... | /R/plot.ContSupVarsBiplot.R | no_license | villardon/MultBiplotR | R | false | false | 830 | r | plot.ContSupVarsBiplot <- function(x, F1=1, F2=2, xmin = -3, xmax = 3, ymin = -3, ymax = 3, TypeScale = "Complete",
ValuesScale = "Original", mode="s", dp = 0, PredPoints=0, PchVar=1, ColorVar=NULL, ...){
if (is.null(ColorVar)) ColorVar=3
B=x$ColCoordinates[,c(F1,F2)]
b0=x$b0... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fastreshape.R
\name{fast.reshape}
\alias{fast.reshape}
\alias{dreshape}
\title{Fast reshape}
\usage{
fast.reshape(
data,
varying,
id,
num,
sep = "",
keep,
idname = "id",
numname = "num",
factor = FALSE,
idcombine = TRUE,
... | /mets/man/fast.reshape.Rd | no_license | akhikolla/updatedatatype-list3 | R | false | true | 3,472 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fastreshape.R
\name{fast.reshape}
\alias{fast.reshape}
\alias{dreshape}
\title{Fast reshape}
\usage{
fast.reshape(
data,
varying,
id,
num,
sep = "",
keep,
idname = "id",
numname = "num",
factor = FALSE,
idcombine = TRUE,
... |
library(gdata)
library(tm)
library(KoNLP)
library(sqldf)
library(stringr)
library(party)
library(rpart)
library(partykit)
library(caret)
library(doParallel)
registerDoParallel(3)
# 한글 euc-kr 안깨지게 읽어 오는 함수
#install.packages("readr")
library(readr)
read.csv.any <- function(text, sep = "", ...) {
encoding <- as.chara... | /03/3_true_lie.R | no_license | YoungHwang/R_Study | R | false | false | 4,590 | r | library(gdata)
library(tm)
library(KoNLP)
library(sqldf)
library(stringr)
library(party)
library(rpart)
library(partykit)
library(caret)
library(doParallel)
registerDoParallel(3)
# 한글 euc-kr 안깨지게 읽어 오는 함수
#install.packages("readr")
library(readr)
read.csv.any <- function(text, sep = "", ...) {
encoding <- as.chara... |
subsetdata$Global_active_power<- as.numeric(levels(subsetdata$Global_active_power))[subsetdata$Global_active_power]
subsetdata <- cbind(subsetdata,as.POSIXct(paste(subsetdata$Date, subsetdata$Time), format="%Y-%m-%d %H:%M:%S"))
colnames(subsetdata)[dim(subsetdata)[2]] <- "DateTime"
png(filename = "./github/ExData_Plott... | /Project 1/plot2.R | no_license | EduardoPachecoAcc/ExData_Plotting1 | R | false | false | 475 | r | subsetdata$Global_active_power<- as.numeric(levels(subsetdata$Global_active_power))[subsetdata$Global_active_power]
subsetdata <- cbind(subsetdata,as.POSIXct(paste(subsetdata$Date, subsetdata$Time), format="%Y-%m-%d %H:%M:%S"))
colnames(subsetdata)[dim(subsetdata)[2]] <- "DateTime"
png(filename = "./github/ExData_Plott... |
library(dplR)
### Name: morlet
### Title: Perform a Continuous Morlet Wavelet Transform
### Aliases: morlet
### Keywords: hplot
### ** Examples
library(utils)
data(ca533)
ca533.rwi <- detrend(rwl = ca533, method = "ModNegExp")
ca533.crn <- chron(ca533.rwi, prefix = "CAM", prewhiten = FALSE)
Years <- time(ca533.crn)
... | /data/genthat_extracted_code/dplR/examples/morlet.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 417 | r | library(dplR)
### Name: morlet
### Title: Perform a Continuous Morlet Wavelet Transform
### Aliases: morlet
### Keywords: hplot
### ** Examples
library(utils)
data(ca533)
ca533.rwi <- detrend(rwl = ca533, method = "ModNegExp")
ca533.crn <- chron(ca533.rwi, prefix = "CAM", prewhiten = FALSE)
Years <- time(ca533.crn)
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/collapse_tags.R
\name{collapse_tags}
\alias{collapse_tags}
\title{Collapse \code{term_count} Tags}
\usage{
collapse_tags(x, mapping, ...)
}
\arguments{
\item{x}{A \code{term_count} object.}
\item{mapping}{A list of named vectors where the ve... | /man/collapse_tags.Rd | no_license | jimhester/termco | R | false | true | 936 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/collapse_tags.R
\name{collapse_tags}
\alias{collapse_tags}
\title{Collapse \code{term_count} Tags}
\usage{
collapse_tags(x, mapping, ...)
}
\arguments{
\item{x}{A \code{term_count} object.}
\item{mapping}{A list of named vectors where the ve... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.