Ich habe 1-d Vektor von Werten. Ich möchte sie in eine Zeichenfolge mit durch Komma getrennten Werten konvertieren. Gibt es einen leichten Weg in Julia, dies zu tun? So etwas wie Zusammenbruch in r
collapse ein Vektor als Komma getrennte Zeichenfolge in Julia
{julia}
julia> x = [24,122,63,24,83,56,54,175,11,11,24,51,85,92,74,500,80,127,126,59,111,155,132,202,64,164,1301]
#I want output like this as a string
#24,122,63,24,83,56,54,175,11,11,24,51,85,92,74,500,80,127,126,59,111,155,132,202,64,164,1301,27
#I have tried something like this
[julia> [print(i,",") for i in x]
24,122,63,24,83,56,54,175,11,11,24,51,85,92,74,500,80,127,126,59,111,155,132,202,64,164,1301,27-element Array{Void,1}:
nothing
nothing
nothing
nothing
nothing
nothing
nothing
nothing
nothing
nothing
nothing
nothing
nothing
nothing
nothing
nothing
nothing
nothing
nothing
nothing
nothing
nothing
nothing
nothing
nothing
nothing
nothing
'join (map (string, x), ',')' ist genau das, was ich wollte. Danke – PoisonAlien
@PoisonAlien - Sieht so aus, als ob die 'map' nicht notwendig ist, und Sie können' '' ('' '' '' '' 'direkt mitmachen). – TigerhawkT3