3 added 167 characters in body

# R, 292323 21 bytes

As noted by MarcoBreitig, we can shorten it to 21 bytes if we don't need to provide it as a function:

x=scan();x[order(!x)]


Previous versions:

function(x)x[order(!x)]


The function takes a vector as input and orders by the logical vector that results from negating the input.

function(x)c(x[x!=0],x[x==0])


The function takes a vector as input and the concatenates (c()) the non-zero values and then the zero-values.

# R, 2923 bytes

function(x)x[order(!x)]


The function takes a vector as input and orders by the logical vector that results from negating the input.

function(x)c(x[x!=0],x[x==0])


The function takes a vector as input and the concatenates (c()) the non-zero values and then the zero-values.

# R, 2923 21 bytes

As noted by MarcoBreitig, we can shorten it to 21 bytes if we don't need to provide it as a function:

x=scan();x[order(!x)]


Previous versions:

function(x)x[order(!x)]


The function takes a vector as input and orders by the logical vector that results from negating the input.

function(x)c(x[x!=0],x[x==0])


The function takes a vector as input and the concatenates (c()) the non-zero values and then the zero-values.

2 added 178 characters in body

# R, 2929 23 bytes

function(x)x[order(!x)]


The function takes a vector as input and orders by the logical vector that results from negating the input.

function(x)c(x[x!=0],x[x==0])


The function takes a vector as input and the concatenates (c()) the non-zero values and then the zero-values.

# R, 29 bytes

function(x)c(x[x!=0],x[x==0])


The function takes a vector as input and the concatenates (c()) the non-zero values and then the zero-values.

# R, 29 23 bytes

function(x)x[order(!x)]


The function takes a vector as input and orders by the logical vector that results from negating the input.

function(x)c(x[x!=0],x[x==0])


The function takes a vector as input and the concatenates (c()) the non-zero values and then the zero-values.

1

# R, 29 bytes

function(x)c(x[x!=0],x[x==0])


The function takes a vector as input and the concatenates (c()) the non-zero values and then the zero-values.