Farhad M.
Farhad M.

Reputation: 151

How to print a vector line by line without the position numbers

how I can get straight line of hotel names without 1,2,3... in the first row. how can I do it?. I tried data.frame and list functions but failed. Thank you

enter image description here

Upvotes: -1

Views: 3024

Answers (3)

Karsten W.
Karsten W.

Reputation: 18440

Try

paste(df$V1, collapse=", ")

to get a comma separated list of hotel names.

Upvotes: 0

Mohammad Razeghi
Mohammad Razeghi

Reputation: 1594

you can use print with row.names = FALSE

print(foo, row.names = FALSE)

Upvotes: 2

LyzandeR
LyzandeR

Reputation: 37879

You could use cat instead.

Using the letters vector:

> cat(letters, sep='\n')
a
b
c
d
e
f
g
h
i
j
k
l
m
n

#<truncated>

Upvotes: 7

Related Questions