[R] Line numbers of scan(0
Rolf Turner
rolf.turner at xtra.co.nz
Fri Apr 29 06:06:03 CEST 2011
On 29/04/11 09:40, Lisa wrote:
> Dear all,
>
> Does everyone know how to change the line numbers of scan()? For example,
>
>> scan(n = 3)
> 1: 4
> 2: 6
> 3: 9
> Read 3 items
> [1] 4 6 9
>
> I just want to change the line numbers 1, 2, and 3 to, say a, b, and c that
> look like this:
>
>> scan(n = 3)
> a: 4
> b: 6
> c: 9
> Read 3 items
> [1] 4 6 9
>
> Any help will be appreciated.
Are you suffering from the delusion that the line numbers "1", "2", and "3"
are part of/permanently affixed to the object returned by scan()?
They're not.
cheers,
Rolf Turner
More information about the R-help
mailing list