Displaying 3 results from an estimated 3 matches for "outut".
Did you mean:
output
2009 Dec 04
2
writing 'output.csv' file
Dear R helpers
Suppose
M <- c(1:10) # length(M) = 10
N <- c(25:50) # length(N) = 26
I wish to have an outut file giving M and N. So I have tried
write.csv(data.frame(M, N), 'output.csv', row.names = FALSE)
but I get the following error message
Error in data.frame(M, N) :
arguments imply differing number of rows: 10, 26
How do I modify my write.csv command to get my output in a single...
2005 Feb 01
1
Process to both write to and read from (pipe/fork)?
...%s", buf);
}
fclose(f);
}
else
{
/* this is the child process which feeds something into the pipe */
FILE *f = popen("sed -e 's/,$//'", "w");
close(fd[0]);
/* connect stdout to pipe's output end, so parent ends up reading
the outut of sed */
dup2(fd[1], fileno(stdout));
fprintf(f, "450, 390, 467, 654, 30, 542, 334, 432, 421,\n");
fprintf(f, "357, 497, 493, 550, 549, 467, 575, 578, 342,\n");
fprintf(f, "446, 547, 534, 495, 979, 479\n");
pclose(f);
}
return (0);
}
2005 Feb 01
1
Process to both write to and read from (pipe/fork)?
...%s", buf);
}
fclose(f);
}
else
{
/* this is the child process which feeds something into the pipe */
FILE *f = popen("sed -e 's/,$//'", "w");
close(fd[0]);
/* connect stdout to pipe's output end, so parent ends up reading
the outut of sed */
dup2(fd[1], fileno(stdout));
fprintf(f, "450, 390, 467, 654, 30, 542, 334, 432, 421,\n");
fprintf(f, "357, 497, 493, 550, 549, 467, 575, 578, 342,\n");
fprintf(f, "446, 547, 534, 495, 979, 479\n");
pclose(f);
}
return (0);
}