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/FullSet/Correlation/soft_tissue.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.04,family="gaussian",standardize=FALSE)
sink('./soft_tissue_020.txt',a... | /Model/EN/Correlation/soft_tissue/soft_tissue_020.R | no_license | esbgkannan/QSMART | R | false | false | 361 | r | library(glmnet)
mydata = read.table("../../../../TrainingSet/FullSet/Correlation/soft_tissue.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.04,family="gaussian",standardize=FALSE)
sink('./soft_tissue_020.txt',a... |
kernel="gauss"
for (kernel in c("exp","matern3_2","matern5_2","gauss")) {
context(paste0("Check LogLikelihood for kernel ",kernel))
f = function(x) 1-1/2*(sin(12*x)/(1+x)+2*cos(7*x)*x^5+0.7)
plot(f)
n <- 5
set.seed(123)
X <- as.matrix(runif(n))
y = f(X)
points(X,y)
k = DiceKriging::km(design=X,res... | /bindings/R/rlibkriging/tests/testthat/test-NuggetKrigingLogLik.R | permissive | libKriging/libKriging | R | false | false | 6,069 | r | kernel="gauss"
for (kernel in c("exp","matern3_2","matern5_2","gauss")) {
context(paste0("Check LogLikelihood for kernel ",kernel))
f = function(x) 1-1/2*(sin(12*x)/(1+x)+2*cos(7*x)*x^5+0.7)
plot(f)
n <- 5
set.seed(123)
X <- as.matrix(runif(n))
y = f(X)
points(X,y)
k = DiceKriging::km(design=X,res... |
require(data.table)
results1 <- readRDS("./srs_data/processed/results.rdata")
resultsC1 <- readRDS("./srs_data/processed/resultsC.rdata")
results2 <- readRDS("srs_data/processed/resultsnonegnona.rdata")
resultsC2 <- readRDS("srs_data/processed/resultsCnonegnona.rdata")
# Aggregation with data frame (slow)
# results... | /srs_data/list_analytes_of_interest.R | no_license | artwr/srs_work | R | false | false | 2,682 | r |
require(data.table)
results1 <- readRDS("./srs_data/processed/results.rdata")
resultsC1 <- readRDS("./srs_data/processed/resultsC.rdata")
results2 <- readRDS("srs_data/processed/resultsnonegnona.rdata")
resultsC2 <- readRDS("srs_data/processed/resultsCnonegnona.rdata")
# Aggregation with data frame (slow)
# results... |
ez_graph <- function(loc, df, fun, svg, x="success"){
dir.create(loc)
count = 0
for(i in colnames(df)){
file_name <- paste(loc, '/', 0, count, '_', i, sep='')
if (count > 9) {file_name <- paste(loc, '/', count, '_', i, sep='')}
print(file_name)
count = count + 1
wri... | /messing arround/R_funs/graphs.R | no_license | JakeGads/data_final | R | false | false | 2,105 | r | ez_graph <- function(loc, df, fun, svg, x="success"){
dir.create(loc)
count = 0
for(i in colnames(df)){
file_name <- paste(loc, '/', 0, count, '_', i, sep='')
if (count > 9) {file_name <- paste(loc, '/', count, '_', i, sep='')}
print(file_name)
count = count + 1
wri... |
#function to change column names ot PO Names
# This is the base function
#names(cal58_60)[2] <- cal58_60[1 , 2]
require(tidyverse)
#Create a data frame of each sheet and load into environment
seperate_calendars <- function(xlsx, ...){
sheet_names <- excel_sheets(xlsx)
months <- lapply(sheet_names, function(X) read... | /cleaning_functions.R | no_license | martin-gleason/gis_pitch | R | false | false | 2,132 | r | #function to change column names ot PO Names
# This is the base function
#names(cal58_60)[2] <- cal58_60[1 , 2]
require(tidyverse)
#Create a data frame of each sheet and load into environment
seperate_calendars <- function(xlsx, ...){
sheet_names <- excel_sheets(xlsx)
months <- lapply(sheet_names, function(X) read... |
##
### ---------------
###
### Create: Jianming Zeng
### Date: 2018-08-10 17:07:49
### Email: jmzeng1314@163.com
### Blog: http://www.bio-info-trainee.com/
### Forum: http://www.biotrainee.com/thread-1376-1-1.html
### CAFS/SUSTC/Eli Lilly/University of Macau
### Update Log: 2018-08-10 First version
###
### ---------... | /scripts/step0-install-packages.R | no_license | zhaoxuetong/tcga_example | R | false | false | 4,686 | r | ##
### ---------------
###
### Create: Jianming Zeng
### Date: 2018-08-10 17:07:49
### Email: jmzeng1314@163.com
### Blog: http://www.bio-info-trainee.com/
### Forum: http://www.biotrainee.com/thread-1376-1-1.html
### CAFS/SUSTC/Eli Lilly/University of Macau
### Update Log: 2018-08-10 First version
###
### ---------... |
##############################################################################
# global settings
##############################################################################
in_dir = "./00_input"
out_dir = "./01_output"
if (!dir.exists(out_dir)) {dir.create(out_dir)}
library(tidyverse)
library(DESeq2)
############... | /Figure3_ATAC-Seq_in_vivo/Figure3_ATAC-Seq_in_vivo.R | no_license | FrancisCrickInstitute/Lattke_et_al_Astrocyte_Maturation | R | false | false | 41,519 | r | ##############################################################################
# global settings
##############################################################################
in_dir = "./00_input"
out_dir = "./01_output"
if (!dir.exists(out_dir)) {dir.create(out_dir)}
library(tidyverse)
library(DESeq2)
############... |
#' @import shiny
#' @import SingleCellExperiment
#' @import ggplot2
#' @import grid
#' @import Polychrome
#' @importFrom cowplot plot_grid
#' @importFrom viridisLite viridis
#' @importFrom sessioninfo session_info
#' @rawNamespace import(plotly, except = last_plot)
#' @importFrom grDevices as.raster pdf dev.off
#' @imp... | /R/app_server.R | no_license | drighelli/spatialLIBD | R | false | false | 40,405 | r | #' @import shiny
#' @import SingleCellExperiment
#' @import ggplot2
#' @import grid
#' @import Polychrome
#' @importFrom cowplot plot_grid
#' @importFrom viridisLite viridis
#' @importFrom sessioninfo session_info
#' @rawNamespace import(plotly, except = last_plot)
#' @importFrom grDevices as.raster pdf dev.off
#' @imp... |
# chap09_2_InFormal(1)
# 분석 절차
# 1단계 : 토픽분석(단어의 빈도수)
# 2단계 : 연관어 분석(관련 단어 분석)
# 3단계 : 감성 분석(단어의 긍정/부정 분석)
##################################################
# 1. 토픽분석(텍스트 마이닝)
# - 시각화 : 단어 빈도수에 따른 워드 클라우드
###################################################
## 1. 패키지 설치와 준비
# 1) KoNLP 설치
instal... | /chap09_2_InFormal(1).R | no_license | yangmyongho/2_Rwork | R | false | false | 6,863 | r | # chap09_2_InFormal(1)
# 분석 절차
# 1단계 : 토픽분석(단어의 빈도수)
# 2단계 : 연관어 분석(관련 단어 분석)
# 3단계 : 감성 분석(단어의 긍정/부정 분석)
##################################################
# 1. 토픽분석(텍스트 마이닝)
# - 시각화 : 단어 빈도수에 따른 워드 클라우드
###################################################
## 1. 패키지 설치와 준비
# 1) KoNLP 설치
instal... |
#the following finds 7 averages each of varying randomly generated samples from N(10,25)
#the average from the random sample is compared to the true mean by plotting each average
#it is expected that higher sample sizes will give more precise averages
set.seed(8846)
y1 <- rnorm(100, 10, 25)
mean1 <- mean(y1)
error1 <- ... | /Stat_Theory/norms.R | no_license | aswartz04/coursework | R | false | false | 916 | r | #the following finds 7 averages each of varying randomly generated samples from N(10,25)
#the average from the random sample is compared to the true mean by plotting each average
#it is expected that higher sample sizes will give more precise averages
set.seed(8846)
y1 <- rnorm(100, 10, 25)
mean1 <- mean(y1)
error1 <- ... |
puts "Salut, bienvenu dans ma super. pyramide! Combien d'étages veux-tu?"
x = gets.chomp.to_i
a = "#"
i = 0
until i > x
puts "#{i} #{a}"
i += 1
a += "#"
end | /exo20.rd | no_license | eastwoodgate/myfirstruby | R | false | false | 175 | rd | puts "Salut, bienvenu dans ma super. pyramide! Combien d'étages veux-tu?"
x = gets.chomp.to_i
a = "#"
i = 0
until i > x
puts "#{i} #{a}"
i += 1
a += "#"
end |
# This scripts executes the decontam pipeline
# Build the phyloseq object with filtered data
count_mat <- as.matrix(filtered_counts)
tax_mat <- as.matrix(filtered_tax)
count_phylo <- otu_table(count_mat, taxa_are_rows = TRUE)
tax_phylo <- tax_table(tax_mat)
meta_phylo <- sample_data(filtered_meta)
physeq <- phyloseq... | /src/06_decontam.R | permissive | charlie-carr/implant_microbiota | R | false | false | 1,889 | r | # This scripts executes the decontam pipeline
# Build the phyloseq object with filtered data
count_mat <- as.matrix(filtered_counts)
tax_mat <- as.matrix(filtered_tax)
count_phylo <- otu_table(count_mat, taxa_are_rows = TRUE)
tax_phylo <- tax_table(tax_mat)
meta_phylo <- sample_data(filtered_meta)
physeq <- phyloseq... |
library(shiny)
library(caret)
shinyUI (
pageWithSidebar (
# Application title
headerPanel ("Predict Your Vehicle's MPG"),
sidebarPanel (
sliderInput('cyl', 'Cylinders', 4, min = 4, max= 8, step = 1),
sliderInput('disp', 'Displacement', 210, min = 70, max= 450, step = 10),
sliderInpu... | /ui.R | no_license | HaojunZhu/Coursera_Data_Products_Project | R | false | false | 848 | r | library(shiny)
library(caret)
shinyUI (
pageWithSidebar (
# Application title
headerPanel ("Predict Your Vehicle's MPG"),
sidebarPanel (
sliderInput('cyl', 'Cylinders', 4, min = 4, max= 8, step = 1),
sliderInput('disp', 'Displacement', 210, min = 70, max= 450, step = 10),
sliderInpu... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/btools_dates.r
\name{fdoq}
\alias{fdoq}
\title{First day of quarter}
\usage{
fdoq(date)
}
\arguments{
\item{date}{a vector of dates. No default.}
}
\description{
\code{fdoq} create a date for start of quarter, from quarter, year
}
\de... | /man/fdoq.Rd | no_license | ykim0902/btools | R | false | false | 562 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/btools_dates.r
\name{fdoq}
\alias{fdoq}
\title{First day of quarter}
\usage{
fdoq(date)
}
\arguments{
\item{date}{a vector of dates. No default.}
}
\description{
\code{fdoq} create a date for start of quarter, from quarter, year
}
\de... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/log.r
\name{user_log_dir}
\alias{user_log_dir}
\title{Return full path to the user-specific log dir for this application.}
\usage{
user_log_dir(appname = NULL, appauthor = appname, version = NULL,
opinion = TRUE, expand = TRUE, os = get_os(... | /man/user_log_dir.Rd | no_license | takewiki/rappdirs | R | false | true | 2,528 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/log.r
\name{user_log_dir}
\alias{user_log_dir}
\title{Return full path to the user-specific log dir for this application.}
\usage{
user_log_dir(appname = NULL, appauthor = appname, version = NULL,
opinion = TRUE, expand = TRUE, os = get_os(... |
## 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 <- function(y) {
x <<- y
m <<- NULL
}
get <- function() x
setinverse <- function(inverse) m <<- inverse
get... | /cachematrix.R | no_license | sagar2k/ProgrammingAssignment2 | R | false | false | 734 | 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 <- function(y) {
x <<- y
m <<- NULL
}
get <- function() x
setinverse <- function(inverse) m <<- inverse
get... |
# Server ------------------------------------------------------------------
cars_edit_module <- function(input,
output,
session,
title,
obj_to_edit,
trigger) {
# namespace ... | /Modules/edit_modules/cars/cars_edit_module.R | no_license | vikram-rawat/Honda_Welding | R | false | false | 3,793 | r | # Server ------------------------------------------------------------------
cars_edit_module <- function(input,
output,
session,
title,
obj_to_edit,
trigger) {
# namespace ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/di.R
\name{di.fun}
\alias{di.fun}
\title{Function for DI}
\usage{
di.fun(X)
}
\arguments{
\item{X}{A count random variable}
}
\value{
Returns
\item{di}{The Poisson dispersion index}
}
\description{
The function computes the univariate Poisson... | /man/di.fun.Rd | no_license | cran/GWI | R | false | true | 1,104 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/di.R
\name{di.fun}
\alias{di.fun}
\title{Function for DI}
\usage{
di.fun(X)
}
\arguments{
\item{X}{A count random variable}
}
\value{
Returns
\item{di}{The Poisson dispersion index}
}
\description{
The function computes the univariate Poisson... |
#' @title Get data from The Eurostat APi in JSON
#'
#' @description Retrive data from
#' \href{http://ec.europa.eu/eurostat/web/json-and-unicode-web-services}{The Eurostat Web Services}. Data to retrive
#' can be spesified with filters. Normally, it is better to use JSON
#' query thru \code{\link{get_euro... | /R/get_eurostat_json.R | no_license | HunJaeCHUNG/eurostat | R | false | false | 4,010 | r | #' @title Get data from The Eurostat APi in JSON
#'
#' @description Retrive data from
#' \href{http://ec.europa.eu/eurostat/web/json-and-unicode-web-services}{The Eurostat Web Services}. Data to retrive
#' can be spesified with filters. Normally, it is better to use JSON
#' query thru \code{\link{get_euro... |
# Case Study - Denco
sales1 = read.csv("./data/denco.csv")
#sales1 = read.csv(file.choose())
#using gsheet
library(gsheet)
url = 'https://docs.google.com/spreadsheets/d/1PWWoMqE5o3ChwJbpexeeYkW6p4BHL9hubVb1fkKSBgA/edit#gid=216113907'
denco2 = as.data.frame(gsheet2tbl(url))
str(denco2)
head(sales1,n=7)
names(sales1... | /scr.R | no_license | bidyan24/2ndtrial | R | false | false | 2,720 | r | # Case Study - Denco
sales1 = read.csv("./data/denco.csv")
#sales1 = read.csv(file.choose())
#using gsheet
library(gsheet)
url = 'https://docs.google.com/spreadsheets/d/1PWWoMqE5o3ChwJbpexeeYkW6p4BHL9hubVb1fkKSBgA/edit#gid=216113907'
denco2 = as.data.frame(gsheet2tbl(url))
str(denco2)
head(sales1,n=7)
names(sales1... |
library(gbutils)
### Name: sim_complex
### Title: Simulate real or complex numbers using polar form
### Aliases: sim_complex sim_real
### Keywords: distribution simulation
### ** Examples
## x[1] is fixed to 1, x[2] is negative with random magnitude:
x <- sim_real(c(1,NA,NA,NA), c(1, -1, NA, NA))
## z[1] fixed to ... | /data/genthat_extracted_code/gbutils/examples/sim_complex.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 615 | r | library(gbutils)
### Name: sim_complex
### Title: Simulate real or complex numbers using polar form
### Aliases: sim_complex sim_real
### Keywords: distribution simulation
### ** Examples
## x[1] is fixed to 1, x[2] is negative with random magnitude:
x <- sim_real(c(1,NA,NA,NA), c(1, -1, NA, NA))
## z[1] fixed to ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/EFA.R
\name{EFA}
\alias{EFA}
\title{Exploratory factor analysis (EFA)}
\source{
Grieder, S., & Steiner, M.D. (2020). Algorithmic Jingle Jungle:
A Comparison of Implementations of Principal Axis Factoring and Promax Rotation
in R and SPSS. Ma... | /EFAtools/man/EFA.Rd | no_license | akhikolla/InformationHouse | R | false | true | 16,549 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/EFA.R
\name{EFA}
\alias{EFA}
\title{Exploratory factor analysis (EFA)}
\source{
Grieder, S., & Steiner, M.D. (2020). Algorithmic Jingle Jungle:
A Comparison of Implementations of Principal Axis Factoring and Promax Rotation
in R and SPSS. Ma... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rough_alignment.R
\name{rough_align}
\alias{rough_align}
\title{Initial alignment of mask and image}
\usage{
rough_align(img, mask, img_fill_value = img_mode(img), ...)
}
\arguments{
\item{img}{Image - greyscale, white(ish) as background, bla... | /man/rough_align.Rd | permissive | srvanderplas/ShoeScrubR | R | false | true | 820 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rough_alignment.R
\name{rough_align}
\alias{rough_align}
\title{Initial alignment of mask and image}
\usage{
rough_align(img, mask, img_fill_value = img_mode(img), ...)
}
\arguments{
\item{img}{Image - greyscale, white(ish) as background, bla... |
library(jsonlite)
library(plyr)
library(dplyr)
library(tidyjson)
library(ggplot2)
library(scales)
library(reshape)
library(reshape2)
library(lazyeval)
library(fasttime)
library(data.table)
library(rgeolocate)
truncate_url<- function(df, colname_vector){
# truncate the utm part of the targeted colnames, such as curr... | /sop_function.R | no_license | johnnychiuchiu/Ecommerce-Report | R | false | false | 64,020 | r | library(jsonlite)
library(plyr)
library(dplyr)
library(tidyjson)
library(ggplot2)
library(scales)
library(reshape)
library(reshape2)
library(lazyeval)
library(fasttime)
library(data.table)
library(rgeolocate)
truncate_url<- function(df, colname_vector){
# truncate the utm part of the targeted colnames, such as curr... |
##### LINEAR MODEL
#linear.model = lm(transactionRevenue ~ have_revenue +
# is_chrome +
# `day_of_week_Sexta Feira`,
# data = trainData)
linear.model = lm(transactionRevenue ~ have_revenue +
continent_America... | /google-revenue-eda.R | permissive | marvinlemos/kaggle-google-revenue | R | false | false | 1,452 | r |
##### LINEAR MODEL
#linear.model = lm(transactionRevenue ~ have_revenue +
# is_chrome +
# `day_of_week_Sexta Feira`,
# data = trainData)
linear.model = lm(transactionRevenue ~ have_revenue +
continent_America... |
\name{mdcc}
%% <LIST>
\alias{mdcc}
%% </LIST>
\Rdversion{1.1}
\alias{mdcc}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Moving Response and Correlation Functions.
}
\description{
This function calculates moving response and correlation functions from
tree-ring chronologies and monthly climat... | /man/mdcc.Rd | no_license | cszang/bootRes | R | false | false | 6,539 | rd | \name{mdcc}
%% <LIST>
\alias{mdcc}
%% </LIST>
\Rdversion{1.1}
\alias{mdcc}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Moving Response and Correlation Functions.
}
\description{
This function calculates moving response and correlation functions from
tree-ring chronologies and monthly climat... |
heck2steprobVcov <-
function(y1vec, y2vec, x1Matr, x2Matr, eststage1, eststage2, eststage2sigma, weights = rep(1,nrow(y1vec)), t.c = 1.345)
{
n=sum(y1vec==1)
sumheck=0 #
for(i in 1:n) # sandwich estimator of the first term
{
sumheck=sumheck+PsiMest(x2Matr[i,],y2vec[i],eststage2,eststage2sigma,t.c,we... | /ssmrob/R/heck2steprobVcov.R | no_license | ingted/R-Examples | R | false | false | 1,532 | r | heck2steprobVcov <-
function(y1vec, y2vec, x1Matr, x2Matr, eststage1, eststage2, eststage2sigma, weights = rep(1,nrow(y1vec)), t.c = 1.345)
{
n=sum(y1vec==1)
sumheck=0 #
for(i in 1:n) # sandwich estimator of the first term
{
sumheck=sumheck+PsiMest(x2Matr[i,],y2vec[i],eststage2,eststage2sigma,t.c,we... |
# Create S4 method 'annualUpdate'
#E.O.Env.KPFM.annual_update.01.cpp
code<-"
#include <string>
using namespace Rcpp;
int rYear = as<int>(getRTState(universe, \"relativeYear\"));
//read next line of file
const char* fileName = as<const char*>(getRuntimePath(universe, getAttribute(element, \"RuntimeFile\")));
... | /_Scenarios/KPFM 20150331/code/E.O.Env.KPFM.annual_update.01.cpp.R | no_license | AndrewJConstable/EPOCuniverse | R | false | false | 1,069 | r | # Create S4 method 'annualUpdate'
#E.O.Env.KPFM.annual_update.01.cpp
code<-"
#include <string>
using namespace Rcpp;
int rYear = as<int>(getRTState(universe, \"relativeYear\"));
//read next line of file
const char* fileName = as<const char*>(getRuntimePath(universe, getAttribute(element, \"RuntimeFile\")));
... |
library(ape)
testtree <- read.tree("1389_0.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="1389_0_unrooted.txt") | /codeml_files/newick_trees_processed/1389_0/rinput.R | no_license | DaniBoo/cyanobacteria_project | R | false | false | 135 | r | library(ape)
testtree <- read.tree("1389_0.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="1389_0_unrooted.txt") |
context("files are present and sensible")
test_that("files are present", {
expect_that(bgmfiles(), is_a("character"))
expect_that(length(bgmfiles()), testthat::is_more_than(1L))
expect_that(all(file.exists(bgmfiles())), testthat::is_true())
})
| /tests/testthat/test-files.R | no_license | AustralianAntarcticDivision/bgmfiles | R | false | false | 252 | r | context("files are present and sensible")
test_that("files are present", {
expect_that(bgmfiles(), is_a("character"))
expect_that(length(bgmfiles()), testthat::is_more_than(1L))
expect_that(all(file.exists(bgmfiles())), testthat::is_true())
})
|
# names in the original sample with country of residence information:
datDir <- "/scicore/home/weder/GROUP/Innovation/01_patent_data"
inv_names <- readRDS(paste0(datDir,
"/created data/origin_name_sample.rds"))
# names scrapped from name-prism:
inv_names_origin <- readRDS(paste0(datDir,
... | /Code/training_data/temp.R | no_license | Sasikarnjib/name_to_origin | R | false | false | 761 | r |
# names in the original sample with country of residence information:
datDir <- "/scicore/home/weder/GROUP/Innovation/01_patent_data"
inv_names <- readRDS(paste0(datDir,
"/created data/origin_name_sample.rds"))
# names scrapped from name-prism:
inv_names_origin <- readRDS(paste0(datDir,
... |
#!/usr/bin/env Rscript
#
# --------------------------------------------------
# Building Energy Baseline Analysis Package
#
# Copyright (c) 2013, The Regents of the University of California, Department
# of Energy contract-operators of the Lawrence Berkeley National Laboratory.
# All rights reserved.
#
# The Regents ... | /loadshape/r/baseline.R | permissive | AnginZ/loadshape | R | false | false | 26,379 | r | #!/usr/bin/env Rscript
#
# --------------------------------------------------
# Building Energy Baseline Analysis Package
#
# Copyright (c) 2013, The Regents of the University of California, Department
# of Energy contract-operators of the Lawrence Berkeley National Laboratory.
# All rights reserved.
#
# The Regents ... |
#########################
## Countries of the world
## Made by: Jaakko Järvinen
## Date: 19.03.2020
rm(list=(ls()))
dev.off()
cat("\014")
# Libraries
library(sp)
library(stringr)
library(geojsonio)
library(ggplot2)
# Reading the data and plotting the whole world
spdf <- geojson_read("data/custom.geo.json", what = "s... | /World/Map_script.R | no_license | jarvijaakko/Karttaplotit | R | false | false | 3,431 | r | #########################
## Countries of the world
## Made by: Jaakko Järvinen
## Date: 19.03.2020
rm(list=(ls()))
dev.off()
cat("\014")
# Libraries
library(sp)
library(stringr)
library(geojsonio)
library(ggplot2)
# Reading the data and plotting the whole world
spdf <- geojson_read("data/custom.geo.json", what = "s... |
## Copyright (C) 2013 Marius Hofert, Bernhard Pfaff
##
## 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 3 of the License, or (at your option) any later
## version.
##
## This pr... | /R/GHYP.R | no_license | StephanKalika/QRM | R | false | false | 5,093 | r | ## Copyright (C) 2013 Marius Hofert, Bernhard Pfaff
##
## 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 3 of the License, or (at your option) any later
## version.
##
## This pr... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/check-call.R
\name{test_call}
\alias{check_arg}
\alias{check_equal.ArgumentState}
\alias{check_function}
\alias{check_operator}
\alias{test_call}
\alias{test_function}
\alias{test_function_v2}
\title{Test whether a student correctly called a ... | /man/test_call.Rd | no_license | ludov04/testwhat | R | false | true | 3,726 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/check-call.R
\name{test_call}
\alias{check_arg}
\alias{check_equal.ArgumentState}
\alias{check_function}
\alias{check_operator}
\alias{test_call}
\alias{test_function}
\alias{test_function_v2}
\title{Test whether a student correctly called a ... |
test_that(
"test is_binding_locked with a nonexistent variable returns false",
{
e <- new.env()
expect_false(is_binding_locked(x, e))
}
)
test_that(
"test is_binding_locked with an unlocked variable returns false",
{
e <- new.env()
e$x <- 1:10
expect_false(is_binding_l... | /tests/testthat/test-is-code.R | no_license | cran/assertive.code | R | false | false | 3,914 | r | test_that(
"test is_binding_locked with a nonexistent variable returns false",
{
e <- new.env()
expect_false(is_binding_locked(x, e))
}
)
test_that(
"test is_binding_locked with an unlocked variable returns false",
{
e <- new.env()
e$x <- 1:10
expect_false(is_binding_l... |
################################## lasso_validator_v4.R ################################
# Function: Validate the prediction generated from lasso_predictor.R with real data #
# Usage: R --no-save < lasso_validator.R --args dir subdir type #
# Arguments: dir = directory for expected data ... | /lasso_validator_v4.R | no_license | chelseaju/Pseudogene | R | false | false | 3,288 | r | ################################## lasso_validator_v4.R ################################
# Function: Validate the prediction generated from lasso_predictor.R with real data #
# Usage: R --no-save < lasso_validator.R --args dir subdir type #
# Arguments: dir = directory for expected data ... |
#' Shiny module UI function for visit plan display
#'
#' This function represents a shiny dashboard UI module that allows users to
#' view a plot of the visit plan.
#'
#' @param id string containing a namespace identifier
#' @param label string to be used as sidebar tab label
#' @return shiny.tag list object containing... | /R/mod_visitplan.R | permissive | SwissClinicalTrialOrganisation/secuTrialRshiny | R | false | false | 1,745 | r | #' Shiny module UI function for visit plan display
#'
#' This function represents a shiny dashboard UI module that allows users to
#' view a plot of the visit plan.
#'
#' @param id string containing a namespace identifier
#' @param label string to be used as sidebar tab label
#' @return shiny.tag list object containing... |
library(jpeg)
library(wvtool)
library("matrixStats")
imgActual <- readJPEG("C:/Fabric16-ConvertImage.jpg")
img1 <- readJPEG("C:/Fabric16-ConvertImage.jpg")
gaborFilter <- gabor.filter(x=imgActual, lamda=5, theta=30, bw=5, phi=0, asp=0.6, disp=TRUE)
imgGabor <-gaborFilter$filtered_img
# Column Gabor
mean_col_Gabor <- ... | /files/Image16.R | no_license | coskunuyar/Statistical-Process-Control-Textile-Surfaces-Gabor-Filtering | R | false | false | 1,581 | r | library(jpeg)
library(wvtool)
library("matrixStats")
imgActual <- readJPEG("C:/Fabric16-ConvertImage.jpg")
img1 <- readJPEG("C:/Fabric16-ConvertImage.jpg")
gaborFilter <- gabor.filter(x=imgActual, lamda=5, theta=30, bw=5, phi=0, asp=0.6, disp=TRUE)
imgGabor <-gaborFilter$filtered_img
# Column Gabor
mean_col_Gabor <- ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/query.R
\name{druid.resulttodf}
\alias{druid.resulttodf}
\title{Converts JSON from Druid into a data frame}
\usage{
druid.resulttodf(result, resultFn = identity, ...)
}
\arguments{
\item{result}{Druid query result}
\item{resultFn}{function t... | /man/druid.resulttodf.Rd | permissive | JesseKolb/RDruid | R | false | true | 487 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/query.R
\name{druid.resulttodf}
\alias{druid.resulttodf}
\title{Converts JSON from Druid into a data frame}
\usage{
druid.resulttodf(result, resultFn = identity, ...)
}
\arguments{
\item{result}{Druid query result}
\item{resultFn}{function t... |
#############################################################################
##
## Auxiliary functions
##
#############################################################################
## --------------------------------------------------------------------------
## Message
RunuranGUI.TESTING <- FALSE
mygmessage <-... | /R/common.R | no_license | cran/RunuranGUI | R | false | false | 5,528 | r | #############################################################################
##
## Auxiliary functions
##
#############################################################################
## --------------------------------------------------------------------------
## Message
RunuranGUI.TESTING <- FALSE
mygmessage <-... |
# Reading, naming and subsetting power consumption data
power <- read.table("household_power_consumption.txt",skip=1,sep=";")
names(power) <- c("Date","Time","Global_active_power","Global_reactive_power","Voltage","Global_intensity","Sub_metering_1","Sub_metering_2","Sub_metering_3")
subpower <- subset(power,power$D... | /plot3.R | no_license | sush1007-neti/coursera-exploratory-data-analysis-course-project-1 | R | false | false | 1,292 | r | # Reading, naming and subsetting power consumption data
power <- read.table("household_power_consumption.txt",skip=1,sep=";")
names(power) <- c("Date","Time","Global_active_power","Global_reactive_power","Voltage","Global_intensity","Sub_metering_1","Sub_metering_2","Sub_metering_3")
subpower <- subset(power,power$D... |
plot4 <- function()
{
# Keep the input file in the working directory and the source file in working directory
# execute the following to generate the plot
# source("plot4.R")
# plot4()
d <- read.table("household_power_consumption.txt",
sep=";",
header=TRUE
)
dfplot4 <... | /plot4.R | no_license | ddavidraj/ExData_Plotting1 | R | false | false | 2,393 | r | plot4 <- function()
{
# Keep the input file in the working directory and the source file in working directory
# execute the following to generate the plot
# source("plot4.R")
# plot4()
d <- read.table("household_power_consumption.txt",
sep=";",
header=TRUE
)
dfplot4 <... |
library(drake)
library(MATSS)
library(LDATS)
library(matssldats)
source(here::here("fxns", "lda_wrapper.R"))
## make sure the package functions in MATSS and matssldats are loaded in as
## dependencies
expose_imports(MATSS)
expose_imports(matssldats)
seed <- seq(from = 2, to = 4, by = 2)
ncpts <- c(0, 1)
ntopics <-... | /analysis/pipeline_sim.R | permissive | diazrenata/ldats-sandbox | R | false | false | 2,394 | r | library(drake)
library(MATSS)
library(LDATS)
library(matssldats)
source(here::here("fxns", "lda_wrapper.R"))
## make sure the package functions in MATSS and matssldats are loaded in as
## dependencies
expose_imports(MATSS)
expose_imports(matssldats)
seed <- seq(from = 2, to = 4, by = 2)
ncpts <- c(0, 1)
ntopics <-... |
# Clear out the environment
rm(list = ls())
# Data Management
#
# Class 1 Start Script
# Load relevant libraries, installing them if you haven't already done so
if (!require(tidyverse))
{
install.packages("tidyverse")
}
if (!require(ggmap))
{
install.packages("ggmap")
}
if (!require(maps))
{
i... | /class data visualization2.r | no_license | yyuan3/Data-Management-SQL-R | R | false | false | 4,162 | r | # Clear out the environment
rm(list = ls())
# Data Management
#
# Class 1 Start Script
# Load relevant libraries, installing them if you haven't already done so
if (!require(tidyverse))
{
install.packages("tidyverse")
}
if (!require(ggmap))
{
install.packages("ggmap")
}
if (!require(maps))
{
i... |
#' dashboardMAP Creates a simple map that highlights a Colorado County or place
#' Modified from cp_countymap AB 2/2018
#' Revised 3/2018 to account for standalone JSON dataset
#'
#' This function creates a map to be used in the profile process,
#' If a planning region is selected, the plannign region is c... | /R/dashboardMAP.R | no_license | ColoradoDemography/ProfileComparisons | R | false | false | 5,879 | r | #' dashboardMAP Creates a simple map that highlights a Colorado County or place
#' Modified from cp_countymap AB 2/2018
#' Revised 3/2018 to account for standalone JSON dataset
#'
#' This function creates a map to be used in the profile process,
#' If a planning region is selected, the plannign region is c... |
# Title: POSC-3410 Lab 3 ####
# Author: Jacob A. Bose
# Date: 31 January 2021
# Lesson 1 ####
library(tidyverse)
gtd_df <- gtd_raw
str(gtd_df)
gtd_df <- gtd_df %>%
select(eventid, iyear, imonth, iday, summary, country, country_txt, region, region_txt, provstate, city, crit1, crit2, crit3, doubtterr, success, su... | /Bose - DAL3.R | no_license | jabose/bose-posc-3410 | R | false | false | 8,225 | r | # Title: POSC-3410 Lab 3 ####
# Author: Jacob A. Bose
# Date: 31 January 2021
# Lesson 1 ####
library(tidyverse)
gtd_df <- gtd_raw
str(gtd_df)
gtd_df <- gtd_df %>%
select(eventid, iyear, imonth, iday, summary, country, country_txt, region, region_txt, provstate, city, crit1, crit2, crit3, doubtterr, success, su... |
library(Matrix)
library(dplyr)
library(tm)
library(slam)
library(Rstem)
library(ggplot2)
library(wordcloud)
####################################### lectura del diccionario y la matriz tdm #########################################
#setwd("~/Dropbox/ITAM_Master/Metodos_Analiticos/Final_MA/omar/Abstracts/App_Shiny_def")
... | /final/App_Shiny_def/server.R | no_license | felipegerard/metodos-analiticos | R | false | false | 9,034 | r | library(Matrix)
library(dplyr)
library(tm)
library(slam)
library(Rstem)
library(ggplot2)
library(wordcloud)
####################################### lectura del diccionario y la matriz tdm #########################################
#setwd("~/Dropbox/ITAM_Master/Metodos_Analiticos/Final_MA/omar/Abstracts/App_Shiny_def")
... |
#################################### Space Time Analyses PAPER #######################################
########################################### Figures production #######################################
#This script produces figures based on outputs from earlier analyses for the space beats time project.
#The... | /space_beats_time_sbt_paper_figures.R | no_license | dahcase/space_time_lucc | R | false | false | 49,511 | r | #################################### Space Time Analyses PAPER #######################################
########################################### Figures production #######################################
#This script produces figures based on outputs from earlier analyses for the space beats time project.
#The... |
#==============================================================================
# source ("Interval.R")
#==============================================================================
# History:
# - Created 2011.01.19 - BTL
# Parts extracted from in.interval.R.
#=====================... | /R/ErrorModel/Interval.R | no_license | langfob/rdv-framework-frozen-google-code-export-do-not-change | R | false | false | 11,925 | r | #==============================================================================
# source ("Interval.R")
#==============================================================================
# History:
# - Created 2011.01.19 - BTL
# Parts extracted from in.interval.R.
#=====================... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/calculate_distance.R
\name{calculate_distance}
\alias{calculate_distance}
\title{calculate distance between adjacent cells}
\usage{
calculate_distance(x, adj)
}
\arguments{
\item{x}{\code{spatRaster}}
\item{adj}{\code{matrix} of adjacent cel... | /man/calculate_distance.Rd | no_license | josephlewis/leastcostpath | R | false | true | 741 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/calculate_distance.R
\name{calculate_distance}
\alias{calculate_distance}
\title{calculate distance between adjacent cells}
\usage{
calculate_distance(x, adj)
}
\arguments{
\item{x}{\code{spatRaster}}
\item{adj}{\code{matrix} of adjacent cel... |
library(dygraphs)
library(TTR)
library(xts)
rsidataplot <- function(indata, sentType) {
keeps <- c("date", sentType)
df <- indata[keeps]
xt <- xts(df[,-1], order.by=df$date)
colnames(xt) <- "observation"
dygraph(xt, main="Observation", group="rsi-ts") %>%
dySeries("observation", color="gray")
}
rsiplo... | /RSILogic.R | no_license | craighagerman/TimeSeriesAnalysis | R | false | false | 1,068 | r | library(dygraphs)
library(TTR)
library(xts)
rsidataplot <- function(indata, sentType) {
keeps <- c("date", sentType)
df <- indata[keeps]
xt <- xts(df[,-1], order.by=df$date)
colnames(xt) <- "observation"
dygraph(xt, main="Observation", group="rsi-ts") %>%
dySeries("observation", color="gray")
}
rsiplo... |
# This script is a sine model for max and min monthly temp
library(TTR)
weathfile = read.csv("data/Monthly_ppt_1980_present_patched.csv")
ensofile = read.csv("data/enso.csv")
enso.vec = as.vector(t(ensoframe[,c(2,3,4,5,6,7,8,9,10,11,12,13)]))
enso.ts = ts(enso.vec,start=c(1950,1),end=c(2013,6),freq=12)
enso.w = wi... | /modeling_temp.r | no_license | DrRoad/weather_analysis | R | false | false | 1,120 | r | # This script is a sine model for max and min monthly temp
library(TTR)
weathfile = read.csv("data/Monthly_ppt_1980_present_patched.csv")
ensofile = read.csv("data/enso.csv")
enso.vec = as.vector(t(ensoframe[,c(2,3,4,5,6,7,8,9,10,11,12,13)]))
enso.ts = ts(enso.vec,start=c(1950,1),end=c(2013,6),freq=12)
enso.w = wi... |
#<<<<<<<<<<<HEAD
##Präambel
setwd("Z:/Aktuell/Eigene Dateien/Eigene Dateien_Sarah/R/Skripte")
#loading custom functions
source("R_functions.R")
# before loading packages check for updates (right side under "packages")
# abdawdwad
library(tidyverse)
library(ggpubr)
library(rstatix)
library(readxl)
... | /Auswertung BMS.R | no_license | SDegenghardt/BMS | R | false | false | 4,703 | r | #<<<<<<<<<<<HEAD
##Präambel
setwd("Z:/Aktuell/Eigene Dateien/Eigene Dateien_Sarah/R/Skripte")
#loading custom functions
source("R_functions.R")
# before loading packages check for updates (right side under "packages")
# abdawdwad
library(tidyverse)
library(ggpubr)
library(rstatix)
library(readxl)
... |
#' Moran Autocorrelation Descriptor
#'
#' Moran Autocorrelation Descriptor
#'
#' This function calculates the Moran
#' autocorrelation descriptor (Dim: \code{length(props) * nlag}).
#'
#' @param x A character vector, as the input protein sequence.
#'
#' @param props A character vector, specifying the
#' Ac... | /protr/R/desc05Moran.R | no_license | ingted/R-Examples | R | false | false | 7,039 | r | #' Moran Autocorrelation Descriptor
#'
#' Moran Autocorrelation Descriptor
#'
#' This function calculates the Moran
#' autocorrelation descriptor (Dim: \code{length(props) * nlag}).
#'
#' @param x A character vector, as the input protein sequence.
#'
#' @param props A character vector, specifying the
#' Ac... |
context("common functions")
context("1. test - factorial_f")
test_that("factorial_f", {
expect_equal(rfda:::factorial_f(0L), factorial(0))
expect_equal(rfda:::factorial_f(1L), factorial(1))
expect_equal(rfda:::factorial_f(2L), factorial(2))
expect_equal(rfda:::factorial_f(3L), factorial(3))
expect_equal(rfda... | /tests/testthat/test-common_functions.R | permissive | alexchang2017/rfda | R | false | false | 4,302 | r | context("common functions")
context("1. test - factorial_f")
test_that("factorial_f", {
expect_equal(rfda:::factorial_f(0L), factorial(0))
expect_equal(rfda:::factorial_f(1L), factorial(1))
expect_equal(rfda:::factorial_f(2L), factorial(2))
expect_equal(rfda:::factorial_f(3L), factorial(3))
expect_equal(rfda... |
#*******************************************************************************
#
# Bayesian Regression and Adaptive Sampling with Gaussian Process Trees
# Copyright (C) 2005, University of California
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser Gene... | /R/tgp.read.traces.R | no_license | cran/tgp | R | false | false | 7,431 | r | #*******************************************************************************
#
# Bayesian Regression and Adaptive Sampling with Gaussian Process Trees
# Copyright (C) 2005, University of California
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser Gene... |
testlist <- list(genotype = c(-1266581119L, -2105442008L, -2130682987L, -2122252288L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L))
result <- do.call(detectRUNS:::genoConvertCpp,testlist)
str(result) | /detectRUNS/inst/testfiles/genoConvertCpp/libFuzzer_genoConvertCpp/genoConvertCpp_valgrind_files/1609875117-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 236 | r | testlist <- list(genotype = c(-1266581119L, -2105442008L, -2130682987L, -2122252288L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L))
result <- do.call(detectRUNS:::genoConvertCpp,testlist)
str(result) |
# PREPROCESS HELPERS ----
# create_simple_scale_recipe <- function(data, prepare = TRUE, scale = TRUE) {
#
# data_copy <- data
#
# # Create recipe
# recipe_spec <- recipes::recipe(~ ., data = data)
#
# # Scale Numeric Columns
# names_numeric <- data_copy %>%
# dplyr::select_if(is.numeric)... | /R/dev-preprocess.R | permissive | StatMixedML/modeltime.gluonts | R | false | false | 2,031 | r |
# PREPROCESS HELPERS ----
# create_simple_scale_recipe <- function(data, prepare = TRUE, scale = TRUE) {
#
# data_copy <- data
#
# # Create recipe
# recipe_spec <- recipes::recipe(~ ., data = data)
#
# # Scale Numeric Columns
# names_numeric <- data_copy %>%
# dplyr::select_if(is.numeric)... |
library(shiny)
library(XLConnect)
library(dplyr)
library(ggplot2)
library(scales)
library(ggthemes)
library(extrafont)
wb <- loadWorkbook("revenue.xlsx", create=FALSE)
df <- readWorksheet(wb, sheet=1)
shinyServer(function(input, output) {
ddf <- reactive({
df[as.numeric(input$startMonth):as.numeric(input$end... | /chapter1/1.5.6/server.R | no_license | winnersky/R-Knitr-Book | R | false | false | 964 | r | library(shiny)
library(XLConnect)
library(dplyr)
library(ggplot2)
library(scales)
library(ggthemes)
library(extrafont)
wb <- loadWorkbook("revenue.xlsx", create=FALSE)
df <- readWorksheet(wb, sheet=1)
shinyServer(function(input, output) {
ddf <- reactive({
df[as.numeric(input$startMonth):as.numeric(input$end... |
\name{edgeRnews}
\title{edgeR News}
\encoding{UTF-8}
\section{Version 3.12.0}{\itemize{
\item
New argument tagwise for estimateDisp(), allowing users not to estimate tagwise dispersions.
\item
estimateTrendedDisp() has more stable performance and does not return negative trended dispersion estimates.
\item
New plot... | /Tools/EPIC/x86_64-pc-linux-gnu-library/3.2/edgeR/NEWS.Rd | no_license | grst/benchmarking-transcriptomics-deconvolution | R | false | false | 21,296 | rd | \name{edgeRnews}
\title{edgeR News}
\encoding{UTF-8}
\section{Version 3.12.0}{\itemize{
\item
New argument tagwise for estimateDisp(), allowing users not to estimate tagwise dispersions.
\item
estimateTrendedDisp() has more stable performance and does not return negative trended dispersion estimates.
\item
New plot... |
#Write a function Find_expression, which should be able to print every possible
#solution that makes the expression evaluate to a random integer from 1 to 100.
#For example, Find_expression(50) should print lines include:
#5.1
Find_expression <- function(n){
library(gtools)
Insert <- c("+","... | /PS1_5.R | no_license | YangRuiyi0612/Assignment01 | R | false | false | 2,295 | r | #Write a function Find_expression, which should be able to print every possible
#solution that makes the expression evaluate to a random integer from 1 to 100.
#For example, Find_expression(50) should print lines include:
#5.1
Find_expression <- function(n){
library(gtools)
Insert <- c("+","... |
library(shiny)
library(shinyBS)
library(shinyWidgets)
library(shinyjs)
library(shinyalert)
library(shinydashboard)
library(rhandsontable)
library(dplyr)
library(dbplyr)
library(magrittr)
library(RODBC)
library(pool)
library(V8)
library(odbc)
library(scrypt) # https://cran.r-project.org/web/packages/argo... | /global.R | no_license | mkaranja/Banana-Tracker | R | false | false | 1,425 | r |
library(shiny)
library(shinyBS)
library(shinyWidgets)
library(shinyjs)
library(shinyalert)
library(shinydashboard)
library(rhandsontable)
library(dplyr)
library(dbplyr)
library(magrittr)
library(RODBC)
library(pool)
library(V8)
library(odbc)
library(scrypt) # https://cran.r-project.org/web/packages/argo... |
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 9.53817618724929e+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), .Dim = c(5L, 7L)))
result <- do.call(CNull:::communities_individual_... | /CNull/inst/testfiles/communities_individual_based_sampling_alpha/AFL_communities_individual_based_sampling_alpha/communities_individual_based_sampling_alpha_valgrind_files/1615774180-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 362 | r | testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 9.53817618724929e+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), .Dim = c(5L, 7L)))
result <- do.call(CNull:::communities_individual_... |
# Creating a matrix [8/25]
matrix(1:10, nrow = 2)
matrix(1:10, nrow = 2, byrow = T) # byrow is F by default
## creating matrices from vectors
goog <- c(450,451,452,445,468)
msft <- c(230,231,232,236,228)
stocks <- c(goog, msft)
stock.matrix <- matrix(stocks, byrow = T, nrow = 2)
stock.matrix
## naming matrices
day... | /R Matrices/Section_8_Script.R | no_license | kswr/DS_-_ML_Bootcamp_with_R | R | false | false | 1,197 | r | # Creating a matrix [8/25]
matrix(1:10, nrow = 2)
matrix(1:10, nrow = 2, byrow = T) # byrow is F by default
## creating matrices from vectors
goog <- c(450,451,452,445,468)
msft <- c(230,231,232,236,228)
stocks <- c(goog, msft)
stock.matrix <- matrix(stocks, byrow = T, nrow = 2)
stock.matrix
## naming matrices
day... |
# plotting Denggi data
# Convert data to data.table
dt <- data.table(df)
# Group data by year
dt.by.year <- dt[, sum(df$Total_Cases), by = Year]
| /plot_denggi.R | no_license | suaidishak/denggistats | R | false | false | 148 | r | # plotting Denggi data
# Convert data to data.table
dt <- data.table(df)
# Group data by year
dt.by.year <- dt[, sum(df$Total_Cases), by = Year]
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/addCouncilStyle.R
\name{addPolygons}
\alias{addPolygons}
\title{Wrapper for addPolygons}
\usage{
addPolygons(map, smoothFactor = 0, weight = 0, ...)
}
\arguments{
\item{map}{A \code{leaflet} map}
}
\value{
A \code{leaflet} map with polygons a... | /man/addPolygons.Rd | permissive | NewYorkCityCouncil/councildown | R | false | true | 476 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/addCouncilStyle.R
\name{addPolygons}
\alias{addPolygons}
\title{Wrapper for addPolygons}
\usage{
addPolygons(map, smoothFactor = 0, weight = 0, ...)
}
\arguments{
\item{map}{A \code{leaflet} map}
}
\value{
A \code{leaflet} map with polygons a... |
airtemps <- c(212,33.5, 90, 100, 0 -40)
celsius1 <- (airtemps[1]-32)*5/9
celsius2 <- (airtemps[2]-32)*5/9
celsius3 <- (airtemps[3]-32)*5/9
fahr_to_celsius <- function(fahr) {
celsius <- (fahr-32)*5/9
return(celsius)
}
# Formula
celsius_to_fahr <- function(celsius)
fahr <- (9/5)*celsius +32
return(fahr)
cel... | /fahr_to_celsius.R | permissive | monikavsikand/arctic-training | R | false | false | 380 | r | airtemps <- c(212,33.5, 90, 100, 0 -40)
celsius1 <- (airtemps[1]-32)*5/9
celsius2 <- (airtemps[2]-32)*5/9
celsius3 <- (airtemps[3]-32)*5/9
fahr_to_celsius <- function(fahr) {
celsius <- (fahr-32)*5/9
return(celsius)
}
# Formula
celsius_to_fahr <- function(celsius)
fahr <- (9/5)*celsius +32
return(fahr)
cel... |
\name{CT}
\alias{CT}
\docType{data}
\title{
The Cow Temperature Data }
\description{
The data set is adapted from Velleman and Hoaglin (1984). The body temperature of a cow is measured at 6:30am on 75 consecutive days. We use this data set with the intent of explaining the concept of "data smooting". The data appears o... | /man/CT.Rd | no_license | cran/RSADBE | R | false | false | 937 | rd | \name{CT}
\alias{CT}
\docType{data}
\title{
The Cow Temperature Data }
\description{
The data set is adapted from Velleman and Hoaglin (1984). The body temperature of a cow is measured at 6:30am on 75 consecutive days. We use this data set with the intent of explaining the concept of "data smooting". The data appears o... |
save_csv <- function(x) {
path <- tempfile(fileext = ".csv")
readr::write_csv(x, path)
path
}
expect_snapshot_data <- function(x, name) {
path <- save_csv(x)
testthat::expect_snapshot_file(path, paste0(name, ".csv"))
}
| /R/test-helpers.R | permissive | cran/mcmcr | R | false | false | 230 | r | save_csv <- function(x) {
path <- tempfile(fileext = ".csv")
readr::write_csv(x, path)
path
}
expect_snapshot_data <- function(x, name) {
path <- save_csv(x)
testthat::expect_snapshot_file(path, paste0(name, ".csv"))
}
|
\name{mvPot-package}
\alias{mvPot-package}
\alias{mvPot}
\docType{package}
\title{
Multivariate Peaks-over-Threshold Modelling for Extreme Events Analysis
}
\description{
The mvPot package provides functions to perform high-dimensional peaks-over-threshold inference
of spatial processes such as the Brown--Resnick. Para... | /man/mvPot-package.Rd | no_license | cran/mvPot | R | false | false | 5,092 | rd | \name{mvPot-package}
\alias{mvPot-package}
\alias{mvPot}
\docType{package}
\title{
Multivariate Peaks-over-Threshold Modelling for Extreme Events Analysis
}
\description{
The mvPot package provides functions to perform high-dimensional peaks-over-threshold inference
of spatial processes such as the Brown--Resnick. Para... |
library(miceadds)
### Name: tw.imputation
### Title: Two-Way Imputation
### Aliases: tw.imputation tw.mcmc.imputation
### Keywords: Two-way imputation
### ** Examples
#############################################################################
# EXAMPLE 1: Two-way imputation data.internet
#########################... | /data/genthat_extracted_code/miceadds/examples/tw.imputation.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 1,180 | r | library(miceadds)
### Name: tw.imputation
### Title: Two-Way Imputation
### Aliases: tw.imputation tw.mcmc.imputation
### Keywords: Two-way imputation
### ** Examples
#############################################################################
# EXAMPLE 1: Two-way imputation data.internet
#########################... |
dyn.load("~/Documentos/Analisis_grupo/multivariate_DLM/multiva_dlm.so")
MultiDlm <- function(Vm0, Vc0, Npar, Vbeta, Y, coord, Nneigh, Stop, X, n01, Cbeta, VecProb, conditional){
if(Stop<=dim(X)[1] & Stop>0){
tep = .C("multiDlm", as.double(Vm0), as.double(Vc0), as.integer(Npar), as.double(Vbeta), as.double(t(Y)),... | /Dlm_multi_univ.r | no_license | JohnatanLAB/Rfmri | R | false | false | 1,041 | r |
dyn.load("~/Documentos/Analisis_grupo/multivariate_DLM/multiva_dlm.so")
MultiDlm <- function(Vm0, Vc0, Npar, Vbeta, Y, coord, Nneigh, Stop, X, n01, Cbeta, VecProb, conditional){
if(Stop<=dim(X)[1] & Stop>0){
tep = .C("multiDlm", as.double(Vm0), as.double(Vc0), as.integer(Npar), as.double(Vbeta), as.double(t(Y)),... |
library(sentometrics)
### Name: plot.sentomeasures
### Title: Plot sentiment measures
### Aliases: plot.sentomeasures
### ** Examples
data("usnews", package = "sentometrics")
data("list_lexicons", package = "sentometrics")
data("list_valence_shifters", package = "sentometrics")
# construct a sentomeasures object t... | /data/genthat_extracted_code/sentometrics/examples/plot.sentomeasures.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 909 | r | library(sentometrics)
### Name: plot.sentomeasures
### Title: Plot sentiment measures
### Aliases: plot.sentomeasures
### ** Examples
data("usnews", package = "sentometrics")
data("list_lexicons", package = "sentometrics")
data("list_valence_shifters", package = "sentometrics")
# construct a sentomeasures object t... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/output.R
\name{percent}
\alias{percent}
\title{Formats a double as percent}
\usage{
percent(x, digits = 0)
}
\arguments{
\item{x}{double value to be formated.}
\item{digits}{integer number of digits after '.'.}
}
\value{
formatted string
}
\... | /man/percent.Rd | no_license | tobiasreischmann/matchingmarketsevaluation | R | false | true | 390 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/output.R
\name{percent}
\alias{percent}
\title{Formats a double as percent}
\usage{
percent(x, digits = 0)
}
\arguments{
\item{x}{double value to be formated.}
\item{digits}{integer number of digits after '.'.}
}
\value{
formatted string
}
\... |
testlist <- list(doy = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), latitude = numeric(0), temp = c(8.5728629954997e-312, 1.56898424065867e+82, 8.96970809549085e-158, -1.3258495253834e-113, 2.79620616433656e-119, -6.8... | /meteor/inst/testfiles/ET0_ThornthwaiteWilmott/AFL_ET0_ThornthwaiteWilmott/ET0_ThornthwaiteWilmott_valgrind_files/1615831464-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 757 | r | testlist <- list(doy = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), latitude = numeric(0), temp = c(8.5728629954997e-312, 1.56898424065867e+82, 8.96970809549085e-158, -1.3258495253834e-113, 2.79620616433656e-119, -6.8... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/stream_operations.R
\name{stream_stop}
\alias{stream_stop}
\title{Stops a Spark Stream}
\usage{
stream_stop(stream)
}
\arguments{
\item{stream}{The spark stream object to be stopped.}
}
\description{
Stops processing data from a Spark stream.... | /man/stream_stop.Rd | permissive | sparklyr/sparklyr | R | false | true | 323 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/stream_operations.R
\name{stream_stop}
\alias{stream_stop}
\title{Stops a Spark Stream}
\usage{
stream_stop(stream)
}
\arguments{
\item{stream}{The spark stream object to be stopped.}
}
\description{
Stops processing data from a Spark stream.... |
args=commandArgs(T)
cutOff_enhanced<-as.numeric(args[1])
cutOff_coaccess<-as.numeric(args[2])
library(Matrix)
library(parallel)
buenrostro2018Data<-readRDS(paste0("../output/buenrostro2018-snap-full_enh",cutOff_enhanced,".rds"))
labels<-read.table("../input/metadata_buenrostro2018_sorted.tsv",header = TRUE,sep = "\t",... | /intra-dataset/Buenrostro2018/bin/3_rangeIntegration.r | permissive | mrcuizhe/svmATAC | R | false | false | 2,524 | r | args=commandArgs(T)
cutOff_enhanced<-as.numeric(args[1])
cutOff_coaccess<-as.numeric(args[2])
library(Matrix)
library(parallel)
buenrostro2018Data<-readRDS(paste0("../output/buenrostro2018-snap-full_enh",cutOff_enhanced,".rds"))
labels<-read.table("../input/metadata_buenrostro2018_sorted.tsv",header = TRUE,sep = "\t",... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/combine_epochs_periods.R
\name{combine_epochs_periods}
\alias{combine_epochs_periods}
\title{Combine epochs with sleep/nonwear periods}
\usage{
combine_epochs_periods(epochs, periods, start_var, end_var)
}
\arguments{
\item{epochs}{A \code{ti... | /man/combine_epochs_periods.Rd | no_license | dipetkov/actigraph.sleepr | R | false | true | 1,725 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/combine_epochs_periods.R
\name{combine_epochs_periods}
\alias{combine_epochs_periods}
\title{Combine epochs with sleep/nonwear periods}
\usage{
combine_epochs_periods(epochs, periods, start_var, end_var)
}
\arguments{
\item{epochs}{A \code{ti... |
rm(list=ls())
gc()
# source("R/sim_warping_mixture.R")
library(mixedWarpedCurves2)
library(gtools)
library(plyr)
library(dplyr)
library(ggplot2)
library(tibble)
library(tidyr)
kappa1 <- c(0.3,1,1,0.3)
kappa1 <- kappa1 / sum(kappa1)
kappa2 <- c(1.2,1,1,1.2)
kappa2 <- kappa2 / sum(kappa2)
kappa3 <- c(0.1,1,2,1)
kappa3... | /test/test_mixed_dirichlet.R | no_license | eric-f/mixedWarpedCurves2 | R | false | false | 1,786 | r | rm(list=ls())
gc()
# source("R/sim_warping_mixture.R")
library(mixedWarpedCurves2)
library(gtools)
library(plyr)
library(dplyr)
library(ggplot2)
library(tibble)
library(tidyr)
kappa1 <- c(0.3,1,1,0.3)
kappa1 <- kappa1 / sum(kappa1)
kappa2 <- c(1.2,1,1,1.2)
kappa2 <- kappa2 / sum(kappa2)
kappa3 <- c(0.1,1,2,1)
kappa3... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils_groupcomparison_checks.R
\name{.checkContrastMatrix}
\alias{.checkContrastMatrix}
\title{Check if contrast matrix includes all conditions}
\usage{
.checkContrastMatrix(contrast_matrix, input)
}
\arguments{
\item{contrast_matrix}{contras... | /man/dot-checkContrastMatrix.Rd | no_license | jspaezp/MSstats | R | false | true | 461 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils_groupcomparison_checks.R
\name{.checkContrastMatrix}
\alias{.checkContrastMatrix}
\title{Check if contrast matrix includes all conditions}
\usage{
.checkContrastMatrix(contrast_matrix, input)
}
\arguments{
\item{contrast_matrix}{contras... |
\name{Fest}
\alias{Fest}
\alias{Fhazard}
\title{Estimate the Empty Space Function or its Hazard Rate}
\description{
Estimates the empty space function \eqn{F(r)}
or its hazard rate \eqn{h(r)} from a point pattern in a
window of arbitrary shape.
}
\usage{
Fest(X, \dots, eps, r=NULL, breaks=NULL,
correction=c... | /man/Fest.Rd | no_license | spatstat/spatstat.core | R | false | false | 11,812 | rd | \name{Fest}
\alias{Fest}
\alias{Fhazard}
\title{Estimate the Empty Space Function or its Hazard Rate}
\description{
Estimates the empty space function \eqn{F(r)}
or its hazard rate \eqn{h(r)} from a point pattern in a
window of arbitrary shape.
}
\usage{
Fest(X, \dots, eps, r=NULL, breaks=NULL,
correction=c... |
#' @title Comparable pairs in a partial order
#' @description Calculates the fraction of comparable pairs in a partial order.
#' @param P A partial order as matrix object, e.g. calculated with [neighborhood_inclusion]
#' or [positional_dominance].
#' @return Fraction of comparable pairs in `P`.
#' @author David Sch... | /netrankr/R/comparable.pairs.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 1,529 | r | #' @title Comparable pairs in a partial order
#' @description Calculates the fraction of comparable pairs in a partial order.
#' @param P A partial order as matrix object, e.g. calculated with [neighborhood_inclusion]
#' or [positional_dominance].
#' @return Fraction of comparable pairs in `P`.
#' @author David Sch... |
coef.mitml.testEstimates <- function(object, ...){
# extract pooled parameter estimates
est <- object$estimates
out <- est[, 1, drop = TRUE]
if(is.null(names(out))) names(out) <- rownames(est)
return(out)
}
| /R/coef.mitml.testEstimates.R | no_license | simongrund1/mitml | R | false | false | 221 | r | coef.mitml.testEstimates <- function(object, ...){
# extract pooled parameter estimates
est <- object$estimates
out <- est[, 1, drop = TRUE]
if(is.null(names(out))) names(out) <- rownames(est)
return(out)
}
|
#' Convert to meters per second from miles per hour
#'
#' @param data numeric value in miles per hour
#' @export
convert2ms <- function(data){
data <- data*0.44704
return(data)
} | /EThourly/R/convert2ms.R | no_license | MichaelRGrant/ETHourly | R | false | false | 188 | r | #' Convert to meters per second from miles per hour
#'
#' @param data numeric value in miles per hour
#' @export
convert2ms <- function(data){
data <- data*0.44704
return(data)
} |
/Coco/regression discrete/laboratorio de escog discreta en R basado en Train.R | no_license | CocoUrbina/Python | R | false | false | 6,244 | r | ||
setup({
sc <- testthat_spark_connection()
text_tbl <- testthat_tbl("test_text")
train_data_file <- here::here("tests", "testthat", "data", "crf-eng.train.small")
conll_data <- nlp_conll_read_dataset(sc, train_data_file)
embeddings <- nlp_word_embeddings_pretrained(sc, output_col = "embeddings")
train_dat... | /tests/testthat/testthat-ner-crf.R | permissive | mstei4176/sparknlp | R | false | false | 2,927 | r | setup({
sc <- testthat_spark_connection()
text_tbl <- testthat_tbl("test_text")
train_data_file <- here::here("tests", "testthat", "data", "crf-eng.train.small")
conll_data <- nlp_conll_read_dataset(sc, train_data_file)
embeddings <- nlp_word_embeddings_pretrained(sc, output_col = "embeddings")
train_dat... |
# Sample script to scrape text from webpage
library(rvest) # Load `rvest` package
library(dplyr) # Load `dplyr` package
library(stringr) # Load `stringr` package
setwd("~/Documents/DA/Projects/Project1/actresses/")
# Set Working directory
file_url <- "http://www.imdb.com/name/nm0706787/"
# Assign the wiki url ... | /webscrape_text.R | no_license | puneeth019/playground | R | false | false | 895 | r | # Sample script to scrape text from webpage
library(rvest) # Load `rvest` package
library(dplyr) # Load `dplyr` package
library(stringr) # Load `stringr` package
setwd("~/Documents/DA/Projects/Project1/actresses/")
# Set Working directory
file_url <- "http://www.imdb.com/name/nm0706787/"
# Assign the wiki url ... |
library(plotly)
plot_ly(data=d,x=~nbedroom,y=~nbathroom,z= ~nrooms)
plot_ly(x=jitter(d$nbedroom,2),y=jitter(d$nbathroom,2),z=jitter( d$nrooms,2)) | /eda/eda_rooms.R | no_license | JordanJamesSands/melbourne_housing | R | false | false | 145 | r | library(plotly)
plot_ly(data=d,x=~nbedroom,y=~nbathroom,z= ~nrooms)
plot_ly(x=jitter(d$nbedroom,2),y=jitter(d$nbathroom,2),z=jitter( d$nrooms,2)) |
# AFGR May 16 2017
# This script will be used to produce the importance level for each of the ROIs
# for the hi lo project. This will be done on the non modality regressed, age, and quality regressed data.
# Load library(s)
# First thing we need to do is load our library(s)
source('/home/adrose/hiLo/scripts/04_Cognit... | /scripts/04_CognitiveModels/scripts/runRandomForest.R | no_license | PennBBL/hiLo | R | false | false | 33,549 | r | # AFGR May 16 2017
# This script will be used to produce the importance level for each of the ROIs
# for the hi lo project. This will be done on the non modality regressed, age, and quality regressed data.
# Load library(s)
# First thing we need to do is load our library(s)
source('/home/adrose/hiLo/scripts/04_Cognit... |
VAR1.coef <- function(VAR, m, p) {
if (p == 1) {
Pi <- Bcoef(VAR)[, (m * p + 1)]
Phi <- Bcoef(VAR)[, 1:(m * p)]
} else if (p > 1) {
Pi <- c(Bcoef(VAR)[, (m * p + 1)], rep(0, m * (p - 1)))
Phi <- rbind(Bcoef(VAR)[, 1:(m * p)], cbind(diag(m * (p - 1)), matrix(0, nrow = m * (p - 1), ncol = m)))
... | /PS3_SVAR_Analysis_LR.R | no_license | juan-castro-1/MacroM3 | R | false | false | 3,211 | r | VAR1.coef <- function(VAR, m, p) {
if (p == 1) {
Pi <- Bcoef(VAR)[, (m * p + 1)]
Phi <- Bcoef(VAR)[, 1:(m * p)]
} else if (p > 1) {
Pi <- c(Bcoef(VAR)[, (m * p + 1)], rep(0, m * (p - 1)))
Phi <- rbind(Bcoef(VAR)[, 1:(m * p)], cbind(diag(m * (p - 1)), matrix(0, nrow = m * (p - 1), ncol = m)))
... |
testlist <- list(a = 184549375L, b = -1L, x = c(-16056321L, NA, 901775359L, -212L, NA, 58095222L, 458299416L, 941103128L, 404232216L, 404232216L, 404232216L, 404232216L, 404232216L, 404232216L, 404232447L, -1L, -1L, -572662307L, -570425600L, 12554L, -13254657L, -1L, 738197504L, 16777215L, 689656064L, 0L, -1L, -1356... | /grattan/inst/testfiles/anyOutside/libFuzzer_anyOutside/anyOutside_valgrind_files/1610055149-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 452 | r | testlist <- list(a = 184549375L, b = -1L, x = c(-16056321L, NA, 901775359L, -212L, NA, 58095222L, 458299416L, 941103128L, 404232216L, 404232216L, 404232216L, 404232216L, 404232216L, 404232216L, 404232447L, -1L, -1L, -572662307L, -570425600L, 12554L, -13254657L, -1L, 738197504L, 16777215L, 689656064L, 0L, -1L, -1356... |
library(shiny)
require(ggplot2)
ui <- fluidPage(
plotOutput("plot", click = "plot_click"),
verbatimTextOutput("info")
)
server <- function(input, output, session) {
output$plot <- renderPlot({
plot(mtcars$wt, mtcars$mpg)
}, res = 96)
output$info <- renderPrint({
req(input$plot_click)
x <- rou... | /chap_7/01/app.R | permissive | kpivert/my_ms_book | R | false | false | 452 | r | library(shiny)
require(ggplot2)
ui <- fluidPage(
plotOutput("plot", click = "plot_click"),
verbatimTextOutput("info")
)
server <- function(input, output, session) {
output$plot <- renderPlot({
plot(mtcars$wt, mtcars$mpg)
}, res = 96)
output$info <- renderPrint({
req(input$plot_click)
x <- rou... |
# Copyright (c) 2019, Adrian Dusa
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, in whole or in part, are permitted provided that the
# following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, thi... | /R/onAttach.R | no_license | josemanuelmejia/QCA | R | false | false | 2,283 | r | # Copyright (c) 2019, Adrian Dusa
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, in whole or in part, are permitted provided that the
# following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, thi... |
library(rsconnect)
#rsconnect::setAccountInfo(name='tohweizhong', token='DF9614818065B5DAAF22AE7D78C38089', secret='uSZ0rCRf6/gKj2ltBXrGENb4kn0y8Cw2bZaA87zk')
| /rsconnect.R | no_license | tohweizhong/shiny-bookmarks | R | false | false | 160 | r |
library(rsconnect)
#rsconnect::setAccountInfo(name='tohweizhong', token='DF9614818065B5DAAF22AE7D78C38089', secret='uSZ0rCRf6/gKj2ltBXrGENb4kn0y8Cw2bZaA87zk')
|
# Phase space / Liapounov phase diagram for Prey Predator model
#setwd(paste0(Sys.getenv('CS_HOME'),'/MediationEcotox/Models/Game'))
library(dplyr)
library(ggplot2)
source('functions.R')
#datadir = '/Volumes/Data/ComplexSystems/MediationEcotox/Results/Game/20160427_LHSGRID/split/'
datadir='/mnt/volume1/juste/Compl... | /Models/Game/phase.R | no_license | JusteRaimbault/MediationEcotox | R | false | false | 4,980 | r |
# Phase space / Liapounov phase diagram for Prey Predator model
#setwd(paste0(Sys.getenv('CS_HOME'),'/MediationEcotox/Models/Game'))
library(dplyr)
library(ggplot2)
source('functions.R')
#datadir = '/Volumes/Data/ComplexSystems/MediationEcotox/Results/Game/20160427_LHSGRID/split/'
datadir='/mnt/volume1/juste/Compl... |
## 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
setmatrix<-function(solve) m<<- solve
getmatri... | /cachematrix.R | no_license | rorystc/ProgrammingAssignment2 | R | false | false | 741 | r | ## 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
setmatrix<-function(solve) m<<- solve
getmatri... |
#!/usr/bin/R
rm(list=ls())
#------------------------------------------------------------------
library(grid)
library(gridExtra)
library(lattice)
library(RColorBrewer)
library(reshape)
library(ggplot2)
#------------------------------------------------------------------
args <- commandArgs(trailingOnly = TRUE)
if (Sys.in... | /script/ENm008.chain.GetWeightConnection.R | no_license | yunxu/chromatin | R | false | false | 23,326 | r | #!/usr/bin/R
rm(list=ls())
#------------------------------------------------------------------
library(grid)
library(gridExtra)
library(lattice)
library(RColorBrewer)
library(reshape)
library(ggplot2)
#------------------------------------------------------------------
args <- commandArgs(trailingOnly = TRUE)
if (Sys.in... |
function(input, output, session) {
# Define a reactive expression for the document term matrix
terms <- reactive({
# Change when the "update" button is pressed...
input$update
# ...but not for anything else
isolate({
withProgress({
setProgress(message = "Processing corpus...")
... | /analysis/Shiny/wordcloud/server.R | no_license | alexliyihao/EDAV_final_project | R | false | false | 679 | r | function(input, output, session) {
# Define a reactive expression for the document term matrix
terms <- reactive({
# Change when the "update" button is pressed...
input$update
# ...but not for anything else
isolate({
withProgress({
setProgress(message = "Processing corpus...")
... |
# a matrix is a 2D-vector
# it fills by column by default, use byRow = TRUE to fill by row
# it can only has one data type
apple <- c(109.49, 109.90, 109.11, 109.95, 111.03, 112.12, 113.95, 113.30, 115.19, 115.19, 115.82, 115.97, 116.64, 116.95, 117.06, 116.29, 116.52, 117.26, 116.76, 116.73, 115.82)
ibm <- c(159.8... | /finance_basics_with_r/intro_r_finance/2_vector_matrix/matrix.R | no_license | printfCRLF/rr | R | false | false | 1,553 | r | # a matrix is a 2D-vector
# it fills by column by default, use byRow = TRUE to fill by row
# it can only has one data type
apple <- c(109.49, 109.90, 109.11, 109.95, 111.03, 112.12, 113.95, 113.30, 115.19, 115.19, 115.82, 115.97, 116.64, 116.95, 117.06, 116.29, 116.52, 117.26, 116.76, 116.73, 115.82)
ibm <- c(159.8... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.