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 |
|---|---|---|---|---|---|---|---|---|---|
translatedRandomBeta=function (n, min, max, param1 = 3, param2 = 1){
scale <- max - min
simu <- rbeta(n, param1, param2)
res <- (simu * scale) + min
return(res)
}
| /imp4p/R/translatedRandomBeta.R | no_license | akhikolla/InformationHouse | R | false | false | 179 | r |
translatedRandomBeta=function (n, min, max, param1 = 3, param2 = 1){
scale <- max - min
simu <- rbeta(n, param1, param2)
res <- (simu * scale) + min
return(res)
}
|
library("data.table")
setwd("~/Desktop/datasciencecoursera/4_Exploratory_Data_Analysis/project/data")
powerDT <- data.table::fread(input = "household_power_consumption.txt"
, na.strings="?"
)
powerDT[, Global_active_power := lapply(.SD, as.numeric), .SDcols = c("Global_active_power")]
p... | /plot1.R | no_license | mahmood361/datasciencecoursera | R | false | false | 664 | r | library("data.table")
setwd("~/Desktop/datasciencecoursera/4_Exploratory_Data_Analysis/project/data")
powerDT <- data.table::fread(input = "household_power_consumption.txt"
, na.strings="?"
)
powerDT[, Global_active_power := lapply(.SD, as.numeric), .SDcols = c("Global_active_power")]
p... |
#' Example Query Data Frame
#'
#' Example \code{query_df} for use in generating a \link{mgFeatures-class}
#' object using the \link{annotateFeatures} \link[=MgDb]{MgDb-class} method.
#' The dataset contains the OTU ids and Greengenes database version 13.5 ids.
#' Specifically, the OTU centers came from a mock community... | /R/mock_query_df.R | no_license | nate-d-olson/metagenomeFeatures | R | false | false | 806 | r | #' Example Query Data Frame
#'
#' Example \code{query_df} for use in generating a \link{mgFeatures-class}
#' object using the \link{annotateFeatures} \link[=MgDb]{MgDb-class} method.
#' The dataset contains the OTU ids and Greengenes database version 13.5 ids.
#' Specifically, the OTU centers came from a mock community... |
# Plots associations from clusters to outcome measures.
library(argparse)
library(plyr)
library(data.table)
library(feather)
library(grid)
library(ggplot2)
library(ggbeeswarm)
library(cowplot)
# Get arguments.
parser <- ArgumentParser()
parser$add_argument('--input', required = TRUE)
parser$add_argument('... | /scripts/outcomes/core_set/plot_associations.R | permissive | morrislab/plos-medicine-joint-patterns | R | false | false | 4,867 | r | # Plots associations from clusters to outcome measures.
library(argparse)
library(plyr)
library(data.table)
library(feather)
library(grid)
library(ggplot2)
library(ggbeeswarm)
library(cowplot)
# Get arguments.
parser <- ArgumentParser()
parser$add_argument('--input', required = TRUE)
parser$add_argument('... |
# (a)
rm(list=ls())
set.seed(1)
p = 20
n = 1000
X = rnorm(n, mean = 0, sd = 1)
e = rnorm(n, mean = 0, sd = 1)
c = seq(from = 1, to = 20, length.out = p)
beta = rep(0, p)
beta0 = 1
beta[1] = 2
beta[2] = 3
beta[3] = 5
Y = beta0 + beta[1]*X + beta[2]*X^2 + beta[3]*X^3 + e
# (b)
simulatedData = data.frame(
response = Y,... | /Homework/HW2/HW2_P6.R | permissive | Zhuoyue-Xing/STAT-LRNING-BIOL-INFO-SYST | R | false | false | 3,442 | r | # (a)
rm(list=ls())
set.seed(1)
p = 20
n = 1000
X = rnorm(n, mean = 0, sd = 1)
e = rnorm(n, mean = 0, sd = 1)
c = seq(from = 1, to = 20, length.out = p)
beta = rep(0, p)
beta0 = 1
beta[1] = 2
beta[2] = 3
beta[3] = 5
Y = beta0 + beta[1]*X + beta[2]*X^2 + beta[3]*X^3 + e
# (b)
simulatedData = data.frame(
response = Y,... |
source("incl/start.R")
library("listenv")
if (requireNamespace("future.apply", quietly = TRUE)) {
future_lapply <- future.apply::future_lapply
strategies <- c("sequential", "batchjobs_interactive", "batchjobs_local")
## CRAN processing times: Don't run these tests on Windows 32-bit
if (!fullTest && isWin32... | /data/genthat_extracted_code/future.BatchJobs/tests/zzz,future_lapply.R | no_license | surayaaramli/typeRrh | R | false | false | 3,103 | r | source("incl/start.R")
library("listenv")
if (requireNamespace("future.apply", quietly = TRUE)) {
future_lapply <- future.apply::future_lapply
strategies <- c("sequential", "batchjobs_interactive", "batchjobs_local")
## CRAN processing times: Don't run these tests on Windows 32-bit
if (!fullTest && isWin32... |
data <- read.csv("household_power_consumption.txt", sep = ";")
data1 <- subset(data, data$Date=="1/2/2007" | data$Date =="2/2/2007")
firstdate <- which(data1$Date == "1/2/2007")
seconddate <- which(data1$Date == "2/2/2007")
data1$Date <- as.Date(data1$Date, format="%d/%m/%Y")
data1$Time <- strptime(data1$Time, format... | /plot3.R | no_license | jce2209/datasciencecoursera | R | false | false | 952 | r | data <- read.csv("household_power_consumption.txt", sep = ";")
data1 <- subset(data, data$Date=="1/2/2007" | data$Date =="2/2/2007")
firstdate <- which(data1$Date == "1/2/2007")
seconddate <- which(data1$Date == "2/2/2007")
data1$Date <- as.Date(data1$Date, format="%d/%m/%Y")
data1$Time <- strptime(data1$Time, format... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/readplink.R
\name{snp_readBed}
\alias{snp_readBed}
\alias{snp_readBed2}
\title{Read PLINK files into a "bigSNP"}
\usage{
snp_readBed(bedfile, backingfile = sub_bed(bedfile))
snp_readBed2(
bedfile,
backingfile = sub_bed(bedfile),
ind.ro... | /man/snp_readBed.Rd | no_license | pythseq/bigsnpr | R | false | true | 2,127 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/readplink.R
\name{snp_readBed}
\alias{snp_readBed}
\alias{snp_readBed2}
\title{Read PLINK files into a "bigSNP"}
\usage{
snp_readBed(bedfile, backingfile = sub_bed(bedfile))
snp_readBed2(
bedfile,
backingfile = sub_bed(bedfile),
ind.ro... |
library(DPpackage)
data(neuroblastomaProcessed, package="penaltyLearning")
x1 <- neuroblastomaProcessed$feature.mat[, "log.n"]
x2 <- neuroblastomaProcessed$feature.mat[, "log.hall"]
y <- with(neuroblastomaProcessed, cbind(
ifelse(target.mat[,1]==-Inf, -999, target.mat[,1]),
ifelse(target.mat[,2]==Inf, -999, target.... | /DPpackage-bug.R | no_license | tdhock/bayesian-labeled-changepoint | R | false | false | 733 | r | library(DPpackage)
data(neuroblastomaProcessed, package="penaltyLearning")
x1 <- neuroblastomaProcessed$feature.mat[, "log.n"]
x2 <- neuroblastomaProcessed$feature.mat[, "log.hall"]
y <- with(neuroblastomaProcessed, cbind(
ifelse(target.mat[,1]==-Inf, -999, target.mat[,1]),
ifelse(target.mat[,2]==Inf, -999, target.... |
/Programacion-Actuarial/metodo-burbuja-11.R | no_license | djosafat/riesgoyprobabilidad | R | false | false | 2,116 | r | ||
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/MAP.R
\docType{data}
\name{phecode.cuis.list}
\alias{phecode.cuis.list}
\title{MAP dictionary}
\format{
A list of 1866
}
\usage{
phecode.cuis.list
}
\description{
MAP dictionary that maps phecode to CUIs
}
\examples{
head(phecode.cuis.list)
t... | /man/phecode.cuis.list.Rd | no_license | celehs/MAP | R | false | true | 364 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/MAP.R
\docType{data}
\name{phecode.cuis.list}
\alias{phecode.cuis.list}
\title{MAP dictionary}
\format{
A list of 1866
}
\usage{
phecode.cuis.list
}
\description{
MAP dictionary that maps phecode to CUIs
}
\examples{
head(phecode.cuis.list)
t... |
#Lists can be complex
myVector = c(3,4,5)
myList = list(c(2,3,4), "Casey", myVector)
vectorOfLists = list(1, "myname", myVector, myList)
#Factors have categories
is.factor(myVector)
orderMeUp = as.factor(myVector)
is.factor(orderMeUp)
levels(orderMeUp)
class(orderMeUp)
unclass(orderMeUp)
#you can state explicit order... | /JHU_R_Specialization/dataTypes.R | no_license | sciencecasey/Stats_R_and_early_stuff | R | false | false | 770 | r | #Lists can be complex
myVector = c(3,4,5)
myList = list(c(2,3,4), "Casey", myVector)
vectorOfLists = list(1, "myname", myVector, myList)
#Factors have categories
is.factor(myVector)
orderMeUp = as.factor(myVector)
is.factor(orderMeUp)
levels(orderMeUp)
class(orderMeUp)
unclass(orderMeUp)
#you can state explicit order... |
#' @export
gibbs_default_priors <- function(nparam, ngroup = NULL) {
prior <- list(mu_global = rep(0, nparam),
Sigma_global = diag(1.0, nparam),
v_global = 0,
S_global = diag(1.0, nparam))
if (!is.null(ngroup) && !is.na(ngroup)) {
group <- list(mu_g... | /R/gibbs_default_priors.R | no_license | ashiklom/mvtraits | R | false | false | 909 | r | #' @export
gibbs_default_priors <- function(nparam, ngroup = NULL) {
prior <- list(mu_global = rep(0, nparam),
Sigma_global = diag(1.0, nparam),
v_global = 0,
S_global = diag(1.0, nparam))
if (!is.null(ngroup) && !is.na(ngroup)) {
group <- list(mu_g... |
#/////////////////////////////////////////////////////////////////////////////////////////////////
# This is a script to: 1) text to columns of 02.df.R files and
# 2) create a long DF (estimates spread across columns per result)
# for both full results and CBG results for BC
# Date: 2019-11-20
# Author: V Southerland... | /Houston_03.pm.long.df.R | no_license | hugh1li/EDF-HIA-Houston | R | false | false | 12,883 | r | #/////////////////////////////////////////////////////////////////////////////////////////////////
# This is a script to: 1) text to columns of 02.df.R files and
# 2) create a long DF (estimates spread across columns per result)
# for both full results and CBG results for BC
# Date: 2019-11-20
# Author: V Southerland... |
challenge_B = function(){
v = 0.1
t = 200
size = 100
repeats = 50
num_communties = 10
communities = data.frame()
#generate some communites with random initial richnesses and store them
#in a datframe called communties. Because expected richness for 100 selected
#from 100 is 63.66, richness w... | /HPC/Sandbox/challenge_B.R | no_license | PetraGuy/CMEECourseWork | R | false | false | 1,940 | r |
challenge_B = function(){
v = 0.1
t = 200
size = 100
repeats = 50
num_communties = 10
communities = data.frame()
#generate some communites with random initial richnesses and store them
#in a datframe called communties. Because expected richness for 100 selected
#from 100 is 63.66, richness w... |
#!/usr/bin/Rscript
## ./knit [epub|github|html|pdf|docx] to generate different types of output
library(knitr)
## use markdown as the output format: R code in ```r and ```
render_markdown()
## Formatting for printed numbers
knit_hooks$set(inline = function(x) {
if(is.numeric(x) && x > 0.001)
I(prettyNum(round(... | /paper/knit | permissive | mmadsen/experiment-classification | R | false | false | 2,356 | #!/usr/bin/Rscript
## ./knit [epub|github|html|pdf|docx] to generate different types of output
library(knitr)
## use markdown as the output format: R code in ```r and ```
render_markdown()
## Formatting for printed numbers
knit_hooks$set(inline = function(x) {
if(is.numeric(x) && x > 0.001)
I(prettyNum(round(... | |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/package_delete.R
\name{package_delete}
\alias{package_delete}
\title{Delete a package}
\usage{
package_delete(id, key = get_default_key(), url = get_default_url(), ...)
}
\arguments{
\item{id}{(character) The id of the package. Required.}
\i... | /man/package_delete.Rd | permissive | chrisfan24/ckanr | R | false | true | 919 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/package_delete.R
\name{package_delete}
\alias{package_delete}
\title{Delete a package}
\usage{
package_delete(id, key = get_default_key(), url = get_default_url(), ...)
}
\arguments{
\item{id}{(character) The id of the package. Required.}
\i... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/run_shiny.R
\name{run_shiny}
\alias{run_shiny}
\title{Run the visang Shiny App}
\usage{
run_shiny(...)
}
\arguments{
\item{...}{optional arguments to \code{shiny::runApp()}}
}
\description{
Runs the visang Shiny App, with optional additional ... | /man/run_shiny.Rd | permissive | gretat/visang.prog | R | false | true | 333 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/run_shiny.R
\name{run_shiny}
\alias{run_shiny}
\title{Run the visang Shiny App}
\usage{
run_shiny(...)
}
\arguments{
\item{...}{optional arguments to \code{shiny::runApp()}}
}
\description{
Runs the visang Shiny App, with optional additional ... |
\name{corplot}
\alias{corplot}
\title{
Pairwise Correlation Calculation and Visualization
}
\description{
Pairwise comparison matrix of the original and corrected measurements
}
\usage{
corplot(mat)
}
\arguments{
\item{mat}{
a data matrix from \code{\link{correct.guided}} function
}
}
\details{
Pairwise plots of sequ... | /man/corplot.Rd | no_license | cran/GCAI.bias | R | false | false | 1,333 | rd | \name{corplot}
\alias{corplot}
\title{
Pairwise Correlation Calculation and Visualization
}
\description{
Pairwise comparison matrix of the original and corrected measurements
}
\usage{
corplot(mat)
}
\arguments{
\item{mat}{
a data matrix from \code{\link{correct.guided}} function
}
}
\details{
Pairwise plots of sequ... |
# parses output of bottleneck
# out1: TPM 70, IAM and SMM
# out2: TPM 95
# out3: TPM 99
# out24: TPM 90
# run these bash commands on all files in bottleneck/out to remove header information
# make sure it works
system("for i in output/bottleneck_out/*.txt; do cat $i | awk '/SIGN/,0' > output/bottleneck_out/$i.edit.tx... | /R/bottleneck_results.R | no_license | mastoffel/pinniped_bottlenecks | R | false | false | 7,944 | r | # parses output of bottleneck
# out1: TPM 70, IAM and SMM
# out2: TPM 95
# out3: TPM 99
# out24: TPM 90
# run these bash commands on all files in bottleneck/out to remove header information
# make sure it works
system("for i in output/bottleneck_out/*.txt; do cat $i | awk '/SIGN/,0' > output/bottleneck_out/$i.edit.tx... |
\name{NcmsProcessData-class}
\Rdversion{1.1}
\docType{class}
\alias{NcmsProcessData-class}
\alias{show,NcmsProcessData-method}
\title{Class \code{"NcmsProcessData"}}
\description{
%% ~~ A concise (1-5 lines) description of what the class is. ~~
}
\section{Objects from the Class}{
Objects can be created by calls of th... | /NcmsProcessData-class.Rd | no_license | ReemaSingh/HTDA | R | false | false | 1,407 | rd | \name{NcmsProcessData-class}
\Rdversion{1.1}
\docType{class}
\alias{NcmsProcessData-class}
\alias{show,NcmsProcessData-method}
\title{Class \code{"NcmsProcessData"}}
\description{
%% ~~ A concise (1-5 lines) description of what the class is. ~~
}
\section{Objects from the Class}{
Objects can be created by calls of th... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/eloFunctions.R
\name{pm_eloShowWinProbForScoreDiff}
\alias{pm_eloShowWinProbForScoreDiff}
\title{pm_eloShowWinProbForScoreDiff}
\usage{
pm_eloShowWinProbForScoreDiff(scoreDiff)
}
\arguments{
\item{scoreDiff}{The difference in score}
}
\value{... | /man/pm_eloShowWinProbForScoreDiff.Rd | no_license | quietsnooze/pmpackage | R | false | true | 422 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/eloFunctions.R
\name{pm_eloShowWinProbForScoreDiff}
\alias{pm_eloShowWinProbForScoreDiff}
\title{pm_eloShowWinProbForScoreDiff}
\usage{
pm_eloShowWinProbForScoreDiff(scoreDiff)
}
\arguments{
\item{scoreDiff}{The difference in score}
}
\value{... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/findActiveSeq.R
\name{findActivePrep}
\alias{findActivePrep}
\title{Computes a set of indices that contains the active variables of FPS}
\usage{
findActivePrep(S, ndim)
}
\arguments{
\item{S}{The input symmetric matrix S}
\item{ndim}... | /man/findActivePrep.Rd | no_license | lingxuez/fastFPS | R | false | false | 565 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/findActiveSeq.R
\name{findActivePrep}
\alias{findActivePrep}
\title{Computes a set of indices that contains the active variables of FPS}
\usage{
findActivePrep(S, ndim)
}
\arguments{
\item{S}{The input symmetric matrix S}
\item{ndim}... |
#' Return asd quantity
#'
#' @param plan.values
#' @param n
#' @param censor.time
#' @param quantile.mark
#'
#' @return variance
#' @export
#'
#' @examples
#' \dontrun{
#' plan.values3 <- get.plan.values("Weibull",
#' prob = c(.2,.12),
#' time = c(1000... | /R/asd.quant.R | no_license | anhnguyendepocen/SMRD | R | false | false | 1,773 | r | #' Return asd quantity
#'
#' @param plan.values
#' @param n
#' @param censor.time
#' @param quantile.mark
#'
#' @return variance
#' @export
#'
#' @examples
#' \dontrun{
#' plan.values3 <- get.plan.values("Weibull",
#' prob = c(.2,.12),
#' time = c(1000... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fars.R
\name{fars_read}
\alias{fars_read}
\title{fars_read ()is a function that read in data from a csv file.
FARS stand for "Fatality Analysis Reporting System" and is a nationwide census, providing the American public yearly data,
regarding... | /man/fars_read.Rd | no_license | jianweilu/rhomewek | R | false | true | 962 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fars.R
\name{fars_read}
\alias{fars_read}
\title{fars_read ()is a function that read in data from a csv file.
FARS stand for "Fatality Analysis Reporting System" and is a nationwide census, providing the American public yearly data,
regarding... |
library(tidyverse)
df <- readr::read_csv("1D_model2_0.5.out")
cat("Mean for F: ", mean(df$F_est), "\n")
cat("Overall RMSD for Nu0: ", sqrt(mean((df$Nu0_true-df$Nu0_est)^2)), "\n")
cat("Overall RMSD for T: ", sqrt(mean((df$T_true-df$T_est)^2)), "\n")
df %>% ggplot(aes(F_est)) +
geom_density(fill="gray40", color="whi... | /sims/misspecified-inbreeding/results/plot_1D_model2.R | no_license | pblischak/inbreeding-sfs | R | false | false | 1,492 | r | library(tidyverse)
df <- readr::read_csv("1D_model2_0.5.out")
cat("Mean for F: ", mean(df$F_est), "\n")
cat("Overall RMSD for Nu0: ", sqrt(mean((df$Nu0_true-df$Nu0_est)^2)), "\n")
cat("Overall RMSD for T: ", sqrt(mean((df$T_true-df$T_est)^2)), "\n")
df %>% ggplot(aes(F_est)) +
geom_density(fill="gray40", color="whi... |
#' manhattan
#'
#' produces mnhattan plots
#'
#' @param mh.par character{1}. Parameter name, used as a prefix in the files of interest.
#' @param mh.pw character{1}. Output path. (default home folder).
#'
#' @return NULL. It automatically produces a plot.
#' @export
#' @importFrom dplyr group_by summarise mutate selec... | /R/manhattan.R | no_license | gardiner/daphneg2 | R | false | false | 4,021 | r | #' manhattan
#'
#' produces mnhattan plots
#'
#' @param mh.par character{1}. Parameter name, used as a prefix in the files of interest.
#' @param mh.pw character{1}. Output path. (default home folder).
#'
#' @return NULL. It automatically produces a plot.
#' @export
#' @importFrom dplyr group_by summarise mutate selec... |
# solve ax^2+bx+c=0
solve_quadratic <- function(a,b,c){
if(delta(a,b,c) > 0){ # D>0
x_1 = (-b+sqrt(delta(a,b,c)))/(2*a)
x_2 = (-b-sqrt(delta(a,b,c)))/(2*a)
res = c(x_1,x_2)
return(res)
}
else if(delta(a,b,c) == 0){ # D=0
res = -b/(2*a)
return(res)
}
else{return(NULL)} # D<0
}
# D
delt... | /animalBreeding/R/solve_quadratic.R | no_license | VladaMilch/animalBreeding_pub | R | false | false | 353 | r | # solve ax^2+bx+c=0
solve_quadratic <- function(a,b,c){
if(delta(a,b,c) > 0){ # D>0
x_1 = (-b+sqrt(delta(a,b,c)))/(2*a)
x_2 = (-b-sqrt(delta(a,b,c)))/(2*a)
res = c(x_1,x_2)
return(res)
}
else if(delta(a,b,c) == 0){ # D=0
res = -b/(2*a)
return(res)
}
else{return(NULL)} # D<0
}
# D
delt... |
#download zip file from the assignment
fileUrl <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip"
if(!file.exists("data")) {
dir.create("data")
download.file(fileUrl, "./data/dataset.zip")
unzip("./data/dataset.zip", exdir = "data")
}
#read data from test
x_test <- rea... | /run_analysis.R | no_license | IuliiaNikitina12/getting_and_cleaning_data_final_project | R | false | false | 2,446 | r |
#download zip file from the assignment
fileUrl <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip"
if(!file.exists("data")) {
dir.create("data")
download.file(fileUrl, "./data/dataset.zip")
unzip("./data/dataset.zip", exdir = "data")
}
#read data from test
x_test <- rea... |
# Our overall goal here is simply to examine how household energy usage varies over a 2-day period in February, 2007. The task is to reconstruct the following plots below, using the base plotting system.:
# Plot1.png is the ourcome of this code, it displays a graphic representation of the Global Active Power histogra... | /plot1.R | no_license | FHasbani/ExData_Plotting1 | R | false | false | 2,852 | r | # Our overall goal here is simply to examine how household energy usage varies over a 2-day period in February, 2007. The task is to reconstruct the following plots below, using the base plotting system.:
# Plot1.png is the ourcome of this code, it displays a graphic representation of the Global Active Power histogra... |
#Load data into R
powerData<-read.table("household_power_consumption/household_power_consumption.txt", header = TRUE, sep = ";", dec = ".")
#Convert Date column to Date data type
powerData$Date<-as.Date(powerData$Date,'%d/%m/%Y')
#subset data to leave data for dates 2007-02-01 and 2007-02-02 only
subsetPowerData<-... | /plot4.R | no_license | jkamaumburu/ExData_Plotting1 | R | false | false | 1,722 | r |
#Load data into R
powerData<-read.table("household_power_consumption/household_power_consumption.txt", header = TRUE, sep = ";", dec = ".")
#Convert Date column to Date data type
powerData$Date<-as.Date(powerData$Date,'%d/%m/%Y')
#subset data to leave data for dates 2007-02-01 and 2007-02-02 only
subsetPowerData<-... |
\name{area.served}
\alias{area.served}
\title{
area.served
}
\description{
area.served
}
\usage{
area.served()
}
\details{
It does stuff}
| /man/area.served.Rd | no_license | CRMcMahon/netassess-new | R | false | false | 140 | rd | \name{area.served}
\alias{area.served}
\title{
area.served
}
\description{
area.served
}
\usage{
area.served()
}
\details{
It does stuff}
|
# Script for Kaggle springleaf
######################################################
# Source files and libraries
######################################################
source('source.R')
######################################################
# Raw Data
######################################################
raw <- r... | /script.R | no_license | jun2tong/springleaf | R | false | false | 770 | r | # Script for Kaggle springleaf
######################################################
# Source files and libraries
######################################################
source('source.R')
######################################################
# Raw Data
######################################################
raw <- r... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/TARGOS-package.R
\docType{package}
\name{TARGOS}
\alias{TARGOS}
\alias{TARGOS-package}
\title{A package containing Target Osteo helpers and data accessors}
\description{
This package provides data loaders for TARGET Osteosarcoma data
... | /man/TARGOS.Rd | no_license | seandavi/TARGOS | R | false | false | 323 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/TARGOS-package.R
\docType{package}
\name{TARGOS}
\alias{TARGOS}
\alias{TARGOS-package}
\title{A package containing Target Osteo helpers and data accessors}
\description{
This package provides data loaders for TARGET Osteosarcoma data
... |
library(tidyverse)
library(stargazer)
library(stringr)
library(xtable)
load('res-fmt.RData')
fmtnumbers <- function(x){
return(prettyNum(x, digits=3, big.mark=',', drop0trailing=T))
}
for (cursim in simnames){
sumtable_byN <-
lapply(get(paste('res_byN_', cursim, sep='')),
function(xN) {
... | /res-tex.R | no_license | d3center-isr/smart-mm | R | false | false | 8,493 | r | library(tidyverse)
library(stargazer)
library(stringr)
library(xtable)
load('res-fmt.RData')
fmtnumbers <- function(x){
return(prettyNum(x, digits=3, big.mark=',', drop0trailing=T))
}
for (cursim in simnames){
sumtable_byN <-
lapply(get(paste('res_byN_', cursim, sep='')),
function(xN) {
... |
#!/usr/bin/env Rscript
## Function to subset phylogenetic tree from larger tree
prune.tree <- function(larger_tree,metadata,outfile){
# read in tree
tree <- read.tree(larger_tree)
# get tip names from metadata file
n <- read.table(metadata, sep="\t", header=TRUE)
n <- n %>% filter(paper=="yes")
n$new... | /src/plot_funcs_fig3.R | no_license | timplab/jhu-covid-pipeline | R | false | false | 5,094 | r | #!/usr/bin/env Rscript
## Function to subset phylogenetic tree from larger tree
prune.tree <- function(larger_tree,metadata,outfile){
# read in tree
tree <- read.tree(larger_tree)
# get tip names from metadata file
n <- read.table(metadata, sep="\t", header=TRUE)
n <- n %>% filter(paper=="yes")
n$new... |
library(openxlsx)
library(tidyr)
library(dplyr)
library(ggplot2)
library(arules)
library(arulesViz)
# Reading base dataset on loan and returns
POSData <- read.xlsx(xlsxFile = "D:\\Data Science and Big Data Analytics\\Assignment 2\\Data.xlsx", sheet = 1, colNames = TRUE)
nrow(POSData) # Checking number of rows... | /Inventory Management.R | no_license | Varun-Dua/Inventory-Management | R | false | false | 2,371 | r | library(openxlsx)
library(tidyr)
library(dplyr)
library(ggplot2)
library(arules)
library(arulesViz)
# Reading base dataset on loan and returns
POSData <- read.xlsx(xlsxFile = "D:\\Data Science and Big Data Analytics\\Assignment 2\\Data.xlsx", sheet = 1, colNames = TRUE)
nrow(POSData) # Checking number of rows... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/random.R
\name{random.WignerMatrix}
\alias{random.WignerMatrix}
\title{Generate a random nxn Wigner matrix, where off diagonals are N(0,1) and diagonals are N(0,2)}
\usage{
random.WignerMatrix(n)
}
\arguments{
\item{n}{dimension}
}
\descripti... | /man/random.WignerMatrix.Rd | no_license | wangtengyao/putils | R | false | true | 419 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/random.R
\name{random.WignerMatrix}
\alias{random.WignerMatrix}
\title{Generate a random nxn Wigner matrix, where off diagonals are N(0,1) and diagonals are N(0,2)}
\usage{
random.WignerMatrix(n)
}
\arguments{
\item{n}{dimension}
}
\descripti... |
repmat <-
function (v, n, m)
{
kronecker(matrix(1, n, m), v)
}
plota.theme <- function
(
col.border = 'black',
col.up = 'green',
col.dn = 'red',
col.x.highlight = 'orange',
col.y.highlight = 'orange',
alpha=NA
)
{
col = c(col.border, col.up, col.dn, col.x.highlight, col.y.highli... | /RMD/Gerber_Statistic_and_Hierarchical_Risk_Parity/SRC_additional_functions.R | permissive | PhoebusLyubil/nextlevelanalytics.github.io | R | false | false | 134,256 | r | repmat <-
function (v, n, m)
{
kronecker(matrix(1, n, m), v)
}
plota.theme <- function
(
col.border = 'black',
col.up = 'green',
col.dn = 'red',
col.x.highlight = 'orange',
col.y.highlight = 'orange',
alpha=NA
)
{
col = c(col.border, col.up, col.dn, col.x.highlight, col.y.highli... |
#' Create arrow connections between compartments
#'
#' @description Combine information for each arrow (origin, destination, label,
#' witdh, color, scaling and more) into a dataframe
#'
#' @param qmd_info a \code{qmd_info} object generated with \code{import_qmd_info} or
#' \code{skeleton_qmd_info}
#' @param scaling lo... | /R/define_arrow_layout.R | no_license | yookhwan/modelviz | R | false | false | 7,719 | r | #' Create arrow connections between compartments
#'
#' @description Combine information for each arrow (origin, destination, label,
#' witdh, color, scaling and more) into a dataframe
#'
#' @param qmd_info a \code{qmd_info} object generated with \code{import_qmd_info} or
#' \code{skeleton_qmd_info}
#' @param scaling lo... |
D<-read.csv("HUDK5053 Team 6 Survey.csv")
#remove columns that I don't need
D1<-D[,c(3,21:45)]
D2<-D1[,-c(3:7,9,10,12,13,15,16,18,20,22:26)]
write.csv(D2,"/Users/mazixuan/Desktop/HUDK 5053 Dashboard/survey.csv")
# re-scored the answers and then upload
D3<-read.csv("survey_scored.csv")
head(D3)
#add up respectively the ... | /plot.R | no_license | Xyyzzz11/HUDK-5053-Group-6- | R | false | false | 937 | r | D<-read.csv("HUDK5053 Team 6 Survey.csv")
#remove columns that I don't need
D1<-D[,c(3,21:45)]
D2<-D1[,-c(3:7,9,10,12,13,15,16,18,20,22:26)]
write.csv(D2,"/Users/mazixuan/Desktop/HUDK 5053 Dashboard/survey.csv")
# re-scored the answers and then upload
D3<-read.csv("survey_scored.csv")
head(D3)
#add up respectively the ... |
glm.fda <- function(basismat, y, family, lamRmat, wtvec=NULL,
bvec0=NULL, addterm=NULL) {
#GLM.FDA Fits a generalized linear model with regularization.
# This function is called by function smooth.GLM
# Arguments
#
# BASISMAT An N by NBASIS matrix of values of basis functions
# Y ... | /R/glm.fda.R | no_license | cran/fda | R | false | false | 18,608 | r | glm.fda <- function(basismat, y, family, lamRmat, wtvec=NULL,
bvec0=NULL, addterm=NULL) {
#GLM.FDA Fits a generalized linear model with regularization.
# This function is called by function smooth.GLM
# Arguments
#
# BASISMAT An N by NBASIS matrix of values of basis functions
# Y ... |
## Matrix inversion is usually a costly computation and there is
## benefit to caching the inverse of a matrix rather than computing it
## repeatedly. The functions here cache the inverse of a matrix.
## makeCacheMatrix: This function creates a special "matrix" object
## that can cache its inverse.
makeCacheMatri... | /cachematrix.R | no_license | mehtapuneet/ProgrammingAssignment2 | R | false | false | 2,033 | r | ## Matrix inversion is usually a costly computation and there is
## benefit to caching the inverse of a matrix rather than computing it
## repeatedly. The functions here cache the inverse of a matrix.
## makeCacheMatrix: This function creates a special "matrix" object
## that can cache its inverse.
makeCacheMatri... |
moody2018.a <- read.csv("~/Downloads/moody2018-a.csv")
View(moody2018.a)
boxplot(moody2018.a$SCORE ~ moody2018.a$GRADE,main='Distribution of Student Grade by Score',ylab='Score',xlab='Letter Grade',notch=TRUE,col.lab="Purple",col=c("Blue","Cyan"),varwidth=TRUE,pch=2)
g1 <- subset(moody2018.a,moody2018.a$GRADE=="A"|... | /Intro to Data/R hw/moody.R | no_license | Xequals0/Everything-Else | R | false | false | 1,171 | r | moody2018.a <- read.csv("~/Downloads/moody2018-a.csv")
View(moody2018.a)
boxplot(moody2018.a$SCORE ~ moody2018.a$GRADE,main='Distribution of Student Grade by Score',ylab='Score',xlab='Letter Grade',notch=TRUE,col.lab="Purple",col=c("Blue","Cyan"),varwidth=TRUE,pch=2)
g1 <- subset(moody2018.a,moody2018.a$GRADE=="A"|... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Div.R
\name{CrossCodeFrames}
\alias{CrossCodeFrames}
\title{Cross codes in data frames}
\usage{
CrossCodeFrames(codeFrame1, codeFrame2, useMatrixToDataFrame = TRUE)
}
\arguments{
\item{codeFrame1}{data frame}
\item{codeFrame2}{dat... | /man/CrossCodeFrames.Rd | no_license | cran/SSBtools | R | false | true | 507 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Div.R
\name{CrossCodeFrames}
\alias{CrossCodeFrames}
\title{Cross codes in data frames}
\usage{
CrossCodeFrames(codeFrame1, codeFrame2, useMatrixToDataFrame = TRUE)
}
\arguments{
\item{codeFrame1}{data frame}
\item{codeFrame2}{dat... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/DepLogoR.R
\name{plotBlocks}
\alias{plotBlocks}
\title{Plots blocks of data}
\usage{
plotBlocks(
data,
show.number = TRUE,
block.fun = deprects,
ic.scale = TRUE,
add = FALSE,
...
)
}
\arguments{
\item{data}{the data, a single \lin... | /man/plotBlocks.Rd | no_license | Jstacs/DepLogo | R | false | true | 1,645 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/DepLogoR.R
\name{plotBlocks}
\alias{plotBlocks}
\title{Plots blocks of data}
\usage{
plotBlocks(
data,
show.number = TRUE,
block.fun = deprects,
ic.scale = TRUE,
add = FALSE,
...
)
}
\arguments{
\item{data}{the data, a single \lin... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/trello_search.R
\name{trello_search}
\alias{trello_search}
\alias{trello_search_actions}
\alias{trello_search_cards}
\alias{trello_search_boards}
\alias{trello_search_members}
\alias{trello_search_teams}
\title{Search models}
\usage{
trello_s... | /man/trello_search.Rd | no_license | navigate-cgalvao/trelloR | R | false | true | 951 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/trello_search.R
\name{trello_search}
\alias{trello_search}
\alias{trello_search_actions}
\alias{trello_search_cards}
\alias{trello_search_boards}
\alias{trello_search_members}
\alias{trello_search_teams}
\title{Search models}
\usage{
trello_s... |
##Read in full data set
setwd ("C:/Users/Lisa/Documents/Coursera/Course 4 - Exploratory Data Analysis/ExData_Plotting1")
dataFile <- "../data/household_power_consumption.txt"
data <- read.csv(dataFile, header=TRUE, sep=";", na.strings="?", stringsAsFactors=FALSE, dec=".")
##Convert the Date and Time variables to Dat... | /Plot4.R | no_license | datalkr/ExData_Plotting1 | R | false | false | 1,550 | r | ##Read in full data set
setwd ("C:/Users/Lisa/Documents/Coursera/Course 4 - Exploratory Data Analysis/ExData_Plotting1")
dataFile <- "../data/household_power_consumption.txt"
data <- read.csv(dataFile, header=TRUE, sep=";", na.strings="?", stringsAsFactors=FALSE, dec=".")
##Convert the Date and Time variables to Dat... |
# EU H2020 PASSION
# Planning tool
# Jose Alberto Hernandez
# May 2021
# Inputs:
# Network topology and traffic (nodesLabeling and crossmatrix)
# Passion OSNR characterisation for lightpaths
# Passion cost values
# Output:
# Lightpaths, both primary and secondary, and their allocation in the fibre/wavelengths (Fi... | /R_passion_tool2.R | no_license | josemtnzjmnz/PASSION_WDM_planner | R | false | false | 36,999 | r |
# EU H2020 PASSION
# Planning tool
# Jose Alberto Hernandez
# May 2021
# Inputs:
# Network topology and traffic (nodesLabeling and crossmatrix)
# Passion OSNR characterisation for lightpaths
# Passion cost values
# Output:
# Lightpaths, both primary and secondary, and their allocation in the fibre/wavelengths (Fi... |
#Progressive Passes
ProgPass <- MainData %>% filter(x>60) %>%
filter(endX - x >0) %>%
filter(endX >= 0.25*x) %>%
filter(player == "Declan Rice")
#Preparing the dataset so that we can apply KMC to the passes
kdata <- data.frame("x1"=0,"y1"=0,"xe1"=0,"ye1"=0)
#Concatenating the passes into a single observation... | /progressive.R | no_license | abhiamishra/AnalysisVisualizer | R | false | false | 1,687 | r | #Progressive Passes
ProgPass <- MainData %>% filter(x>60) %>%
filter(endX - x >0) %>%
filter(endX >= 0.25*x) %>%
filter(player == "Declan Rice")
#Preparing the dataset so that we can apply KMC to the passes
kdata <- data.frame("x1"=0,"y1"=0,"xe1"=0,"ye1"=0)
#Concatenating the passes into a single observation... |
univregs <- function(target, dataset, targetID = -1, test = NULL, user_test = NULL, wei = NULL, ncores = 1) {
univariateModels <- list();
dm <- dim(dataset)
rows <- dm[1]
cols <- dm[2]
if (targetID != -1 ) {
target <- dataset[, targetID]
dataset[, targetID] <- rbinom(rows, 1, 0.5)
} ... | /R/univregs.R | no_license | cran/MXM | R | false | false | 29,789 | r | univregs <- function(target, dataset, targetID = -1, test = NULL, user_test = NULL, wei = NULL, ncores = 1) {
univariateModels <- list();
dm <- dim(dataset)
rows <- dm[1]
cols <- dm[2]
if (targetID != -1 ) {
target <- dataset[, targetID]
dataset[, targetID] <- rbinom(rows, 1, 0.5)
} ... |
# library the prerequisite packages
library(Seurat)
library(hdf5r)
library(Matrix)
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Write the Hdf5 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
# Instruction
# -- data - An object whose class is Seurat
# -- file - A file path
# -- unmodified.dataset - User defined slots that are not changed to
#... | /R_write_inout_h5.R | no_license | charliex210/BCSS | R | false | false | 7,837 | r |
# library the prerequisite packages
library(Seurat)
library(hdf5r)
library(Matrix)
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Write the Hdf5 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
# Instruction
# -- data - An object whose class is Seurat
# -- file - A file path
# -- unmodified.dataset - User defined slots that are not changed to
#... |
library(ggplot2)
library(grid)
library(gridExtra)
size_mod <- 1
my_theme <- ggplot2::theme(
axis.text = element_text(size=13 + size_mod),
axis.title.x = element_text(size=14 + size_mod, vjust = -1),
axis.title.y = element_text(size=14 + size_mod, vjust = 1),
legend.background = element_rect(fill = "NA"),
l... | /R/ggtheme.R | no_license | michbur/countfitteR-1 | R | false | false | 1,238 | r | library(ggplot2)
library(grid)
library(gridExtra)
size_mod <- 1
my_theme <- ggplot2::theme(
axis.text = element_text(size=13 + size_mod),
axis.title.x = element_text(size=14 + size_mod, vjust = -1),
axis.title.y = element_text(size=14 + size_mod, vjust = 1),
legend.background = element_rect(fill = "NA"),
l... |
## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
# Assuem that all of our input matrix are nonsingular
# Create a cache of inverse matrix
makeCacheMatrix <- function(x = matrix()) {
inv_x <- NULL
set <- function(y) {
x... | /cachematrix.R | no_license | abalone0204/ProgrammingAssignment2 | R | false | false | 1,107 | r | ## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
# Assuem that all of our input matrix are nonsingular
# Create a cache of inverse matrix
makeCacheMatrix <- function(x = matrix()) {
inv_x <- NULL
set <- function(y) {
x... |
library(testthat)
library(Article3Package)
context("linear method")
################################################################################
# classic Linear method
test_that("classic linear regression with computed B.sigma2 hypothesis testing", {
set.seed(465)
# sample data
s <- RandomXSampler(NormalS... | /ThesisRpackage/tests/testthat/3Article_old/test_LinearMethod.R | permissive | cayek/Thesis | R | false | false | 6,467 | r | library(testthat)
library(Article3Package)
context("linear method")
################################################################################
# classic Linear method
test_that("classic linear regression with computed B.sigma2 hypothesis testing", {
set.seed(465)
# sample data
s <- RandomXSampler(NormalS... |
#'A that converts a RFAM formatted sto file to a connectivity (CT) table file
#'
#'Parses a RFAM formatted Stockholm alignment file, pulls out the sequence you want, and maps the consensus secondary structure onto a
#'connectivity table (CT).
#'
#'@param Path.to.sto Path to the sto file that you want to reformat
#'@par... | /R/RFAM_sto_to_ct.R | permissive | JPSieg/R2easyR | R | false | false | 6,997 | r | #'A that converts a RFAM formatted sto file to a connectivity (CT) table file
#'
#'Parses a RFAM formatted Stockholm alignment file, pulls out the sequence you want, and maps the consensus secondary structure onto a
#'connectivity table (CT).
#'
#'@param Path.to.sto Path to the sto file that you want to reformat
#'@par... |
## The goal is to save Matrix inverse computation time, which can be a costly operation for large matrices
## This is achieved with the help of two functions
## Function makeCacheMatrix() returns a cached Matrix object
## Return value is a list that provides methods to access matrix and its cached inverse, once it... | /cachematrix.R | no_license | sanman2022/ProgrammingAssignment2 | R | false | false | 2,700 | r | ## The goal is to save Matrix inverse computation time, which can be a costly operation for large matrices
## This is achieved with the help of two functions
## Function makeCacheMatrix() returns a cached Matrix object
## Return value is a list that provides methods to access matrix and its cached inverse, once it... |
\encoding{UTF-8}
\name{code}
\docType{data}
\alias{code}
\title{
Administrative area code
}
\description{
The administrative area code in China updated to July 2016.
}
\usage{code}
\format{A data.frame containing 3507 observations of 2 variables.}
\source{
National Bureau of Statistics of the Peop... | /man/code.Rd | no_license | cran/IDCard | R | false | false | 505 | rd | \encoding{UTF-8}
\name{code}
\docType{data}
\alias{code}
\title{
Administrative area code
}
\description{
The administrative area code in China updated to July 2016.
}
\usage{code}
\format{A data.frame containing 3507 observations of 2 variables.}
\source{
National Bureau of Statistics of the Peop... |
# Continous Random Variables
# For continuous distributions, the function that starts with `d` is the PDF
# instead of the PMR
library("ggplot2")
do_unif <- function() {
# PDF
x <- seq(-0.5, 1.5, 1/10000)
y <- dunif(x, 0, 1)
# plot(x, y, type="l", xlab="x", ylab = "dunif(x)", main="Uniform Density PDF")
# c... | /stats-101-notes/stats-chap-5.R | no_license | telvis07/stats | R | false | false | 1,278 | r | # Continous Random Variables
# For continuous distributions, the function that starts with `d` is the PDF
# instead of the PMR
library("ggplot2")
do_unif <- function() {
# PDF
x <- seq(-0.5, 1.5, 1/10000)
y <- dunif(x, 0, 1)
# plot(x, y, type="l", xlab="x", ylab = "dunif(x)", main="Uniform Density PDF")
# c... |
#----
## RandomFunc.R
## Oct 06 2021
#----
## PlotRandom.R
##
## Purpose:
## A function that will generate a random sample
## of Normal values, plot a histogram with an
## overlaid mean on the plot.
##
## Inputs:
## numpts = the number of points to generate
## mu = the theoretical mean of the Normal... | /RandomFunc.R | no_license | jbernacki/RandomFunc | R | false | false | 1,309 | r | #----
## RandomFunc.R
## Oct 06 2021
#----
## PlotRandom.R
##
## Purpose:
## A function that will generate a random sample
## of Normal values, plot a histogram with an
## overlaid mean on the plot.
##
## Inputs:
## numpts = the number of points to generate
## mu = the theoretical mean of the Normal... |
dataFile <- "./data/household_power_consumption.txt"
data <- read.table(dataFile, header=TRUE, sep=";", stringsAsFactors=FALSE, dec=".")
januaryData <- data[data$Date %in% c("1/2/2007","2/2/2007") ,]
## Converting dates to day of week (x axis is day of week)
#First, we need to paste Date and Time together in one stri... | /plot3.R | no_license | mayayo/Exploratory_Data_Analysis_Coursera | R | false | false | 1,222 | r | dataFile <- "./data/household_power_consumption.txt"
data <- read.table(dataFile, header=TRUE, sep=";", stringsAsFactors=FALSE, dec=".")
januaryData <- data[data$Date %in% c("1/2/2007","2/2/2007") ,]
## Converting dates to day of week (x axis is day of week)
#First, we need to paste Date and Time together in one stri... |
build_education_attainment_pnad <- function(Data){
just_created_vars_list_existedBefore <- exists(x = "just_created_vars", where = .GlobalEnv)
sulfix <- harmonizePNAD:::find_sulfix(Data, general_or_specific = "specific")
if(sulfix == "pnad1973"){
warning("PNAD 1973: It is not ... | /R/build_education_attainment_pnad.R | no_license | arthurwelle/harmonizePNAD | R | false | false | 1,150 | r | build_education_attainment_pnad <- function(Data){
just_created_vars_list_existedBefore <- exists(x = "just_created_vars", where = .GlobalEnv)
sulfix <- harmonizePNAD:::find_sulfix(Data, general_or_specific = "specific")
if(sulfix == "pnad1973"){
warning("PNAD 1973: It is not ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/greengrass_operations.R
\name{greengrass_list_subscription_definition_versions}
\alias{greengrass_list_subscription_definition_versions}
\title{Lists the versions of a subscription definition}
\usage{
greengrass_list_subscription_definition_v... | /cran/paws.internet.of.things/man/greengrass_list_subscription_definition_versions.Rd | permissive | johnnytommy/paws | R | false | true | 923 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/greengrass_operations.R
\name{greengrass_list_subscription_definition_versions}
\alias{greengrass_list_subscription_definition_versions}
\title{Lists the versions of a subscription definition}
\usage{
greengrass_list_subscription_definition_v... |
rm(list = ls())
#options(warn=-1)
library(ggplot2)
library(ggrepel)
library(dplyr, warn.conflicts = FALSE)
library(tidyr)
#df<-read.csv("~/data.csv", header=T)
#df
args <- commandArgs(TRUE)
#df<-read.csv("~/data_trajectory.csv", header=T)
df<-read.csv(args[1], header=T)
#df
df2 <- df # %>% unite(xy, c(x,y), sep=',',... | /SA2/Runs/BotTeamRuns1/energy.R | no_license | SRI-CSL/SoftAgentsDiagnosis | R | false | false | 1,513 | r | rm(list = ls())
#options(warn=-1)
library(ggplot2)
library(ggrepel)
library(dplyr, warn.conflicts = FALSE)
library(tidyr)
#df<-read.csv("~/data.csv", header=T)
#df
args <- commandArgs(TRUE)
#df<-read.csv("~/data_trajectory.csv", header=T)
df<-read.csv(args[1], header=T)
#df
df2 <- df # %>% unite(xy, c(x,y), sep=',',... |
###############################################################################
# CURSO: Formação Cientista de Dados PLATAFORMA: Data Science Academy #
# MÓDULO: Big Data Analytics com R INSTRUTOR: Daniel Mendes #
# Data: 25/10/2016 - inicio aula: 8:21pm 25/10/2016 - fim aula:9:55pm ... | /Script 3.5 - Mapas.R | no_license | marcusfreire0504/Ciencia_de_Dados | R | false | false | 2,672 | r | ###############################################################################
# CURSO: Formação Cientista de Dados PLATAFORMA: Data Science Academy #
# MÓDULO: Big Data Analytics com R INSTRUTOR: Daniel Mendes #
# Data: 25/10/2016 - inicio aula: 8:21pm 25/10/2016 - fim aula:9:55pm ... |
rm(list=ls())
#Pre-reqs ----------------------------------------------------------------
library(plyr)
library(stringr)
library(tidyr)
library(dplyr)
library(RColorBrewer)
library(ggplot2)
# Data --------------------------------------------------------------------
data <- read.csv("/data/real/scotland_all.csv"... | /scripts/compare_models.R | no_license | JonMinton/Crime_Contours | R | false | false | 6,513 | r | rm(list=ls())
#Pre-reqs ----------------------------------------------------------------
library(plyr)
library(stringr)
library(tidyr)
library(dplyr)
library(RColorBrewer)
library(ggplot2)
# Data --------------------------------------------------------------------
data <- read.csv("/data/real/scotland_all.csv"... |
#class-2019-09-12
My first project. | /class-2019-09-12.R | no_license | garotondo/class-2019-09-12 | R | false | false | 35 | r | #class-2019-09-12
My first project. |
\name{frag.nma}
\alias{frag.nma}
\title{
Assessing Fragility of a Network Meta-Analysis With a Binary Outcome
}
\description{
Produces results, such as fragility index, fragility quotient, and event status modifications for altering statistical significance, of treatment comparison(s) in a network meta-analysis w... | /man/frag.nma.Rd | no_license | cran/fragility | R | false | false | 12,328 | rd | \name{frag.nma}
\alias{frag.nma}
\title{
Assessing Fragility of a Network Meta-Analysis With a Binary Outcome
}
\description{
Produces results, such as fragility index, fragility quotient, and event status modifications for altering statistical significance, of treatment comparison(s) in a network meta-analysis w... |
#' @title Download and Create a Tidy Data Frame of CRU CL v. 2.0 Climatology Variables
#'
#' @description This function automates downloading and importing \acronym{CRU}
#' \acronym{CL} v. 2.0 climatology data and creates a tidy data frame of the
#' data. If requested, minimum and maximum temperature may also be
#' au... | /R/get_CRU_df.R | permissive | hydroinfo-gis/getCRUCLdata | R | false | false | 5,267 | r | #' @title Download and Create a Tidy Data Frame of CRU CL v. 2.0 Climatology Variables
#'
#' @description This function automates downloading and importing \acronym{CRU}
#' \acronym{CL} v. 2.0 climatology data and creates a tidy data frame of the
#' data. If requested, minimum and maximum temperature may also be
#' au... |
# Reproducible example for shap.plot.summary()
library(SHAPforxgboost)
library(data.table)
library(ggplot2)
# Download the file from here: https://github.com/aishameriane/Stuff/blob/master/shap_long_complete.Rds
shap_long_complete <- readRDS(file = "shap_long_complete.Rds")
# Original plot
shap.plot.summ... | /Example_shap_plot_summary.r | no_license | aishameriane/Stuff | R | false | false | 3,952 | r | # Reproducible example for shap.plot.summary()
library(SHAPforxgboost)
library(data.table)
library(ggplot2)
# Download the file from here: https://github.com/aishameriane/Stuff/blob/master/shap_long_complete.Rds
shap_long_complete <- readRDS(file = "shap_long_complete.Rds")
# Original plot
shap.plot.summ... |
install.packages("reshape2")
library(reshape2)
# Load activity labels + features
activityLabels <- read.table("UCI HAR Dataset/activity_labels.txt")
activityLabels[,2] <- as.character(activityLabels[,2])
features <- read.table("UCI HAR Dataset/features.txt")
features[,2] <- as.character(features[,2])
# Extract only t... | /run_analysis.R | no_license | esarem/Getting-and-Cleaning-data-_Coursera | R | false | false | 1,746 | r | install.packages("reshape2")
library(reshape2)
# Load activity labels + features
activityLabels <- read.table("UCI HAR Dataset/activity_labels.txt")
activityLabels[,2] <- as.character(activityLabels[,2])
features <- read.table("UCI HAR Dataset/features.txt")
features[,2] <- as.character(features[,2])
# Extract only t... |
testlist <- list(Beta = 0, CVLinf = 0, FM = 0, L50 = 0, L95 = 0, LenBins = numeric(0), LenMids = numeric(0), Linf = 0, MK = 0, Ml = numeric(0), Prob = structure(0, .Dim = c(1L, 1L)), SL50 = -2.13200492829867e+156, SL95 = 0, nage = 0L, nlen = 0L, rLens = numeric(0))
result <- do.call(DLMtool::LBSPRgen,tes... | /DLMtool/inst/testfiles/LBSPRgen/AFL_LBSPRgen/LBSPRgen_valgrind_files/1615829804-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 338 | r | testlist <- list(Beta = 0, CVLinf = 0, FM = 0, L50 = 0, L95 = 0, LenBins = numeric(0), LenMids = numeric(0), Linf = 0, MK = 0, Ml = numeric(0), Prob = structure(0, .Dim = c(1L, 1L)), SL50 = -2.13200492829867e+156, SL95 = 0, nage = 0L, nlen = 0L, rLens = numeric(0))
result <- do.call(DLMtool::LBSPRgen,tes... |
## Copyright (c) 2020 Ian Hall
## See LICENCE for licensing information
## Growth rate estimates for confirmed cases in Europe and for different metrics in Italy using GAM
## Figure 1 (main text) and figures S1 and S2 (electronic supplementary material) of:
##
## Pellis L, Scarabel F, Stage HB, Overton CE, Chappell L... | /Figure_1_S1_S2.R | permissive | thomasallanhouse/covid19-growth | R | false | false | 10,429 | r | ## Copyright (c) 2020 Ian Hall
## See LICENCE for licensing information
## Growth rate estimates for confirmed cases in Europe and for different metrics in Italy using GAM
## Figure 1 (main text) and figures S1 and S2 (electronic supplementary material) of:
##
## Pellis L, Scarabel F, Stage HB, Overton CE, Chappell L... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ac_get_custom_contact_fields_values.R
\name{ac_get_custom_contact_fields_values}
\alias{ac_get_custom_contact_fields_values}
\title{Retrieve List of Contacts Custom Field Values}
\usage{
ac_get_custom_contact_fields_values(field_id = NULL, va... | /man/ac_get_custom_contact_fields_values.Rd | no_license | mdancho84/ractivecampaign | R | false | true | 773 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ac_get_custom_contact_fields_values.R
\name{ac_get_custom_contact_fields_values}
\alias{ac_get_custom_contact_fields_values}
\title{Retrieve List of Contacts Custom Field Values}
\usage{
ac_get_custom_contact_fields_values(field_id = NULL, va... |
#my first program in R programming
myString<- "hello world"
print(myString)
mean_values<-mean(1:50)
mean_values
| /helloworld.R | no_license | YUMENGPING/datascience | R | false | false | 114 | r | #my first program in R programming
myString<- "hello world"
print(myString)
mean_values<-mean(1:50)
mean_values
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pmx_utils_nonmem_reader.R
\name{pmx_is.nm.table.list}
\alias{pmx_is.nm.table.list}
\title{Test for nm_table_list class}
\usage{
pmx_is.nm.table.list(x)
}
\arguments{
\item{x}{An object to be tested.}
}
\value{
Logical value, `TRUE` for `nm_ta... | /man/pmx_is.nm.table.list.Rd | no_license | ggPMXdevelopment/ggPMX | R | false | true | 443 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pmx_utils_nonmem_reader.R
\name{pmx_is.nm.table.list}
\alias{pmx_is.nm.table.list}
\title{Test for nm_table_list class}
\usage{
pmx_is.nm.table.list(x)
}
\arguments{
\item{x}{An object to be tested.}
}
\value{
Logical value, `TRUE` for `nm_ta... |
setwd("c:/juan/CREAL/GitHub/PrivateTeachingMaterials/advanced_modelling_R/")
dat <- read.table("data/recuperainfarto.txt")
head(dat)
names(dat) <- c("grupo", paste0("time", 1:5))
head(dat)
dat$id <- 1:nrow(dat)
head(dat)
# crear datos largos
dat.long <- reshape(dat, direction = "long",
varying ... | /advanced_modelling_R/answer_exercises/continuos_tradicional_ejerc_1.R | no_license | isglobal-brge/PrivateTeachingMaterials | R | false | false | 1,075 | r |
setwd("c:/juan/CREAL/GitHub/PrivateTeachingMaterials/advanced_modelling_R/")
dat <- read.table("data/recuperainfarto.txt")
head(dat)
names(dat) <- c("grupo", paste0("time", 1:5))
head(dat)
dat$id <- 1:nrow(dat)
head(dat)
# crear datos largos
dat.long <- reshape(dat, direction = "long",
varying ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot.rocTree.R
\name{plot.rocTree}
\alias{plot.rocTree}
\title{Plotting an \code{rocTree} object}
\usage{
\method{plot}{rocTree}(
x,
output = c("graph", "visNetwork"),
digits = 4,
tree = 1L,
rankdir = c("TB", "BT", "LR", "RL"),
sh... | /fuzzedpackages/rocTree/man/plot.rocTree.Rd | no_license | akhikolla/testpackages | R | false | true | 2,938 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot.rocTree.R
\name{plot.rocTree}
\alias{plot.rocTree}
\title{Plotting an \code{rocTree} object}
\usage{
\method{plot}{rocTree}(
x,
output = c("graph", "visNetwork"),
digits = 4,
tree = 1L,
rankdir = c("TB", "BT", "LR", "RL"),
sh... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{properties}
\alias{properties}
\title{The key 'properties' that are allowed in ical files}
\format{An object of class \code{character} of length 54.}
\usage{
properties
}
\description{
The key 'properties' that are... | /man/properties.Rd | permissive | mpadge/ical | R | false | true | 864 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{properties}
\alias{properties}
\title{The key 'properties' that are allowed in ical files}
\format{An object of class \code{character} of length 54.}
\usage{
properties
}
\description{
The key 'properties' that are... |
print("hello world!")
# this is a serious mistake!
| /test.r | permissive | glazin/SWC_example | R | false | false | 51 | r | print("hello world!")
# this is a serious mistake!
|
b = bw[['trace']][order(bw[['trace']][,1]),c(1,2)]
spline = smooth.spline(b)
xxx = seq(b[1,1], tail(b[,1],1), length.out=1001)
smooth = predict(spline, xxx)
maxi = which(cumsum(exp(-0.5*smooth$y))/sum(exp(-0.5*smooth$y))>0.9999)[1]
mini = tail(which(cumsum(exp(-0.5*smooth$y))/sum(exp(-0.5*smooth$y))<0.0001),1)
xxx =... | /scratch/bw.boot.r | no_license | wes-brooks/thesis | R | false | false | 1,022 | r | b = bw[['trace']][order(bw[['trace']][,1]),c(1,2)]
spline = smooth.spline(b)
xxx = seq(b[1,1], tail(b[,1],1), length.out=1001)
smooth = predict(spline, xxx)
maxi = which(cumsum(exp(-0.5*smooth$y))/sum(exp(-0.5*smooth$y))>0.9999)[1]
mini = tail(which(cumsum(exp(-0.5*smooth$y))/sum(exp(-0.5*smooth$y))<0.0001),1)
xxx =... |
library(kutils)
### Name: mgsub
### Title: apply a vector of replacements, one after the other.
### Aliases: mgsub
### ** Examples
x <- c("Tom", "Jerry", "Elmer", "Bugs")
pattern <- c("Tom", "Bugs")
replacement <- c("Thomas", "Bugs Bunny")
(y <- mgsub(pattern, replacement, x))
x[1] <- "tom"
(y <- mgsub(pattern, rep... | /data/genthat_extracted_code/kutils/examples/mgsub.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 437 | r | library(kutils)
### Name: mgsub
### Title: apply a vector of replacements, one after the other.
### Aliases: mgsub
### ** Examples
x <- c("Tom", "Jerry", "Elmer", "Bugs")
pattern <- c("Tom", "Bugs")
replacement <- c("Thomas", "Bugs Bunny")
(y <- mgsub(pattern, replacement, x))
x[1] <- "tom"
(y <- mgsub(pattern, rep... |
Ncdf<-function(u,v){
x=0
u=as.matrix(abs(u))
v=as.matrix(v)
ad=as.matrix(c(2,2,2))
rd=max(ad)
as1=c(1,1,rep(1,(rd-ad[1])))
as2=c(dim(u),rep(1,(rd-ad[2])))
as3=c(dim(v),rep(1,(rd-ad[3])))
as=rbind(as1,as2,as3)
rs=pmax(as1,as2,as3)
xa=rowMeans(as)>1
F=rep(0,max(rs))
md=v>0
Q=which(v>0)
if (xa[1]){Qx=Q} e... | /R/Ncdf.R | no_license | cran/FIAR | R | false | false | 474 | r |
Ncdf<-function(u,v){
x=0
u=as.matrix(abs(u))
v=as.matrix(v)
ad=as.matrix(c(2,2,2))
rd=max(ad)
as1=c(1,1,rep(1,(rd-ad[1])))
as2=c(dim(u),rep(1,(rd-ad[2])))
as3=c(dim(v),rep(1,(rd-ad[3])))
as=rbind(as1,as2,as3)
rs=pmax(as1,as2,as3)
xa=rowMeans(as)>1
F=rep(0,max(rs))
md=v>0
Q=which(v>0)
if (xa[1]){Qx=Q} e... |
#' Check for a function argument.
#'
#' Throws exception if checks are not passed.
#' Note that argument is evaluated when checked.
#'
#' @param x [any]\cr
#' Argument.
#' @param cl [\code{character}]\cr
#' Class that argument must \dQuote{inherit} from.
#' If multiple classes are given, \code{x} must \dQuote{inh... | /BBmisc/R/checkArg.R | no_license | ingted/R-Examples | R | false | false | 4,867 | r | #' Check for a function argument.
#'
#' Throws exception if checks are not passed.
#' Note that argument is evaluated when checked.
#'
#' @param x [any]\cr
#' Argument.
#' @param cl [\code{character}]\cr
#' Class that argument must \dQuote{inherit} from.
#' If multiple classes are given, \code{x} must \dQuote{inh... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/SimSpsoContour.R
\name{SimSpsoContour}
\alias{SimSpsoContour}
\title{Simulates trial replications from the SPSO model with desirability optimality function.}
\usage{
SimSpsoContour(
NSims,
PE,
PT,
corET,
Nmax,
cohort,
... | /issuestests/Phase12Compare/man/SimSpsoContour.Rd | no_license | akhikolla/RcppDeepStateTest | R | false | true | 3,146 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/SimSpsoContour.R
\name{SimSpsoContour}
\alias{SimSpsoContour}
\title{Simulates trial replications from the SPSO model with desirability optimality function.}
\usage{
SimSpsoContour(
NSims,
PE,
PT,
corET,
Nmax,
cohort,
... |
#' Pulls data from database
#'
#' \code{pullDataSet} returns data.frame with results of
#' the query in a given .sql file while replacing arguments with given
#' values.
#'
#' NOTE: all the vars should be in a named list
#'
#' @param f A .sql file for the query
pullDataSet <- function(f, varList, conn){
#requir... | /R/pullDataSet.R | no_license | bmschneider/r2plr | R | false | false | 972 | r | #' Pulls data from database
#'
#' \code{pullDataSet} returns data.frame with results of
#' the query in a given .sql file while replacing arguments with given
#' values.
#'
#' NOTE: all the vars should be in a named list
#'
#' @param f A .sql file for the query
pullDataSet <- function(f, varList, conn){
#requir... |
# From David B
#Wed 29/01/2020 15:50
# Dear all,
# You should now have access to the following SMR tables:
# dead
# diabetes
# ecg_clean
# pis
# simd
# smr00
# smr01
# smr01c
# smr02
# smr04
# smr06
# spec
# viking_orcades_recruit_dates
# --
# In the smr01 table patients can have up to six ... | /scripts/a02_01_read_in_smr_01.R | no_license | e-macdonald-dunlop/catalogue_omics_clocks | R | false | false | 5,322 | r |
# From David B
#Wed 29/01/2020 15:50
# Dear all,
# You should now have access to the following SMR tables:
# dead
# diabetes
# ecg_clean
# pis
# simd
# smr00
# smr01
# smr01c
# smr02
# smr04
# smr06
# spec
# viking_orcades_recruit_dates
# --
# In the smr01 table patients can have up to six ... |
# Ensure that all feed URLs begin with http:// or https://.
#
clean.url <- function(url) {
ifelse(!grepl("^https?://", url), paste("http://", url, sep = ""), url)
}
#' @importFrom lubridate parse_date_time
parse.date <- function(date) {
FORMATS = c("a, d b Y H:M:S z", "Y-m-d H:M:S z", "d b Y H:M:S", "d b Y H:M:S z... | /R/read.R | no_license | mherradora/feedeR | R | false | false | 5,059 | r | # Ensure that all feed URLs begin with http:// or https://.
#
clean.url <- function(url) {
ifelse(!grepl("^https?://", url), paste("http://", url, sep = ""), url)
}
#' @importFrom lubridate parse_date_time
parse.date <- function(date) {
FORMATS = c("a, d b Y H:M:S z", "Y-m-d H:M:S z", "d b Y H:M:S", "d b Y H:M:S z... |
#' Set up a Shiny app to use shinyalert
#'
#' This function must be called from a Shiny app's UI in order for the
#' \code{\link[shinyalert]{shinyalert}} function to work.\cr\cr
#' You can call \code{useShinyalert()} from anywhere inside the UI.
#'
#' @return Scripts that \code{shinyalert} requires that are automatical... | /R/useShinyalert.R | no_license | thiagorodiani/shinyalert | R | false | false | 1,479 | r | #' Set up a Shiny app to use shinyalert
#'
#' This function must be called from a Shiny app's UI in order for the
#' \code{\link[shinyalert]{shinyalert}} function to work.\cr\cr
#' You can call \code{useShinyalert()} from anywhere inside the UI.
#'
#' @return Scripts that \code{shinyalert} requires that are automatical... |
setwd("D:/yxue/TSC/Create Prospective TSC")
#Path to Prospective TSC
path_pros_tsc<- "D:/RareDisease_TSC/Results/FV_2_update/2n_lin_setting1_Yan/Indices/lin"
#Path to Test
path_test_indice<- "D:\\RareDisease_TSC\\Data\\Dict_ind_2_update\\2n_Yan'sData"
Num_Sim <- 10
Num_splits <- 8
score_threshold<... | /02. Code/forResult/Create Prospective TSC.R | no_license | jzhao0802/TSC | R | false | false | 2,424 | r |
setwd("D:/yxue/TSC/Create Prospective TSC")
#Path to Prospective TSC
path_pros_tsc<- "D:/RareDisease_TSC/Results/FV_2_update/2n_lin_setting1_Yan/Indices/lin"
#Path to Test
path_test_indice<- "D:\\RareDisease_TSC\\Data\\Dict_ind_2_update\\2n_Yan'sData"
Num_Sim <- 10
Num_splits <- 8
score_threshold<... |
##########################################################################
# Mytilus edulis Integral Projection Model - Control Script
# Calculations using Functions of IPM kernels P, F, and K
# Created by Steve Dudgeon
# Created on 04 / 14 /2021
# edited on 04 / 15 /2021
#############################################... | /Data/Mytilus_IPM_Calculations.R | no_license | khannibal10/IPM-Mytilus-edulis | R | false | false | 3,687 | r | ##########################################################################
# Mytilus edulis Integral Projection Model - Control Script
# Calculations using Functions of IPM kernels P, F, and K
# Created by Steve Dudgeon
# Created on 04 / 14 /2021
# edited on 04 / 15 /2021
#############################################... |
add2 <- function(x, y) {
x + y
}
above <- function(x, n = 10) {
use <- x > n
x[use]
}
columnmean <- function(x, removeNA = TRUE) {
nc <- ncol(y)
means <- numeric(nc)
for(i in 1:nc) {
means[i] <- mean(y[,i], na.rm = removeNA)
}
means
} | /Introduction To R Programming/Week 1 + 2/firstFunctions.R | no_license | abogdanovich1/datasciencecoursera | R | false | false | 256 | r | add2 <- function(x, y) {
x + y
}
above <- function(x, n = 10) {
use <- x > n
x[use]
}
columnmean <- function(x, removeNA = TRUE) {
nc <- ncol(y)
means <- numeric(nc)
for(i in 1:nc) {
means[i] <- mean(y[,i], na.rm = removeNA)
}
means
} |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{MLEbins.res}
\alias{MLEbins.res}
\title{Results from using MLEbins method on each year of IBTS data set, as in MEPS Table S.2}
\format{Table data frame (\code{tbl_df}) with 30 rows (one for each year) and
correspon... | /man/MLEbins.res.Rd | no_license | Kol9da/sizeSpectra | R | false | true | 853 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{MLEbins.res}
\alias{MLEbins.res}
\title{Results from using MLEbins method on each year of IBTS data set, as in MEPS Table S.2}
\format{Table data frame (\code{tbl_df}) with 30 rows (one for each year) and
correspon... |
#' Fabrics Transformation
#'
#' It manipulates the fabric variable (which is a character variable) and obtains the upper and lower limit of it. This function also isolates
#' all possible levels of fabric available in the examined dataset of articles.
#'
#' @param data_group input dataset
#' @param fabric A text string... | /AApackage/R/fabrics_transf.R | no_license | afortuny/AAanalysis | R | false | false | 2,071 | r | #' Fabrics Transformation
#'
#' It manipulates the fabric variable (which is a character variable) and obtains the upper and lower limit of it. This function also isolates
#' all possible levels of fabric available in the examined dataset of articles.
#'
#' @param data_group input dataset
#' @param fabric A text string... |
library(ODEnetwork)
### Name: createState
### Title: Creates starting State Vector
### Aliases: createState
### ** Examples
if (interactive()) {
masses <- c(1, 2)
dampers <- diag(c(0.1, 0.5))
dampers[1, 2] <- 0.05
springs <- diag(c(4, 10))
springs[1, 2] <- 6
odenet <- ODEnetwork(masses, dampers, springs... | /data/genthat_extracted_code/ODEnetwork/examples/createState.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 349 | r | library(ODEnetwork)
### Name: createState
### Title: Creates starting State Vector
### Aliases: createState
### ** Examples
if (interactive()) {
masses <- c(1, 2)
dampers <- diag(c(0.1, 0.5))
dampers[1, 2] <- 0.05
springs <- diag(c(4, 10))
springs[1, 2] <- 6
odenet <- ODEnetwork(masses, dampers, springs... |
\name{pcopula2}
\alias{pcopula2}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{ pcopula2}
\description{Generator of generalized archimedean copula. Different cumulative copulas can be obtained using pcopula2, for example pCBBi, i=4,5.
}
\usage{
pcopula2(theta, delta, psi, v1, ivpsi, v2, s, t)
}... | /man/pcopula2.Rd | no_license | cran/fgac | R | false | false | 1,210 | rd | \name{pcopula2}
\alias{pcopula2}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{ pcopula2}
\description{Generator of generalized archimedean copula. Different cumulative copulas can be obtained using pcopula2, for example pCBBi, i=4,5.
}
\usage{
pcopula2(theta, delta, psi, v1, ivpsi, v2, s, t)
}... |
options(download.file.method="curl")
install.packages("pdftools", repos="https://cran.rstudio.com")
| /packages/pdftools/test.R | permissive | rstudio/shinyapps-package-dependencies | R | false | false | 100 | r | options(download.file.method="curl")
install.packages("pdftools", repos="https://cran.rstudio.com")
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/thesis.R
\name{gc_word}
\alias{gc_word}
\title{Creates an R Markdown Word Thesis document}
\usage{
gc_word(...)
}
\arguments{
\item{...}{Further arguments passed to or from other methods.}
}
\value{
A Word Document based on (hopefully soon, b... | /man/gc_word.Rd | permissive | seathebass/gcdown | R | false | true | 575 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/thesis.R
\name{gc_word}
\alias{gc_word}
\title{Creates an R Markdown Word Thesis document}
\usage{
gc_word(...)
}
\arguments{
\item{...}{Further arguments passed to or from other methods.}
}
\value{
A Word Document based on (hopefully soon, b... |
unzip("activity.zip")
activity<-read.csv("activity.csv",stringsAsFactors=T)
## aggregate total steps by date
aggTotSteps<-aggregate(steps~date,data=activity,sum)
## produce histogram
#hist(aggTotSteps$steps)
#########aves<-aggregate(steps~date,data=activity,mean)
#########print(aves)
## calculate mean and median of ... | /cp1 with old code attempts.R | no_license | DatSci01/RepData_PeerAssessment1 | R | false | false | 2,116 | r | unzip("activity.zip")
activity<-read.csv("activity.csv",stringsAsFactors=T)
## aggregate total steps by date
aggTotSteps<-aggregate(steps~date,data=activity,sum)
## produce histogram
#hist(aggTotSteps$steps)
#########aves<-aggregate(steps~date,data=activity,mean)
#########print(aves)
## calculate mean and median of ... |
\name{nwsIFetch}
\docType{methods}
\alias{nwsIFetch}
\alias{nwsIFetch-methods}
\alias{nwsIFetch,netWorkSpace-method}
\title{Iterate Through Values in a netWorkSpace Variable}
\description{
Create a function that acts as a destructive iterator over the
values of the specified variable.
}
\usage{
\S4method{nwsIFetch}{ne... | /man/nwsIFetch-methods.Rd | no_license | bigcomputing/R-big | R | false | false | 1,250 | rd | \name{nwsIFetch}
\docType{methods}
\alias{nwsIFetch}
\alias{nwsIFetch-methods}
\alias{nwsIFetch,netWorkSpace-method}
\title{Iterate Through Values in a netWorkSpace Variable}
\description{
Create a function that acts as a destructive iterator over the
values of the specified variable.
}
\usage{
\S4method{nwsIFetch}{ne... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.