Re: [R] How do I print a string without the initial [1]?

2007-04-18 Thread Soare Marcian-Alin
Hello Steve,

You can print strings in R with the method cat()

\n . new line
\t  . tabulator

Try:
name <- c("Steve")
age=22
cat("\tHello my name is", name ,"and I am", age ,"years old.\n")

Have Fun!

Kind Regards,
Soare Marcian-Alin

2007/4/18, steve <[EMAIL PROTECTED]>:
>
> If I print a sting I get an initial [1]:
>
> > xx="a"
> > xx
> [1] "a"
>
>
> How do I get it to print just
>
> "a"
>
> with no [1]?
>
> I tried looking this up, but I don't know what the initial [1] is called.
>
> Steve
>
> __
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] How do I print a string without the initial [1]?

2007-04-18 Thread Benilton Carvalho
 > x="a\n"
 > cat(x)
a

On Apr 18, 2007, at 5:31 PM, steve wrote:

> If I print a sting I get an initial [1]:
>
>> xx="a"
>> xx
> [1] "a"
>
>
> How do I get it to print just
>
> "a"

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] How do I print a string without the initial [1]?

2007-04-18 Thread steve
If I print a sting I get an initial [1]:

 > xx="a"
 > xx
[1] "a"


How do I get it to print just

"a"

with no [1]?

I tried looking this up, but I don't know what the initial [1] is called.

Steve

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.