R documentation with graphics
Thursday, December 21, 2006
specifying printer lpr
lpr -#2 -sP dj thesis.txt
This command will create a symbolic link to the file thesis.txt in the spool
directory for the printer named dj, where it would be processed by lpd.
It would then print a second copy of thesis.txt.
Monday, December 18, 2006
bold greek letters latex
% use bm package
\usepackage{bm}
% inside math mode
\[ ... {\bm beta} ... \]
better than \boldmath because it works within math mode directly,
no need to use in text mode.
Friday, December 15, 2006
logit - expit
%% maps (0,b) into (-inf,inf)
%% inverse of expit
%% usage: logit(x,b) or logit(x)
%% b defaults to 1
function y = logit(x,b)
if nargin<2
b = 1;
end
y = log( x ./ (b - x) );
%% maps (-inf, inf) into (0,b)
%% inverse of logit
%% usage: expit(x,b) or expit(x)
%% b defaults to 1
function y = expit(x,b)
if nargin<2
b = 1;
end
y = b./(1+exp(-x)) ;
Monday, December 11, 2006
Tuesday, December 5, 2006
Friday, November 17, 2006
R equivalent of repmat (matlab)
repmat = function(X,m,n){ ##R equivalent of repmat (matlab) mx = dim(X)[1] nx = dim(X)[2] matrix(t(matrix(X,mx,nx*n)),mx*m,nx*n,byrow=T)
Subscribe to:
Posts (Atom)