This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
readBin <- function(con, what, n = 1L, size = NA_integer_, signed = TRUE, | |
endian = .Platform$endian) | |
{ | |
if(is.character(con)) { | |
con <- file(con, "rb") | |
on.exit(close(con)) | |
} | |
swap <- endian != .Platform$endian | |
if(!is.character(what) || is.na(what) || | |
length(what) != 1L || ## hence length(what) == 1: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` | |
Apr 09, 2019 11:07:35 AM com.google.apphosting.utils.jetty.JettyLogger warn | |
WARNING: /resources/query/columns | |
java.lang.RuntimeException: com.google.common.util.concurrent.UncheckedExecutionException: java.lang.NumberFormatException: For input string: "ju9exeyy1" | |
at org.activityinfo.server.database.hibernate.HibernateDatabaseTreeLoader.loadAll(HibernateDatabaseTreeLoader.java:99) | |
at org.activityinfo.server.database.hibernate.HibernateDatabaseTreeProvider.getDatabaseTrees(HibernateDatabaseTreeProvider.java:51) | |
at org.activityinfo.server.endpoint.rest.DesignedDatabaseTreeProvider.queryDatabaseTree(DesignedDatabaseTreeProvider.java:91) | |
at org.activityinfo.server.endpoint.rest.VisibleDatabaseTreeProviderImpl.fetchUserDbs(VisibleDatabaseTreeProviderImpl.java:83) | |
at org.activityinfo.server.endpoint.rest.VisibleDatabaseTreeProviderImpl.getDatabaseMetadata(VisibleDatabaseTreeProviderImpl.java:71) | |
at org.activityinfo.store.query.server.FormSupervisorAdapter.getFormPe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Source code recreated from a .class file by IntelliJ IDEA | |
// (powered by Fernflower decompiler) | |
// | |
package org.renjin.grDevices; | |
import java.lang.invoke.MethodHandle; | |
import org.renjin.gcc.runtime.BytePtr; | |
import org.renjin.gcc.runtime.FunctionPtr1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Needs to be done once | |
install.packages("devtools") | |
library(devtools) | |
install_github( "bedatadriven/activityinfo-R", ref = "release") | |
library(activityinfo) | |
activityInfoLogin(userEmail = "api+training@bedatadriven.com", | |
password = "testing123") |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.activityinfo.ui.client.search; | |
import com.google.common.base.Strings; | |
import com.google.gwt.dom.client.InputElement; | |
import com.google.gwt.event.dom.client.KeyCodes; | |
import org.activityinfo.i18n.shared.I18N; | |
import org.activityinfo.model.database.Resource; | |
import org.activityinfo.model.database.UserDatabaseMeta; | |
import org.activityinfo.observable.Observable; | |
import org.activityinfo.observable.StatefulValue; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function(beta, X, y, offset, theta, lambda, S, fact = c(1,1)){ | |
n <- dim(X)[1] | |
eta <- offset + X%*%beta | |
mu <- exp(eta) | |
aux1 <- theta + y | |
aux2 <- theta + mu | |
## pull the log inside to use gamma and factorial in log space due to | |
## possibly very high numbers | |
l <- sum(lgamma(aux1) - (lfactorial(y) + lgamma(theta))) + t(y) %*% eta + n*theta*log(theta) - t(aux1) %*% log(aux2) | |
pen <- t(beta) %*% S %*% beta |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: "Text Mining with R" | |
date: "13 February 2018" | |
output: | |
html_document: | |
theme: flatly | |
highlight: haddock | |
code_folding: show | |
toc: true | |
toc_float: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tm) | |
library(SnowballC) | |
library(stringr) | |
library(ggplot2) | |
## RQ: What are the most commonly used words & the term frequencies in the 'Protestants-Christelijk' schools and 'Openbaar' schools? | |
# Read in our school metadata | |
schools <- read.csv("schools.csv", | |
sep = ";", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Extends: | |
Class "vector", directly | |
Class "index", directly | |
Class "replValue", directly | |
Class "numLike", directly | |
Class "number", directly | |
Class "atomicVector", directly | |
Class "numericVector", directly | |
Class "replValueSp", by class "replValue", distance 2 |