Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
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
# Pěkný to neni, ale zdá se že funguje | |
# edit: případně vlastně můžem embednout iconv do argumentu gsubu | |
paste0(unlist(lapply(strsplit(Z, "'")[[1]], function(a) {gsub("'","",iconv(a, to='ASCII//TRANSLIT'))})), collapse="'") | |
# > Z="příliš žluťoučký 'kůň' s 'apostrofama'" | |
# > paste0(unlist(lapply(strsplit(Z, "'")[[1]], function(a) {gsub("'","",iconv(a, to='ASCII//TRANSLIT'))})), collapse="'") | |
# [1] "prilis zlutoucky 'kun' s 'apostrofama" |
Loading
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
library(mclust) | |
mixplot <- function(ts,plot=TRUE) { | |
rng=seq(from=min(ts),to=max(ts),by=(max(ts)-min(ts))/1000) | |
mcp = Mclust(ts)$par | |
mat=cbind(mcp$mean,mcp$var$sigmasq,mcp$pro) | |
dens=apply(mat[,-3],1,function(x) dnorm(rng,mean=x[1],sd=sqrt(x[2]))) | |
f=dens%*%mat[,3] | |
if (plot) { | |
hist(ts,breaks=100,border="gray",probability=TRUE,main="") |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer