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 |
|---|---|---|---|---|---|---|---|---|---|
## ----global_options, echo = FALSE, include = FALSE----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------... | /inst/doc/miRBaseConverter-vignette.R | no_license | taoshengxu/miRBaseConverter | R | false | false | 22,799 | r | ## ----global_options, echo = FALSE, include = FALSE----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------... |
#' @name wiltseInput
#' @title An example input file for \code{wiltseBrien} and \code{wiltseDecompose}
#' @description This dataset is used to demonstrate the use of the two functions included in Brendan Wiltse's PhD thesis \code{wiltseBrien} and \code{wiltseDecompose}
#' \itemize{
#' \item Column 1: Date of the inte... | /R/wiltseInput.R | no_license | shiggo/jezioro | R | false | false | 575 | r | #' @name wiltseInput
#' @title An example input file for \code{wiltseBrien} and \code{wiltseDecompose}
#' @description This dataset is used to demonstrate the use of the two functions included in Brendan Wiltse's PhD thesis \code{wiltseBrien} and \code{wiltseDecompose}
#' \itemize{
#' \item Column 1: Date of the inte... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/track.R
\name{assess}
\alias{assess}
\title{Assess track quality.}
\usage{
assess(tracks, min_path_length = 19, strata)
}
\arguments{
\item{tracks}{data frame with track objects}
\item{min_path_length}{minimum length of a valid track}
\item... | /man/assess.Rd | permissive | cells2numbers/migrationminer | R | false | true | 841 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/track.R
\name{assess}
\alias{assess}
\title{Assess track quality.}
\usage{
assess(tracks, min_path_length = 19, strata)
}
\arguments{
\item{tracks}{data frame with track objects}
\item{min_path_length}{minimum length of a valid track}
\item... |
## plot: mixing ################################################################
# plot name
file_plot <- paste0("figure/7a_mixing",
"_N", N,
"_f", flat_TRUE,
"_e", epsilonH_TRUE,
"_d", delta_TRUE,
"_R", distr_r,
... | /7a_plot_mixing.R | no_license | imlouischan/ebola-sl | R | false | false | 1,055 | r | ## plot: mixing ################################################################
# plot name
file_plot <- paste0("figure/7a_mixing",
"_N", N,
"_f", flat_TRUE,
"_e", epsilonH_TRUE,
"_d", delta_TRUE,
"_R", distr_r,
... |
#' Remove metadata results from \code{SummarizedExperiment} object
#'
#' @description
#' Removes either the entire result list or all plots from the metadata of a \code{SummarizedExperiment}.
#' Can be used to obtain a more lightweight object for further processing.
#'
#' @description
#' remove=="all" will only leave a... | /maplet/R/mt_clean_remove_results.R | no_license | ZWCharlie/maplet | R | false | false | 1,819 | r | #' Remove metadata results from \code{SummarizedExperiment} object
#'
#' @description
#' Removes either the entire result list or all plots from the metadata of a \code{SummarizedExperiment}.
#' Can be used to obtain a more lightweight object for further processing.
#'
#' @description
#' remove=="all" will only leave a... |
context( "improvement")
test_that( "improvement", {
metric <- 1.1
ref <- 1.0
improvement( metric, ref ) %>% expect_equal(0.1)
improvement( metric, ref, decreasing = TRUE ) %>% expect_equal(-0.1)
})
| /tests/testthat/test-improvement.R | no_license | decisionpatterns/ml.tools | R | false | false | 223 | r |
context( "improvement")
test_that( "improvement", {
metric <- 1.1
ref <- 1.0
improvement( metric, ref ) %>% expect_equal(0.1)
improvement( metric, ref, decreasing = TRUE ) %>% expect_equal(-0.1)
})
|
## calculations of equi-coordinate quantiles for pmvt
wgts <- function(typred, ttarg){
dists <- abs(typred-ttarg)
if(sum(dists < 1 & dists > 0.0001) < 3){
return(rep(1, length(typred)))
}
(1-dists^3)^3*(dists < 1)
}
predict_with_se <- function(fit, newdata){
pred <- try(predict(fit, newdata, se.fit=TRU... | /R/noisy-root.R | no_license | cran/mvtnorm | R | false | false | 4,038 | r | ## calculations of equi-coordinate quantiles for pmvt
wgts <- function(typred, ttarg){
dists <- abs(typred-ttarg)
if(sum(dists < 1 & dists > 0.0001) < 3){
return(rep(1, length(typred)))
}
(1-dists^3)^3*(dists < 1)
}
predict_with_se <- function(fit, newdata){
pred <- try(predict(fit, newdata, se.fit=TRU... |
source("get_data.R")
png("plot3.png")
with(required_data, plot(datetime,Sub_metering_1, type = "l", ylab = "Energy sub metering", xlab=""))
with(required_data, lines(datetime, Sub_metering_2, col="red"))
with(required_data, lines(datetime, Sub_metering_3, col="blue"))
legend("topright", legend=c("Sub_metering_1", "Su... | /plot3.R | no_license | Garlando/ExData_Plotting1 | R | false | false | 400 | r | source("get_data.R")
png("plot3.png")
with(required_data, plot(datetime,Sub_metering_1, type = "l", ylab = "Energy sub metering", xlab=""))
with(required_data, lines(datetime, Sub_metering_2, col="red"))
with(required_data, lines(datetime, Sub_metering_3, col="blue"))
legend("topright", legend=c("Sub_metering_1", "Su... |
## makeCacheMatrix creates a list of four functions- set, get, setInverse and
# getInverse.
## cacheSolve checks if there is a cached inverted matrix and solves
# the matrix if needed, setting the inverse in
# makeCacheMatrix$setInverse (invertedMatrix)
# The first function, makeCacheMatrix creates a special "matrix... | /cachematrix.R | no_license | bjcomposer/ProgrammingAssignment2 | R | false | false | 1,674 | r | ## makeCacheMatrix creates a list of four functions- set, get, setInverse and
# getInverse.
## cacheSolve checks if there is a cached inverted matrix and solves
# the matrix if needed, setting the inverse in
# makeCacheMatrix$setInverse (invertedMatrix)
# The first function, makeCacheMatrix creates a special "matrix... |
library("data.table")
library("reshape2")
# Load: activity labels
activity_labels <- read.table("C:/Users/Niki/Desktop/UCI HAR Dataset/activity_labels.txt")[,2]
# Load: features (column names)
features <- read.table("C:/Users/Niki/Desktop/UCI HAR Dataset/features.txt")[,2]
# Extract only the mean and standard deviat... | /run_analysis.R | no_license | JYOTIKADASH/Getting-and-Cleaning-Data-Project | R | false | false | 2,169 | r | library("data.table")
library("reshape2")
# Load: activity labels
activity_labels <- read.table("C:/Users/Niki/Desktop/UCI HAR Dataset/activity_labels.txt")[,2]
# Load: features (column names)
features <- read.table("C:/Users/Niki/Desktop/UCI HAR Dataset/features.txt")[,2]
# Extract only the mean and standard deviat... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gl2treemix.r
\name{gl2treemix}
\alias{gl2treemix}
\title{Convert a genlight object to a treemix input file}
\usage{
gl2treemix(x, outfile = "treemix_input.gz", outpath = tempdir(),
v = 2)
}
\arguments{
\item{x}{-- name of the genlight objec... | /man/gl2treemix.Rd | no_license | hakancengiz1/dartR | R | false | true | 1,255 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gl2treemix.r
\name{gl2treemix}
\alias{gl2treemix}
\title{Convert a genlight object to a treemix input file}
\usage{
gl2treemix(x, outfile = "treemix_input.gz", outpath = tempdir(),
v = 2)
}
\arguments{
\item{x}{-- name of the genlight objec... |
# install.packages("RMySQL")
library(RMySQL)
# Password for phpmyAdmin, not for your Career Account
mydb <- dbConnect(MySQL(), user='g1117061', password='!@Pod2020', dbname='g1117061', host='mydb.itap.purdue.edu')
# Important otherwise can leave connection open and ITaP gets MAD as it drains on the MySQL server!
... | /reportGeneration_Listeners.R | no_license | allihanlon/cs348-project | R | false | false | 1,897 | r | # install.packages("RMySQL")
library(RMySQL)
# Password for phpmyAdmin, not for your Career Account
mydb <- dbConnect(MySQL(), user='g1117061', password='!@Pod2020', dbname='g1117061', host='mydb.itap.purdue.edu')
# Important otherwise can leave connection open and ITaP gets MAD as it drains on the MySQL server!
... |
// const $siteList = $('.siteList')
// const $lastLi = $siteList.find('li.last')
// const x = localStorage.getItem('x')
// const xObject = JSON.parse(x)
// const hashMap = xObject || [
// { logo: 'A', url: 'https://www.acfun.cn' },
// { logo: 'B', url: 'https://www.bilibili.com' },
// { logo: 'G', URL: 'https://www.... | /.parcel-cache/ce/c0043666dc64d7ae6245d430f7b1c5.blob | no_license | lizvv/Front-end-navigation | R | false | false | 3,184 | blob | // const $siteList = $('.siteList')
// const $lastLi = $siteList.find('li.last')
// const x = localStorage.getItem('x')
// const xObject = JSON.parse(x)
// const hashMap = xObject || [
// { logo: 'A', url: 'https://www.acfun.cn' },
// { logo: 'B', url: 'https://www.bilibili.com' },
// { logo: 'G', URL: 'https://www.... |
# Summary functions for Co-op data
library(plyr)
library(reshape2)
library(RPostgreSQL)
library(rgeos)
h6spatial = function(dfrm,dbcon) {
# Get HUC6 polygons and return as a list of spatial polygons
qr1 = paste("SELECT huc6_id, poly_id, vert_ord, easting, northing ",
"FROM huc6_poly WHERE huc6... | /hobbers_wc/coopfns.R | permissive | akrherz/DEV | R | false | false | 10,874 | r | # Summary functions for Co-op data
library(plyr)
library(reshape2)
library(RPostgreSQL)
library(rgeos)
h6spatial = function(dfrm,dbcon) {
# Get HUC6 polygons and return as a list of spatial polygons
qr1 = paste("SELECT huc6_id, poly_id, vert_ord, easting, northing ",
"FROM huc6_poly WHERE huc6... |
Nm <- 2000 # number of mitochondria (20 % of cell)
Nmb <- 500 # number of Mb
N <- 10000 # number of spaces in cell
S <- floor(N^(1/3))
Nb <- 200
Ns <- 10
getD <- function(Nm, S, Nb, Ns) {
R <- 1:(S^3) # 3D space
Nms <- numeric(length = Ns)
a <- vector(mode = "list", length = Ns)
for(s in 1:Ns) {
cat(... | /MitochondrionBackup.R | no_license | snaketron/MitochondrionVolume | R | false | false | 1,888 | r | Nm <- 2000 # number of mitochondria (20 % of cell)
Nmb <- 500 # number of Mb
N <- 10000 # number of spaces in cell
S <- floor(N^(1/3))
Nb <- 200
Ns <- 10
getD <- function(Nm, S, Nb, Ns) {
R <- 1:(S^3) # 3D space
Nms <- numeric(length = Ns)
a <- vector(mode = "list", length = Ns)
for(s in 1:Ns) {
cat(... |
######################################################
####### 1.5 Basic Data types in R #################
######################################################
############ 1.5.1 Operations in R #################
V <- c(1,2,3,4,5,6) ## Assigning a vector V
V
V+10 ## Adding each element in vector V with 10
V-... | /Chapter01/Chapter 1.R | permissive | PacktPublishing/R-Data-Structures-and-Algorithms | R | false | false | 3,190 | r | ######################################################
####### 1.5 Basic Data types in R #################
######################################################
############ 1.5.1 Operations in R #################
V <- c(1,2,3,4,5,6) ## Assigning a vector V
V
V+10 ## Adding each element in vector V with 10
V-... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tcgacompare.R
\name{tcgaCompare}
\alias{tcgaCompare}
\title{Compare mutation load against TCGA cohorts}
\usage{
tcgaCompare(maf, cohortName = NULL, primarySite = FALSE, col = c("gray70",
"black"), medianCol = "red", fn = NULL, width = 8, he... | /man/tcgaCompare.Rd | permissive | xflicsu/maftools | R | false | true | 1,260 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tcgacompare.R
\name{tcgaCompare}
\alias{tcgaCompare}
\title{Compare mutation load against TCGA cohorts}
\usage{
tcgaCompare(maf, cohortName = NULL, primarySite = FALSE, col = c("gray70",
"black"), medianCol = "red", fn = NULL, width = 8, he... |
## The S3 version
FaCov <- function (x, ...)
UseMethod("FaCov")
# setMethod("getQuan", "FaCov", function(obj) obj@n.obs)
FaCov.formula <- function (formula, data = NULL, factors = 2, cor = FALSE, method = "mle", scoresMethod = "none", ...)
## formula and data arguments are used to construct x
## method = c("mle"... | /R/FaCov.R | no_license | cran/robustfa | R | false | false | 5,605 | r | ## The S3 version
FaCov <- function (x, ...)
UseMethod("FaCov")
# setMethod("getQuan", "FaCov", function(obj) obj@n.obs)
FaCov.formula <- function (formula, data = NULL, factors = 2, cor = FALSE, method = "mle", scoresMethod = "none", ...)
## formula and data arguments are used to construct x
## method = c("mle"... |
library(sklarsomega)
### Name: simulate.sklarsomega
### Title: Simulate a Sklar's Omega dataset(s).
### Aliases: simulate.sklarsomega
### ** Examples
# The following data were presented in Krippendorff (2013).
data = matrix(c(1,2,3,3,2,1,4,1,2,NA,NA,NA,
1,2,3,3,2,2,4,1,2,5,NA,3,
NA,... | /data/genthat_extracted_code/sklarsomega/examples/simulate.sklarsomega.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 766 | r | library(sklarsomega)
### Name: simulate.sklarsomega
### Title: Simulate a Sklar's Omega dataset(s).
### Aliases: simulate.sklarsomega
### ** Examples
# The following data were presented in Krippendorff (2013).
data = matrix(c(1,2,3,3,2,1,4,1,2,NA,NA,NA,
1,2,3,3,2,2,4,1,2,5,NA,3,
NA,... |
##### info ####
# file: elymus_seedling_gs_survival_model_2019_density_exp
# author: Amy Kendig
# date last edited: 10/23/20
# goal: estimate Elymus seedling growing season survival based on density and fungicide treatments
#### set up ####
# clear all existing data
rm(list=ls())
# load packages
library(tidyverse)... | /code/elymus_seedling_gs_survival_model_2019_density_exp.R | no_license | aekendig/microstegium-bipolaris | R | false | false | 4,461 | r | ##### info ####
# file: elymus_seedling_gs_survival_model_2019_density_exp
# author: Amy Kendig
# date last edited: 10/23/20
# goal: estimate Elymus seedling growing season survival based on density and fungicide treatments
#### set up ####
# clear all existing data
rm(list=ls())
# load packages
library(tidyverse)... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Synthesize_and_gapfill_functions.R
\name{regpredict}
\alias{regpredict}
\title{Predict flux values using linear regression parameters}
\usage{
regpredict(rgrp, traindata, dayn)
}
\description{
Predict flux values using linear regression param... | /man/regpredict.Rd | no_license | aukkola/FluxnetLSM | R | false | true | 328 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Synthesize_and_gapfill_functions.R
\name{regpredict}
\alias{regpredict}
\title{Predict flux values using linear regression parameters}
\usage{
regpredict(rgrp, traindata, dayn)
}
\description{
Predict flux values using linear regression param... |
Training=read.csv("pml-training.csv",header=TRUE)
Testing=read.csv("pml-testing.csv",header=TRUE)
library(caret)
inTrain=createDataPartition(y=Training$classe, p=0.8, list=FALSE)
training=Training[inTrain,]
testing=Training[-inTrain,]
field_names=names(training);
valid_names=c();
for (i in 1:length(field_names)){
... | /R_code/main.R | no_license | LI-JIANSHU/Coursera-Practical-Machine-Learning | R | false | false | 1,375 | r | Training=read.csv("pml-training.csv",header=TRUE)
Testing=read.csv("pml-testing.csv",header=TRUE)
library(caret)
inTrain=createDataPartition(y=Training$classe, p=0.8, list=FALSE)
training=Training[inTrain,]
testing=Training[-inTrain,]
field_names=names(training);
valid_names=c();
for (i in 1:length(field_names)){
... |
#' Stratify hypotheses based on increasing value of the covariate
#'
#' Hypotheses are stratified into nbins different strata of (approximately) equal size based on
#' increasing value of the covariate
#'
#' @param covariate Numeric vector of ordinal covariates based on which the stratification will be done.
#' @param... | /R/helpers.R | no_license | nignatiadis/IHW | R | false | false | 4,103 | r | #' Stratify hypotheses based on increasing value of the covariate
#'
#' Hypotheses are stratified into nbins different strata of (approximately) equal size based on
#' increasing value of the covariate
#'
#' @param covariate Numeric vector of ordinal covariates based on which the stratification will be done.
#' @param... |
#############################################################
#
# Program: panel_graphic2.R
#
# Project: Leverage DES for interactive graphics
#
# Biostatisticians: Meridith Blevins, MS**
# Bryan E Shepherd, PhD
# ** contact programmer: meridith.blevins at vanderbilt.edu
#
# Purpose: Rep... | /code/panel_graphic2.R | no_license | CCASANET/dataviz | R | false | false | 10,395 | r | #############################################################
#
# Program: panel_graphic2.R
#
# Project: Leverage DES for interactive graphics
#
# Biostatisticians: Meridith Blevins, MS**
# Bryan E Shepherd, PhD
# ** contact programmer: meridith.blevins at vanderbilt.edu
#
# Purpose: Rep... |
# Tout d'abord, lisons le texte. Il sera lu ligne par ligne
mon_texte <- readLines("Sur la lecture - Marcel Proust.txt")
# Mais il y a un problème. Certaines lignes sont vides
mon_texte[1:5]
# Nous devons donc identifier ces lignes...
lignes_vides <- which(mon_texte == "")
# ...et supprimez-les du texte
mon_texte <... | /materials/1_KnowYourComputer_R/algorithme_gout.R | no_license | ABC-DH/EnExDi2020 | R | false | false | 1,659 | r | # Tout d'abord, lisons le texte. Il sera lu ligne par ligne
mon_texte <- readLines("Sur la lecture - Marcel Proust.txt")
# Mais il y a un problème. Certaines lignes sont vides
mon_texte[1:5]
# Nous devons donc identifier ces lignes...
lignes_vides <- which(mon_texte == "")
# ...et supprimez-les du texte
mon_texte <... |
#This is a test...
###################
### STATIC PART ###
#Import libraries
library(shiny)
library(leaflet)
library(data.table)
library(leaflet.extras)
library(shinythemes)
library(shinyjs)
library(shinyalert)
library(DT)
library(findingdemo)
rasters <- load_rasters()
######################
### USER INTERFACE ###... | /inst/application/app.R | no_license | iobis/findingdemo | R | false | false | 8,412 | r | #This is a test...
###################
### STATIC PART ###
#Import libraries
library(shiny)
library(leaflet)
library(data.table)
library(leaflet.extras)
library(shinythemes)
library(shinyjs)
library(shinyalert)
library(DT)
library(findingdemo)
rasters <- load_rasters()
######################
### USER INTERFACE ###... |
library(testthat)
library(fooshiny)
test_check("fooshiny")
| /tests/testthat.R | permissive | aswansyahputra/fooshiny | R | false | false | 60 | r | library(testthat)
library(fooshiny)
test_check("fooshiny")
|
#' banocc: A package for Bayesian ANalysis of Compositional Correlation
#'
#' BAnOCC is a package for inferring correlations between features in
#' compositional data, where each sample sums to one. It provides one
#' object, \code{banocc_model} and one function, \code{run_banocc}
#'
#' @section banocc objects:
#'
#' ... | /R/banocc.R | permissive | biobakery/banocc | R | false | false | 799 | r | #' banocc: A package for Bayesian ANalysis of Compositional Correlation
#'
#' BAnOCC is a package for inferring correlations between features in
#' compositional data, where each sample sums to one. It provides one
#' object, \code{banocc_model} and one function, \code{run_banocc}
#'
#' @section banocc objects:
#'
#' ... |
## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
makeCacheMatrix <- function(x = matrix()) {
m <-NULL ## set local varialbe to initiate m as null
set <-function(y =matrix()){
x <<-y
m <<-NULL
} ... | /cachematrix.R | no_license | feletoon/ProgrammingAssignment2 | R | false | false | 1,602 | r | ## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
makeCacheMatrix <- function(x = matrix()) {
m <-NULL ## set local varialbe to initiate m as null
set <-function(y =matrix()){
x <<-y
m <<-NULL
} ... |
# Install and load packages
package_names <- c("survey","dplyr","foreign","devtools")
lapply(package_names, function(x) if(!x %in% installed.packages()) install.packages(x))
lapply(package_names, require, character.only=T)
install_github("e-mitchell/meps_r_pkg/MEPS")
library(MEPS)
options(survey.lonely.ps... | /mepstrends/hc_use/json/code/r/totEVT__insurance__sex__.r | permissive | HHS-AHRQ/MEPS-summary-tables | R | false | false | 3,986 | r | # Install and load packages
package_names <- c("survey","dplyr","foreign","devtools")
lapply(package_names, function(x) if(!x %in% installed.packages()) install.packages(x))
lapply(package_names, require, character.only=T)
install_github("e-mitchell/meps_r_pkg/MEPS")
library(MEPS)
options(survey.lonely.ps... |
#!/usr/bin/env Rscript
library(tidyverse, quietly = TRUE)
library(happyR)
args <- commandArgs(trailingOnly = TRUE)
prefix <- c("ont" = "results/ont/happy/longshot/longshot", "illumina"="results/illumina/happy/longshot/longshot","pacbio"="results/pacbio/happy/longshot/longshot")
output <- args[1]
hapdata_pr = map_df(... | /workflow/scripts/happyR_prc.R | permissive | aryarm/VarBench | R | false | false | 1,862 | r | #!/usr/bin/env Rscript
library(tidyverse, quietly = TRUE)
library(happyR)
args <- commandArgs(trailingOnly = TRUE)
prefix <- c("ont" = "results/ont/happy/longshot/longshot", "illumina"="results/illumina/happy/longshot/longshot","pacbio"="results/pacbio/happy/longshot/longshot")
output <- args[1]
hapdata_pr = map_df(... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/create_grattan_colours.R
\docType{data}
\name{grattan_lightred2}
\alias{grattan_lightred2}
\title{'}
\format{
An object of class \code{character} of length 1.
}
\usage{
grattan_lightred2
}
\description{
'
}
\keyword{datasets}
| /man/grattan_lightred2.Rd | permissive | MattCowgill/grattantheme | R | false | true | 304 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/create_grattan_colours.R
\docType{data}
\name{grattan_lightred2}
\alias{grattan_lightred2}
\title{'}
\format{
An object of class \code{character} of length 1.
}
\usage{
grattan_lightred2
}
\description{
'
}
\keyword{datasets}
|
#general statistical function for computing a highest density region (whose proportion is given by 'hpd')
#author: R FITZ-JOHN 2010 (from diversitree)
hdr <-
function(z, hpd, lim=NULL){
xx <- sort(c(lim, seq(min(z), max(z), length = 1024)))
ez <- ecdf(z)
f <- suppressWarnings(approxfun(ez(xx), xx))
fit <- suppress... | /working/auteur.extended/R/hdr.R | no_license | eastman/auteur | R | false | false | 509 | r | #general statistical function for computing a highest density region (whose proportion is given by 'hpd')
#author: R FITZ-JOHN 2010 (from diversitree)
hdr <-
function(z, hpd, lim=NULL){
xx <- sort(c(lim, seq(min(z), max(z), length = 1024)))
ez <- ecdf(z)
f <- suppressWarnings(approxfun(ez(xx), xx))
fit <- suppress... |
#Log changes
log_recodes <- function(rawDF, cleanedDF, uuid_){
#Start Log
# Create empty vectors
question <- vector()
old_value <- vector()
new_value <- vector()
uuid <- vector()
for (j in 1:length(rawDF)) {
for (rowi in 1:nrow(rawDF)){
value_raw <- rawDF[rowi, j]
va... | /generate_log_based_clean_raw_datasets.R | no_license | reach-afg/data_processing_code | R | false | false | 4,516 | r |
#Log changes
log_recodes <- function(rawDF, cleanedDF, uuid_){
#Start Log
# Create empty vectors
question <- vector()
old_value <- vector()
new_value <- vector()
uuid <- vector()
for (j in 1:length(rawDF)) {
for (rowi in 1:nrow(rawDF)){
value_raw <- rawDF[rowi, j]
va... |
#!/usr/bin/env Rscript
# library("xcms")
library("MALDIquant")
library("MALDIquantForeign")
setwd("../../data/mzXML")
mzXMLFiles <- list.files()
# xset <- xcmsSet(mzXMLFiles)
# warnings()
spectra <- importMzXml(mzXMLFiles)
# samples <- factor(sapply(spectra, function(x)metaData(x)$sampleName))
spectra <- transformInte... | /src/PCA/pca.r | no_license | hsiaoyi0504/massAnalysis | R | false | false | 1,021 | r | #!/usr/bin/env Rscript
# library("xcms")
library("MALDIquant")
library("MALDIquantForeign")
setwd("../../data/mzXML")
mzXMLFiles <- list.files()
# xset <- xcmsSet(mzXMLFiles)
# warnings()
spectra <- importMzXml(mzXMLFiles)
# samples <- factor(sapply(spectra, function(x)metaData(x)$sampleName))
spectra <- transformInte... |
# Text Analysis of AfD articles in Deutsche Welle Newspaper
# Political Data Science 2018
# Maria Fernanda Lopes Ferreira Del Ducca
# au516257 201400917
# Clean list
rm(list = ls())
# Set working directory
setwd("~/Documents/Masters'/2.2018/Political Data Science/Final Exam/Deutsche Welle")
# Install necessary ... | /Text Analysis Deutsche.R | no_license | lopesmf/R-Projects | R | false | false | 15,552 | r | # Text Analysis of AfD articles in Deutsche Welle Newspaper
# Political Data Science 2018
# Maria Fernanda Lopes Ferreira Del Ducca
# au516257 201400917
# Clean list
rm(list = ls())
# Set working directory
setwd("~/Documents/Masters'/2.2018/Political Data Science/Final Exam/Deutsche Welle")
# Install necessary ... |
##############################################
#
# General description:
#
# The following script reads the repeat masker table for hg19
# and creates genomic ranges of L1HS, creates bed files and
# gets the number of SNPs in these ranges using Vcftools
# Input:
#
# Output:
#
# : ...
#####################... | /Scripts/GetSNPsinL1RefRanges_hg19_AUB.R | no_license | hdohna/L1polymORFgit | R | false | false | 10,126 | r | ##############################################
#
# General description:
#
# The following script reads the repeat masker table for hg19
# and creates genomic ranges of L1HS, creates bed files and
# gets the number of SNPs in these ranges using Vcftools
# Input:
#
# Output:
#
# : ...
#####################... |
if (F) {
# load required ecomod functions
loadfunctions("utility/src/_Rfunctions/colours")
}
plot.kml<-function(x, metadata=NULL, pid = "FISHSET_ID", ord="ORD", labelFields = NULL, folderFields = NULL, colourField = NULL, addLineMarkers = T, filename = "df_kml") {
#' ###MMM - Jan 2016
#' This function enabl... | /observers/src/_RFunctions/plot.kml.r | no_license | rodrigosantana/ecomod | R | false | false | 6,162 | r | if (F) {
# load required ecomod functions
loadfunctions("utility/src/_Rfunctions/colours")
}
plot.kml<-function(x, metadata=NULL, pid = "FISHSET_ID", ord="ORD", labelFields = NULL, folderFields = NULL, colourField = NULL, addLineMarkers = T, filename = "df_kml") {
#' ###MMM - Jan 2016
#' This function enabl... |
testlist <- list(AgeVector = c(-4.73074171454048e-167, 2.2262381097027e-76, -9.12990429452974e-204, 5.97087417427845e-79, 4.7390525269307e-300, 6.58361441690132e-121, 3.58611068565168e-154, -2.94504776827523e-186, 2.62380314702636e-116, -6.78950518864266e+23, 6.99726801437032e-167, 86485.676793021, 1.11271562183704... | /myTAI/inst/testfiles/cpp_bootMatrix/AFL_cpp_bootMatrix/cpp_bootMatrix_valgrind_files/1615766880-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 1,803 | r | testlist <- list(AgeVector = c(-4.73074171454048e-167, 2.2262381097027e-76, -9.12990429452974e-204, 5.97087417427845e-79, 4.7390525269307e-300, 6.58361441690132e-121, 3.58611068565168e-154, -2.94504776827523e-186, 2.62380314702636e-116, -6.78950518864266e+23, 6.99726801437032e-167, 86485.676793021, 1.11271562183704... |
# Take a .jpg file with an associated .tem file and compute
# amount of sclera above and below the eye
# # FOR DEBUGGING ##
# tem <- 'data/CFD-BM-003-003-N.tem'
# threshold = .0011
# # END DEBUGGING ##
sclera <- function(tem, threshold = .0011){
paks <- c('readr','dplyr','tidyr','foreach','imager')
lapply(paks, ... | /R_scripts/sclera.R | no_license | d-bohn/R_tools_for_psychomorph | R | false | false | 7,227 | r | # Take a .jpg file with an associated .tem file and compute
# amount of sclera above and below the eye
# # FOR DEBUGGING ##
# tem <- 'data/CFD-BM-003-003-N.tem'
# threshold = .0011
# # END DEBUGGING ##
sclera <- function(tem, threshold = .0011){
paks <- c('readr','dplyr','tidyr','foreach','imager')
lapply(paks, ... |
####library(quantmod)
####options(download.file.method="wget")
####options(download.file.method="wininet")
####library(quantmod)
####getSymbols(c('DGS10','SP500','USD3MTD156N'),src='FRED')
####getSymbols('^VIX')
####snp = diff(log(get('SP500'))); trs = get('DGS10'); lbr = get('USD3MTD156N'); vix0=get('VIX')$VIX.Close/(... | /R11.R | permissive | mt-christo/r-prog | R | false | false | 9,099 | r | ####library(quantmod)
####options(download.file.method="wget")
####options(download.file.method="wininet")
####library(quantmod)
####getSymbols(c('DGS10','SP500','USD3MTD156N'),src='FRED')
####getSymbols('^VIX')
####snp = diff(log(get('SP500'))); trs = get('DGS10'); lbr = get('USD3MTD156N'); vix0=get('VIX')$VIX.Close/(... |
## Put comments here that give an overall description of what your
## functions do
## Makes a Cached Special Matrix
makeCacheMatrix <- function(x = matrix()) {
m <- NULL
StoreMatrix <- function(y) {
x <<- y
m <<- NULL
}
getMatrix <- function() x
... | /cachematrix.R | no_license | dorourke-metabiota/ProgrammingAssignment2 | R | false | false | 966 | r | ## Put comments here that give an overall description of what your
## functions do
## Makes a Cached Special Matrix
makeCacheMatrix <- function(x = matrix()) {
m <- NULL
StoreMatrix <- function(y) {
x <<- y
m <<- NULL
}
getMatrix <- function() x
... |
df_weird <- data.frame(a = c("1.123", "aap", NA), b = c("1", "", "jan"), c= 10:12,
stringsAsFactors = FALSE)
df_ok <- data.frame(a = c("1.123", "", NA), b = c("1", " ", "45"), c= 10:12,
stringsAsFactors = FALSE)
df2 <- numeric_data_frame(df_weird)
print(df2)
| /examples/test_numeric_data_frame.R | no_license | timemod/regts | R | false | false | 306 | r | df_weird <- data.frame(a = c("1.123", "aap", NA), b = c("1", "", "jan"), c= 10:12,
stringsAsFactors = FALSE)
df_ok <- data.frame(a = c("1.123", "", NA), b = c("1", " ", "45"), c= 10:12,
stringsAsFactors = FALSE)
df2 <- numeric_data_frame(df_weird)
print(df2)
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fitmoplot.R
\name{fitmoplot}
\alias{fitmoplot}
\alias{fitmoplot.tidal}
\alias{fitmoplot.tidalmean}
\title{Plot the fitted results for a tidal object by month}
\usage{
fitmoplot(dat_in, ...)
\method{fitmoplot}{tidal}(dat_in, month = c(1:12), ... | /man/fitmoplot.Rd | no_license | padilla410/WRTDStidal | R | false | true | 3,428 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fitmoplot.R
\name{fitmoplot}
\alias{fitmoplot}
\alias{fitmoplot.tidal}
\alias{fitmoplot.tidalmean}
\title{Plot the fitted results for a tidal object by month}
\usage{
fitmoplot(dat_in, ...)
\method{fitmoplot}{tidal}(dat_in, month = c(1:12), ... |
# check if the sequence holds the Markov property
verifyMarkovProperty<-function(sequence,...) {
n<-length(sequence)
u<-unique(sequence)
stateNames<-u
nelements<-length(stateNames)
mat<-zeros(nrow=nelements, ncol=3)
# SSO: state sequence occurrences
# TSO: two state occurences
dimnames(mat)<-li... | /markovchain/R/5_statisticalTests.R | no_license | ingted/R-Examples | R | false | false | 5,106 | r | # check if the sequence holds the Markov property
verifyMarkovProperty<-function(sequence,...) {
n<-length(sequence)
u<-unique(sequence)
stateNames<-u
nelements<-length(stateNames)
mat<-zeros(nrow=nelements, ncol=3)
# SSO: state sequence occurrences
# TSO: two state occurences
dimnames(mat)<-li... |
# Olin Shipstead
# 15 March 2020
# Exercise recreating NYTimes plot:
# https://www.nytimes.com/interactive/2020/03/15/business/economy/coronavirus-worker-risk.html
library(ggplot2)
library(plotly)
exposure <- read.csv("Exposed_to_Disease_or_Infections.csv")[,c(1,3)]
proximity <- read.csv("Physical_Proximit... | /Vulnerability_by_Occupation.R | no_license | olin-shipstead/covid-occupational-vulernability | R | false | false | 1,684 | r | # Olin Shipstead
# 15 March 2020
# Exercise recreating NYTimes plot:
# https://www.nytimes.com/interactive/2020/03/15/business/economy/coronavirus-worker-risk.html
library(ggplot2)
library(plotly)
exposure <- read.csv("Exposed_to_Disease_or_Infections.csv")[,c(1,3)]
proximity <- read.csv("Physical_Proximit... |
#' Convert HTTK-Pop-generated parameters to HTTK physiological parameters
#'
#' @export
#'
#' @param indiv_dt The data.table object returned by \code{httkpop_generate()}
#'
#' @return A data.table with the physiological parameters expected by any HTTK
#' model, including body weight (BW), hematocrit, tis... | /R/httkpop_bio.R | no_license | CHEMPHY/httk | R | false | false | 9,311 | r | #' Convert HTTK-Pop-generated parameters to HTTK physiological parameters
#'
#' @export
#'
#' @param indiv_dt The data.table object returned by \code{httkpop_generate()}
#'
#' @return A data.table with the physiological parameters expected by any HTTK
#' model, including body weight (BW), hematocrit, tis... |
# Download and read household power consumption data
url <- "http://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
temp <- tempfile()
download.file(url, temp)
data <- read.table(unz(temp, "household_power_consumption.txt"), header=T, sep=";", na.strings="?")
unlink(temp)
# Cleaning data... | /plot2.R | no_license | tx2/ExData_Plotting1 | R | false | false | 832 | r | # Download and read household power consumption data
url <- "http://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
temp <- tempfile()
download.file(url, temp)
data <- read.table(unz(temp, "household_power_consumption.txt"), header=T, sep=";", na.strings="?")
unlink(temp)
# Cleaning data... |
# Generated by using data-raw/codegen.R -> do not edit by hand
Array__Slice1 <- function(array, offset){
.Call(`_arrow_Array__Slice1` , array, offset)
}
Array__Slice2 <- function(array, offset, length){
.Call(`_arrow_Array__Slice2` , array, offset, length)
}
Array__IsNull <- function(x, i){
.Call(`_arrow... | /r/R/arrowExports.R | permissive | swordry/arrow | R | false | false | 43,969 | r | # Generated by using data-raw/codegen.R -> do not edit by hand
Array__Slice1 <- function(array, offset){
.Call(`_arrow_Array__Slice1` , array, offset)
}
Array__Slice2 <- function(array, offset, length){
.Call(`_arrow_Array__Slice2` , array, offset, length)
}
Array__IsNull <- function(x, i){
.Call(`_arrow... |
#' Allocates an empty vector, matrix or array
#'
#' Allocates an empty vector, matrix or array faster than the corresponding
#' function in R.
#'
#' @param value A \code{\link[base]{numeric}} scalar that all elements will
#' have as value.
#'
#' @param length,nrow,ncol,dim \code{\link[base]{numeric}}s specifying the
#'... | /R/allocMatrix.R | no_license | HenrikBengtsson/matrixStats | R | false | false | 1,255 | r | #' Allocates an empty vector, matrix or array
#'
#' Allocates an empty vector, matrix or array faster than the corresponding
#' function in R.
#'
#' @param value A \code{\link[base]{numeric}} scalar that all elements will
#' have as value.
#'
#' @param length,nrow,ncol,dim \code{\link[base]{numeric}}s specifying the
#'... |
file <- read.table("c:/sorted_directed_net.txt",sep="\t")
max(file[3])
mat <- matrix(0,nrow=10500,ncol=10500)
li <- as.list(file)
for (i in 1:length(li$V1)) {
mat[li$V1[i],li$V2[i]] <- li$V3[i]
}
isSymmetric(mat)
mat_tr <- t(mat)
new_weight <- sqrt(mat * mat_tr)
lower_tri <- lower.tri(new_weight... | /Graph/HW3/P3_matrix.R | no_license | vishalbelsare/Graphs_NetworkFlowAndPatternRecognition | R | false | false | 350 | r | file <- read.table("c:/sorted_directed_net.txt",sep="\t")
max(file[3])
mat <- matrix(0,nrow=10500,ncol=10500)
li <- as.list(file)
for (i in 1:length(li$V1)) {
mat[li$V1[i],li$V2[i]] <- li$V3[i]
}
isSymmetric(mat)
mat_tr <- t(mat)
new_weight <- sqrt(mat * mat_tr)
lower_tri <- lower.tri(new_weight... |
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.99939407475234e-241, 6.87207483341803e-308, 5.79926223825009e+41, 0, 0, 0, 0), .Dim = c(1L, 7L)))
result <- do.call(CNull:::communities_individual_based_sampling_beta_interleaved_matrices,testlist)
str(result) | /CNull/inst/testfiles/communities_individual_based_sampling_beta_interleaved_matrices/AFL_communities_individual_based_sampling_beta_interleaved_matrices/communities_individual_based_sampling_beta_interleaved_matrices_valgrind_files/1615840615-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 277 | r | testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.99939407475234e-241, 6.87207483341803e-308, 5.79926223825009e+41, 0, 0, 0, 0), .Dim = c(1L, 7L)))
result <- do.call(CNull:::communities_individual_based_sampling_beta_interleaved_matrices,testlist)
str(result) |
setwd("/home/triffe/git/DISS/")
source("R/UtilityFunctions.R")
source("R/MeanFunctions.R")
yearsUS <- 1969:2009
yearsES <- 1975:2009
#PxUS <- local(get(load("Data/HMD_Px/PxUS.Rdata")))
#PxES <- local(get(load("Data/HMD_Px/PxES.Rdata")))
ExUS <- local(get(load("Data/Exposures/USexp.Rdata")))
ExES <- local(get(load... | /R/Pollard1948.R | no_license | timriffe/TwoSex | R | false | false | 4,789 | r | setwd("/home/triffe/git/DISS/")
source("R/UtilityFunctions.R")
source("R/MeanFunctions.R")
yearsUS <- 1969:2009
yearsES <- 1975:2009
#PxUS <- local(get(load("Data/HMD_Px/PxUS.Rdata")))
#PxES <- local(get(load("Data/HMD_Px/PxES.Rdata")))
ExUS <- local(get(load("Data/Exposures/USexp.Rdata")))
ExES <- local(get(load... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/leaflet.R
\name{e_leaflet}
\alias{e_leaflet}
\alias{e_leaflet_tile}
\title{Leaflet}
\usage{
e_leaflet(e, roam = TRUE, ...)
e_leaflet_tile(
e,
template = "https://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png",
options = NULL,
...
)
}... | /man/leaflet.Rd | permissive | Hansz00/echarts4r | R | false | true | 1,230 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/leaflet.R
\name{e_leaflet}
\alias{e_leaflet}
\alias{e_leaflet_tile}
\title{Leaflet}
\usage{
e_leaflet(e, roam = TRUE, ...)
e_leaflet_tile(
e,
template = "https://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png",
options = NULL,
...
)
}... |
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/dl14.R
\name{dl14}
\alias{dl14}
\title{Function to return the DL14 hydrologic indicator statistic for a given data frame}
\usage{
dl14(qfiletempf)
}
\arguments{
\item{qfiletempf}{data frame containing a "discharge" column containing d... | /man/dl14.Rd | permissive | joycezw/EflowStats | R | false | false | 759 | rd | % Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/dl14.R
\name{dl14}
\alias{dl14}
\title{Function to return the DL14 hydrologic indicator statistic for a given data frame}
\usage{
dl14(qfiletempf)
}
\arguments{
\item{qfiletempf}{data frame containing a "discharge" column containing d... |
/Load1.R | no_license | gorokhoff/classification | R | false | false | 3,466 | r | ||
source("getData.R")
## Plot into a graphics device and save as plot2.png with 480x480 pixels
png(filename = "./plot2.png",
width = 480,
height = 480,
units = "px")
plot(DateTime,
Global_active_power,
type = "l",
xlab = "",
ylab = "Global Active Power (kilowatts)")
dev.off() | /plot2.R | no_license | A-Mindcrafter/ExData_Plotting1 | R | false | false | 312 | r | source("getData.R")
## Plot into a graphics device and save as plot2.png with 480x480 pixels
png(filename = "./plot2.png",
width = 480,
height = 480,
units = "px")
plot(DateTime,
Global_active_power,
type = "l",
xlab = "",
ylab = "Global Active Power (kilowatts)")
dev.off() |
\name{Quantiles}
\alias{Quantiles}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Quantiles
}
\description{
Calcule les pourcentiles d'une acquistion
}
\usage{
Quantiles(seeing = NULL, probas = c(0, 0.05, 0.1, 0.5, 0.95))
}
%- maybe also 'usage' for other objects documented here.
\arguments{
\... | /Rseeing/man/Quantiles.Rd | no_license | karinechevalier/Rseeing | R | false | false | 1,233 | rd | \name{Quantiles}
\alias{Quantiles}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Quantiles
}
\description{
Calcule les pourcentiles d'une acquistion
}
\usage{
Quantiles(seeing = NULL, probas = c(0, 0.05, 0.1, 0.5, 0.95))
}
%- maybe also 'usage' for other objects documented here.
\arguments{
\... |
# Clear workspace
rm(list = ls())
# Setup
################################################################################
# Packages
library(tidyverse)
library(countrycode)
library(testthat)
# Directories
inputdir <- "data/cosimo/raw"
outputdir <- "data/cosimo/processed"
plotdir <- "data/cosimo/figures"
# Set... | /data/cosimo/plot_cosimo_results.R | no_license | cfree14/bfa_paper | R | false | false | 2,008 | r |
# Clear workspace
rm(list = ls())
# Setup
################################################################################
# Packages
library(tidyverse)
library(countrycode)
library(testthat)
# Directories
inputdir <- "data/cosimo/raw"
outputdir <- "data/cosimo/processed"
plotdir <- "data/cosimo/figures"
# Set... |
## Put comments here that give an overall description of what your
## functions do
#makeCacheMatrix: This function creates a special "matrix" object that can
#cache its inverse.
makeCacheMatrix <- function(x = matrix()) {
m <- NULL
set <- function(y) {
x <<- y
m <<- NULL
}
get <- function() x
setin... | /cachematrix.R | no_license | Khalidsid/ProgrammingAssignment2 | R | false | false | 1,006 | r | ## Put comments here that give an overall description of what your
## functions do
#makeCacheMatrix: This function creates a special "matrix" object that can
#cache its inverse.
makeCacheMatrix <- function(x = matrix()) {
m <- NULL
set <- function(y) {
x <<- y
m <<- NULL
}
get <- function() x
setin... |
#' Methods for afex_aov objects
#'
#' Methods defined for objects returned from the ANOVA functions \code{\link{aov_car}} et al. of class \code{afex_aov} containing both the ANOVA fitted via \code{car::Anova} and base R's \code{aov}.
#'
#' @param object,x object of class \code{afex_aov} as returned from \code{\link{a... | /R/methods.afex_aov.R | no_license | dejavu2010/afex | R | false | false | 8,923 | r | #' Methods for afex_aov objects
#'
#' Methods defined for objects returned from the ANOVA functions \code{\link{aov_car}} et al. of class \code{afex_aov} containing both the ANOVA fitted via \code{car::Anova} and base R's \code{aov}.
#'
#' @param object,x object of class \code{afex_aov} as returned from \code{\link{a... |
cat('\n\n');timestamp();cat('\n')
library(btergm)
library(parallel)
library(texreg)
data_dir <- '/home/sdowning/data/firm_nets_rnr2/firmctrl'
firm_i <- 'qualtrics'
d <- 3
ncpus <- 4
parallel <- "multicore"
data_file <- file.path(data_dir,sprintf('%s_d%s.rds',firm_i,d))
nets <- readRDS(data_file)
nPeriods <- 11 ## ... | /R/amj_rnr2_firmctrl/awareness_AMJ_RNR_TERGM_m4-1-2.R | no_license | sdownin/compnet-venus | R | false | false | 3,013 | r | cat('\n\n');timestamp();cat('\n')
library(btergm)
library(parallel)
library(texreg)
data_dir <- '/home/sdowning/data/firm_nets_rnr2/firmctrl'
firm_i <- 'qualtrics'
d <- 3
ncpus <- 4
parallel <- "multicore"
data_file <- file.path(data_dir,sprintf('%s_d%s.rds',firm_i,d))
nets <- readRDS(data_file)
nPeriods <- 11 ## ... |
#TypeConverion
age="18"
num_age=as.integer(age)
print(class(num_age))
| /Day - 1/Class/TypeConversion.R | no_license | klmsathish/R_Programming | R | false | false | 74 | r | #TypeConverion
age="18"
num_age=as.integer(age)
print(class(num_age))
|
## Toxicities: survival, feeding tube, aspiration
# Outputs: predicted toxicity probability for each patient,
# predicted survival probability for each patient,
# weight of each variable in each risk prediction model
## load libraries
needs(survival)
needs(dplyr)
needs(purrr)
attach(input[[1]])
### set file direc... | /public/R/risk_preds_11_18.R | no_license | uic-evl/SMART-UI-Backend | R | false | false | 9,974 | r | ## Toxicities: survival, feeding tube, aspiration
# Outputs: predicted toxicity probability for each patient,
# predicted survival probability for each patient,
# weight of each variable in each risk prediction model
## load libraries
needs(survival)
needs(dplyr)
needs(purrr)
attach(input[[1]])
### set file direc... |
# Getting the data
download.file('https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip',
destfile = "./Exploratory Analysis/dataset.zip")
unzip(zipfile = "./Exploratory Analysis/dataset.zip")
data <- read.table('household_power_consumption.txt', header = T, stringsAsFac... | /ExploratoryDataAnalysis/Project 1/Plot2.R | no_license | lauramiranda99/datasciencecoursera | R | false | false | 821 | r | # Getting the data
download.file('https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip',
destfile = "./Exploratory Analysis/dataset.zip")
unzip(zipfile = "./Exploratory Analysis/dataset.zip")
data <- read.table('household_power_consumption.txt', header = T, stringsAsFac... |
# Packages/Libraries to be included for modelling
#install.packages("devtools")
require(devtools)
library(xgboost)
#library(randomForest)
# Importing/Loading data containing tfidf vectors of documents along with their terms (tokens)
tfIdfVal <- read.csv(file="tf_idf_features.csv", header=TRUE, sep=",")
# Segregating ... | /News Article/Additional_Models/Combined_RandomForest_XgBoost/XgBoost_Results/xgboost_model.R | no_license | rishupal/classifyNewsArticle | R | false | false | 3,610 | r | # Packages/Libraries to be included for modelling
#install.packages("devtools")
require(devtools)
library(xgboost)
#library(randomForest)
# Importing/Loading data containing tfidf vectors of documents along with their terms (tokens)
tfIdfVal <- read.csv(file="tf_idf_features.csv", header=TRUE, sep=",")
# Segregating ... |
# Plot 4
par(mfrow=c(2,2))
with(dat7,{
hist(dat7$Global_active_power,col="red", main=NULL,
xlab = "Global Active Power (kilowatts)")
plot(x = dat7$NewDateTime, y = dat7$Voltage,
type = "l",
ylab = "Voltage",
xlab = "datetime")
with(dat7, plot(NewDateTime, Sub_metering_1,... | /plot4.R | no_license | Primimirat/Project | R | false | false | 975 | r | # Plot 4
par(mfrow=c(2,2))
with(dat7,{
hist(dat7$Global_active_power,col="red", main=NULL,
xlab = "Global Active Power (kilowatts)")
plot(x = dat7$NewDateTime, y = dat7$Voltage,
type = "l",
ylab = "Voltage",
xlab = "datetime")
with(dat7, plot(NewDateTime, Sub_metering_1,... |
# allGenerics.R - DESC
# allGenerics.R
# Copyright 2003-2013 FLR Team. Distributed under the GPL 2 or later
# Maintainer: Laurie Kell, ICCAT & Iago Mosqueira, JRC
# Notes:
# ggplot
setGeneric("ggplot", useAsDefault = ggplot2::ggplot)
| /R/allGenerics.R | no_license | PachoAlvarez/ggplotFL | R | false | false | 237 | r | # allGenerics.R - DESC
# allGenerics.R
# Copyright 2003-2013 FLR Team. Distributed under the GPL 2 or later
# Maintainer: Laurie Kell, ICCAT & Iago Mosqueira, JRC
# Notes:
# ggplot
setGeneric("ggplot", useAsDefault = ggplot2::ggplot)
|
library(gridExtra)
library(reshape2)
library(ggplot2)
mat <- matrix(0, 500, 250)
colnames(mat) <- 1:250
rownames(mat) <- 1:500
mmat <- melt(mat)[,1:2]
h = 0
kols <- apply(mmat, 1, function(x) hcl(h, x[1]/2.5, x[2]/2.5, fixup=FALSE))
plot(mmat[,1]/2.5, mmat[,2]/2.5, col=kols, pch=20, las=1, xlab="Natężenie", ylab="Jas... | /Kolory/hcl.R | no_license | pbiecek/Eseje | R | false | false | 4,365 | r | library(gridExtra)
library(reshape2)
library(ggplot2)
mat <- matrix(0, 500, 250)
colnames(mat) <- 1:250
rownames(mat) <- 1:500
mmat <- melt(mat)[,1:2]
h = 0
kols <- apply(mmat, 1, function(x) hcl(h, x[1]/2.5, x[2]/2.5, fixup=FALSE))
plot(mmat[,1]/2.5, mmat[,2]/2.5, col=kols, pch=20, las=1, xlab="Natężenie", ylab="Jas... |
\name{example.dat}
\docType{data}
\alias{example.dat}
\title{Simulated data from Observational Study}
\description{
data.frame containing simulated data from an observational study
treatment (0 or 1)
baseage (baseline age in years)
id (integer identifying subjects)
start (beginning of each tim... | /man/example.dat.Rd | no_license | trooper197/tccox | R | false | false | 951 | rd | \name{example.dat}
\docType{data}
\alias{example.dat}
\title{Simulated data from Observational Study}
\description{
data.frame containing simulated data from an observational study
treatment (0 or 1)
baseage (baseline age in years)
id (integer identifying subjects)
start (beginning of each tim... |
## Copyright (C) 2001 Paulo Neis
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
## (at your option) any later version.
##
## This program is dis... | /R/ellipord.R | no_license | berapp/signal | R | false | false | 3,483 | r | ## Copyright (C) 2001 Paulo Neis
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
## (at your option) any later version.
##
## This program is dis... |
if (!require("pacman")) install.packages("pacman"); library(pacman)
p_load(caret, MASS, e1071, xgboost, randomForest) # load ML packages that unfortunately mask dplyr functions
p_load(tidyverse, Matrix)
past_dat <- read_rds("data/model_ready/past_dat.Rds")
#### Modelling --------------------------------------------... | /scripts/04_train_evaluate_models.R | permissive | sergiorgiraldo/predicting-march-madness | R | false | false | 3,525 | r | if (!require("pacman")) install.packages("pacman"); library(pacman)
p_load(caret, MASS, e1071, xgboost, randomForest) # load ML packages that unfortunately mask dplyr functions
p_load(tidyverse, Matrix)
past_dat <- read_rds("data/model_ready/past_dat.Rds")
#### Modelling --------------------------------------------... |
# Created by Javad Rahimipour Anaraki on 26/02/18 updated 01/02/19
# Ph.D. Candidate
# Department of Computer Science
# Memorial University of Newfoundland
# jra066 [AT] mun [DOT] ca | www.cs.mun.ca/~jra066
# input: Data from Jaeger Oxycon Pro
# output: Interpolated data
rm(list=ls())
#==================... | /Important_codes_prepare_data/Archive/JaegerDataPrepValidity_edited_by_Javad_Khataei.R | no_license | walkabillylab/Smartphone_accelerometers-Pocket_location | R | false | false | 8,174 | r | # Created by Javad Rahimipour Anaraki on 26/02/18 updated 01/02/19
# Ph.D. Candidate
# Department of Computer Science
# Memorial University of Newfoundland
# jra066 [AT] mun [DOT] ca | www.cs.mun.ca/~jra066
# input: Data from Jaeger Oxycon Pro
# output: Interpolated data
rm(list=ls())
#==================... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/getData.R
\name{add_website}
\alias{add_website}
\title{Adds website to Search Console}
\usage{
add_website(siteURL)
}
\arguments{
\item{siteURL}{The URL of the website to add.}
}
\value{
TRUE if successful, raises an error if not.
}
\descrip... | /man/add_website.Rd | no_license | mstei4176/searchConsoleR | R | false | true | 472 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/getData.R
\name{add_website}
\alias{add_website}
\title{Adds website to Search Console}
\usage{
add_website(siteURL)
}
\arguments{
\item{siteURL}{The URL of the website to add.}
}
\value{
TRUE if successful, raises an error if not.
}
\descrip... |
library(data.table)
library(reshape2)
library(dplyr)
ProData <- function(datatype){ # Loads appropriate data and adds activity names & column labels
# Load Test data
subj <- read.table(paste(FolderPath,datatype,"/subject_",datatype,".txt", sep=""))
data <- read.table(paste(FolderPath,datatype... | /run_analysis.R | no_license | IndC/GetAndCleanData | R | false | false | 1,917 | r | library(data.table)
library(reshape2)
library(dplyr)
ProData <- function(datatype){ # Loads appropriate data and adds activity names & column labels
# Load Test data
subj <- read.table(paste(FolderPath,datatype,"/subject_",datatype,".txt", sep=""))
data <- read.table(paste(FolderPath,datatype... |
## ----setup, include=FALSE-----------------------------------------------------
library(knitr)
opts_chunk$set(echo = TRUE, dev='CairoPNG')
par_hook = function(before, options, envir)
{
if(before)
{
do.call(par, options$par)
}
}
knit_hooks$set(par = par_hook)
library(dexter)
library(dplyr)
... | /fuzzedpackages/dexter/inst/doc/Test_Individual_differences.R | no_license | akhikolla/testpackages | R | false | false | 1,608 | r | ## ----setup, include=FALSE-----------------------------------------------------
library(knitr)
opts_chunk$set(echo = TRUE, dev='CairoPNG')
par_hook = function(before, options, envir)
{
if(before)
{
do.call(par, options$par)
}
}
knit_hooks$set(par = par_hook)
library(dexter)
library(dplyr)
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/svytools.R
\name{wgttest}
\alias{wgttest}
\title{Test whether sampling weights are needed}
\usage{
wgttest(model, weights, data = NULL, model_output = FALSE,
test = NULL, digits = getOption("jtools-digits", default = 3))
}
\arguments{
\item... | /man/wgttest.Rd | permissive | vitorcapdeville/jtools | R | false | true | 4,567 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/svytools.R
\name{wgttest}
\alias{wgttest}
\title{Test whether sampling weights are needed}
\usage{
wgttest(model, weights, data = NULL, model_output = FALSE,
test = NULL, digits = getOption("jtools-digits", default = 3))
}
\arguments{
\item... |
#' noOutliers
#'
#' Remove outliers from a validation dataset by Mahalanobis distance
#' @param matrix A matrix of response options, where each column represents an item and each row represents a respondent
#' @return Returns a matrix with outliers removed
#' @export
noOutliers <- function(matrix) {
mahal <- mahala... | /R/noOutliers.R | no_license | MrConradHarrison/cleftqCATsim | R | false | false | 540 | r | #' noOutliers
#'
#' Remove outliers from a validation dataset by Mahalanobis distance
#' @param matrix A matrix of response options, where each column represents an item and each row represents a respondent
#' @return Returns a matrix with outliers removed
#' @export
noOutliers <- function(matrix) {
mahal <- mahala... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/crossprodSelf.R
\name{big_crossprodSelf}
\alias{big_crossprodSelf}
\alias{crossprod,FBM,missing-method}
\title{Crossprod}
\usage{
big_crossprodSelf(
X,
fun.scaling = big_scale(center = FALSE, scale = FALSE),
ind.row = rows_along(X),
i... | /man/big_crossprodSelf.Rd | no_license | minghao2016/bigstatsr | R | false | true | 2,404 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/crossprodSelf.R
\name{big_crossprodSelf}
\alias{big_crossprodSelf}
\alias{crossprod,FBM,missing-method}
\title{Crossprod}
\usage{
big_crossprodSelf(
X,
fun.scaling = big_scale(center = FALSE, scale = FALSE),
ind.row = rows_along(X),
i... |
testlist <- list(x = c(NaN, 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), y = numeric(0))
result <- do.call(blorr:::blr_pairs_cpp,testlist)
str(result) | /blorr/inst/testfiles/blr_pairs_cpp/libFuzzer_blr_pairs_cpp/blr_pairs_cpp_valgrind_files/1609956573-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 217 | r | testlist <- list(x = c(NaN, 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), y = numeric(0))
result <- do.call(blorr:::blr_pairs_cpp,testlist)
str(result) |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/filter_summary.R
\name{summary.RNAFilt}
\alias{summary.RNAFilt}
\title{RNA Filter Summary}
\usage{
\method{summary}{RNAFilt}(filter_object, size_library = NULL, min_nonzero = NULL)
}
\arguments{
\item{filter_object}{S3 object of class 'RNAFil... | /man/summary.RNAFilt.Rd | permissive | clabornd/pmartR | R | false | true | 1,222 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/filter_summary.R
\name{summary.RNAFilt}
\alias{summary.RNAFilt}
\title{RNA Filter Summary}
\usage{
\method{summary}{RNAFilt}(filter_object, size_library = NULL, min_nonzero = NULL)
}
\arguments{
\item{filter_object}{S3 object of class 'RNAFil... |
##Produces plot3.png Exploratory Data Analysis Course 012 Project 1
#Read all of the data
data<-read.table("household_power_consumption.txt", header=TRUE, sep=";", na.strings="?", stringsAsFactors=FALSE)
#Pull out the specific dates required
data<-data[data$Date %in% c('1/2/2007', '2/2/2007'),]
#Create a field with ... | /plot3.R | no_license | gnolder/ExData_Plotting1 | R | false | false | 1,049 | r | ##Produces plot3.png Exploratory Data Analysis Course 012 Project 1
#Read all of the data
data<-read.table("household_power_consumption.txt", header=TRUE, sep=";", na.strings="?", stringsAsFactors=FALSE)
#Pull out the specific dates required
data<-data[data$Date %in% c('1/2/2007', '2/2/2007'),]
#Create a field with ... |
# 09. 데이터 분석 프로젝트
# 09-1. '한국복지패널데이터' 분석 준비
install.packages("foreign") # foreign 패키지 설치
library(foreign) # SPSS 파일 로드
library(dplyr) # 전처리
library(ggplot2) # 시각화
library(readxl) # 엑셀 파일 불러오기
raw_welfare <- read.spss(file = "Koweps_hpc10_2015_beta3.sav", to.data.frame = T)
welfare <- raw_welfare
# 데이... | /2016년 11차 한국복지패널조사/wel.R | no_license | dmseydl/R-report | R | false | false | 2,254 | r | # 09. 데이터 분석 프로젝트
# 09-1. '한국복지패널데이터' 분석 준비
install.packages("foreign") # foreign 패키지 설치
library(foreign) # SPSS 파일 로드
library(dplyr) # 전처리
library(ggplot2) # 시각화
library(readxl) # 엑셀 파일 불러오기
raw_welfare <- read.spss(file = "Koweps_hpc10_2015_beta3.sav", to.data.frame = T)
welfare <- raw_welfare
# 데이... |
#read in tracers from the base model and store ready to check out gape sizes
this_run<-"base"
this_out<-"Base"
source(paste(DIR$'General functions',"nonZeroMean.R", sep=""))
mg_2_tonne<-2e-8; X_CN<-5.7
burnin<-35 #number of years to skip for burnin
this_path<-paste(DIR$'Base',"ATLANTISmodels\\",this_run,"\\... | /(13)GapeSizes/effectOfGapeSize_PrepData.R | no_license | mcgregorv/AtlantisRscripts | R | false | false | 4,532 | r | #read in tracers from the base model and store ready to check out gape sizes
this_run<-"base"
this_out<-"Base"
source(paste(DIR$'General functions',"nonZeroMean.R", sep=""))
mg_2_tonne<-2e-8; X_CN<-5.7
burnin<-35 #number of years to skip for burnin
this_path<-paste(DIR$'Base',"ATLANTISmodels\\",this_run,"\\... |
#1
###########
#Import training data
library(tidyverse)
options(stringsAsFactors = F)
folder <- "input/"
CleanSheet_round <- data.frame(index = 1:625)
for( i in 5:37){
year <- "16"
week <- as.character(i)
sheet <- paste0("FPL",year,"-GW",week,".csv")
path <- paste0(folder,sheet)
data_temp <... | /Rcode/R/sportradar/data_16/data/CleanSheets_16.R | no_license | willisgram/master_thesis | R | false | false | 1,008 | r | #1
###########
#Import training data
library(tidyverse)
options(stringsAsFactors = F)
folder <- "input/"
CleanSheet_round <- data.frame(index = 1:625)
for( i in 5:37){
year <- "16"
week <- as.character(i)
sheet <- paste0("FPL",year,"-GW",week,".csv")
path <- paste0(folder,sheet)
data_temp <... |
library(httr)
library(httpuv)
library(jsonlite)
library(ggplot2)
library(dplyr)
library(data.table)
library(rgbif)
library(plotly)
| /R/core-R/load-libraries.R | no_license | longwei66/strava | R | false | false | 131 | r | library(httr)
library(httpuv)
library(jsonlite)
library(ggplot2)
library(dplyr)
library(data.table)
library(rgbif)
library(plotly)
|
#' Cleaning CCM case symptoms data
#'
#' This function uses the clean_names function from the janitor package to clean
#' the field names and it uses the across function to properly parse all fields
#' with a CCM datetime format (YYYY-mm-dd, II:MM pp).
#'
#' @param raw_ccm_case_symptoms_data A tbl_df of raw CCM case sy... | /R/cleaning_ccm_case_symptoms_data.R | no_license | timchisamore/covid-19_validating-derived-dates | R | false | false | 776 | r | #' Cleaning CCM case symptoms data
#'
#' This function uses the clean_names function from the janitor package to clean
#' the field names and it uses the across function to properly parse all fields
#' with a CCM datetime format (YYYY-mm-dd, II:MM pp).
#'
#' @param raw_ccm_case_symptoms_data A tbl_df of raw CCM case sy... |
summary(covid_flat)
str(covid_flat)
| /dataCleanup.R | no_license | respulsivestud/covid19graphs | R | false | false | 37 | r | summary(covid_flat)
str(covid_flat)
|
#' Bank data
#'
#' The data is related with direct marketing campaigns of a
#' Portuguese banking institution. The marketing campaigns were based on
#' phone calls. Often, more than one contact to the same client was required,
#' in order to access if the product (bank term deposit) would be ('yes') or
#' not ('no') su... | /R/bank.R | no_license | adamacosta/bankmarketing | R | false | false | 1,586 | r | #' Bank data
#'
#' The data is related with direct marketing campaigns of a
#' Portuguese banking institution. The marketing campaigns were based on
#' phone calls. Often, more than one contact to the same client was required,
#' in order to access if the product (bank term deposit) would be ('yes') or
#' not ('no') su... |
## First we create a matrix (set and get a value of it) and than we
## calculate (set and get the value of) inverse matrix. On the second step we
## get the inverse matrix which has been calculated. If it's not calculated
## yet, we calculate inverse matrix on this step.
## makeCacheMatrix create a matrix and than ca... | /cachematrix.R | no_license | llmm/ProgrammingAssignment2 | R | false | false | 1,081 | r | ## First we create a matrix (set and get a value of it) and than we
## calculate (set and get the value of) inverse matrix. On the second step we
## get the inverse matrix which has been calculated. If it's not calculated
## yet, we calculate inverse matrix on this step.
## makeCacheMatrix create a matrix and than ca... |
##### Script for generating shoreline building density for lakes in hyperstability survey DNR dataset
##### Fishscapes project
rm(list=ls())
#******** DATA REQUIREMENT *********#
# to run this script and data analyses you must download hsBuildingDensities_data.zip
# from Fishscapes/Data/GIS on the Fishscapes Google Dr... | /HSbuildingDensities.R | no_license | joneslabND/hsBuildingDensities | R | false | false | 4,557 | r | ##### Script for generating shoreline building density for lakes in hyperstability survey DNR dataset
##### Fishscapes project
rm(list=ls())
#******** DATA REQUIREMENT *********#
# to run this script and data analyses you must download hsBuildingDensities_data.zip
# from Fishscapes/Data/GIS on the Fishscapes Google Dr... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/aspects.R
\name{mobile_tooltip}
\alias{mobile_tooltip}
\title{Tooltip}
\usage{
mobile_tooltip(m, ...)
}
\arguments{
\item{m}{An object of class \code{mobile} as returned by \code{\link{mobile}}.}
\item{...}{Named options from the
\href{http... | /man/mobile_tooltip.Rd | permissive | takewiki/mobileCharts | R | false | true | 640 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/aspects.R
\name{mobile_tooltip}
\alias{mobile_tooltip}
\title{Tooltip}
\usage{
mobile_tooltip(m, ...)
}
\arguments{
\item{m}{An object of class \code{mobile} as returned by \code{\link{mobile}}.}
\item{...}{Named options from the
\href{http... |
## Sample dendrogram
output[["wgcna_sample_tree"]] <- renderPlotly({
tryCatch({
checkReload()
sampleTree <- hclust(dist(t(inUse_normDge$counts)), method = "average")
plotly_dendrogram(sampleTree, inUse_normDge$samples[[input$color_wgcna_tree]], NA)
}, error = function(err) {
return(NULL)
})
... | /inst/src/tabs/wgcna/svr_wgcna.R | permissive | genignored/dgeAnalysis | R | false | false | 9,719 | r |
## Sample dendrogram
output[["wgcna_sample_tree"]] <- renderPlotly({
tryCatch({
checkReload()
sampleTree <- hclust(dist(t(inUse_normDge$counts)), method = "average")
plotly_dendrogram(sampleTree, inUse_normDge$samples[[input$color_wgcna_tree]], NA)
}, error = function(err) {
return(NULL)
})
... |
library(reshape2)
library(ggplot2)
data <- read.delim('~/Dropbox/densitypaper/ExtractedData/A549.txt',header=T,stringsAsFactors=F)
data$volume <- data$volume/1000
numericcols <- c('volume','area','totalGAPDH','cytoGAPDH','nucGAPDH','nucArea',
'nucIntensityTotal','nucIntensityAvg','numCyclin','totalRN... | /SupplementaryFigures/VolumeDepIndepTxn/mu_analysis_test_Supp_A549.R | no_license | arjunrajlaboratory/DensityPaperDataAnalysis | R | false | false | 3,195 | r | library(reshape2)
library(ggplot2)
data <- read.delim('~/Dropbox/densitypaper/ExtractedData/A549.txt',header=T,stringsAsFactors=F)
data$volume <- data$volume/1000
numericcols <- c('volume','area','totalGAPDH','cytoGAPDH','nucGAPDH','nucArea',
'nucIntensityTotal','nucIntensityAvg','numCyclin','totalRN... |
testlist <- list(G = numeric(0), Rn = numeric(0), atmp = numeric(0), ra = numeric(0), relh = 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), rs = numeric(0), temp = numeric(0))
result <- do.call(meteor:::ET0_PenmanMonteith,testlist)
str(result) | /meteor/inst/testfiles/ET0_PenmanMonteith/libFuzzer_ET0_PenmanMonteith/ET0_PenmanMonteith_valgrind_files/1612736766-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 304 | r | testlist <- list(G = numeric(0), Rn = numeric(0), atmp = numeric(0), ra = numeric(0), relh = 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), rs = numeric(0), temp = numeric(0))
result <- do.call(meteor:::ET0_PenmanMonteith,testlist)
str(result) |
## ----style, echo = FALSE, results = 'asis'-------------------------------
BiocStyle::markdown()
options(width=100, max.print=1000)
knitr::opts_chunk$set(
eval=as.logical(Sys.getenv("KNITR_EVAL", "TRUE")),
cache=as.logical(Sys.getenv("KNITR_CACHE", "TRUE")))
## ----setup, echo=FALSE, messages=FALSE, warnings=... | /vignettes/08_Programming_in_R/Programming_in_R.R | permissive | tgirke/GEN242-2016 | R | false | false | 9,799 | r | ## ----style, echo = FALSE, results = 'asis'-------------------------------
BiocStyle::markdown()
options(width=100, max.print=1000)
knitr::opts_chunk$set(
eval=as.logical(Sys.getenv("KNITR_EVAL", "TRUE")),
cache=as.logical(Sys.getenv("KNITR_CACHE", "TRUE")))
## ----setup, echo=FALSE, messages=FALSE, warnings=... |
library(Rllvm)
m = parseIR("array.ll")
ee = ExecutionEngine(m)
.llvm(m$foo, .ee = ee)
m[["g", ee = ee]]
.llvm(m$get, .ee = ee)
| /experiments/array.R | no_license | duncantl/Rllvm | R | false | false | 131 | r | library(Rllvm)
m = parseIR("array.ll")
ee = ExecutionEngine(m)
.llvm(m$foo, .ee = ee)
m[["g", ee = ee]]
.llvm(m$get, .ee = ee)
|
#This function takes command line Input
readInput<-function(){
j<-0
n<-readline("size : ")
array<-as.numeric()
while(j<n) {
y<-as.numeric(readline("Enter Data : "))
array<-as.numeric(c(array,y))
j<-j+1
}
return array
}
array<-readInput()
r<-readline("rth Moment : ")
#This function Calculates the arithme... | /Descriptive Analysis/central_moments.R | no_license | shoaibrayeen/R | R | false | false | 806 | r | #This function takes command line Input
readInput<-function(){
j<-0
n<-readline("size : ")
array<-as.numeric()
while(j<n) {
y<-as.numeric(readline("Enter Data : "))
array<-as.numeric(c(array,y))
j<-j+1
}
return array
}
array<-readInput()
r<-readline("rth Moment : ")
#This function Calculates the arithme... |
## quadrant gate
quadrant.gate=function(action, window){
print("Quadrant Gate")
# update selected.node and active.SeqFrame
# selected.node(appspace[SeqFrame.hierachy.view])
select.channels()
##--------------------------------------------------------------------------
## mou... | /R/quadrant.gate.R | no_license | sheng-liu/SeqViz | R | false | false | 5,753 | r |
## quadrant gate
quadrant.gate=function(action, window){
print("Quadrant Gate")
# update selected.node and active.SeqFrame
# selected.node(appspace[SeqFrame.hierachy.view])
select.channels()
##--------------------------------------------------------------------------
## mou... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RenameClusters.R
\name{ClusterRename}
\alias{ClusterRename}
\title{New Name Clusters
Create a vector of cluster names. The function takes a csv file with old names in 1st columnn
and new names in 2nd column. The levels of the output are orde... | /man/ClusterRename.Rd | permissive | RachelQueen1/SCFunctionsV3 | R | false | true | 1,172 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RenameClusters.R
\name{ClusterRename}
\alias{ClusterRename}
\title{New Name Clusters
Create a vector of cluster names. The function takes a csv file with old names in 1st columnn
and new names in 2nd column. The levels of the output are orde... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.