In many instances one may need to append a character or a value in a given sequence, usually represented as a vector or array. It is pretty easy to achieve this naively. However, the point is not to consume any more memory. This is one of the simple solutions I can propose in GNU R.
# This function appends a word into vector a in every f element
appendfreq<-function(a,f,word) { i <- as.integer(length(a)/f-1); q<-f; for(j in 1:i) { a<-append(a,word,after=q); q<-q+f+1; } ;return(a); }
Showing posts with label text processing. Show all posts
Showing posts with label text processing. Show all posts
Wednesday, 10 March 2010
Thursday, 14 February 2008
Latex Poster: A working full example
You must use Latex to generate your posters, because it looks beautiful. Here is fully working and self contained example [latex_poster].
Subscribe to:
Posts (Atom)
