Thank you very much to the both of you
Paolo
On 20 December 2010 00:35, Duncan Murdoch wrote:
> On 19/12/2010 7:21 PM, Paolo Rossi wrote:
>
>> I would like to know how to turn a variable into a string. I have tried
>> as.symbol and as.name but it doesnt work for what I'd like to do
>>
>> Esse
On 19/12/2010 7:21 PM, Paolo Rossi wrote:
I would like to know how to turn a variable into a string. I have tried
as.symbol and as.name but it doesnt work for what I'd like to do
Essentially, I'd like to feed the function below with two variables. This
works fine in the bit working out number of
Paolo -
One way to make the function do what you want is to replace
the line
print(sprintf("OK with %s and %s\n", var1, var2))
with
cat('OK with',substitute(var1),'and',substitute(var2),'\n')
With sprintf, you'd need
print(sprintf("OK with %s and %s\n", deparse(substitute(var1)),
depa
I would like to know how to turn a variable into a string. I have tried
as.symbol and as.name but it doesnt work for what I'd like to do
Essentially, I'd like to feed the function below with two variables. This
works fine in the bit working out number of elements in each variable.
In the print(sp
4 matches
Mail list logo