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 |
|---|---|---|---|---|---|---|---|---|---|
library(pomp)
### Name: rw2
### Title: Two-dimensional random-walk process
### Aliases: rw2
### Keywords: datasets models
### ** Examples
pompExample(rw2)
plot(rw2)
x <- simulate(rw2,nsim=10,seed=20348585L,params=c(x1.0=0,x2.0=0,s1=1,s2=3,tau=1))
plot(x[[1]])
| /data/genthat_extracted_code/pomp/examples/rw2.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 267 | r | library(pomp)
### Name: rw2
### Title: Two-dimensional random-walk process
### Aliases: rw2
### Keywords: datasets models
### ** Examples
pompExample(rw2)
plot(rw2)
x <- simulate(rw2,nsim=10,seed=20348585L,params=c(x1.0=0,x2.0=0,s1=1,s2=3,tau=1))
plot(x[[1]])
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/remote_Utils.R
\name{closeSandbox}
\alias{closeSandbox}
\title{Quit from sandboxed R session}
\usage{
closeSandbox(sandboxCon)
}
\arguments{
\item{sandboxCon}{socket connection to original R session}
}
\description{
keep socket connection ope... | /man/closeSandbox.Rd | permissive | elizabethmax/sandbox | R | false | true | 384 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/remote_Utils.R
\name{closeSandbox}
\alias{closeSandbox}
\title{Quit from sandboxed R session}
\usage{
closeSandbox(sandboxCon)
}
\arguments{
\item{sandboxCon}{socket connection to original R session}
}
\description{
keep socket connection ope... |
Loading datasets...datasets loaded.
Merging neural and behavioral datasets......datasets merged.
[1] "189 ROIs are missing from 39 runs."
[1] "1 ROIs are missing from 41 runs."
[1] "1 ROIs are missing from 43 runs."
[1] "1 ROIs are missing from 340 runs."
[1] "1 ROIs are missing from 492 runs."
[1] "1 ROIs are missing ... | /lba_rl_joint_v11f_100_r2.R | permissive | bjsmith/reversallearning | R | false | false | 111,867 | r | Loading datasets...datasets loaded.
Merging neural and behavioral datasets......datasets merged.
[1] "189 ROIs are missing from 39 runs."
[1] "1 ROIs are missing from 41 runs."
[1] "1 ROIs are missing from 43 runs."
[1] "1 ROIs are missing from 340 runs."
[1] "1 ROIs are missing from 492 runs."
[1] "1 ROIs are missing ... |
library(consensus)
library(tidyverse)
library(rlang)
folder <- "2021EJOR"
| /2021EJOR/0.setup.R | no_license | noeliarico/kemeny | R | false | false | 75 | r | library(consensus)
library(tidyverse)
library(rlang)
folder <- "2021EJOR"
|
library(tidyverse)
library(ggplot2)
rm(list=ls())
graphics.off()
setwd("/home/nesbit/Desktop/Data_RVK/Code")
read.csv("../Data/Blagodatskaya/Blagodatskaya.csv")
format_data <- function(df,temp,time_units,popBio_unts,species,medium,rep,header){
#get number of datasets
n_data <- ncol(df)/2
data_list <- list()
f... | /MilesNesbit/Code/Processing/Blagodatskaya_processed.R | no_license | zongyi2020/CMEEProject | R | false | false | 2,033 | r | library(tidyverse)
library(ggplot2)
rm(list=ls())
graphics.off()
setwd("/home/nesbit/Desktop/Data_RVK/Code")
read.csv("../Data/Blagodatskaya/Blagodatskaya.csv")
format_data <- function(df,temp,time_units,popBio_unts,species,medium,rep,header){
#get number of datasets
n_data <- ncol(df)/2
data_list <- list()
f... |
##### Justin Owens
##### Getting and Cleaning Data
##### Peer Graded Assignment 2/4/2018
library(data.table)
library(reshape2)
require(dplyr)
require(tidyr)
# If the data doesn't exist, download it
if(!dir.exists('./UCI HAR Dataset')){
download.file('https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUC... | /run_analysis.R | no_license | savethequinn/GettingCleaningDataCourseProject | R | false | false | 4,680 | r | ##### Justin Owens
##### Getting and Cleaning Data
##### Peer Graded Assignment 2/4/2018
library(data.table)
library(reshape2)
require(dplyr)
require(tidyr)
# If the data doesn't exist, download it
if(!dir.exists('./UCI HAR Dataset')){
download.file('https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUC... |
library(dplyr)
library(ggplot2)
library(gganimate)
library(purrr)
#code rain character set
katakana <- c("\u30a0", "\u30a1", "\u30a2", "\u30a3", "\u30a4", "\u30a5", "\u30a6", "\u30a7", "\u30a8",
"\u30a9", "\u30aa", "\u30ab", "\u30ac", "\u30ad", "\u30ae", "\u30af", "\u30b0", "\u30b1",
"\u30b... | /CodeRain.R | no_license | vishalinp/SynthwaveCodeRain | R | false | false | 11,079 | r | library(dplyr)
library(ggplot2)
library(gganimate)
library(purrr)
#code rain character set
katakana <- c("\u30a0", "\u30a1", "\u30a2", "\u30a3", "\u30a4", "\u30a5", "\u30a6", "\u30a7", "\u30a8",
"\u30a9", "\u30aa", "\u30ab", "\u30ac", "\u30ad", "\u30ae", "\u30af", "\u30b0", "\u30b1",
"\u30b... |
#' Summarize distribution with quantiles
#'
#' Essentially, this is a more strict wrapper of `as_q(f)(probs)`. If any value
#' in `probs` is outside of segment \\[0; 1\\], an error is thrown.
#'
#' @inheritParams summ_mean
#' @param probs Vector of probabilities for which quantiles should be returned.
#'
#' @return A n... | /R/summ-other.R | permissive | ismayc/pdqr | R | false | false | 2,123 | r | #' Summarize distribution with quantiles
#'
#' Essentially, this is a more strict wrapper of `as_q(f)(probs)`. If any value
#' in `probs` is outside of segment \\[0; 1\\], an error is thrown.
#'
#' @inheritParams summ_mean
#' @param probs Vector of probabilities for which quantiles should be returned.
#'
#' @return A n... |
fixed_design <- function(alpha, beta, delta.mcr, delta.alt, tau){
c <- qnorm(1 - alpha) # Ensure type one error rate
pow <- function(n){
integrate(function(delta){
pi_0(delta, delta.alt, tau) * pnorm(sqrt(n) * delta - c)
},
delta.mcr,
Inf)$value
} # Define power function
optimum <- nlopt... | /R/fixed_design.R | no_license | MatheMax/RegReSample | R | false | false | 646 | r | fixed_design <- function(alpha, beta, delta.mcr, delta.alt, tau){
c <- qnorm(1 - alpha) # Ensure type one error rate
pow <- function(n){
integrate(function(delta){
pi_0(delta, delta.alt, tau) * pnorm(sqrt(n) * delta - c)
},
delta.mcr,
Inf)$value
} # Define power function
optimum <- nlopt... |
## Helper function for printing a concatenated list of (words, numbers, etc.)
## (to make pretty and informative message messages)
printc <- function(wlist) {
n <- length(wlist)
if ( n == 1 ) return(wlist)
wlist[n] <- paste("and", wlist[n], collapse = " ")
if ( n == 2 ) return(paste(wlist, collapse = " ... | /R/response_matrix.R | no_license | duckmayr/gpirt | R | false | false | 5,508 | r | ## Helper function for printing a concatenated list of (words, numbers, etc.)
## (to make pretty and informative message messages)
printc <- function(wlist) {
n <- length(wlist)
if ( n == 1 ) return(wlist)
wlist[n] <- paste("and", wlist[n], collapse = " ")
if ( n == 2 ) return(paste(wlist, collapse = " ... |
\name{null_estimation}
\alias{null_estimation}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
A function to estimate the proportions of the three component nulls
}
\description{
This is a function to estimate the proportions of the three component
nulls involved in mediation testing. We ... | /man/null_estimation.Rd | no_license | biostatYu/HDMT | R | false | false | 2,505 | rd | \name{null_estimation}
\alias{null_estimation}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
A function to estimate the proportions of the three component nulls
}
\description{
This is a function to estimate the proportions of the three component
nulls involved in mediation testing. We ... |
library(sevenbridges)
library(readr)
#reads local file, but defines it on the job / image
# Any changes to the inputs or positions must be doubled in both definedashboard.R and runDashboard.R
fl=fileDef(name='runDashboardBeta.R',content=read_file('runDashboardBeta.R'))
ERCCDashboard<-Tool(id="ERCCdashboard",label="ERCC... | /tools/definedashboard.R | no_license | jeparson/protomagic | R | false | false | 2,529 | r | library(sevenbridges)
library(readr)
#reads local file, but defines it on the job / image
# Any changes to the inputs or positions must be doubled in both definedashboard.R and runDashboard.R
fl=fileDef(name='runDashboardBeta.R',content=read_file('runDashboardBeta.R'))
ERCCDashboard<-Tool(id="ERCCdashboard",label="ERCC... |
testlist <- list(Beta = 0, CVLinf = 86341236051411296, FM = 1.53632495265886e-311, L50 = 0, L95 = 0, LenBins = c(2.0975686864138e+162, -2.68131210337361e-144, -1.11215735981244e+199, -4.48649879577108e+143, 1.6611802228813e+218, 900371.947279558, 1.07063092954708e+238, 2.88003257377011e-142, 1.29554... | /DLMtool/inst/testfiles/LBSPRgen/AFL_LBSPRgen/LBSPRgen_valgrind_files/1615832248-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 2,052 | r | testlist <- list(Beta = 0, CVLinf = 86341236051411296, FM = 1.53632495265886e-311, L50 = 0, L95 = 0, LenBins = c(2.0975686864138e+162, -2.68131210337361e-144, -1.11215735981244e+199, -4.48649879577108e+143, 1.6611802228813e+218, 900371.947279558, 1.07063092954708e+238, 2.88003257377011e-142, 1.29554... |
context("test-slice")
test_that("vec_slice throws error with non-vector inputs", {
expect_error(vec_slice(environment(), 1L), class = "vctrs_error_scalar_type")
})
test_that("can subset base vectors", {
i <- 2:3
expect_identical(vec_slice(lgl(1, 0, 1), i), lgl(0, 1))
expect_identical(vec_slice(int(1, 2, 3), i... | /tests/testthat/test-slice.R | no_license | zachary-foster/vctrs | R | false | false | 11,625 | r | context("test-slice")
test_that("vec_slice throws error with non-vector inputs", {
expect_error(vec_slice(environment(), 1L), class = "vctrs_error_scalar_type")
})
test_that("can subset base vectors", {
i <- 2:3
expect_identical(vec_slice(lgl(1, 0, 1), i), lgl(0, 1))
expect_identical(vec_slice(int(1, 2, 3), i... |
% Generated by roxygen2 (4.0.2.9000): do not edit by hand
\name{sig.tot.inertia.perm}
\alias{sig.tot.inertia.perm}
\title{Permuted significance of the CA total inertia}
\usage{
sig.tot.inertia.perm(data)
}
\arguments{
\item{data}{Name of the dataset.}
}
\description{
This function allows you to calculate the permuted s... | /man/sig.tot.inertia.perm.Rd | no_license | trinker/CAinterprTools | R | false | false | 713 | rd | % Generated by roxygen2 (4.0.2.9000): do not edit by hand
\name{sig.tot.inertia.perm}
\alias{sig.tot.inertia.perm}
\title{Permuted significance of the CA total inertia}
\usage{
sig.tot.inertia.perm(data)
}
\arguments{
\item{data}{Name of the dataset.}
}
\description{
This function allows you to calculate the permuted s... |
library(openxlsx)
library(maptools)
library(ggplot2)
library(rgdal)
library(dplyr)
sejmiki <- read.xlsx("1461143032_a1c242476ecfd74febac7beef6a12fcb.xlsx")
shp1 <- readShapePoly("gminy/gminy")
sejmiki2 <- sejmiki[,c(1,2,3,4,5,25,26)]
sejmiki2$kod <- paste0(sejmiki2$TERYT, sejmiki2$Typ)
# wyciagamy srodki kazdej gmi... | /2017/WielkaWarszawa/skrypt.R | no_license | pbiecek/SmarterPoland_blog | R | false | false | 2,574 | r | library(openxlsx)
library(maptools)
library(ggplot2)
library(rgdal)
library(dplyr)
sejmiki <- read.xlsx("1461143032_a1c242476ecfd74febac7beef6a12fcb.xlsx")
shp1 <- readShapePoly("gminy/gminy")
sejmiki2 <- sejmiki[,c(1,2,3,4,5,25,26)]
sejmiki2$kod <- paste0(sejmiki2$TERYT, sejmiki2$Typ)
# wyciagamy srodki kazdej gmi... |
#' @title Call and open the tidytemplate
#' @description Use the tidytemplate Rmd for starting your analysis with a
#' leg up for processing
#' @param name name of your TidyTuesday analysis file
#' @param open should the file be opened after being created
#' @param ... arguments to be passed to \link[usethis]{use_templ... | /R/use_tidytemplate.R | permissive | jrosen48/tidytuesdayR | R | false | false | 1,257 | r | #' @title Call and open the tidytemplate
#' @description Use the tidytemplate Rmd for starting your analysis with a
#' leg up for processing
#' @param name name of your TidyTuesday analysis file
#' @param open should the file be opened after being created
#' @param ... arguments to be passed to \link[usethis]{use_templ... |
library(data.table)
library(dplyr)
library(tidyr)
Mode <- function(x) {
ux <- unique(x)
ux[which.max(tabulate(match(x, ux)))]
}
# Load Data ---------------------------------------------------------------
path <- "/Users/xiaofeifei/I/Kaggle/Basket/"
orderp <- fread(file.path(path, "order_products__prior.csv"))
o... | /Basket/code/features/ealier_data.R | no_license | xiaofeifei1800/Kaggle | R | false | false | 5,872 | r |
library(data.table)
library(dplyr)
library(tidyr)
Mode <- function(x) {
ux <- unique(x)
ux[which.max(tabulate(match(x, ux)))]
}
# Load Data ---------------------------------------------------------------
path <- "/Users/xiaofeifei/I/Kaggle/Basket/"
orderp <- fread(file.path(path, "order_products__prior.csv"))
o... |
load(file = "testdata.rda")
### Test GWAS helper functions.
## Test EMMA function
pheno <- gDataTest$pheno$ph1
covar <- gDataTest$covar
# Check with default settings.
expect_equivalent(statgenGWAS:::EMMA(dat = pheno, trait = 2, K = Sigma)[[1]],
c(9.80733999117857e-05, 2.16021038853735))
expect_eq... | /inst/tinytest/test_STGHelper.R | no_license | Biometris/statgenGWAS | R | false | false | 6,161 | r | load(file = "testdata.rda")
### Test GWAS helper functions.
## Test EMMA function
pheno <- gDataTest$pheno$ph1
covar <- gDataTest$covar
# Check with default settings.
expect_equivalent(statgenGWAS:::EMMA(dat = pheno, trait = 2, K = Sigma)[[1]],
c(9.80733999117857e-05, 2.16021038853735))
expect_eq... |
#' riverbend
#'
#' A function for automatically generating factor analysis riverplots wiht a sequence of solutions.
#'
#' @param data Data frame containing only variables to test.
#' @param maxlatent Maximum number of latent variables to test.
#' @param minlatent Minimum number of latent variables to test.
#' @param cu... | /R/riverbend.R | no_license | cognopod/walter | R | false | false | 967 | r | #' riverbend
#'
#' A function for automatically generating factor analysis riverplots wiht a sequence of solutions.
#'
#' @param data Data frame containing only variables to test.
#' @param maxlatent Maximum number of latent variables to test.
#' @param minlatent Minimum number of latent variables to test.
#' @param cu... |
load(file="test.RData")
# Create Submission File on Test Data (must have test data ready)
########################################################
# name of test file = test
# use the model to generate predictions
repeater_glm <- predict(glm.tune, newdata = test, type="prob")
repeater_gbm <- predict(gbm.tune, newdat... | /R/submissions/rf_0.61255_july_03_2014/avs_models_submission.R | no_license | lorenzol/kaggle_avs | R | false | false | 1,622 | r |
load(file="test.RData")
# Create Submission File on Test Data (must have test data ready)
########################################################
# name of test file = test
# use the model to generate predictions
repeater_glm <- predict(glm.tune, newdata = test, type="prob")
repeater_gbm <- predict(gbm.tune, newdat... |
## Two functiuons to calculate matrix inverse
## Creating cach matrix
makeCacheMatrix <- function(x = matrix()) {
inv <- NULL
set <- function(y) {
x <<- y
inv <<- NULL
}
get <- function() x
setinv <- function(inverse) inv <<- inverse
getinv <- function() inv
list(set = set, get = ge... | /cachematrix.R | no_license | AminMostafa/ProgrammingAssignment2 | R | false | false | 679 | r | ## Two functiuons to calculate matrix inverse
## Creating cach matrix
makeCacheMatrix <- function(x = matrix()) {
inv <- NULL
set <- function(y) {
x <<- y
inv <<- NULL
}
get <- function() x
setinv <- function(inverse) inv <<- inverse
getinv <- function() inv
list(set = set, get = ge... |
#
# This is a Shiny web application. You can run the application by clicking
# the 'Run App' button above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
classifiers <- c("logistic", "penlog", "svm", "randomforest",
"lda", "nb", "ada", "tree")
ui <- p... | /inst/nproc/ui.R | no_license | cran/nproc | R | false | false | 2,059 | r | #
# This is a Shiny web application. You can run the application by clicking
# the 'Run App' button above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
classifiers <- c("logistic", "penlog", "svm", "randomforest",
"lda", "nb", "ada", "tree")
ui <- p... |
inflation_adjust <- function(base_year=NA){
require(dplyr)
require(xts)
if (nchar(base_year) == 4){
#Load file from BLS servers
temp<-tempfile()
download.file("http://download.bls.gov/pub/time.series/cu/cu.data.1.AllItems",temp)
cu_main<-read.table(temp,
header=FALSE,
... | /inflation_adjust.R | no_license | SamPortnow/DissertationAnalysis | R | false | false | 2,237 | r | inflation_adjust <- function(base_year=NA){
require(dplyr)
require(xts)
if (nchar(base_year) == 4){
#Load file from BLS servers
temp<-tempfile()
download.file("http://download.bls.gov/pub/time.series/cu/cu.data.1.AllItems",temp)
cu_main<-read.table(temp,
header=FALSE,
... |
#' Run all examples in a package.
#'
#' One of the most frustrating parts of `R CMD check` is getting all of your
#' examples to pass - whenever one fails you need to fix the problem and then
#' restart the whole process. This function makes it a little easier by
#' making it possible to run all examples from an R fun... | /devtoolsVersion/devtools 1/R/run-examples.r | no_license | connectthefuture/devtools-R-Forge | R | false | false | 2,239 | r | #' Run all examples in a package.
#'
#' One of the most frustrating parts of `R CMD check` is getting all of your
#' examples to pass - whenever one fails you need to fix the problem and then
#' restart the whole process. This function makes it a little easier by
#' making it possible to run all examples from an R fun... |
\alias{gtkProgressBarUpdate}
\name{gtkProgressBarUpdate}
\title{gtkProgressBarUpdate}
\description{
This function is deprecated. Please use \code{\link{gtkProgressSetValue}} or
\code{\link{gtkProgressSetPercentage}} instead.
\strong{WARNING: \code{gtk_progress_bar_update} is deprecated and should not be used in newly-... | /man/gtkProgressBarUpdate.Rd | no_license | cran/RGtk2.10 | R | false | false | 624 | rd | \alias{gtkProgressBarUpdate}
\name{gtkProgressBarUpdate}
\title{gtkProgressBarUpdate}
\description{
This function is deprecated. Please use \code{\link{gtkProgressSetValue}} or
\code{\link{gtkProgressSetPercentage}} instead.
\strong{WARNING: \code{gtk_progress_bar_update} is deprecated and should not be used in newly-... |
library(ggplot2)
load("precise.rdata")
# Plot illustrating entire data set
no_border <- opts(
plot.margin = unit(rep(0, 4), "cm"),
axis.text.x = theme_blank(),
axis.text.y = theme_blank(),
axis.title.x = theme_blank(),
axis.title.y = theme_blank(),
axis.ticks.length = unit(0, "cm"),
axis.ticks.margin = unit(0,... | /0-overview.r | permissive | FelipeCarrillo/ggplot2-bayarea | R | false | false | 574 | r | library(ggplot2)
load("precise.rdata")
# Plot illustrating entire data set
no_border <- opts(
plot.margin = unit(rep(0, 4), "cm"),
axis.text.x = theme_blank(),
axis.text.y = theme_blank(),
axis.title.x = theme_blank(),
axis.title.y = theme_blank(),
axis.ticks.length = unit(0, "cm"),
axis.ticks.margin = unit(0,... |
# superimpose.R
#
# $Revision: 1.37 $ $Date: 2017/12/30 05:03:15 $
#
#
#############################
superimpose <- function(...) {
# remove any NULL arguments
arglist <- list(...)
if(any(isnull <- sapply(arglist, is.null)))
return(do.call(superimpose, arglist[!isnull]))
UseMethod("superimpose")
}
superi... | /R/superimpose.R | no_license | kasselhingee/spatstat | R | false | false | 6,045 | r | # superimpose.R
#
# $Revision: 1.37 $ $Date: 2017/12/30 05:03:15 $
#
#
#############################
superimpose <- function(...) {
# remove any NULL arguments
arglist <- list(...)
if(any(isnull <- sapply(arglist, is.null)))
return(do.call(superimpose, arglist[!isnull]))
UseMethod("superimpose")
}
superi... |
library(DBI)
# Connect to my-db as defined in ~/.my.cnf
con <- dbConnect(RMySQL::MySQL(),user='root',password='root',dbname='travlr_auth', host='127.0.0.1',port=8889)
dbListTables(con)
dbListFields(con, "users")
res <- dbSendQuery(con, "SELECT user_email FROM users limit 5")
dbFetch(res)
# Or a chunk at a time
while... | /connect_db.R | no_license | VinoMahavira/R | R | false | false | 438 | r | library(DBI)
# Connect to my-db as defined in ~/.my.cnf
con <- dbConnect(RMySQL::MySQL(),user='root',password='root',dbname='travlr_auth', host='127.0.0.1',port=8889)
dbListTables(con)
dbListFields(con, "users")
res <- dbSendQuery(con, "SELECT user_email FROM users limit 5")
dbFetch(res)
# Or a chunk at a time
while... |
#' @importFrom mc2 mcmc
#' @importFrom coda mcmc.list
#' @include generics.R
NULL
#' Bayesian integration of a posterior
#'
#' @param lp Function that evaluates log-posterior given a vector of parameter values
#' @param start Initial values for the parameter values
#' @param algorithm A string indicating the MCMC alg... | /Packages/nlfit/R/bayfit.R | no_license | AleMorales/DynamicPhotosynthesis | R | false | false | 3,260 | r | #' @importFrom mc2 mcmc
#' @importFrom coda mcmc.list
#' @include generics.R
NULL
#' Bayesian integration of a posterior
#'
#' @param lp Function that evaluates log-posterior given a vector of parameter values
#' @param start Initial values for the parameter values
#' @param algorithm A string indicating the MCMC alg... |
# Plot 2
# Global Active Power vs day
# Load in the power consumption data set
# First two columns will be converted to date/time
restData <- read.csv("household_power_consumption.txt",
sep=";",
colClasses=c(rep("character",2),rep("numeric",7)),
na.string... | /plot2.r | no_license | xiopepa/ExData_Plotting1 | R | false | false | 1,114 | r | # Plot 2
# Global Active Power vs day
# Load in the power consumption data set
# First two columns will be converted to date/time
restData <- read.csv("household_power_consumption.txt",
sep=";",
colClasses=c(rep("character",2),rep("numeric",7)),
na.string... |
#!/usr/bin/env Rscript
#diff_datos_V2.R
library("optparse")
option_list <- list(
make_option(c("-l","--datasetLeft", type="character", default = NULL),
help="path to first dataset. Datasets are called 'left' and 'right' to reference join actions",
metavar="character"),
make_option(c(... | /utils/main_diff_datos.R | permissive | Pedrodpj92/clontmpV2_Predicting_DBpedia_types | R | false | false | 8,816 | r | #!/usr/bin/env Rscript
#diff_datos_V2.R
library("optparse")
option_list <- list(
make_option(c("-l","--datasetLeft", type="character", default = NULL),
help="path to first dataset. Datasets are called 'left' and 'right' to reference join actions",
metavar="character"),
make_option(c(... |
## The following function processes the given HAR dataset by doing the following:
## - merge subject, activity(y) and feature(X) values from both the test/train partitions
## - appropriately label the data set with descriptive variable names.
## - extract only the measurements matching 'features_regex' (mean & std by ... | /run_analysis.R | no_license | neonquest/SmartphonesDataSet | R | false | false | 2,646 | r | ## The following function processes the given HAR dataset by doing the following:
## - merge subject, activity(y) and feature(X) values from both the test/train partitions
## - appropriately label the data set with descriptive variable names.
## - extract only the measurements matching 'features_regex' (mean & std by ... |
#' Summarize nitrogen removal along a flowpath
#'
#' Nitrogen removal varies along a flowpath as they include different land cover
#' and waterbody types that have different nitrogen reduction capabilities.
#' This function takes a flowpath generated by
#' \code{\link{nsink_generate_flowpath}} as required input and ret... | /R/nsink_summarize_flowpath.R | permissive | qkellogg/nsink-1 | R | false | false | 20,311 | r | #' Summarize nitrogen removal along a flowpath
#'
#' Nitrogen removal varies along a flowpath as they include different land cover
#' and waterbody types that have different nitrogen reduction capabilities.
#' This function takes a flowpath generated by
#' \code{\link{nsink_generate_flowpath}} as required input and ret... |
#=========================================
# MSc Transporte Economics
# TRAN 5911 Dissertation
# Samira Marx
#=========================================
#--------------------------------------
# library
#--------------------------------------
library(xtable)
library(ggplot2)
#--------------------------------------
# P... | /r-scripts/bayes_mkt1_T_print.R | no_license | samiramarx/Bayesian-elasticities | R | false | false | 889 | r | #=========================================
# MSc Transporte Economics
# TRAN 5911 Dissertation
# Samira Marx
#=========================================
#--------------------------------------
# library
#--------------------------------------
library(xtable)
library(ggplot2)
#--------------------------------------
# P... |
library(dplyr)
library(ggplot2)
library(scales)
library(tidyr )
library(plotly)
data_stress_delhi <- read.csv("C:/Users/HP/Desktop/desktop/Pooja Reaearch Methods/COVID-19 Survey Student Responses Delhi.csv" )
summary(data_stress_delhi)
#data_stress_delhi$Health.issue.during.lockdown[NO] <- 0
names(data_... | /Students Delhi.R | no_license | poojakommasani/Covid-19-Impact-on-Students | R | false | false | 6,158 | r | library(dplyr)
library(ggplot2)
library(scales)
library(tidyr )
library(plotly)
data_stress_delhi <- read.csv("C:/Users/HP/Desktop/desktop/Pooja Reaearch Methods/COVID-19 Survey Student Responses Delhi.csv" )
summary(data_stress_delhi)
#data_stress_delhi$Health.issue.during.lockdown[NO] <- 0
names(data_... |
library(survey)
library(haven)
source("CIarrFcn.R")
# Integrating survey package output in with the existing function
surveyci <- function(formula,design,deff) {
if(length(all.vars(formula))>1) {
message("Nope.")
return()
}
p <- svymean(formula,design,na.rm=TRUE,deff=deff)
n <- sum(c(!is.na(design$... | /exploration.R | no_license | sofisinozich/complex-intervals | R | false | false | 867 | r | library(survey)
library(haven)
source("CIarrFcn.R")
# Integrating survey package output in with the existing function
surveyci <- function(formula,design,deff) {
if(length(all.vars(formula))>1) {
message("Nope.")
return()
}
p <- svymean(formula,design,na.rm=TRUE,deff=deff)
n <- sum(c(!is.na(design$... |
library(markovchain)
library(msm)
# cav
Q <- rbind ( c(0, 0.25, 0, 0.25),
c(0.166, 0, 0.166, 0.166),
c(0, 0.25, 0, 0.25),
c(0, 0, 0, 0) )
cavmsm <- msm(state ~ years, subject = PTNUM, data = cav, qmatrix = Q, death = 4)
# cavmsm
# qmatrix.msm(cavmsm)
# qmatrix.msm(cavmsm, covaria... | /tests/testthat/testmsm.R | no_license | heyanyun/markovchain | R | false | false | 550 | r | library(markovchain)
library(msm)
# cav
Q <- rbind ( c(0, 0.25, 0, 0.25),
c(0.166, 0, 0.166, 0.166),
c(0, 0.25, 0, 0.25),
c(0, 0, 0, 0) )
cavmsm <- msm(state ~ years, subject = PTNUM, data = cav, qmatrix = Q, death = 4)
# cavmsm
# qmatrix.msm(cavmsm)
# qmatrix.msm(cavmsm, covaria... |
data<-read.table("~/Desktop/HW/household_power_consumption.txt", header=TRUE, sep=";")
data$Date<-strptime(data$Date, format="%d/%m/%Y")
data$Date<-as.Date(data$Date)
dat1<-subset(data, data$Date == "2007-02-01")
dat2<-subset(data, data$Date == "2007-02-02")
dat<-rbind(dat1,dat2)
#head(dat)
#tail(dat)
dat$Global_acti... | /plot1.R | no_license | shastara/ExData_Plotting1 | R | false | false | 553 | r | data<-read.table("~/Desktop/HW/household_power_consumption.txt", header=TRUE, sep=";")
data$Date<-strptime(data$Date, format="%d/%m/%Y")
data$Date<-as.Date(data$Date)
dat1<-subset(data, data$Date == "2007-02-01")
dat2<-subset(data, data$Date == "2007-02-02")
dat<-rbind(dat1,dat2)
#head(dat)
#tail(dat)
dat$Global_acti... |
# Pulls flat files from Google Cloud Storage bucket.
# Location: raw_data_storage/ ISBE_Student_Courses/
# Below is a list of all documents contained in this file
gcs_global_bucket("raw_data_storage")
# ISBE State Course Code & Local Course ID --------------------------------
gcs_get_object("ISBE_Student_Courses/19... | /data/02-gcs_files.R | no_license | kippchicago/isbe_midyear_reporting | R | false | false | 17,681 | r | # Pulls flat files from Google Cloud Storage bucket.
# Location: raw_data_storage/ ISBE_Student_Courses/
# Below is a list of all documents contained in this file
gcs_global_bucket("raw_data_storage")
# ISBE State Course Code & Local Course ID --------------------------------
gcs_get_object("ISBE_Student_Courses/19... |
.Random.seed <-
c(403L, 10L, -572949166L, -809372979L, -764360057L, 639274350L,
-1285519544L, -813120693L, -1113150807L, 53911544L, -2030080218L,
749727809L, 1004577235L, -855585918L, 664453044L, -1816602825L,
1476562477L, -930095292L, -437748630L, 410781397L, 1014853743L,
-1969622666L, 543546016L, -1326315677L, 77... | /R/stfa-internal.R | no_license | javiergarcirod/stfa | R | false | false | 8,231 | r | .Random.seed <-
c(403L, 10L, -572949166L, -809372979L, -764360057L, 639274350L,
-1285519544L, -813120693L, -1113150807L, 53911544L, -2030080218L,
749727809L, 1004577235L, -855585918L, 664453044L, -1816602825L,
1476562477L, -930095292L, -437748630L, 410781397L, 1014853743L,
-1969622666L, 543546016L, -1326315677L, 77... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/impulse_fitting.R
\name{reduce_best_timecourse_params}
\alias{reduce_best_timecourse_params}
\title{Reduce to best timecourse parameters}
\usage{
reduce_best_timecourse_params(timecourse_list,
reduction_type = "loss-min", sufficiency_tolera... | /man/reduce_best_timecourse_params.Rd | no_license | QinLab/impulse | R | false | true | 1,161 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/impulse_fitting.R
\name{reduce_best_timecourse_params}
\alias{reduce_best_timecourse_params}
\title{Reduce to best timecourse parameters}
\usage{
reduce_best_timecourse_params(timecourse_list,
reduction_type = "loss-min", sufficiency_tolera... |
#' Get data from stripe API
#' @param endpoint Name of target data to access under https://api.stripe.com/v1/
#' e.g. "users", "charges"
#' @param date_type Type of date_since argument. Can be "exact", "days", "weeks", "months" or "years".
#' "exact" uses exact date like "2016-01-01".
#' "days", "weeks", "months" or "y... | /R/get_stripe_data.R | no_license | HanjoStudy/exploratory_func | R | false | false | 4,021 | r | #' Get data from stripe API
#' @param endpoint Name of target data to access under https://api.stripe.com/v1/
#' e.g. "users", "charges"
#' @param date_type Type of date_since argument. Can be "exact", "days", "weeks", "months" or "years".
#' "exact" uses exact date like "2016-01-01".
#' "days", "weeks", "months" or "y... |
testlist <- list(a = 0L, b = 0L, x = c(-15925248L, 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))
result <- do.call(grattan:::anyOutside,testlist)
str(result) | /grattan/inst/testfiles/anyOutside/libFuzzer_anyOutside/anyOutside_valgrind_files/1610055716-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 275 | r | testlist <- list(a = 0L, b = 0L, x = c(-15925248L, 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))
result <- do.call(grattan:::anyOutside,testlist)
str(result) |
## Read data sets and combine
testData <- read.table("test/X_test.txt")
trainData <- read.table("train/X_train.txt")
X <- rbind(testData, trainData)
## Garbage collection
rm(testData)
rm(trainData)
## Read subjects and combine
testSub <- read.table("test/subject_test.txt")
trainSub <- read.table("train/subject_train.... | /run_analysis.R | no_license | dkab28/getting-and-cleaning-data_jh1 | R | false | false | 2,050 | r | ## Read data sets and combine
testData <- read.table("test/X_test.txt")
trainData <- read.table("train/X_train.txt")
X <- rbind(testData, trainData)
## Garbage collection
rm(testData)
rm(trainData)
## Read subjects and combine
testSub <- read.table("test/subject_test.txt")
trainSub <- read.table("train/subject_train.... |
MX1 <- -0.5
MX2 <- 1
MX3 <- 0.3
amin <- 1.5
amax <- 45
Aquants <- c(1.45, 3.6, 35, 45.5)
A_test <- seq(amin, amax, length.out = 100)
truth <- - 0.15 * A_test^2 + A_test * (2 + MX1^2 + MX2^2) - 15 #+ 5 * (1 + MX1^2 + 6 * MX1 + 9) + 15 * (1 + MX2^2 + 6 * MX2 + 9) + MX3
truth <- truth / 50
# truth <- - (A_test - 10) * ... | /simulations/simulation-parameters-01.R | no_license | bvegetabile/entbal-continuous-paper | R | false | false | 432 | r | MX1 <- -0.5
MX2 <- 1
MX3 <- 0.3
amin <- 1.5
amax <- 45
Aquants <- c(1.45, 3.6, 35, 45.5)
A_test <- seq(amin, amax, length.out = 100)
truth <- - 0.15 * A_test^2 + A_test * (2 + MX1^2 + MX2^2) - 15 #+ 5 * (1 + MX1^2 + 6 * MX1 + 9) + 15 * (1 + MX2^2 + 6 * MX2 + 9) + MX3
truth <- truth / 50
# truth <- - (A_test - 10) * ... |
library(sgeostat)
library(pbkrtest)
library(mvoutlier)
library(boot)
args = commandArgs(trailingOnly=TRUE)
print(args)
p_sig.cor = args[1]
p_counts = args[2]
p_tax_code = args[3]
assign("fstat_min", as.numeric(args[4]), envir = .GlobalEnv)
assign("fstat_max", as.numeric(args[5]), envir = .GlobalEnv)
assign("cor_thr",... | /linear_model/model_pick/rational/Scripts/calculate_all.models.R | permissive | lotrus28/TaboCom | R | false | false | 10,316 | r | library(sgeostat)
library(pbkrtest)
library(mvoutlier)
library(boot)
args = commandArgs(trailingOnly=TRUE)
print(args)
p_sig.cor = args[1]
p_counts = args[2]
p_tax_code = args[3]
assign("fstat_min", as.numeric(args[4]), envir = .GlobalEnv)
assign("fstat_max", as.numeric(args[5]), envir = .GlobalEnv)
assign("cor_thr",... |
#Source: https://www.knowru.com/blog/how-create-restful-api-for-machine-learning-credit-model-in-r/
url <- "https://archive.ics.uci.edu/ml/machine-learning-databases/statlog/german/german.data"
col.names <- c('Status of existing checking account', 'Duration in month', 'Credit history'
, 'Purpose', 'Credit amount', '... | /RestAPI/knowruAPI.R | no_license | AshutoshAgrahari/R_Practice | R | false | false | 1,677 | r | #Source: https://www.knowru.com/blog/how-create-restful-api-for-machine-learning-credit-model-in-r/
url <- "https://archive.ics.uci.edu/ml/machine-learning-databases/statlog/german/german.data"
col.names <- c('Status of existing checking account', 'Duration in month', 'Credit history'
, 'Purpose', 'Credit amount', '... |
######################################################
### Make estimates of the error in the camera data ###
######################################################
X <- readxl::read_xlsx("Data/Error.xlsx")
flight.height <- function(plane.height,reflected.length,measured.length){
fh <- plane.height * (1 - (reflecte... | /HD_RGB_Flight_Height_Code/old_scripts/Estimate_Error_Height.R | no_license | HiDef-Aerial-Surveying/RBG_Flight_Height_Analysis | R | false | false | 552 | r | ######################################################
### Make estimates of the error in the camera data ###
######################################################
X <- readxl::read_xlsx("Data/Error.xlsx")
flight.height <- function(plane.height,reflected.length,measured.length){
fh <- plane.height * (1 - (reflecte... |
testlist <- list(G = numeric(0), Rn = numeric(0), atmp = c(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), ra = numeric(0), relh = -1.72131968218895e+83, rs = numeric(0), temp = c(8.5728629954997e-312, 1.56898424065867e+82, 8.96970809549085e-158, ... | /meteor/inst/testfiles/ET0_PenmanMonteith/AFL_ET0_PenmanMonteith/ET0_PenmanMonteith_valgrind_files/1615838914-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 826 | r | testlist <- list(G = numeric(0), Rn = numeric(0), atmp = c(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), ra = numeric(0), relh = -1.72131968218895e+83, rs = numeric(0), temp = c(8.5728629954997e-312, 1.56898424065867e+82, 8.96970809549085e-158, ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/write_to_iramuteq.R
\name{write_to_iramuteq}
\alias{write_to_iramuteq}
\title{Writes metadata and textdata as an Iramuteq corpus file .}
\usage{
write_to_iramuteq(
metadata,
textdata,
to_dir = NULL,
filename = "textot.txt",
encoding... | /man/write_to_iramuteq.Rd | no_license | lvaudor/textoteR | R | false | true | 1,203 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/write_to_iramuteq.R
\name{write_to_iramuteq}
\alias{write_to_iramuteq}
\title{Writes metadata and textdata as an Iramuteq corpus file .}
\usage{
write_to_iramuteq(
metadata,
textdata,
to_dir = NULL,
filename = "textot.txt",
encoding... |
#################################################################
## function to get derivatives of the smooth model terms .... ##
## (currently only univariate smooths) ##
## analytic derivatives for P-, SCOP-splines ##
## finite differencing using predict.gam() for other... | /R/derivative.scam.r | no_license | roliveros-ramos/scam | R | false | false | 4,086 | r | #################################################################
## function to get derivatives of the smooth model terms .... ##
## (currently only univariate smooths) ##
## analytic derivatives for P-, SCOP-splines ##
## finite differencing using predict.gam() for other... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/CIA.r
\name{CIA}
\alias{CIA}
\title{Category level intensity analysis}
\usage{
CIA(crosstabulation, time.points, categories)
}
\arguments{
\item{crosstabulation}{List of crosstabulation tables generated by \code{multicrosstab} functi... | /man/CIA.Rd | no_license | cran/intensity.analysis | R | false | true | 1,626 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/CIA.r
\name{CIA}
\alias{CIA}
\title{Category level intensity analysis}
\usage{
CIA(crosstabulation, time.points, categories)
}
\arguments{
\item{crosstabulation}{List of crosstabulation tables generated by \code{multicrosstab} functi... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/descriptive_stats.R
\docType{methods}
\name{max,CASTable-method}
\alias{max,CASTable-method}
\title{Maximum Values}
\usage{
\S4method{max}{CASTable}(x)
}
\arguments{
\item{x}{CASTable.}
}
\value{
scalar
}
\description{
Maximum Values
}
\examp... | /man/max-CASTable-method.Rd | permissive | sassoftware/R-swat | R | false | true | 418 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/descriptive_stats.R
\docType{methods}
\name{max,CASTable-method}
\alias{max,CASTable-method}
\title{Maximum Values}
\usage{
\S4method{max}{CASTable}(x)
}
\arguments{
\item{x}{CASTable.}
}
\value{
scalar
}
\description{
Maximum Values
}
\examp... |
# summarise the index by country
hdi_summary <- hdi_no_na %>%
group_by(country) %>%
summarise(mean_index = mean(index),
n = length(index),
sd_index = sd(index),
se_index = sd_index/sqrt(n))
| /R/02-summarise.R | permissive | 3mmaRand/BIO00058M-HDI-w02 | R | false | false | 231 | r | # summarise the index by country
hdi_summary <- hdi_no_na %>%
group_by(country) %>%
summarise(mean_index = mean(index),
n = length(index),
sd_index = sd(index),
se_index = sd_index/sqrt(n))
|
##
##
habitat.suitability <- function(species.num) {
# base path
path.Base1=path.ATLAS
# data path
path.Data=file.path(path.Base1,"Data")
## data frame for storing the results to be plotted
my.strata <- data.frame(stratum=c(440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,... | /FunctionsR/habitat-suitability.R | no_license | phyllog/FishInverAtlas_Ricard | R | false | false | 7,104 | r | ##
##
habitat.suitability <- function(species.num) {
# base path
path.Base1=path.ATLAS
# data path
path.Data=file.path(path.Base1,"Data")
## data frame for storing the results to be plotted
my.strata <- data.frame(stratum=c(440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,... |
tabPanel(title = icon("circle-question"), value = "1",
h4("Formatting the feature data"),
HTML('<p>In the <b>assay data</b> table, you will see a column labeled <b>"ID"</b>. This is a unique identifier that usually
corresponds to the <b>probe set</b> used to take some measurement for the... | /TidyGEO/ui/feature/feature_info.R | permissive | srp33/TidyGEO | R | false | false | 1,237 | r | tabPanel(title = icon("circle-question"), value = "1",
h4("Formatting the feature data"),
HTML('<p>In the <b>assay data</b> table, you will see a column labeled <b>"ID"</b>. This is a unique identifier that usually
corresponds to the <b>probe set</b> used to take some measurement for the... |
library(RSQLite)
plot2 <- function(){
# Create/Connect to a database
con <- dbConnect("SQLite", dbname = "test.sqlite")
if(dbExistsTable(con, "Household_Power")){
dbRemoveTable(con, "Household_Power")
}
dbWriteTable(con, name="Household_Power", value="household_power_cons... | /plot2.R | no_license | manasac/ExData_Plotting1 | R | false | false | 887 | r | library(RSQLite)
plot2 <- function(){
# Create/Connect to a database
con <- dbConnect("SQLite", dbname = "test.sqlite")
if(dbExistsTable(con, "Household_Power")){
dbRemoveTable(con, "Household_Power")
}
dbWriteTable(con, name="Household_Power", value="household_power_cons... |
#
# This script generates CORES for the TCGA FACETS segments across all nonmatching tumor-normal profiles
# for each tumor ID. Therefore, we can compare the COREs to the matching tumor-normal to see if they are similar or not.
#
args <- commandArgs(trailingOnly = TRUE)
#
# Set script arguments
#
event <- "A"
outputCs... | /tcgaFacetsCoreGenerationHPCJob.R | no_license | CodingBash/CNV-Clinical-Preprocessing | R | false | false | 2,344 | r | #
# This script generates CORES for the TCGA FACETS segments across all nonmatching tumor-normal profiles
# for each tumor ID. Therefore, we can compare the COREs to the matching tumor-normal to see if they are similar or not.
#
args <- commandArgs(trailingOnly = TRUE)
#
# Set script arguments
#
event <- "A"
outputCs... |
#' DBIDriver class.
#'
#' Base class for all DBMS drivers (e.g., RSQLite, MySQL, PostgreSQL).
#' The virtual class \code{DBIDriver} defines the operations for creating
#' connections and defining data type mappings. Actual driver classes, for
#' instance \code{RPgSQL}, \code{RMySQL}, etc. implement these operations i... | /DBI/R/DBDriver.R | no_license | jackieli123723/clearlinux | R | false | false | 7,981 | r | #' DBIDriver class.
#'
#' Base class for all DBMS drivers (e.g., RSQLite, MySQL, PostgreSQL).
#' The virtual class \code{DBIDriver} defines the operations for creating
#' connections and defining data type mappings. Actual driver classes, for
#' instance \code{RPgSQL}, \code{RMySQL}, etc. implement these operations i... |
\name{update_z_b_Sj}
\alias{update_z_b_Sj}
\title{
Gibbs sampling for \eqn{z}
}
\description{
Gibbs sampling for \eqn{z}: here the full conditional distribution is being used (that is, the distribution is also conditioned on the values of factors \eqn{y}).
}
\usage{
update_z_b_Sj(w, mu, Lambda, y, SigmaINV, K, x_data)
... | /fuzzedpackages/fabMix/man/update_z_b_Sj.Rd | no_license | akhikolla/testpackages | R | false | false | 1,706 | rd | \name{update_z_b_Sj}
\alias{update_z_b_Sj}
\title{
Gibbs sampling for \eqn{z}
}
\description{
Gibbs sampling for \eqn{z}: here the full conditional distribution is being used (that is, the distribution is also conditioned on the values of factors \eqn{y}).
}
\usage{
update_z_b_Sj(w, mu, Lambda, y, SigmaINV, K, x_data)
... |
add2 <- function(x, y){
x + y
}
above <- function (x, n){
use <- x > n
x[use]
}
# calculate the mean of each column in a matrix
colmean <- function (y){
nc <- ncol(y)
means <- numeric(nc)
for (i in 1:nc){
means[i] <- mean(y[,i])
}
means
}
## Adding some text here from Git-Hub
f <- function(x... | /Programmjng-R/first_functions.R | no_license | farazrehman/datasciencecoursera | R | false | false | 385 | r |
add2 <- function(x, y){
x + y
}
above <- function (x, n){
use <- x > n
x[use]
}
# calculate the mean of each column in a matrix
colmean <- function (y){
nc <- ncol(y)
means <- numeric(nc)
for (i in 1:nc){
means[i] <- mean(y[,i])
}
means
}
## Adding some text here from Git-Hub
f <- function(x... |
write.infile <- function(X, file, sep=";", append = FALSE,nb.dec=4) {
if (!append) cat("", file = file, append = FALSE,sep="")
if (inherits(X, "array")) affichetableau(X, file, sep, nb.dec=nb.dec)
else if (is.matrix(X)) affichmatrice(X, file, sep,nb.dec=nb.dec)
else if (is.data.frame... | /R/write.infile.R | no_license | Rpython1/FactoMineR | R | false | false | 2,428 | r | write.infile <- function(X, file, sep=";", append = FALSE,nb.dec=4) {
if (!append) cat("", file = file, append = FALSE,sep="")
if (inherits(X, "array")) affichetableau(X, file, sep, nb.dec=nb.dec)
else if (is.matrix(X)) affichmatrice(X, file, sep,nb.dec=nb.dec)
else if (is.data.frame... |
# filename
# pollutantmean.R
#
# description
# Calculates the mean of a pollutant across a specified list of monitrs
#
# author
# Dylan P. Jackson
pollutantmean <- function(directory, pollutant, id = 1:332){
# Read in all files with given id(s)
path <- sprintf("%s/%s.csv", directory, "%03d") ... | /r_prog_week2/pollutantmean.R | no_license | DylanPJackson/datasciencecoursera | R | false | false | 920 | r | # filename
# pollutantmean.R
#
# description
# Calculates the mean of a pollutant across a specified list of monitrs
#
# author
# Dylan P. Jackson
pollutantmean <- function(directory, pollutant, id = 1:332){
# Read in all files with given id(s)
path <- sprintf("%s/%s.csv", directory, "%03d") ... |
## Load the relevant libraries
library(dplyr)
## Read the data file into a dataframe
df <- read.table("household_power_consumption.txt", header = TRUE, sep=";", quote = "", na.strings = "?", stringsAsFactors = FALSE)
## Combine Date and Time into DateTime and convert to the proper type
DateTime <- paste(df$Date, df... | /Plot2.R | no_license | dapclark/ExData_Plotting1 | R | false | false | 764 | r | ## Load the relevant libraries
library(dplyr)
## Read the data file into a dataframe
df <- read.table("household_power_consumption.txt", header = TRUE, sep=";", quote = "", na.strings = "?", stringsAsFactors = FALSE)
## Combine Date and Time into DateTime and convert to the proper type
DateTime <- paste(df$Date, df... |
#' @title Detailed description of a data frame
#' @description
#' \code{contents} provides a comprehensive description of a data
#' frame, including summary statistics for both quantitative and
#' categorical variables
#' @param data a data frame
#' @param digits number of decimal digits for statistics.
#' @param maxca... | /R/contents.R | permissive | Rkabacoff/qacr | R | false | false | 4,256 | r | #' @title Detailed description of a data frame
#' @description
#' \code{contents} provides a comprehensive description of a data
#' frame, including summary statistics for both quantitative and
#' categorical variables
#' @param data a data frame
#' @param digits number of decimal digits for statistics.
#' @param maxca... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/wrapper_functions.R
\name{stepglm_wrapper}
\alias{stepglm_wrapper}
\title{Wrapper for fitting a forward stepwise logistic regression using \code{glm}.}
\usage{
stepglm_wrapper(train, test)
}
\arguments{
\item{train}{A list with named objects ... | /man/stepglm_wrapper.Rd | permissive | benkeser/predtmle | R | false | true | 1,954 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/wrapper_functions.R
\name{stepglm_wrapper}
\alias{stepglm_wrapper}
\title{Wrapper for fitting a forward stepwise logistic regression using \code{glm}.}
\usage{
stepglm_wrapper(train, test)
}
\arguments{
\item{train}{A list with named objects ... |
if (!require(pacman)) install.packages("pacman")
p_load(data.table, readr, dplyr, jsonlite, stringr, tidyr, combinat, janitor)
| /politics/r-scripts/resultados-parlamentarias-2017/00-libraries.R | no_license | jnaudon/datachile-etl | R | false | false | 127 | r | if (!require(pacman)) install.packages("pacman")
p_load(data.table, readr, dplyr, jsonlite, stringr, tidyr, combinat, janitor)
|
library(RLLVMCompile)
fib =
function(n)
{
if(n == 0L || n == 1L)
n
else
fib(n - 1L) + fib(n - 2L)
}
g1 =
function(x)
{
x = sin(x)
}
g2 =
function(x)
{
x = sin(x)
x + 10
}
g3 =
function(x)
{
x = sin(x)
return(x + 10)
}
g4 =
function(x)
{
return(x <- sin(x))
}
g5 =
function(x)
{
... | /tests/insertReturn.R | no_license | duncantl/RLLVMCompile | R | false | false | 583 | r | library(RLLVMCompile)
fib =
function(n)
{
if(n == 0L || n == 1L)
n
else
fib(n - 1L) + fib(n - 2L)
}
g1 =
function(x)
{
x = sin(x)
}
g2 =
function(x)
{
x = sin(x)
x + 10
}
g3 =
function(x)
{
x = sin(x)
return(x + 10)
}
g4 =
function(x)
{
return(x <- sin(x))
}
g5 =
function(x)
{
... |
options(repos=BiocManager::repositories()) # Needed for shinyapp.io
iupac_nc <<- data.frame(
code=c("A","C","G","T","R","Y","S","W","K","M","B","D","H","V","N"),
pattern=c("A","C","G","T","[AG]","[CT]","[CG]","[AT]","[GT]","[AC]","[CGT]","[AGT]","[ACT]","[ACG]","[ACGT]"),
choice=c("A","C","G","T","AG","CT","CG",... | /app/global.R | no_license | fanglab/MeMoRe | R | false | false | 51,054 | r | options(repos=BiocManager::repositories()) # Needed for shinyapp.io
iupac_nc <<- data.frame(
code=c("A","C","G","T","R","Y","S","W","K","M","B","D","H","V","N"),
pattern=c("A","C","G","T","[AG]","[CT]","[CG]","[AT]","[GT]","[AC]","[CGT]","[AGT]","[ACT]","[ACG]","[ACGT]"),
choice=c("A","C","G","T","AG","CT","CG",... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fat2.dbc.r
\name{fat2.dbc}
\alias{fat2.dbc}
\title{Fatorial duplo em DBC}
\usage{
fat2.dbc(
fator1,
fator2,
bloco,
resp,
quali = c(TRUE, TRUE),
mcomp = "tukey",
fac.names = c("F1", "F2"),
sigT = 0.05,
sigF = 0.05,
unfold =... | /man/fat2.dbc.Rd | no_license | denisnog/ExpDes.pt | R | false | true | 3,261 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fat2.dbc.r
\name{fat2.dbc}
\alias{fat2.dbc}
\title{Fatorial duplo em DBC}
\usage{
fat2.dbc(
fator1,
fator2,
bloco,
resp,
quali = c(TRUE, TRUE),
mcomp = "tukey",
fac.names = c("F1", "F2"),
sigT = 0.05,
sigF = 0.05,
unfold =... |
\name{table.freq}
\alias{table.freq}
%- table.freq.
\title{ frequency Table of a Histogram }
\description{
It finds the absolute, relative and accumulated frequencies with the class
intervals defined from a previously calculated histogram by the "hist" of R
function.
}
\usage{
table.freq(object)
}
... | /man/table.freq.Rd | no_license | Lafite-1982/agricolae | R | false | false | 1,153 | rd | \name{table.freq}
\alias{table.freq}
%- table.freq.
\title{ frequency Table of a Histogram }
\description{
It finds the absolute, relative and accumulated frequencies with the class
intervals defined from a previously calculated histogram by the "hist" of R
function.
}
\usage{
table.freq(object)
}
... |
# Foreign Language Evaluation : right now it is not discriminating any foreign language based
# on dictonary. We can make use of “tm_map” function to “removeWords” based on a language. The
# difference in word count will provide the words from that language in the corpora.
# Can you think of a way to increase the cov... | /Next_Word_Predictor.R | no_license | ravinderpratap/Capstone_coursera | R | false | false | 3,682 | r | # Foreign Language Evaluation : right now it is not discriminating any foreign language based
# on dictonary. We can make use of “tm_map” function to “removeWords” based on a language. The
# difference in word count will provide the words from that language in the corpora.
# Can you think of a way to increase the cov... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/jury_check.R
\name{jury_check}
\alias{jury_check}
\title{Vérifier la validité de la composition de son jury de thèse.}
\usage{
jury_check(data, binary = FALSE, gender_biais = FALSE)
}
\arguments{
\item{data}{un data.frame ou une matri... | /man/jury_check.Rd | no_license | alaindanet/jury | R | false | false | 1,579 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/jury_check.R
\name{jury_check}
\alias{jury_check}
\title{Vérifier la validité de la composition de son jury de thèse.}
\usage{
jury_check(data, binary = FALSE, gender_biais = FALSE)
}
\arguments{
\item{data}{un data.frame ou une matri... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/linereg.R
\docType{class}
\name{linreg-class}
\alias{linreg-class}
\alias{linreg}
\title{Title}
\description{
Title
}
\section{Fields}{
\describe{
\item{\code{dep}}{matrix.}
\item{\code{indep}}{matrix.}
\item{\code{betahat}}{matrix.}
\ite... | /man/linreg-class.Rd | no_license | casparsylwan/casparnitinlinreg | R | false | true | 892 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/linereg.R
\docType{class}
\name{linreg-class}
\alias{linreg-class}
\alias{linreg}
\title{Title}
\description{
Title
}
\section{Fields}{
\describe{
\item{\code{dep}}{matrix.}
\item{\code{indep}}{matrix.}
\item{\code{betahat}}{matrix.}
\ite... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gassocplot.r
\name{coloc_to_gassocplot}
\alias{coloc_to_gassocplot}
\title{Convert coloc dataset to gassocplot dataset}
\usage{
coloc_to_gassocplot(coloclist, bfile = NULL, plink_bin = NULL)
}
\arguments{
\item{coloclist}{Output from *_to_col... | /man/coloc_to_gassocplot.Rd | permissive | MRCIEU/gwasglue | R | false | true | 665 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gassocplot.r
\name{coloc_to_gassocplot}
\alias{coloc_to_gassocplot}
\title{Convert coloc dataset to gassocplot dataset}
\usage{
coloc_to_gassocplot(coloclist, bfile = NULL, plink_bin = NULL)
}
\arguments{
\item{coloclist}{Output from *_to_col... |
############################################################################################################
##### LIST #####
# In contrast to a vector, in which all elements must be of the same mode, R's list structure can combine objects of different types.
# Vectors which we used so far were ordinary v... | /R Programming/List.R | no_license | Ritik1908/Programs | R | false | false | 3,727 | r | ############################################################################################################
##### LIST #####
# In contrast to a vector, in which all elements must be of the same mode, R's list structure can combine objects of different types.
# Vectors which we used so far were ordinary v... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cbSpeciesClient-methods.R
\docType{methods}
\name{cbSpeciesClient,CellBaseR-method}
\alias{cbSpeciesClient,CellBaseR-method}
\title{A method for getting the avaiable species from the cellbase web services}
\usage{
\S4method{cbSpeciesClient}{C... | /cellbase-client/src/main/R/man/cbSpeciesClient-CellBaseR-method.Rd | permissive | opencb/cellbase | R | false | true | 890 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cbSpeciesClient-methods.R
\docType{methods}
\name{cbSpeciesClient,CellBaseR-method}
\alias{cbSpeciesClient,CellBaseR-method}
\title{A method for getting the avaiable species from the cellbase web services}
\usage{
\S4method{cbSpeciesClient}{C... |
junction_init <- function(
nexus = character(0),
splits = character(0),
deps = list()
) {
splits <- make.unique(splits, sep = "_")
names(deps) <- names(deps) %||% seq_along(deps)
deps <- as_data_frame(deps)
junction_new(nexus, splits, deps)
}
junction_new <- function(nexus = NULL, splits = NULL, deps = N... | /R/class_junction.R | permissive | ian-flores/targets | R | false | false | 1,324 | r | junction_init <- function(
nexus = character(0),
splits = character(0),
deps = list()
) {
splits <- make.unique(splits, sep = "_")
names(deps) <- names(deps) %||% seq_along(deps)
deps <- as_data_frame(deps)
junction_new(nexus, splits, deps)
}
junction_new <- function(nexus = NULL, splits = NULL, deps = N... |
#######################################################################################
########################################################################################
############ Análisis de dosis-respuesta de Ae. aegypti a Clorpirifos ##################
###### feb 2015 Unidad de Bioensayos, Acapulco, Guerr... | /codeClorpirifos.R | no_license | fdzul/codesDosisMortality | R | false | false | 1,730 | r | #######################################################################################
########################################################################################
############ Análisis de dosis-respuesta de Ae. aegypti a Clorpirifos ##################
###### feb 2015 Unidad de Bioensayos, Acapulco, Guerr... |
# Reading, naming and subsetting power consumption data
power <- read.table("household_power_consumption.txt",skip=1,sep=";")
names(power) <- c("Date","Time","Global_active_power","Global_reactive_power","Voltage","Global_intensity","Sub_metering_1","Sub_metering_2","Sub_metering_3")
subpower <- subset(power,power$Date... | /Plot2.R | no_license | shreyasangane/Exploratory-Data-Analysis | R | false | false | 1,013 | r | # Reading, naming and subsetting power consumption data
power <- read.table("household_power_consumption.txt",skip=1,sep=";")
names(power) <- c("Date","Time","Global_active_power","Global_reactive_power","Voltage","Global_intensity","Sub_metering_1","Sub_metering_2","Sub_metering_3")
subpower <- subset(power,power$Date... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/citations.R
\name{dataset_citations}
\alias{dataset_citations}
\title{Generate dataset citations}
\usage{
dataset_citations(datasets = c(), astext = TRUE)
}
\arguments{
\item{datasets}{character vector. Code of the datasets. When no datasets ... | /man/dataset_citations.Rd | permissive | vinisalazar/sdmpredictors | R | false | true | 1,179 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/citations.R
\name{dataset_citations}
\alias{dataset_citations}
\title{Generate dataset citations}
\usage{
dataset_citations(datasets = c(), astext = TRUE)
}
\arguments{
\item{datasets}{character vector. Code of the datasets. When no datasets ... |
library(dplyr)
library(prophet)
data<-read.csv('C:/Users/15189/Desktop/MGMT6160/final/data_sales.csv')
a<-data[which(data$shop_id==59),]
b<-a[which(a$item_id==5587),]
daily <- group_by(data, date)
daily_sale <- summarise(daily,sum_sales = sum(item_cnt_day))
index<-which(daily_sale$date=='2014-... | /Sales Prediction (Time Seiers) Project/model.R | no_license | baiting7/Projects | R | false | false | 1,359 | r |
library(dplyr)
library(prophet)
data<-read.csv('C:/Users/15189/Desktop/MGMT6160/final/data_sales.csv')
a<-data[which(data$shop_id==59),]
b<-a[which(a$item_id==5587),]
daily <- group_by(data, date)
daily_sale <- summarise(daily,sum_sales = sum(item_cnt_day))
index<-which(daily_sale$date=='2014-... |
household <- read.csv("exdata-data-household_power_consumption/household_power_consumption.txt", sep=";", na.strings="?", stringsAsFactors=FALSE)
Date <- strptime(household$Date, "%d/%m/%Y")
separater <-Date == "2007-02-01" | Date == "2007-02-02"
household <- household[separater,]
Datetime<-with(household,paste(Date,Ti... | /Plot4.R | no_license | AndrewLu1992/ExplData_Assignment1 | R | false | false | 1,200 | r | household <- read.csv("exdata-data-household_power_consumption/household_power_consumption.txt", sep=";", na.strings="?", stringsAsFactors=FALSE)
Date <- strptime(household$Date, "%d/%m/%Y")
separater <-Date == "2007-02-01" | Date == "2007-02-02"
household <- household[separater,]
Datetime<-with(household,paste(Date,Ti... |
library(dplyr)
library(reshape2)
library(lubridate)
setwd('../NaturalResources/')
pg_conf <- read.csv('../rds_settings', stringsAsFactors=FALSE)
con <- src_postgres(dbname='vitalsigns', host=pg_conf$host,
user=pg_conf$user, password=pg_conf$pass,
port=pg_conf$port)
##########... | /NaturalResources/NaturalResources.R | no_license | austindrichards/vs-indicators-calc | R | false | false | 5,039 | r | library(dplyr)
library(reshape2)
library(lubridate)
setwd('../NaturalResources/')
pg_conf <- read.csv('../rds_settings', stringsAsFactors=FALSE)
con <- src_postgres(dbname='vitalsigns', host=pg_conf$host,
user=pg_conf$user, password=pg_conf$pass,
port=pg_conf$port)
##########... |
# ==================================================
# xgboost model predicting helpfulness as binary reponse
# Accuracy: .71
# Use the probabilities as a way to rank the reviews shown to the customer
# Higher probability means a higher confidence that the review is "helpful"
# System will show reviews with high probab... | /03_binaryResponse_xgboost_TM.R | no_license | jmichaelgilbert/498_Fantastic_Four | R | false | false | 3,074 | r | # ==================================================
# xgboost model predicting helpfulness as binary reponse
# Accuracy: .71
# Use the probabilities as a way to rank the reviews shown to the customer
# Higher probability means a higher confidence that the review is "helpful"
# System will show reviews with high probab... |
buildPlot1 <- function()
{
library(data.table)
df_full <- fread("household_power_consumption.txt", sep=";", colClasses=c("character"))
df_subset <- subset(df_full, Date=='1/2/2007' | Date=='2/2/2007')[,c("Date", "Time", "Global_active_power")]
rm(df_full)
... | /plot1.R | no_license | drexelhub/ExData_Plotting1 | R | false | false | 757 | r | buildPlot1 <- function()
{
library(data.table)
df_full <- fread("household_power_consumption.txt", sep=";", colClasses=c("character"))
df_subset <- subset(df_full, Date=='1/2/2007' | Date=='2/2/2007')[,c("Date", "Time", "Global_active_power")]
rm(df_full)
... |
#' General Data Import from Water Quality Portal
#'
#' Imports data from Water Quality Portal web service. This function gets the data from here: \url{http://www.waterqualitydata.us}.
#' because it allows for other agencies rather than the USGS.
#'
#' @param \dots see \url{www.waterqualitydata.us/webservices_document... | /R/readWQPdata.R | permissive | lawinslow/dataRetrieval | R | false | false | 14,919 | r | #' General Data Import from Water Quality Portal
#'
#' Imports data from Water Quality Portal web service. This function gets the data from here: \url{http://www.waterqualitydata.us}.
#' because it allows for other agencies rather than the USGS.
#'
#' @param \dots see \url{www.waterqualitydata.us/webservices_document... |
"xyz2torsion" <-
function(pdb, xyz, tbl = c("basic", "mainchain", "sidechain",
"all", "phi", "psi", paste("chi", 1:5, sep="")), ncore = NULL) {
if(ncol(pdb$xyz) != ncol(xyz))
stop("Number of atoms in PDB doesn't match xyz")
ncore <- setup.ncore(ncore, bigmem = TRUE)
tor.names <- c("phi", "psi", pas... | /new_funs/xyz2torsion.R | no_license | Grantlab/bio3d | R | false | false | 1,437 | r | "xyz2torsion" <-
function(pdb, xyz, tbl = c("basic", "mainchain", "sidechain",
"all", "phi", "psi", paste("chi", 1:5, sep="")), ncore = NULL) {
if(ncol(pdb$xyz) != ncol(xyz))
stop("Number of atoms in PDB doesn't match xyz")
ncore <- setup.ncore(ncore, bigmem = TRUE)
tor.names <- c("phi", "psi", pas... |
#Install required packages ----
if(!require(shinydashboard))
install.packages("shinydashboard")
if(!require(leaflet))
install.packages("leaflet")
if(!require(maptools))
install.packages('maptools')
#if(!require(classInt))
# install.packages('classInt')
if(!require(RColorBrewer))
install.packages('RColorBre... | /Shiny App Sample/NYC_App_by_New_PCT_TRACT_SCH_DIST/global.R | no_license | pinnnnnn/17springmap | R | false | false | 1,147 | r | #Install required packages ----
if(!require(shinydashboard))
install.packages("shinydashboard")
if(!require(leaflet))
install.packages("leaflet")
if(!require(maptools))
install.packages('maptools')
#if(!require(classInt))
# install.packages('classInt')
if(!require(RColorBrewer))
install.packages('RColorBre... |
library(readr)
library(dplyr)
library(purrr)
files <- unlist(snakemake@input[['tsv_summaries']])
atp_files <- files[grepl(pattern = "atp_binding.tsv", x = files)]
lat_files <- files[grepl(pattern = "lateral_actin_contact.tsv", x = files)]
lon_files <- files[grepl(pattern = "longitudinal_actin_contact.tsv", x = files)]... | /snakemake/snakemake_combine_shared_feature_residue_outputs.R | permissive | Arcadia-Science/2022-actin-prediction | R | false | false | 1,753 | r | library(readr)
library(dplyr)
library(purrr)
files <- unlist(snakemake@input[['tsv_summaries']])
atp_files <- files[grepl(pattern = "atp_binding.tsv", x = files)]
lat_files <- files[grepl(pattern = "lateral_actin_contact.tsv", x = files)]
lon_files <- files[grepl(pattern = "longitudinal_actin_contact.tsv", x = files)]... |
# load packages -----------------------------------------
# library(shiny)
# library(rstudioapi)
library(fgsea)
library(dplyr)
library(ggplot2)
library(ggrepel)
library(DT)
# load data ---------------------------------------------
# setwd(dirname(getActiveDocumentContext()$path))
## load Enrichr gene list data
load("... | /app.R | no_license | jessicaw9910/cmap | R | false | false | 8,222 | r | # load packages -----------------------------------------
# library(shiny)
# library(rstudioapi)
library(fgsea)
library(dplyr)
library(ggplot2)
library(ggrepel)
library(DT)
# load data ---------------------------------------------
# setwd(dirname(getActiveDocumentContext()$path))
## load Enrichr gene list data
load("... |
%% File Name: tam.jml.Rd
%% File Version: 2.397
\name{tam.jml}
\alias{tam.jml}
\alias{summary.tam.jml}
\alias{logLik.tam.jml}
\title{
Joint Maximum Likelihood Estimation
}
\description{
This function estimate unidimensional
item response models with joint maximum likelihood (JML,
see e.g. Linacre, ... | /TAM/man/tam.jml.Rd | no_license | akhikolla/TestedPackages-NoIssues | R | false | false | 12,340 | rd | %% File Name: tam.jml.Rd
%% File Version: 2.397
\name{tam.jml}
\alias{tam.jml}
\alias{summary.tam.jml}
\alias{logLik.tam.jml}
\title{
Joint Maximum Likelihood Estimation
}
\description{
This function estimate unidimensional
item response models with joint maximum likelihood (JML,
see e.g. Linacre, ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_fpl_fixtures.R
\name{plot.fpl_fixtures}
\alias{plot.fpl_fixtures}
\title{Visualize Fixture Difficulty}
\usage{
\method{plot}{fpl_fixtures}(x)
}
\arguments{
\item{x}{An object of class \code{fpl_fixtures}.}
}
\value{
An object of class \c... | /man/plot.fpl_fixtures.Rd | no_license | Chrisjb/fploptimiser | R | false | true | 542 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_fpl_fixtures.R
\name{plot.fpl_fixtures}
\alias{plot.fpl_fixtures}
\title{Visualize Fixture Difficulty}
\usage{
\method{plot}{fpl_fixtures}(x)
}
\arguments{
\item{x}{An object of class \code{fpl_fixtures}.}
}
\value{
An object of class \c... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rename.R
\name{rename.values}
\alias{rename.values}
\title{Replace/rename values in a vector}
\usage{
rename.values(x, ..., defaultValue = x, warn_missing = TRUE)
}
\arguments{
\item{x}{Vector of values to replace}
\item{...}{Key/value pairs... | /man/rename.values.Rd | no_license | cran/mudata | R | false | true | 959 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rename.R
\name{rename.values}
\alias{rename.values}
\title{Replace/rename values in a vector}
\usage{
rename.values(x, ..., defaultValue = x, warn_missing = TRUE)
}
\arguments{
\item{x}{Vector of values to replace}
\item{...}{Key/value pairs... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/MxFitFunctionWLS.R
\name{mxDescribeDataWLS}
\alias{mxDescribeDataWLS}
\title{Determine whether a dataset will have weights and summary statistics for the means if used with mxFitFunctionWLS}
\usage{
mxDescribeDataWLS(
data,
allContinuousM... | /man/mxDescribeDataWLS.Rd | no_license | cran/OpenMx | R | false | true | 2,209 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/MxFitFunctionWLS.R
\name{mxDescribeDataWLS}
\alias{mxDescribeDataWLS}
\title{Determine whether a dataset will have weights and summary statistics for the means if used with mxFitFunctionWLS}
\usage{
mxDescribeDataWLS(
data,
allContinuousM... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Simulations-class.R
\docType{class}
\name{GeneralSimulations-class}
\alias{GeneralSimulations-class}
\alias{.GeneralSimulations}
\alias{GeneralSimulations}
\title{\code{GeneralSimulations}}
\usage{
GeneralSimulations(data, doses, seed)
}
\arg... | /man/GeneralSimulations-class.Rd | no_license | Roche/crmPack | R | false | true | 1,493 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Simulations-class.R
\docType{class}
\name{GeneralSimulations-class}
\alias{GeneralSimulations-class}
\alias{.GeneralSimulations}
\alias{GeneralSimulations}
\title{\code{GeneralSimulations}}
\usage{
GeneralSimulations(data, doses, seed)
}
\arg... |
# Accessors ####
setDataset.TreeStructs <- function(obj, newVal) {
obj$Dataset <- newVal
return(obj)
}
#' @title setTreestruct.TreeStructs
#' @description This validates and creates the nested dataframe and populates the object with it.
#' @param obj TreeStructs object
#' @param treestructs treestruct data fr... | /R/TreeStructs_methods.r | no_license | fdbesanto2/treestruct | R | false | false | 20,444 | r | # Accessors ####
setDataset.TreeStructs <- function(obj, newVal) {
obj$Dataset <- newVal
return(obj)
}
#' @title setTreestruct.TreeStructs
#' @description This validates and creates the nested dataframe and populates the object with it.
#' @param obj TreeStructs object
#' @param treestructs treestruct data fr... |
##### Load packages #####
require(testthat)
require(PortfolioAnalytics)
##### Source Demo Script #####
source(system.file("demo/demo_max_quadratic_utility.R", package="PortfolioAnalytics"))
##### init.portf objectives #####
context("objectives for quadratic utility")
test_that("init.portf contains mean as an object... | /inst/tests/test_demo_max_qu.R | no_license | cran/PortfolioAnalytics | R | false | false | 3,516 | r | ##### Load packages #####
require(testthat)
require(PortfolioAnalytics)
##### Source Demo Script #####
source(system.file("demo/demo_max_quadratic_utility.R", package="PortfolioAnalytics"))
##### init.portf objectives #####
context("objectives for quadratic utility")
test_that("init.portf contains mean as an object... |
# plot2.R
if (!"neiData" %in% ls()) {
NEI <- readRDS("./data/summarySCC_PM25.rds")
}
if (!"sccData" %in% ls()) {
SCC <- readRDS("./data/Source_Classification_Code.rds")
}
# Subset data for Baltimore
baltimore <- NEI[NEI$fips == "24510", ]
# Emissions for Baltimore
balt_emission <- tapply(baltimore$Emissions, balt... | /plot2.R | no_license | saransh-gupta/ExData_PeerAssessment2 | R | false | false | 642 | r | # plot2.R
if (!"neiData" %in% ls()) {
NEI <- readRDS("./data/summarySCC_PM25.rds")
}
if (!"sccData" %in% ls()) {
SCC <- readRDS("./data/Source_Classification_Code.rds")
}
# Subset data for Baltimore
baltimore <- NEI[NEI$fips == "24510", ]
# Emissions for Baltimore
balt_emission <- tapply(baltimore$Emissions, balt... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.