Displaying 6 results from an estimated 6 matches for "eschgf".
Did you mean:
escha
2005 May 27
4
Chars as numbers
Is there a proper function for transforming
a character to a number instead of using
i=match('c',letters)
# 3
Thanks.
Josef Eschgf??ller
--
Josef Eschgf??ller
Dipartimento Matematico
Universita' di Ferrara
http://felix.unife.it
2005 Apr 25
3
Data frames
...ly column names but no values?
I tried this indirect way:
# Void df with titles from ...
Newvoid = function (...)
{a=c(...); m=length(a)
titles=paste(a,collapse=' ')
conn=textConnection(titles)
tab=read.table(conn,header=T)
close(conn); tab}
Thanks
Josef Eschgf??ller
--
Josef Eschgf??ller
Dipartimento Matematico
Universita' di Ferrara
http://felix.unife.it
2005 May 23
1
Backslash
...---------------------------------------
u=grep('\\{[\\-u]x',a,perl=T)
# equivalent to
u=grep('\{[\-u]x',a,perl=T)
# but
u=grep('\w',a,perl=T)
# is not correct and requires
u=grep('\\w',a,perl=T)
---------------------------------------
Josef Eschgf??ller
--
Josef Eschgf??ller
Dipartimento Matematico
Universita' di Ferrara
http://felix.unife.it
2005 Apr 06
2
Precision
How precise is R numerically? For example I
wrote the following function for calculating
the volume of the ball inscribed in the
unit cube in m dimensions. In order to see what
happens in 40 dimensions, I created an output
of 24 digits. But how many are precise?
Thanks
Josef Eschgf?ller
Ferrara
---------------------------------------
Vol = function (m)
{if (m<=1) 1
else Vol(m-2)*pi/(m+m)}
for (m in 1:40)
{x=sprintf('%2d %.24f',m,Vol(m))
print(x)}
---------------------------------------
1 1.000000000000000000000000
2 0.785398163397448278999491
3 0...
2005 May 19
3
Drawing a circle
Hi.
I need to draw a circle whit center (a,b) and radio r. So I use the
R code below
a<-1.975 # valore x del centro
b<-1.215 # valores y del centro
r<-1.46 # radio
x1<-seq(a-r,a+r,by=0.01); #los valores de x
yp<-sqrt(r^2-(x1-a)^2)+b; # los valores y a partir de la ra??z positiva
yn<-(-1)*sqrt(r^2-(x1-a)^2)+b; # los valores y a partir de la ra??z negativa
x<-c(x1,x1);
2005 Apr 06
6
Introduce a new function in a package?
R-help,
Sometimes I define functions I wish to have in any R session.
The obvious thing to do is copy-paste the code
The thing is that sometimes I don't know where I have the function
code.
My question is if somehow I could define a function and "introduce" it
(let's say 'base' package ) so that
could be used anytime I run a different R project.
Thank you in advance