Hi,
I have a tiny question concerning .Options$max.print
I have to set up this value to a greater value than 1 because I
want to concatenate my output of a function to one single string (for
connivence).
I did this via .Options$max.print - 64000 or options(max.print=64000)
Then I
Dear list members,
sorry for my incompleteness!
My problem is the following:
(R 2.3.1 on Mac OS X 10.4.7 RAM 1GByte using Mac GUI)
I have a function like this:
foo1 - function()
{
out - NULL
for(i in 1:10010) out - paste(out, i, . line\n, sep=)
return(out)
}
a -
Dear all,
My question is concerned to the kind how a function is called.
Example A:
foo(1)
Example B:
a - foo(1)
Is there any way for the function foo() to recognise whether the
returned value of foo() is stored in a variable or not, i.e. to
distinguish between Example A and B?
Dear all,
I wrote some functions using the special argument '...'. OK, it works.
But if I call such a function which also called such a function, then
I get an error message about unused arguments.
Here's an example:
fun1 - function(x,a=1)
{
print(paste(x=,x))
In order to get a table structure out of a dist object use 'as.matrix
()' like 'as.matrix(dist(myMatrix))' and write.table().
Hans
On 16 Aug 2006, at 14:46, Ffenics wrote:
Hi there
Could anyone please tell me how to export a distance matrix to
a .csv file please? when I tried
Quoting Liaw, Andy [EMAIL PROTECTED]:
I'm not sure if this is what you want, but simply add ... to the list of
arguments for fun1 and fun2 would eliminate the error.
Andy
That's it!!
Thank you very much!!
Best,
Hans
Dear all,
I wrote some functions using the special argument '...'.
If you are using 'only' English then
str - dog
strsplit(str,NULL)[[1]]
works perfectly and it is fast.
But if you also dealing with Unicode character have a look at
http://wiki.r-project.org/rwiki/doku.php?id=tips:data-
strings:decomposestring
Cheers,
Hans
you can also use substring(),
the posting guide http://www.R-project.org/posting-
guide.html
and provide commented, minimal, self-contained, reproducible code.
**
Hans-Joerg Bibiko
Max Planck Institute for Evolutionary Anthropology
Department of Linguistics
Deutscher
On 1 Sep 2006, at 08:22, Prof Brian Ripley wrote:
On Wed, 30 Aug 2006, Hans-Joerg Bibiko wrote:
If you are using 'only' English then
str - dog
strsplit(str,NULL)[[1]]
works perfectly and it is fast.
It does also work 'perfectly' and fast in 'Unicode' in all major
European
and CJK
Dear all,
maybe there is someone who has an hint for me.
I have to calculate a distance matrix by using my own function to get
the distance between two rows of my matrix.
The normal way to do this is to use two 'for loops' like
for(i in 1:nrow)
for(j in i:nrow)
Dear Sarah,
many thanks for the hint.
Unfortunately my distance metric is more complex. For me it is not
only important to know whether there is a change between rows but
also to know where (which column) the change occurs and furthermore
to know if there is a change in e.g. column 5 to
= 125E-12 ?
Hans
**
Hans-Joerg Bibiko
Max Planck Institute for Evolutionary Anthropology
Department of Linguistics
Deutscher Platz 6 phone: +49 (0) 341 3550 341
D-04103 Leipzig fax: +49 (0) 341 3550 333
Germany e
Hi,
for presentation purposes I would like to clear to whole console
window (like in a UNIX terminal: 'clear').
Is there such a function?
If not, I could image that is not too hard to write such a function.
Cheers,
Hans
__
Sorry, I forgot to mention that I'm using R 2.3.1 on Mac OSX 10.4.7
via R.app GUI.
On 13 Jul 2006, at 12:53, Joris De Wolf wrote:
ctrl+l
Thanks, but unfortunately this doesn't work on my Mac.
Hans
Hi,
for presentation purposes I would like to clear to whole console
window (like in
Hi,
many thanks for the hints!
Hi,
for presentation purposes I would like to clear to whole console
window (like in a UNIX terminal: 'clear').
Is there such a function?
If not, I could image that is not too hard to write such a function.
At the risk of this being a stupid answer: An
Hi,
an other way without any libraries and written as a one-line-command
would be something like this:
xify - function(x)
{
gsub([0-9],X,
sprintf(
paste(
%,
ifelse(
Hi,
only if you allow to input x as a string then you can use, maybe,
simply the following one-line-command:
xify - function(x)
{
gsub(
[0-9],
X,
sprintf(
paste(%,ifelse(regexpr(\\.,x) 0, x, x-paste(x,.
0,sep=)),
17 matches
Mail list logo