content large_stringlengths 0 6.46M | path large_stringlengths 3 331 | license_type large_stringclasses 2
values | repo_name large_stringlengths 5 125 | language large_stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 4 6.46M | extension large_stringclasses 75
values | text stringlengths 0 6.46M |
|---|---|---|---|---|---|---|---|---|---|
library(glmnet)
mydata = read.table("./TrainingSet/AvgRank/lymphoid.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mse",alpha=1,family="gaussian",standardize=FALSE)
sink('./Model/EN/AvgRank/lymphoid/lymphoid_098.txt',append... | /Model/EN/AvgRank/lymphoid/lymphoid_098.R | no_license | leon1003/QSMART | R | false | false | 356 | r | library(glmnet)
mydata = read.table("./TrainingSet/AvgRank/lymphoid.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mse",alpha=1,family="gaussian",standardize=FALSE)
sink('./Model/EN/AvgRank/lymphoid/lymphoid_098.txt',append... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{string_to_range}
\alias{string_to_range}
\title{Convert spreadsheet range to a vector of row-col strings.}
\usage{
string_to_range(string)
}
\arguments{
\item{string}{a string representing a spreadsheet range}
}
\description{
Th... | /man/string_to_range.Rd | permissive | jimsforks/locatr | R | false | true | 415 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{string_to_range}
\alias{string_to_range}
\title{Convert spreadsheet range to a vector of row-col strings.}
\usage{
string_to_range(string)
}
\arguments{
\item{string}{a string representing a spreadsheet range}
}
\description{
Th... |
library(glmnet)
mydata = read.table("./TrainingSet/RF/bone.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mae",alpha=0.85,family="gaussian",standardize=FALSE)
sink('./Model/EN/Classifier/bone/bone_088.txt',append=TRUE)
prin... | /Model/EN/Classifier/bone/bone_088.R | no_license | leon1003/QSMART | R | false | false | 345 | r | library(glmnet)
mydata = read.table("./TrainingSet/RF/bone.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mae",alpha=0.85,family="gaussian",standardize=FALSE)
sink('./Model/EN/Classifier/bone/bone_088.txt',append=TRUE)
prin... |
#' Matrix of phases names for each pixel in the phase map
#'
#' A dataset containing names of phases for every pixel in the phase map
#' measured on a cross section through the Crassostrea gigas #1 oyster
#' used as an example in de Winter (2017)
#'
#' @docType data
#'
#' @usage data(phasemat)
#'
#' @format ... | /R/phasemat.R | no_license | cran/shelltrace | R | false | false | 457 | r | #' Matrix of phases names for each pixel in the phase map
#'
#' A dataset containing names of phases for every pixel in the phase map
#' measured on a cross section through the Crassostrea gigas #1 oyster
#' used as an example in de Winter (2017)
#'
#' @docType data
#'
#' @usage data(phasemat)
#'
#' @format ... |
rm(list=ls())
require('knitr')
require('tidyr')
require('dplyr')
require('gtools')
require('plotly')
require('gdata')
require('ggplot2')
require('magrittr')
require('reshape')
require('rlang')
require('pracma')
require('ggthemes')
require("binom")
require('drc')
z.crit <- qnorm(0.975)
# ADUCANUMAB Data
# ADAS COG 13
... | /data_post.R | no_license | sfackley/IV_Meta | R | false | false | 17,651 | r | rm(list=ls())
require('knitr')
require('tidyr')
require('dplyr')
require('gtools')
require('plotly')
require('gdata')
require('ggplot2')
require('magrittr')
require('reshape')
require('rlang')
require('pracma')
require('ggthemes')
require("binom")
require('drc')
z.crit <- qnorm(0.975)
# ADUCANUMAB Data
# ADAS COG 13
... |
####################################
# OpenMeta[Analyst] #
# ---- #
# continuous_methods.r #
# Facade module; wraps methods #
# that perform analyses on #
# continuous data in a coherent #
# interface. #
######################... | /src/R/openmetar/R/continuous_methods.r | no_license | forostm/OpenMeta-analyst- | R | false | false | 16,745 | r | ####################################
# OpenMeta[Analyst] #
# ---- #
# continuous_methods.r #
# Facade module; wraps methods #
# that perform analyses on #
# continuous data in a coherent #
# interface. #
######################... |
#Project – cleaning and tidying data
##loading packages
library(data.table)
##Merge the training and the test sets to create one data set and
##appropriately labeling the data set with descriptive variable names.
#reading column names for merged dataset
cl_nm <- read.table(".\\features.txt")
#reading test data
sub... | /Course 3 - Getting and Cleaning Data/run_analysis.R | no_license | shuklro1/datasciencecoursera | R | false | false | 2,011 | r | #Project – cleaning and tidying data
##loading packages
library(data.table)
##Merge the training and the test sets to create one data set and
##appropriately labeling the data set with descriptive variable names.
#reading column names for merged dataset
cl_nm <- read.table(".\\features.txt")
#reading test data
sub... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/root_it.R
\name{root_it}
\alias{root_it}
\title{Calculate the nth root of a numeric value}
\usage{
root_it(x, power, replace_NA = 0)
}
\arguments{
\item{x}{Numeric value}
\item{power}{The n value, e.g. 2 for square root}
\item{replace_NA}{A... | /man/root_it.Rd | no_license | martinctc/modeltoolbox | R | false | true | 519 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/root_it.R
\name{root_it}
\alias{root_it}
\title{Calculate the nth root of a numeric value}
\usage{
root_it(x, power, replace_NA = 0)
}
\arguments{
\item{x}{Numeric value}
\item{power}{The n value, e.g. 2 for square root}
\item{replace_NA}{A... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/modules.R
\name{module_from_RDS}
\alias{module_from_RDS}
\title{Load Module from RDS}
\usage{
module_from_RDS(inf, ...)
}
\arguments{
\item{inf}{input file name}
\item{...}{additional arguments to be passed to \code{readRDS}}
}
\value{
Retur... | /man/module_from_RDS.Rd | no_license | cran/modello | R | false | true | 417 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/modules.R
\name{module_from_RDS}
\alias{module_from_RDS}
\title{Load Module from RDS}
\usage{
module_from_RDS(inf, ...)
}
\arguments{
\item{inf}{input file name}
\item{...}{additional arguments to be passed to \code{readRDS}}
}
\value{
Retur... |
spcacp <- function(Y=NULL,d0=NULL,dims=NULL,nactive=NULL,dr=6,criteria="BIC",penalty="LASSO",D0=NULL,
lambda=NULL,nlam=20,lam_min=1e-4,gamma=2,alpha=1,eps=1e-4,max_step=20){
if(is.null(Y)) stop("Tensor Y must not be NULL !")
if(is.null(dims)){
warning("Dimension dims is NULL !")
d... | /R/spcacp.R | no_license | xliusufe/tensorApp | R | false | false | 3,126 | r |
spcacp <- function(Y=NULL,d0=NULL,dims=NULL,nactive=NULL,dr=6,criteria="BIC",penalty="LASSO",D0=NULL,
lambda=NULL,nlam=20,lam_min=1e-4,gamma=2,alpha=1,eps=1e-4,max_step=20){
if(is.null(Y)) stop("Tensor Y must not be NULL !")
if(is.null(dims)){
warning("Dimension dims is NULL !")
d... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/reporting.R
\name{round_df}
\alias{round_df}
\title{Round All Numeric Columns in Data Frame}
\usage{
round_df(df, n = 3)
}
\arguments{
\item{df}{Data frame}
\item{n}{Digits to round to (to right of decimal)}
}
\value{
Data frame
}
\descripti... | /man/round_df.Rd | permissive | outcomesinsights/jigsaw_r | R | false | true | 524 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/reporting.R
\name{round_df}
\alias{round_df}
\title{Round All Numeric Columns in Data Frame}
\usage{
round_df(df, n = 3)
}
\arguments{
\item{df}{Data frame}
\item{n}{Digits to round to (to right of decimal)}
}
\value{
Data frame
}
\descripti... |
#' EN: Raw data from a time and depth recorder of a Humboldt penguin. ES: Datos crudos de TDR en Pinguinos de Humboldt
#'
#' EN:
#' The data includes raw data obtained from a Humbolt Penguin at Tilgo, Chile
#' The information was collected during the breeding season 2018.
#' It contains 264197 obs from 1 variable.
#' D... | /R/TDR_raw.R | permissive | MiriamLL/spheniscus | R | false | false | 870 | r | #' EN: Raw data from a time and depth recorder of a Humboldt penguin. ES: Datos crudos de TDR en Pinguinos de Humboldt
#'
#' EN:
#' The data includes raw data obtained from a Humbolt Penguin at Tilgo, Chile
#' The information was collected during the breeding season 2018.
#' It contains 264197 obs from 1 variable.
#' D... |
#' Get information on an ERDDAP dataset.
#'
#' @export
#'
#' @param datasetid Dataset id
#' @param url A URL for an ERDDAP server. Default:
#' https://upwell.pfeg.noaa.gov/erddap/ - See [eurl()] for
#' more information
#' @param ... Further args passed on to [crul::verb-GET] (must be a
#' named parameter)
#' @param x ... | /R/info.R | permissive | ropensci/rerddap | R | false | false | 5,566 | r | #' Get information on an ERDDAP dataset.
#'
#' @export
#'
#' @param datasetid Dataset id
#' @param url A URL for an ERDDAP server. Default:
#' https://upwell.pfeg.noaa.gov/erddap/ - See [eurl()] for
#' more information
#' @param ... Further args passed on to [crul::verb-GET] (must be a
#' named parameter)
#' @param x ... |
library(stringr)
library(dplyr)
#Step 1: Merge the training and the test sets to create one data set.
#Load the test data
subject.test <- read.table("test/subject_test.txt")
x.test <- read.table("test/X_test.txt")
y.test <- readLines("test/y_test.txt")
comb.test <- data.frame(cbind(subject=subject.test$V1,label=y.tes... | /run_analysis.R | no_license | lotterdata/gcd_project | R | false | false | 2,859 | r | library(stringr)
library(dplyr)
#Step 1: Merge the training and the test sets to create one data set.
#Load the test data
subject.test <- read.table("test/subject_test.txt")
x.test <- read.table("test/X_test.txt")
y.test <- readLines("test/y_test.txt")
comb.test <- data.frame(cbind(subject=subject.test$V1,label=y.tes... |
context("survival-survdiff")
skip_if_not_installed("survival")
library(survival)
fit <- survdiff(Surv(futime, fustat) ~ rx, data = ovarian)
fit2 <- survdiff(Surv(time, status) ~ pat.karno + strata(inst), data = lung)
fit3 <- survdiff(
Surv(time, status) ~ pat.karno + ph.ecog + strata(inst) + strata(sex),
data = l... | /tests/testthat/test-survival-survdiff.R | no_license | sjewo/broom | R | false | false | 1,226 | r | context("survival-survdiff")
skip_if_not_installed("survival")
library(survival)
fit <- survdiff(Surv(futime, fustat) ~ rx, data = ovarian)
fit2 <- survdiff(Surv(time, status) ~ pat.karno + strata(inst), data = lung)
fit3 <- survdiff(
Surv(time, status) ~ pat.karno + ph.ecog + strata(inst) + strata(sex),
data = l... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/localMaxima.R
\name{localMaxima}
\alias{localMaxima}
\title{Find Local Maxima in a vector}
\usage{
localMaxima(x)
}
\arguments{
\item{x}{a vector of density values, as generated through a call to \code{\link{density}}}
}
\value{
a... | /hilbertSimilarity/man/localMaxima.Rd | no_license | akhikolla/TestedPackages-NoIssues | R | false | true | 692 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/localMaxima.R
\name{localMaxima}
\alias{localMaxima}
\title{Find Local Maxima in a vector}
\usage{
localMaxima(x)
}
\arguments{
\item{x}{a vector of density values, as generated through a call to \code{\link{density}}}
}
\value{
a... |
##STEP 4. Appropriately labels the data set with descriptive variable names.
##
col_list<-gsub("^t","time",col_list)
col_list<-gsub("^f","frequency",col_list)
col_list<-gsub("Gyro","Gyroscope",col_list)
col_list<-gsub("Acc","Accelerometer",col_list)
col_list<-gsub("-X","Xaxis",col_list)
col_list<-gsub("-Y","Yaxis",col... | /cleanLabel.R | no_license | mcwhitty/getncleandata | R | false | false | 1,622 | r | ##STEP 4. Appropriately labels the data set with descriptive variable names.
##
col_list<-gsub("^t","time",col_list)
col_list<-gsub("^f","frequency",col_list)
col_list<-gsub("Gyro","Gyroscope",col_list)
col_list<-gsub("Acc","Accelerometer",col_list)
col_list<-gsub("-X","Xaxis",col_list)
col_list<-gsub("-Y","Yaxis",col... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/calc_term.R
\name{calc_month_term}
\alias{calc_month_term}
\title{calculate term by month}
\usage{
calc_month_term(min, max)
}
\arguments{
\item{min}{Date}
\item{max}{Date}
}
\value{
int how many terms
}
\description{
calculate how many term... | /man/calc_month_term.Rd | permissive | syunsuke/nekodatetool | R | false | true | 410 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/calc_term.R
\name{calc_month_term}
\alias{calc_month_term}
\title{calculate term by month}
\usage{
calc_month_term(min, max)
}
\arguments{
\item{min}{Date}
\item{max}{Date}
}
\value{
int how many terms
}
\description{
calculate how many term... |
library(shiny)
library(tidyverse)
library(urbnmapr)
library(gridExtra)
#######################################################################################
################ Get Initial Data ###########################################
#########################################################################... | /app.R | no_license | mgdesaix/covid-19-analysis | R | false | false | 17,581 | r | library(shiny)
library(tidyverse)
library(urbnmapr)
library(gridExtra)
#######################################################################################
################ Get Initial Data ###########################################
#########################################################################... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bind.R
\name{vec_bind}
\alias{vec_bind}
\alias{vec_rbind}
\alias{vec_cbind}
\title{Combine many data frames into one data frame}
\usage{
vec_rbind(..., .ptype = NULL)
vec_cbind(..., .ptype = NULL, .nrow = NULL)
}
\arguments{
\item{...}{Data ... | /man/vec_bind.Rd | no_license | yutannihilation/vctrs | R | false | true | 2,927 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bind.R
\name{vec_bind}
\alias{vec_bind}
\alias{vec_rbind}
\alias{vec_cbind}
\title{Combine many data frames into one data frame}
\usage{
vec_rbind(..., .ptype = NULL)
vec_cbind(..., .ptype = NULL, .nrow = NULL)
}
\arguments{
\item{...}{Data ... |
library(quantmod)
getSymbols(c("AMZN","AAPL","GOOG","MSFT"),src="yahoo",from="2018-07-09",to="2020-07-09")
library(quantmod)
library(dygraphs)
library(tidyverse)
library(lubridate)
library(htmlwidgets)
getSymbols("SPY", from="2016-01-01", to="2020-01-01")
SPY <- SPY[,c(1:4)] ## remove the volume and adjusted column... | /Codigos/markowitz.R | no_license | Andres1984/Mercado-de-Capitales | R | false | false | 9,321 | r | library(quantmod)
getSymbols(c("AMZN","AAPL","GOOG","MSFT"),src="yahoo",from="2018-07-09",to="2020-07-09")
library(quantmod)
library(dygraphs)
library(tidyverse)
library(lubridate)
library(htmlwidgets)
getSymbols("SPY", from="2016-01-01", to="2020-01-01")
SPY <- SPY[,c(1:4)] ## remove the volume and adjusted column... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/adexchangebuyer_functions.R
\name{creatives.get}
\alias{creatives.get}
\title{Gets the status for a single creative. A creative will be available 30-40 minutes after submission.}
\usage{
creatives.get(accountId, buyerCreativeId)
}
\arguments{... | /googleadexchangebuyerv13.auto/man/creatives.get.Rd | permissive | Phippsy/autoGoogleAPI | R | false | true | 981 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/adexchangebuyer_functions.R
\name{creatives.get}
\alias{creatives.get}
\title{Gets the status for a single creative. A creative will be available 30-40 minutes after submission.}
\usage{
creatives.get(accountId, buyerCreativeId)
}
\arguments{... |
test_that("item.logit", {
z <- rnorm(100, 0, 2)
d <- item.logit(z = z, slope = 4, thr = 0)
expect_true(all(d$x %in% 0:1))
expect_true(mean(d$x) > 0.25)
expect_true(mean(d$x) < 0.75)
})
| /tests/testthat/test_item.logit.R | no_license | beckerbenj/eatAnalysis | R | false | false | 204 | r | test_that("item.logit", {
z <- rnorm(100, 0, 2)
d <- item.logit(z = z, slope = 4, thr = 0)
expect_true(all(d$x %in% 0:1))
expect_true(mean(d$x) > 0.25)
expect_true(mean(d$x) < 0.75)
})
|
#----------------------------------------------------------------------------------------------
# File: player-register-url-grabber.R
# Date: 07-06-2012
# Author: Eric Nantz
# URL: https://github.com/thercast/nhl_analysis/blob/master/web-scraping/skater-register-url-grabber.R
# Email: theRcast@gmail.com
# Purpose: Asse... | /web-scraping/skater-register-url-grabber.R | no_license | raffdoc/nhl_analysis | R | false | false | 4,091 | r | #----------------------------------------------------------------------------------------------
# File: player-register-url-grabber.R
# Date: 07-06-2012
# Author: Eric Nantz
# URL: https://github.com/thercast/nhl_analysis/blob/master/web-scraping/skater-register-url-grabber.R
# Email: theRcast@gmail.com
# Purpose: Asse... |
## ----module, echo=FALSE, results="asis"----------------------------------
Module <- "BigDataO"
cat(paste0("\\newcommand{\\Module}{", Module, "}"))
## ----load_packages, message=FALSE----------------------------------------
library(data.table) # Efficient data storage
library(dplyr) # Efficient data mani... | /Good Reading Materials on Data Science/BigDataO.R | no_license | voite1/Data-Science-Capstone | R | false | false | 4,032 | r |
## ----module, echo=FALSE, results="asis"----------------------------------
Module <- "BigDataO"
cat(paste0("\\newcommand{\\Module}{", Module, "}"))
## ----load_packages, message=FALSE----------------------------------------
library(data.table) # Efficient data storage
library(dplyr) # Efficient data mani... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/read-data.R
\name{read_infections}
\alias{read_infections}
\title{Read Corona Infection Numbers}
\usage{
read_infections(file = NULL)
}
\arguments{
\item{file}{The file path to load from. Do not specify it, to load from
JHU github repository ... | /man/read_infections.Rd | permissive | jnshsrs/corona | R | false | true | 508 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/read-data.R
\name{read_infections}
\alias{read_infections}
\title{Read Corona Infection Numbers}
\usage{
read_infections(file = NULL)
}
\arguments{
\item{file}{The file path to load from. Do not specify it, to load from
JHU github repository ... |
###########################################################
#
# Copyright (C) 2012 by Chi Yau
# All rights reserved
#
# http://www.r-tutor.com
#
################################
# c09-s01
dbinom(4, size=12, prob=0.2)
dbinom(0, size=12, prob=0.2) +
dbinom(1, size=12, prob=0.2) +
dbinom(2, size=12, prob=0.2) +
dbinom(... | /r-tutorial-src/rtutor-pt2-c09.R | no_license | davparker/R_Tutorial | R | false | false | 2,452 | r | ###########################################################
#
# Copyright (C) 2012 by Chi Yau
# All rights reserved
#
# http://www.r-tutor.com
#
################################
# c09-s01
dbinom(4, size=12, prob=0.2)
dbinom(0, size=12, prob=0.2) +
dbinom(1, size=12, prob=0.2) +
dbinom(2, size=12, prob=0.2) +
dbinom(... |
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.32784507357645e-308, 9.53818252170339e+295, 1.22810536108214e+146, 4.12396251261199e-221, 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), .Dim = c(4L, 9L)))
result <- do.call(CNull:::communities_individ... | /CNull/inst/testfiles/communities_individual_based_sampling_beta/AFL_communities_individual_based_sampling_beta/communities_individual_based_sampling_beta_valgrind_files/1615831992-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 365 | r | testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.32784507357645e-308, 9.53818252170339e+295, 1.22810536108214e+146, 4.12396251261199e-221, 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), .Dim = c(4L, 9L)))
result <- do.call(CNull:::communities_individ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/uppertriang.R
\name{uppertriang}
\alias{uppertriang}
\title{get values of upper triangle from matrix}
\usage{
uppertriang(mat, diag = FALSE)
}
\arguments{
\item{mat}{matrix}
\item{diag}{default = FALSE}
}
\description{
get values of upper tr... | /man/uppertriang.Rd | no_license | protViz/quantable | R | false | true | 394 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/uppertriang.R
\name{uppertriang}
\alias{uppertriang}
\title{get values of upper triangle from matrix}
\usage{
uppertriang(mat, diag = FALSE)
}
\arguments{
\item{mat}{matrix}
\item{diag}{default = FALSE}
}
\description{
get values of upper tr... |
#########################################
# OUJBIH ABDERRAHIM ########
# 26/05/2020 ########
# OCP SA Beni Amir Khouribga PFE ########
#########################################
make_path = function(input_var_merge="SDP",input_sortie="X40µm"){
if(input_var_merge=="SDP"&input_sortie=="X... | /Application/version0.3/R/Classification/Main_HG.R | permissive | oujbih/PFE | R | false | false | 17,439 | r | #########################################
# OUJBIH ABDERRAHIM ########
# 26/05/2020 ########
# OCP SA Beni Amir Khouribga PFE ########
#########################################
make_path = function(input_var_merge="SDP",input_sortie="X40µm"){
if(input_var_merge=="SDP"&input_sortie=="X... |
###
library(SummarizedExperiment)
library(jaffelab)
library(recount)
library(genefilter)
library(RColorBrewer)
MAINDIR = "/dcl01/lieber/ajaffe/lab/libd_stem_timecourse"
########################
### read in pheno
pheno = read.csv("/dcl01/lieber/ajaffe/lab/libd_stem_timecourse/volpato/volpato_pheno_bulk.csv",
str... | /deconvolution/deconvolution_cellType_and_brainStage_volpato.R | permissive | LieberInstitute/libd_stem_timecourse | R | false | false | 17,004 | r | ###
library(SummarizedExperiment)
library(jaffelab)
library(recount)
library(genefilter)
library(RColorBrewer)
MAINDIR = "/dcl01/lieber/ajaffe/lab/libd_stem_timecourse"
########################
### read in pheno
pheno = read.csv("/dcl01/lieber/ajaffe/lab/libd_stem_timecourse/volpato/volpato_pheno_bulk.csv",
str... |
#' Build package in specified directory.
#'
#' @param pkg package description, can be path or package name. See
#' \code{\link{as.package}} for more information
#' @param path path in which to produce package. If \code{NULL}, defaults to
#' the parent directory of the package.
#' @param binary Produce a binary (\... | /devtools/R/build.r | no_license | radfordneal/R-package-mods | R | false | false | 2,886 | r | #' Build package in specified directory.
#'
#' @param pkg package description, can be path or package name. See
#' \code{\link{as.package}} for more information
#' @param path path in which to produce package. If \code{NULL}, defaults to
#' the parent directory of the package.
#' @param binary Produce a binary (\... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/seaMass_sigma.R, R/sigma_block.R
\docType{class}
\name{seaMass_sigma-class}
\alias{seaMass_sigma-class}
\alias{seaMass_sigma}
\alias{open_sigma}
\alias{completed,seaMass_sigma-method}
\alias{del,seaMass_sigma-method}
\alias{name,seaMass_sigma... | /man/seaMass_sigma-class.Rd | permissive | alecksphillips/seaMass | R | false | true | 8,693 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/seaMass_sigma.R, R/sigma_block.R
\docType{class}
\name{seaMass_sigma-class}
\alias{seaMass_sigma-class}
\alias{seaMass_sigma}
\alias{open_sigma}
\alias{completed,seaMass_sigma-method}
\alias{del,seaMass_sigma-method}
\alias{name,seaMass_sigma... |
####
### probability4datascience chapter 3 R code translation
### Translated by Sumeeth Guda
####
###
# Libraries to import
###
library(ggplot2)
library(tidyverse)
##
# Chapter 3.2
##
###
# Histogram of the alphabets
###
f <- read.table('./ch3_data_english.txt')
f <- f/100
n <- c(1:26)
ntag <- c('a','b','c','d','e... | /Chapter+3+R+code.r | no_license | skguda/python-to-r-textbook | R | false | false | 1,939 | r | ####
### probability4datascience chapter 3 R code translation
### Translated by Sumeeth Guda
####
###
# Libraries to import
###
library(ggplot2)
library(tidyverse)
##
# Chapter 3.2
##
###
# Histogram of the alphabets
###
f <- read.table('./ch3_data_english.txt')
f <- f/100
n <- c(1:26)
ntag <- c('a','b','c','d','e... |
library(RKEEL)
### Name: NNEP_C
### Title: NNEP_C KEEL Classification Algorithm
### Aliases: NNEP_C R6_NNEP_C
### Keywords: classification
### ** Examples
#data_train <- RKEEL::loadKeelDataset("iris_train")
#data_test <- RKEEL::loadKeelDataset("iris_test")
#Create algorithm
#algorithm <- RKEEL::NNEP_C(data_train, ... | /data/genthat_extracted_code/RKEEL/examples/NNEP-C.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 476 | r | library(RKEEL)
### Name: NNEP_C
### Title: NNEP_C KEEL Classification Algorithm
### Aliases: NNEP_C R6_NNEP_C
### Keywords: classification
### ** Examples
#data_train <- RKEEL::loadKeelDataset("iris_train")
#data_test <- RKEEL::loadKeelDataset("iris_test")
#Create algorithm
#algorithm <- RKEEL::NNEP_C(data_train, ... |
setwd('/home/aslepnev/git/ej')
u = get(load('uni.RData'))
DATA = get(load('uniprc.RData'))
UNI <<- data.table(u, row.names=TRUE)
# sec_ids=c(100,200,300); sec_ws=c(0.5,0.3,0.2); start_dt='2015-01-01'; end_dt='9999-12-31'
b_rt = function(sec_ids, sec_ws, start_dt, end_dt){
r = na.locf(DATA[index(DATA)>=start_dt & i... | /option2.R | no_license | mt-christo/ej | R | false | false | 475 | r | setwd('/home/aslepnev/git/ej')
u = get(load('uni.RData'))
DATA = get(load('uniprc.RData'))
UNI <<- data.table(u, row.names=TRUE)
# sec_ids=c(100,200,300); sec_ws=c(0.5,0.3,0.2); start_dt='2015-01-01'; end_dt='9999-12-31'
b_rt = function(sec_ids, sec_ws, start_dt, end_dt){
r = na.locf(DATA[index(DATA)>=start_dt & i... |
## source('../data/ggboxplot_data.RData')
## use with reshape2::melt to reshape data
##ggplot(aes(y = Value, x = Gene, fill = Group), data = data) + geom_boxplot(outlier.shape = NA) + ylab("ylab") + coord_flip() + scale_color_brewer("Set2")
ggboxplot <- function(data, ylab="y-label", show.outlier=FALSE, color_brewe... | /R/ggboxplot.R | no_license | tienan/lxctk-m1 | R | false | false | 729 | r |
## source('../data/ggboxplot_data.RData')
## use with reshape2::melt to reshape data
##ggplot(aes(y = Value, x = Gene, fill = Group), data = data) + geom_boxplot(outlier.shape = NA) + ylab("ylab") + coord_flip() + scale_color_brewer("Set2")
ggboxplot <- function(data, ylab="y-label", show.outlier=FALSE, color_brewe... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/generic_function_and_methods_remove_data.R
\name{remove_data}
\alias{remove_data}
\title{Generic function to remove data}
\usage{
remove_data(x, samples, assays)
}
\arguments{
\item{x}{S3 Object fluidSCraw or fluidSCproc}
\item{sampl... | /man/remove_data.Rd | no_license | RubD/fluidSCqpcr | R | false | false | 579 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/generic_function_and_methods_remove_data.R
\name{remove_data}
\alias{remove_data}
\title{Generic function to remove data}
\usage{
remove_data(x, samples, assays)
}
\arguments{
\item{x}{S3 Object fluidSCraw or fluidSCproc}
\item{sampl... |
activityRadial <- function(recordTable,
species,
allSpecies = FALSE,
speciesCol = "Species",
recordDateTimeCol = "DateTimeOriginal",
recordDateTimeFormat = "%Y-%m-%d %H:%M:%S",
... | /camtrapR/R/activityRadial.R | no_license | ingted/R-Examples | R | false | false | 6,362 | r | activityRadial <- function(recordTable,
species,
allSpecies = FALSE,
speciesCol = "Species",
recordDateTimeCol = "DateTimeOriginal",
recordDateTimeFormat = "%Y-%m-%d %H:%M:%S",
... |
\name{add_heatmap-dispatch}
\alias{add_heatmap}
\title{
Method dispatch page for add_heatmap}
\description{
Method dispatch page for \code{add_heatmap}.}
\section{Dispatch}{
\code{add_heatmap} can be dispatched on following classes:
\itemize{
\item \code{\link{add_heatmap,HeatmapAnnotation-method}}, \code{\link{Heatma... | /man/add_heatmap-dispatch.rd | no_license | kassambara/ComplexHeatmap | R | false | false | 575 | rd | \name{add_heatmap-dispatch}
\alias{add_heatmap}
\title{
Method dispatch page for add_heatmap}
\description{
Method dispatch page for \code{add_heatmap}.}
\section{Dispatch}{
\code{add_heatmap} can be dispatched on following classes:
\itemize{
\item \code{\link{add_heatmap,HeatmapAnnotation-method}}, \code{\link{Heatma... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/blocks.R
\name{h3_block}
\alias{h3_block}
\title{Title}
\usage{
h3_block(h3)
}
\arguments{
\item{h3}{}
}
\value{
}
\description{
Title
}
| /man/h3_block.Rd | no_license | cmcmaster1/notionr | R | false | true | 216 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/blocks.R
\name{h3_block}
\alias{h3_block}
\title{Title}
\usage{
h3_block(h3)
}
\arguments{
\item{h3}{}
}
\value{
}
\description{
Title
}
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/autocorr.R
\name{varEffective}
\alias{varEffective}
\title{Estimate the variance of a correlated time series}
\usage{
varEffective(
res,
nEff = computeEffectiveNumObs(res, na.rm = na.rm),
na.rm = FALSE,
...
)
}
\arguments{
\item{res}{... | /man/varEffective.Rd | no_license | RCFilm/lognorm | R | false | true | 1,132 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/autocorr.R
\name{varEffective}
\alias{varEffective}
\title{Estimate the variance of a correlated time series}
\usage{
varEffective(
res,
nEff = computeEffectiveNumObs(res, na.rm = na.rm),
na.rm = FALSE,
...
)
}
\arguments{
\item{res}{... |
#:# libraries
library(digest)
library(mlr)
library(OpenML)
library(farff)
#:# config
set.seed(1)
#:# data
dataset <- getOMLDataSet(data.name = "ilpd")
head(dataset$data)
#:# preprocessing
head(dataset$data)
#:# model
task = makeClassifTask(id = "task", data = dataset$data, target = "Class")
lrn = makeLearner("class... | /models/openml_ilpd/classification_Class/bb3b567d4911d1b3944c23b2e03c8373/code.R | no_license | pysiakk/CaseStudies2019S | R | false | false | 694 | r | #:# libraries
library(digest)
library(mlr)
library(OpenML)
library(farff)
#:# config
set.seed(1)
#:# data
dataset <- getOMLDataSet(data.name = "ilpd")
head(dataset$data)
#:# preprocessing
head(dataset$data)
#:# model
task = makeClassifTask(id = "task", data = dataset$data, target = "Class")
lrn = makeLearner("class... |
\name{plotGeoTable-methods}
\docType{methods}
\alias{plotGeoTable-methods}
\alias{plotGeoTable,geoTable-method}
\alias{plotGeoTable}
\title{Plot objects of class 'geoTable'}
\description{
Function that plots objects of class 'geoTable'.
}
\usage{
plotGeoTable(object, outputType='html', filename=NULL, graphNames='out... | /man/plotGeoTable.Rd | no_license | trinker/sparkTable | R | false | false | 2,508 | rd | \name{plotGeoTable-methods}
\docType{methods}
\alias{plotGeoTable-methods}
\alias{plotGeoTable,geoTable-method}
\alias{plotGeoTable}
\title{Plot objects of class 'geoTable'}
\description{
Function that plots objects of class 'geoTable'.
}
\usage{
plotGeoTable(object, outputType='html', filename=NULL, graphNames='out... |
############################
#Jeremy Kang
#GTID: 903136703
#GTName: jkang315
############################
library(ggplot2)
library(GGally)
library(reshape2)
########### #1 ##########
data(midwest)
attach(midwest, warn.conflicts = FALSE)
names(midwest)
help(midwest)
summary(midwest)
table(midwest$state)
#Separate st... | /CSE6242/Homework/hw2/hw2.R | no_license | JeremyKang/personal-work | R | false | false | 22,460 | r | ############################
#Jeremy Kang
#GTID: 903136703
#GTName: jkang315
############################
library(ggplot2)
library(GGally)
library(reshape2)
########### #1 ##########
data(midwest)
attach(midwest, warn.conflicts = FALSE)
names(midwest)
help(midwest)
summary(midwest)
table(midwest$state)
#Separate st... |
bearer_token <- "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
test_that("Radius argument must be passed", {
expect_error({
tweets <- get_radius_tweets("happy",
start_tweets = "2021-01-01T00:00:00Z",
end_tweets = "2021-01-01T10:00:00Z",
... | /tests/testthat/test-get_radius_tweetsv2.R | permissive | cjbarrie/academictwitteR | R | false | false | 395 | r | bearer_token <- "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
test_that("Radius argument must be passed", {
expect_error({
tweets <- get_radius_tweets("happy",
start_tweets = "2021-01-01T00:00:00Z",
end_tweets = "2021-01-01T10:00:00Z",
... |
enumerateRegressionModels = function(fmla, whichModels, data){
trms <- attr(terms(fmla, data = data), "term.labels")
ntrms <- length(trms)
dv = stringFromFormula(fmla[[2]])
if(ntrms == 1 ) whichModels = "all"
if(whichModels=="top"){
lst = combn2( trms, ntrms - 1 )
}else if(whichModels=="all"){
ls... | /pkg/BayesFactor/R/regressionBF-utility.R | no_license | viennese/BayesFactor | R | false | false | 2,092 | r | enumerateRegressionModels = function(fmla, whichModels, data){
trms <- attr(terms(fmla, data = data), "term.labels")
ntrms <- length(trms)
dv = stringFromFormula(fmla[[2]])
if(ntrms == 1 ) whichModels = "all"
if(whichModels=="top"){
lst = combn2( trms, ntrms - 1 )
}else if(whichModels=="all"){
ls... |
#' Simulate Sigma variance-covariance matrix with 1 on diagonal and off-diagonal
#' values set to some fixed value + noise.
#'
Sigma.k.cor <- function(k.cor.base, p.tmp){
Sigma.mat.tmp <- matrix(k.cor.base, p.tmp, p.tmp) + matrix(rnorm(p.tmp**2, sd = 0.03), p.tmp, p.tmp)
range(Sigma.mat.tmp)
diag(Sigma.mat.tm... | /R/utils.R | no_license | statsox/Penalized-Regression-Inference | R | false | false | 1,918 | r |
#' Simulate Sigma variance-covariance matrix with 1 on diagonal and off-diagonal
#' values set to some fixed value + noise.
#'
Sigma.k.cor <- function(k.cor.base, p.tmp){
Sigma.mat.tmp <- matrix(k.cor.base, p.tmp, p.tmp) + matrix(rnorm(p.tmp**2, sd = 0.03), p.tmp, p.tmp)
range(Sigma.mat.tmp)
diag(Sigma.mat.tm... |
require("PMCMRplus")
options("width"=10000)
ARRAY <- c(0.002339681368326715,0.007315616803049349,0.0015978214839412982,0.6753029504767759,0.059346191165712846,9.154813803481165E-4,0.00604130457399386,2.0369620668307205,0.011123558615645606,0.013766693954229955,0.059879454605893355,0.01170620062015303,0.0019263280902962... | /MaFMethodology/R/bestvsmoeas/IGD/friedmanscript.R | no_license | fritsche/hhcopreliminaryresults | R | false | false | 10,722 | r | require("PMCMRplus")
options("width"=10000)
ARRAY <- c(0.002339681368326715,0.007315616803049349,0.0015978214839412982,0.6753029504767759,0.059346191165712846,9.154813803481165E-4,0.00604130457399386,2.0369620668307205,0.011123558615645606,0.013766693954229955,0.059879454605893355,0.01170620062015303,0.0019263280902962... |
## These 3 functions, .ignore.tags, .concat and ignore.lots.of.stuff
## are taken from the PlotTester package, but this has not (yet?)
## been released outside of Genentech, so I'm just copying them here.
.ignore.tags <- function(lines, tags) {
for(tag in tags) {
regex <- paste(sep="", " ", tag, "=\".*?\"")
... | /inst/unitTests/test.filter.widget.R | no_license | apomatix/AnalysisPageServer | R | false | false | 3,364 | r |
## These 3 functions, .ignore.tags, .concat and ignore.lots.of.stuff
## are taken from the PlotTester package, but this has not (yet?)
## been released outside of Genentech, so I'm just copying them here.
.ignore.tags <- function(lines, tags) {
for(tag in tags) {
regex <- paste(sep="", " ", tag, "=\".*?\"")
... |
element.models <- function(branch.name, init.mod, ali, SEL.NEUTRAL,smax=NULL,bmax=NULL){
#======================================================================
#print(SEL.NEUTRAL)
#print(smax)
#init.mod <- init.mod.tra
#ali <- har.msa
#SEL.NEUTRAL
#smax=NULL
#bmax=NULL
M0.kostka = init.mod
... | /gcbias/scripts/30.2.1_element_models.R | no_license | paulati/gcbias-kostka | R | false | false | 3,214 | r | element.models <- function(branch.name, init.mod, ali, SEL.NEUTRAL,smax=NULL,bmax=NULL){
#======================================================================
#print(SEL.NEUTRAL)
#print(smax)
#init.mod <- init.mod.tra
#ali <- har.msa
#SEL.NEUTRAL
#smax=NULL
#bmax=NULL
M0.kostka = init.mod
... |
library(dplyr)
library(PerformanceAnalytics)
library(xts)
#library(MFTSR) # for ewma vol
library(zoo)
library(data.table) # for combine the dataframe to get the solution
source("~/Desktop/Paper2/Paper2 code&data for geometric return/4Optimization.R")
# Function of exponential weighted moving average
# From https://sta... | /Project 1/7Risk Parity.R | no_license | xsguo1031/R-programming- | R | false | false | 1,670 | r | library(dplyr)
library(PerformanceAnalytics)
library(xts)
#library(MFTSR) # for ewma vol
library(zoo)
library(data.table) # for combine the dataframe to get the solution
source("~/Desktop/Paper2/Paper2 code&data for geometric return/4Optimization.R")
# Function of exponential weighted moving average
# From https://sta... |
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | /r/R/expression.R | permissive | ldacey/arrow | R | false | false | 8,873 | r | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... |
\name{cr_hilbert_curve}
\alias{cr_hilbert_curve}
\title{
Visualize global correlation by Hilbert curve
}
\description{
Visualize global correlation by Hilbert curve
}
\usage{
cr_hilbert_curve(cr, chromosome = paste0("chr", 1:22),
merge_chr = TRUE, add_chr_name = TRUE, title = "cr", legend = lgd, ...)
}
\arguments{
... | /man/cr_hilbert_curve.rd | no_license | jokergoo/epik | R | false | false | 821 | rd | \name{cr_hilbert_curve}
\alias{cr_hilbert_curve}
\title{
Visualize global correlation by Hilbert curve
}
\description{
Visualize global correlation by Hilbert curve
}
\usage{
cr_hilbert_curve(cr, chromosome = paste0("chr", 1:22),
merge_chr = TRUE, add_chr_name = TRUE, title = "cr", legend = lgd, ...)
}
\arguments{
... |
diagM <- function(A){
D <- matrix(rep(0,nrow(A)*nrow(A)),nrow=nrow(A),ncol=ncol(A))
for(i in 1:nrow(A)){
D[i,i] <- A[i,i]
}
return(D)
}
| /diagM.R | no_license | jasmyace/sciCompR | R | false | false | 148 | r | diagM <- function(A){
D <- matrix(rep(0,nrow(A)*nrow(A)),nrow=nrow(A),ncol=ncol(A))
for(i in 1:nrow(A)){
D[i,i] <- A[i,i]
}
return(D)
}
|
#load dplyr
library(dplyr)
library(tidyr)
library(ggplot2)
#Function to read and return the files
readfiles <- function(filenametoreplace, filenametosubstitute)
{
currentpath <- rstudioapi::getSourceEditorContext()$path
currentpath <- gsub(filenametoreplace,filenametosubstitute, currentpath)
if(file.exists(cur... | /EDAProject2/plot3.r | no_license | Whitchurch/datasciencecoursera | R | false | false | 1,493 | r | #load dplyr
library(dplyr)
library(tidyr)
library(ggplot2)
#Function to read and return the files
readfiles <- function(filenametoreplace, filenametosubstitute)
{
currentpath <- rstudioapi::getSourceEditorContext()$path
currentpath <- gsub(filenametoreplace,filenametosubstitute, currentpath)
if(file.exists(cur... |
MultiSynth <- function(MultiSynthPrep_obj, parallel = FALSE, ...){
llply(.data = MultiSynthPrep_obj, .fun = synth, ... , .parallel = parallel)
} | /Old Functions/MultiSynth.R | no_license | warddalston/synthTOOLS | R | false | false | 146 | r | MultiSynth <- function(MultiSynthPrep_obj, parallel = FALSE, ...){
llply(.data = MultiSynthPrep_obj, .fun = synth, ... , .parallel = parallel)
} |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Analyse_real_data.R
\name{get_spikes_app}
\alias{get_spikes_app}
\title{Get spikes for the shiny app.}
\usage{
get_spikes_app(
data,
time.step,
thres,
lin.trend,
trans2_low,
trans2_high,
trans1,
trans3,
closeness
)
}
\argume... | /man/get_spikes_app.Rd | no_license | JPNotts/Package | R | false | true | 1,048 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Analyse_real_data.R
\name{get_spikes_app}
\alias{get_spikes_app}
\title{Get spikes for the shiny app.}
\usage{
get_spikes_app(
data,
time.step,
thres,
lin.trend,
trans2_low,
trans2_high,
trans1,
trans3,
closeness
)
}
\argume... |
####################################
###### Begin Document
####################################
## Slide 17 -------------------------------
setwd("~/Desktop/Data")
Grocery <- read.table("Kutner_6_9.txt", header=T)
head(Grocery)
# Construct design matrix
X <- cbind(rep(1,52), Grocery$X1, Grocery$X2, Grocery$X3)... | /Week_One/Class_Four/ISCDS May 25, 2017 Full R Script.R | no_license | ccho0415/Stats-Class | R | false | false | 1,929 | r |
####################################
###### Begin Document
####################################
## Slide 17 -------------------------------
setwd("~/Desktop/Data")
Grocery <- read.table("Kutner_6_9.txt", header=T)
head(Grocery)
# Construct design matrix
X <- cbind(rep(1,52), Grocery$X1, Grocery$X2, Grocery$X3)... |
update_eloRating=function(playerARating, PlayerBRating, k=1) {
#https://gist.github.com/i000313/90b1f3c556b1b1ad8278
# Expected score for player A and for player B.
EA <- (1 / (1 + 10^((PlayerBRating - playerARating)/400)))
EB <- (1 / (1 + 10^((playerARating - PlayerBRating)/400)))
# RAn = RA + K * (SA ... | /projects/utr/src/helper_functions.R | no_license | petertea96/tennis_analytics | R | false | false | 4,899 | r | update_eloRating=function(playerARating, PlayerBRating, k=1) {
#https://gist.github.com/i000313/90b1f3c556b1b1ad8278
# Expected score for player A and for player B.
EA <- (1 / (1 + 10^((PlayerBRating - playerARating)/400)))
EB <- (1 / (1 + 10^((playerARating - PlayerBRating)/400)))
# RAn = RA + K * (SA ... |
library(tm)
library(wordcloud)
library(SnowballC)
dox <- Corpus(DirSource("C:/Users/Sabreena/Dropbox/DS/doc"),readerControl = list(language="eng"))
## Let's take a look at this corpus:
inspect(dox)
writeLines(as.character(dox))
#clean
dox <- tm_map(dox,tolower)
dox <- tm_map(dox, PlainTextDocument)
d... | /Text Mining Random.R | no_license | sabreenaabedin/ds4001 | R | false | false | 844 | r |
library(tm)
library(wordcloud)
library(SnowballC)
dox <- Corpus(DirSource("C:/Users/Sabreena/Dropbox/DS/doc"),readerControl = list(language="eng"))
## Let's take a look at this corpus:
inspect(dox)
writeLines(as.character(dox))
#clean
dox <- tm_map(dox,tolower)
dox <- tm_map(dox, PlainTextDocument)
d... |
datosabiertos <- tabPanel(title = "Datos abiertos",
value = "datosabiertos",
br(),
HTML("<h1><center>Datos Abiertos <b></b> COVID-19 CUSCO</center></h1>"),
column(width = 12,
br(), br(),
wellPanel(... | /tabs/ui/datosabiertos.R | no_license | gorecuscogrds/dashboard-covid-geresa | R | false | false | 514 | r | datosabiertos <- tabPanel(title = "Datos abiertos",
value = "datosabiertos",
br(),
HTML("<h1><center>Datos Abiertos <b></b> COVID-19 CUSCO</center></h1>"),
column(width = 12,
br(), br(),
wellPanel(... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/methods-summarizeSensitivityProfiles.R
\name{summarizeSensitivityProfiles,PharmacoSet-method}
\alias{summarizeSensitivityProfiles,PharmacoSet-method}
\title{Takes the sensitivity data from a PharmacoSet, and summarises them into a
drug vs cel... | /man/summarizeSensitivityProfiles-PharmacoSet-method.Rd | no_license | shaoyoucheng/PharmacoGx | R | false | true | 1,938 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/methods-summarizeSensitivityProfiles.R
\name{summarizeSensitivityProfiles,PharmacoSet-method}
\alias{summarizeSensitivityProfiles,PharmacoSet-method}
\title{Takes the sensitivity data from a PharmacoSet, and summarises them into a
drug vs cel... |
R <- 2000
setwd('simout')
CACE0_0 <- colMeans(cbind(read.table("CACE0_0.txt", sep="\t", header=T),
read.table("CACE0_0c.txt", sep="\t", header=T) ) )
CACE0_1 <- colMeans(cbind(read.table("CACE0_1.txt", sep="\t", header=T),
read.table("CACE0_1c.txt", sep="\t", head... | /simulation/save.R | no_license | JinchengZ/CACEmetaBayes | R | false | false | 4,279 | r | R <- 2000
setwd('simout')
CACE0_0 <- colMeans(cbind(read.table("CACE0_0.txt", sep="\t", header=T),
read.table("CACE0_0c.txt", sep="\t", header=T) ) )
CACE0_1 <- colMeans(cbind(read.table("CACE0_1.txt", sep="\t", header=T),
read.table("CACE0_1c.txt", sep="\t", head... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot.R
\name{plot_heatmap}
\alias{plot_heatmap}
\title{Create a Heatmap of a Scoring Metric}
\usage{
plot_heatmap(scores, y = "model", x, metric)
}
\arguments{
\item{scores}{A data.frame of scores based on quantile forecasts as
produced by \c... | /man/plot_heatmap.Rd | permissive | epiforecasts/scoringutils | R | false | true | 1,116 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot.R
\name{plot_heatmap}
\alias{plot_heatmap}
\title{Create a Heatmap of a Scoring Metric}
\usage{
plot_heatmap(scores, y = "model", x, metric)
}
\arguments{
\item{scores}{A data.frame of scores based on quantile forecasts as
produced by \c... |
# dependency for Model
FILE_RAW_DATA_BASE_DR2_TABLEAU <- file.path(DIR_MIDPUT, 'datareview2_tableua.csv')
FILE_RAW_DATA_BASE_DR2_RDS <- file.path(DIR_MIDPUT, 'datareview2.RDS')
.VAR_BEFORE <- ls()
# ------------------------------------------------------------------------
# Blog post: Logistic Regressions and Subs... | /d_dataexploration2.R | no_license | plusy/TitanicLearningR | R | false | false | 10,634 | r | # dependency for Model
FILE_RAW_DATA_BASE_DR2_TABLEAU <- file.path(DIR_MIDPUT, 'datareview2_tableua.csv')
FILE_RAW_DATA_BASE_DR2_RDS <- file.path(DIR_MIDPUT, 'datareview2.RDS')
.VAR_BEFORE <- ls()
# ------------------------------------------------------------------------
# Blog post: Logistic Regressions and Subs... |
## Compare PET values
require(raster)
obs = read.fwf("./Data/Eo150.clim",
widths = rep(8,14), col.names = c("lon","lat",month.abb))
head(obs)
coordinates(obs) <- ~lon+lat
r = raster(res=0.5)
pet.obs = rasterize(obs, r, field=month.abb)
plot(pet.obs)
writeRaster(pet.obs, "./Data/pet.obs.mon.nc", overw... | /makePETraster.R | no_license | simonbrewer/safricaro | R | false | false | 443 | r | ## Compare PET values
require(raster)
obs = read.fwf("./Data/Eo150.clim",
widths = rep(8,14), col.names = c("lon","lat",month.abb))
head(obs)
coordinates(obs) <- ~lon+lat
r = raster(res=0.5)
pet.obs = rasterize(obs, r, field=month.abb)
plot(pet.obs)
writeRaster(pet.obs, "./Data/pet.obs.mon.nc", overw... |
library('shiny')
library('shinydsc')
library('plotly')
shinyServer(function(input, output, session) {
observe({
if (input$learnmore != 0L) {
updateTabsetPanel(session, 'mainnavbar', selected = 'Help')
}
})
load_dsc_rds = reactive({
if (input$data_type == 'upload' & (!is.null(input$dsc_output... | /inst/app/server.R | no_license | stephenslab/shinydsc | R | false | false | 18,523 | r | library('shiny')
library('shinydsc')
library('plotly')
shinyServer(function(input, output, session) {
observe({
if (input$learnmore != 0L) {
updateTabsetPanel(session, 'mainnavbar', selected = 'Help')
}
})
load_dsc_rds = reactive({
if (input$data_type == 'upload' & (!is.null(input$dsc_output... |
library(ggplot2)
library(gapminder)
library(gganimate)
library(magick)
p <- ggplot(gapminder, aes(gdpPercap, lifeExp, size = pop, color = continent, frame = year)) +
geom_point() +
scale_x_log10()
p
animate(p)
gganimate(p)
# }
# NOT RUN {
gganimate(p, "output.gif")
gganimate(p, "output.mp4")
# }
# NOT RUN {
# Y... | /gganimate/gganimate_POC.R | no_license | AshutoshAgrahari/R_Practice | R | false | false | 1,169 | r | library(ggplot2)
library(gapminder)
library(gganimate)
library(magick)
p <- ggplot(gapminder, aes(gdpPercap, lifeExp, size = pop, color = continent, frame = year)) +
geom_point() +
scale_x_log10()
p
animate(p)
gganimate(p)
# }
# NOT RUN {
gganimate(p, "output.gif")
gganimate(p, "output.mp4")
# }
# NOT RUN {
# Y... |
### Fit many distributions
# Load packages
suppressPackageStartupMessages(library("survival"))
suppressPackageStartupMessages(library("fitdistrplus"))
suppressPackageStartupMessages(library("dplyr"))
suppressPackageStartupMessages(library("tidyr"))
suppressPackageStartupMessages(library("purrr"))
suppressPackageStart... | /weibull_functions.R | no_license | travismark/randCWwork | R | false | false | 37,049 | r | ### Fit many distributions
# Load packages
suppressPackageStartupMessages(library("survival"))
suppressPackageStartupMessages(library("fitdistrplus"))
suppressPackageStartupMessages(library("dplyr"))
suppressPackageStartupMessages(library("tidyr"))
suppressPackageStartupMessages(library("purrr"))
suppressPackageStart... |
#' @title Check headers of files stored on disk
#'
#' @description
#' Function to check that all filenames in a vector
#' point to existing files with the same resolution,
#' orientation, size, and origin.
#'
#' @param files character vector of filenames
#' @param showError logical whether to show an error (True) or
#'... | /R/checkFilenameHeaders.R | permissive | mbowren/LESYMAP | R | false | false | 1,010 | r | #' @title Check headers of files stored on disk
#'
#' @description
#' Function to check that all filenames in a vector
#' point to existing files with the same resolution,
#' orientation, size, and origin.
#'
#' @param files character vector of filenames
#' @param showError logical whether to show an error (True) or
#'... |
library(dplyr)
fname = "~/scrpd/data/raw/GSE71585_RefSeq_counts.csv"
cortical_df = read.csv(fname)
rownames(cortical_df) =cortical_df$gene
cortical_df$gene <- NULL
cortical_df_t = as.data.frame(t(cortical_df))
library(SingleCellExperiment)
library(scran)
sce <- SingleCellExperiment(list(counts=as.matrix(cortical_df)... | /src/cortical_cluster_sc3.R | no_license | mkleyman/srpd | R | false | false | 1,419 | r | library(dplyr)
fname = "~/scrpd/data/raw/GSE71585_RefSeq_counts.csv"
cortical_df = read.csv(fname)
rownames(cortical_df) =cortical_df$gene
cortical_df$gene <- NULL
cortical_df_t = as.data.frame(t(cortical_df))
library(SingleCellExperiment)
library(scran)
sce <- SingleCellExperiment(list(counts=as.matrix(cortical_df)... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/breaks.r
\name{pretty_breaks}
\alias{pretty_breaks}
\title{Pretty breaks.
Uses default R break algorithm as implemented in \code{\link{pretty}}.}
\usage{
pretty_breaks(n = 5, ...)
}
\arguments{
\item{n}{desired number of breaks}
\ite... | /man/pretty_breaks.Rd | no_license | LluisRamon/scales | R | false | false | 653 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/breaks.r
\name{pretty_breaks}
\alias{pretty_breaks}
\title{Pretty breaks.
Uses default R break algorithm as implemented in \code{\link{pretty}}.}
\usage{
pretty_breaks(n = 5, ...)
}
\arguments{
\item{n}{desired number of breaks}
\ite... |
sotes=readxl::read_xlsx('sote-data-part.xlsx')
library(DescTools)
library(ggplot2)
#*************** Reset rating, grade, e.grade, student.level
reset = function(){
rating = sotes$Q13
# Reversing the original order: 1 = Very effective; 2 = Effective; 3 = Somewhat effective; 4 = Ineffective; 5 = Very Ineffective
m... | /Statistics projects/Categorical analysis/SOTES_contingency table.r | no_license | jung-akim/statistics | R | false | false | 19,208 | r | sotes=readxl::read_xlsx('sote-data-part.xlsx')
library(DescTools)
library(ggplot2)
#*************** Reset rating, grade, e.grade, student.level
reset = function(){
rating = sotes$Q13
# Reversing the original order: 1 = Very effective; 2 = Effective; 3 = Somewhat effective; 4 = Ineffective; 5 = Very Ineffective
m... |
#' plot.MC_integral
#'
#' The function plot.MC_integral plots the integrand of a corresponding MC integration
#'
#'
#' @param MC output of a Monte Carlo integration
#' @param ggplot indicates if you want to use ggplot; please note that ggplot has to be installed in this case
#'
#'
#' @return
#'
#'
#' @examples
#' f <... | /R/plot.MC_integral.R | no_license | Hoejrup/ACM | R | false | false | 1,486 | r | #' plot.MC_integral
#'
#' The function plot.MC_integral plots the integrand of a corresponding MC integration
#'
#'
#' @param MC output of a Monte Carlo integration
#' @param ggplot indicates if you want to use ggplot; please note that ggplot has to be installed in this case
#'
#'
#' @return
#'
#'
#' @examples
#' f <... |
# Automatically generated by openapi-generator (https://openapi-generator.tech)
# Please update as you see appropriate
context("Test V1alpha1GeneDatasetRequest")
model.instance <- V1alpha1GeneDatasetRequest$new()
test_that("accessions", {
# tests for the property `accessions` (array[character])
# RNA or Protein ... | /tests/testthat/test_v1alpha1_gene_dataset_request.R | no_license | zhang-ncbi/dataset_r_test | R | false | false | 1,666 | r | # Automatically generated by openapi-generator (https://openapi-generator.tech)
# Please update as you see appropriate
context("Test V1alpha1GeneDatasetRequest")
model.instance <- V1alpha1GeneDatasetRequest$new()
test_that("accessions", {
# tests for the property `accessions` (array[character])
# RNA or Protein ... |
### Carregar pacotes
library(tidyverse)
library(magrittr)
### Carregar dados
dados <- read_csv2( file = 'education/dados/exemplo_preco_quantidade.csv' )
### Analises
## Modelo de Regressao Linear (assunto do proximo semestre)
# objetivo: encontrar um modelo que ajude a prever a quantidade dado o preco
modelo_regr... | /R_scripts/exemplo_preco_quantidade.R | no_license | netoalcides/education | R | false | false | 3,125 | r | ### Carregar pacotes
library(tidyverse)
library(magrittr)
### Carregar dados
dados <- read_csv2( file = 'education/dados/exemplo_preco_quantidade.csv' )
### Analises
## Modelo de Regressao Linear (assunto do proximo semestre)
# objetivo: encontrar um modelo que ajude a prever a quantidade dado o preco
modelo_regr... |
library(ggplot2)
library(dplyr)
library(data.table)
library(magrittr)
# helper function that checks for the next tile to be sampled if there
# are any colors that should be excluded because the max adjacent was
# reached either vertically or horizontally
check_colors <- function(cur_width,
cur... | /tiles_plot.R | no_license | EdwinTh/code_miscellaneous | R | false | false | 3,806 | r | library(ggplot2)
library(dplyr)
library(data.table)
library(magrittr)
# helper function that checks for the next tile to be sampled if there
# are any colors that should be excluded because the max adjacent was
# reached either vertically or horizontally
check_colors <- function(cur_width,
cur... |
\name{MOVA}
\alias{MOVA}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Derivation of predictions and ROC curves by MOVA
%% ~~function to do ... ~~
}
\description{
Conduct MOVA. The training was performed in a random forest, and the evaluation was performed using the Stratified 5-fold c... | /man/MOVA.Rd | no_license | yuya-hatano/MOVA | R | false | false | 12,167 | rd | \name{MOVA}
\alias{MOVA}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Derivation of predictions and ROC curves by MOVA
%% ~~function to do ... ~~
}
\description{
Conduct MOVA. The training was performed in a random forest, and the evaluation was performed using the Stratified 5-fold c... |
#' Polygon-attribution
#'
#' Takes a data frame \code{df} with fields \code{x} and \code{y} and a shape in data frame format, \code{shape_table}, and determines whether, and in which, polygon each point in \code{df} lies.
#' @param df data frame to which the polygon id is attributed. Must contain fields \code{x} and \... | /R/setAttributes.R | no_license | shazhe/mvst0 | R | false | false | 4,530 | r | #' Polygon-attribution
#'
#' Takes a data frame \code{df} with fields \code{x} and \code{y} and a shape in data frame format, \code{shape_table}, and determines whether, and in which, polygon each point in \code{df} lies.
#' @param df data frame to which the polygon id is attributed. Must contain fields \code{x} and \... |
library(data.table)
library(caret)
library(DMwR)
library(leaps)
library(glmnet)
library(randomForest)
library(pROC)
library(ROCR)
f.cutoff.optimizer = function(pred, y) {
output.auc <- vector()
grid = seq(0.1, 0.99, by=0.01)
for (cut.i in 1:length(grid)) {
yhat = ifelse(pred >= grid[cut.i], 1, 0)... | /WNV_RCode_mod_lasso.R | no_license | linpyl/Kaggle_West_Nile_Virues | R | false | false | 5,330 | r | library(data.table)
library(caret)
library(DMwR)
library(leaps)
library(glmnet)
library(randomForest)
library(pROC)
library(ROCR)
f.cutoff.optimizer = function(pred, y) {
output.auc <- vector()
grid = seq(0.1, 0.99, by=0.01)
for (cut.i in 1:length(grid)) {
yhat = ifelse(pred >= grid[cut.i], 1, 0)... |
#this is the R version of the Mad Scripts Battle by ZFTurbo:
#https://www.kaggle.com/zfturbo/facebook-v-predicting-check-ins/mad-scripts-battle/code
#the idea is very simple: split the map into n by m grid and then predict most popular
#place_id's in each bin.
library(data.table)
library(dplyr)
library(tidyr)
train ... | /random forest guy.R | no_license | abhinav-sharma-6167/Kaggle-Practice-Facebook-Checkin | R | false | false | 1,208 | r | #this is the R version of the Mad Scripts Battle by ZFTurbo:
#https://www.kaggle.com/zfturbo/facebook-v-predicting-check-ins/mad-scripts-battle/code
#the idea is very simple: split the map into n by m grid and then predict most popular
#place_id's in each bin.
library(data.table)
library(dplyr)
library(tidyr)
train ... |
testlist <- list(Rs = numeric(0), atmp = 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), temp = c(8.57293714360208e-312, 1.56898424065867e+82, NaN, -1.3258495253834e-113, 2.79620616433656e-119, -6.80033518839696e+41, 2.68298522855314e-211, NA, 6.68889884134308e... | /meteor/inst/testfiles/ET0_Makkink/AFL_ET0_Makkink/ET0_Makkink_valgrind_files/1615855441-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 606 | r | testlist <- list(Rs = numeric(0), atmp = 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), temp = c(8.57293714360208e-312, 1.56898424065867e+82, NaN, -1.3258495253834e-113, 2.79620616433656e-119, -6.80033518839696e+41, 2.68298522855314e-211, NA, 6.68889884134308e... |
#Getting data
most_preferred_time<-dbGetQuery(con,statement="select Mobile,TransactionDate from transaction_data where Mobile is not null and TransactionDate is not null")
most_preferred_time<-data.table(most_preferred_time)
#Processing
most_preferred_time$Date<-NA
most_preferred_time$Date <- format(as.POSIXct... | /most_preferred_day.R | no_license | Ashish0923/rewardz | R | false | false | 1,502 | r | #Getting data
most_preferred_time<-dbGetQuery(con,statement="select Mobile,TransactionDate from transaction_data where Mobile is not null and TransactionDate is not null")
most_preferred_time<-data.table(most_preferred_time)
#Processing
most_preferred_time$Date<-NA
most_preferred_time$Date <- format(as.POSIXct... |
\name{lengthKey}
\alias{lengthKey}
\title{Key for interpreting lengths in a plot}
\description{Key for interpreting lengths in a plot}
\usage{
lengthKey(x,y,tickpos,scale)
}
\arguments{
\item{x,y}{The position of the left end of the key in user units.}
\item{tickpos}{The labels that will appear above the ke... | /man/lengthKey.Rd | no_license | cran/plotrix | R | false | false | 1,181 | rd | \name{lengthKey}
\alias{lengthKey}
\title{Key for interpreting lengths in a plot}
\description{Key for interpreting lengths in a plot}
\usage{
lengthKey(x,y,tickpos,scale)
}
\arguments{
\item{x,y}{The position of the left end of the key in user units.}
\item{tickpos}{The labels that will appear above the ke... |
\name{loess.wrapper}
\alias{loess.wrapper}
\title{Compute a loess fit using cross validation}
\description{
Uses the \code{crossval} function from the \code{boostrap} package to compute
the optimal value of the tuning parameter in the \code{loess} function
and returns the corresponding \code{loess} fit.
}
\usage{
loess... | /man/loess.wrapper.Rd | no_license | s-mckay-curtis/bisoreg | R | false | false | 874 | rd | \name{loess.wrapper}
\alias{loess.wrapper}
\title{Compute a loess fit using cross validation}
\description{
Uses the \code{crossval} function from the \code{boostrap} package to compute
the optimal value of the tuning parameter in the \code{loess} function
and returns the corresponding \code{loess} fit.
}
\usage{
loess... |
testlist <- list(a = 0L, b = 0L, x = c(179514578L, 13355979L, -875836469L, -875836469L, -875836469L, -875836469L, -875836469L, -875886592L, 150931711L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L))
result <- do.call(grattan:::anyOutside,testlist)
str(result) | /grattan/inst/testfiles/anyOutside/libFuzzer_anyOutside/anyOutside_valgrind_files/1610387241-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 288 | r | testlist <- list(a = 0L, b = 0L, x = c(179514578L, 13355979L, -875836469L, -875836469L, -875836469L, -875836469L, -875836469L, -875886592L, 150931711L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L))
result <- do.call(grattan:::anyOutside,testlist)
str(result) |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/updateStyleDependencies.R
\name{updateStyleDependencies}
\alias{updateStyleDependencies}
\title{Updates the values of dependencies in a style}
\usage{
updateStyleDependencies(style.name, dependencies,
base.url = "http://localhost:1234/v1")
... | /for-scripters/R/r2cytoscape/man/updateStyleDependencies.Rd | permissive | mpg-age-bioinformatics/cytoscape-automation | R | false | true | 861 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/updateStyleDependencies.R
\name{updateStyleDependencies}
\alias{updateStyleDependencies}
\title{Updates the values of dependencies in a style}
\usage{
updateStyleDependencies(style.name, dependencies,
base.url = "http://localhost:1234/v1")
... |
library(meaRtools)
### Name: sttcp
### Title: Compute
### Aliases: sttcp
### ** Examples
t1 <- -cumsum(log(runif(1000)) / 2)
t2 <- -cumsum(log(runif(1000)) / 2)
corr <- sttcp(t1, t2)
plot(corr, main="cross correlation")
autocorr <- sttcp(t1, t1)
plot(autocorr, main="auto correlation")
| /data/genthat_extracted_code/meaRtools/examples/sttcp.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 293 | r | library(meaRtools)
### Name: sttcp
### Title: Compute
### Aliases: sttcp
### ** Examples
t1 <- -cumsum(log(runif(1000)) / 2)
t2 <- -cumsum(log(runif(1000)) / 2)
corr <- sttcp(t1, t2)
plot(corr, main="cross correlation")
autocorr <- sttcp(t1, t1)
plot(autocorr, main="auto correlation")
|
# Gregory Way - 2017
# pdx_exomeseq
# scripts/viz/oncoprint_similarity.R
#
# Output:
# Oncoprint diagrams and similarity heatmaps for all replicates and consensus
#
# Data processing and specific plotting functions modified from vignette:
# https://bioconductor.org/packages/3.7/bioc/vignettes/ComplexHeatmap/inst/doc/s8... | /scripts/oncoprint_similarity.R | permissive | biovisual/pdx_exomeseq | R | false | false | 5,303 | r | # Gregory Way - 2017
# pdx_exomeseq
# scripts/viz/oncoprint_similarity.R
#
# Output:
# Oncoprint diagrams and similarity heatmaps for all replicates and consensus
#
# Data processing and specific plotting functions modified from vignette:
# https://bioconductor.org/packages/3.7/bioc/vignettes/ComplexHeatmap/inst/doc/s8... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/query.pft.R
\name{query.pft_species}
\alias{query.pft_species}
\title{Query species given pft name}
\usage{
query.pft_species(pft, modeltype, con)
}
\arguments{
\item{pft}{string pft name}
\item{modeltype}{type of model that is used, this is... | /db/man/query.pft_species.Rd | permissive | yogeshdarji/pecan | R | false | true | 681 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/query.pft.R
\name{query.pft_species}
\alias{query.pft_species}
\title{Query species given pft name}
\usage{
query.pft_species(pft, modeltype, con)
}
\arguments{
\item{pft}{string pft name}
\item{modeltype}{type of model that is used, this is... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/legacy.R
\name{convert_legacyEmuDB_by_name_to_emuDB}
\alias{convert_legacyEmuDB_by_name_to_emuDB}
\title{Convert legacy EMU database and store it in new format}
\usage{
convert_legacyEmuDB_by_name_to_emuDB(dbName, targetDir, options = NULL,
... | /man/convert_legacyEmuDB_by_name_to_emuDB.Rd | no_license | florianschiel/emuR | R | false | true | 1,536 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/legacy.R
\name{convert_legacyEmuDB_by_name_to_emuDB}
\alias{convert_legacyEmuDB_by_name_to_emuDB}
\title{Convert legacy EMU database and store it in new format}
\usage{
convert_legacyEmuDB_by_name_to_emuDB(dbName, targetDir, options = NULL,
... |
#' @import dplyr
globalVariables(c(
"allometry",
"morphology",
"intercept",
"slope",
"result"
))
| /R/imports.R | no_license | cran/rorqual.morpho | R | false | false | 108 | r | #' @import dplyr
globalVariables(c(
"allometry",
"morphology",
"intercept",
"slope",
"result"
))
|
#' Arabidopsis QTL data on gravitropism
#'
#' Data from a QTL experiment on gravitropism in
#' Arabidopsis, with data on 162 recombinant inbred lines (Ler x
#' Cvi). The outcome is the root tip angle (in degrees) at two-minute
#' increments over eight hours.
#'
#' @docType data
#'
#' @usage data(mortality_rate)
#'
#' @... | /R/mortality_rate.R | permissive | lewishounkpevi/BeninStats | R | false | false | 597 | r | #' Arabidopsis QTL data on gravitropism
#'
#' Data from a QTL experiment on gravitropism in
#' Arabidopsis, with data on 162 recombinant inbred lines (Ler x
#' Cvi). The outcome is the root tip angle (in degrees) at two-minute
#' increments over eight hours.
#'
#' @docType data
#'
#' @usage data(mortality_rate)
#'
#' @... |
library(ggplot2)
library(ggplot2movies)
pl <- ggplot(movies,aes(x=rating))
pl2 <- pl+geom_histogram(binwidth = 0.1,aes(fill=..count..))
pl3 <- pl2 + xlab("Movie Rating") + ylab("Count")
print(pl3 + ggtitle("MY TITLE")) | /Histogram.R | no_license | FuzelahamedShaik/R-programming-for-DataScience | R | false | false | 223 | r | library(ggplot2)
library(ggplot2movies)
pl <- ggplot(movies,aes(x=rating))
pl2 <- pl+geom_histogram(binwidth = 0.1,aes(fill=..count..))
pl3 <- pl2 + xlab("Movie Rating") + ylab("Count")
print(pl3 + ggtitle("MY TITLE")) |
Rothmana <-
function(X, Y, lambda_beta, lambda_kappa, convergence = 1e-4, gamma = 0.5, maxit.in = 100, maxit.out = 100){
# Algorithm 2 of Rothmana, Levinaa & Ji Zhua
Nvar <- ncol(X)
n <- nrow(X)
beta_ridge <- beta_ridge_C(X, Y, lambda_beta)
# Starting values:
beta <- matrix(0, Nvar, Nvar)
# Alg... | /graphicalVAR/R/Rothmana.R | no_license | ingted/R-Examples | R | false | false | 1,525 | r | Rothmana <-
function(X, Y, lambda_beta, lambda_kappa, convergence = 1e-4, gamma = 0.5, maxit.in = 100, maxit.out = 100){
# Algorithm 2 of Rothmana, Levinaa & Ji Zhua
Nvar <- ncol(X)
n <- nrow(X)
beta_ridge <- beta_ridge_C(X, Y, lambda_beta)
# Starting values:
beta <- matrix(0, Nvar, Nvar)
# Alg... |
install.packages("raster")
library(raster)
library(ggplot2)
dem = raster("E:/2018/BRENDA/parametros/dem.tif")
ends = shapefile("E:/2018/BRENDA/parametros/GPT_RedHidrica_Ends.shp")
cuenca = shapefile("E:/2018/BRENDA/parametros/GPO_Cuenca.shp")
LongRio = 148618.05069
endPoints = extract(dem, ends)
AltMaxRio = max(endPo... | /BVALENCIA/paramMorfom.r | no_license | ryali93/SupportGIS | R | false | false | 2,048 | r | install.packages("raster")
library(raster)
library(ggplot2)
dem = raster("E:/2018/BRENDA/parametros/dem.tif")
ends = shapefile("E:/2018/BRENDA/parametros/GPT_RedHidrica_Ends.shp")
cuenca = shapefile("E:/2018/BRENDA/parametros/GPO_Cuenca.shp")
LongRio = 148618.05069
endPoints = extract(dem, ends)
AltMaxRio = max(endPo... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/child_labor.R
\docType{data}
\name{child_labor}
\alias{child_labor}
\title{Child Labor Law Data}
\format{A data frame.}
\source{
\url{http://masteringmetrics.com/wp-content/uploads/2015/02/AA_small.dta_.zip}
}
\usage{
child_labor
}
\descripti... | /masteringmetrics/man/child_labor.Rd | permissive | fditraglia/masteringmetrics | R | false | true | 1,001 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/child_labor.R
\docType{data}
\name{child_labor}
\alias{child_labor}
\title{Child Labor Law Data}
\format{A data frame.}
\source{
\url{http://masteringmetrics.com/wp-content/uploads/2015/02/AA_small.dta_.zip}
}
\usage{
child_labor
}
\descripti... |
###
### $Id: pow2.R 48 2014-02-05 20:50:54Z plroebuck $
###
### Raise 2 to some power.
###
##-----------------------------------------------------------------------------
pow2 <- function(f, e) {
if (!(is.numeric(f) || is.complex(f))) {
stop(sprintf("argument %s must be numeric or complex",
... | /matlab/R/pow2.R | no_license | ingted/R-Examples | R | false | false | 971 | r | ###
### $Id: pow2.R 48 2014-02-05 20:50:54Z plroebuck $
###
### Raise 2 to some power.
###
##-----------------------------------------------------------------------------
pow2 <- function(f, e) {
if (!(is.numeric(f) || is.complex(f))) {
stop(sprintf("argument %s must be numeric or complex",
... |
require(lubridate)
Sys.setlocale("LC_ALL","English")
d <- read.csv("household_power_consumption.txt", sep = ";", as.is = T)
d <- d[d$Date %in% c("1/2/2007", "2/2/2007"), ]
d$DateTime <- parse_date_time(paste(d$Date, d$Time), "dmyhms")
d$Global_active_power <- as.numeric(d$Global_active_power)
png(filena... | /plot2.R | no_license | alexandrehuber/ExData_Plotting1 | R | false | false | 491 | r | require(lubridate)
Sys.setlocale("LC_ALL","English")
d <- read.csv("household_power_consumption.txt", sep = ";", as.is = T)
d <- d[d$Date %in% c("1/2/2007", "2/2/2007"), ]
d$DateTime <- parse_date_time(paste(d$Date, d$Time), "dmyhms")
d$Global_active_power <- as.numeric(d$Global_active_power)
png(filena... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.