Displaying 4 results from an estimated 4 matches for "xdr2".
Did you mean:
xdr
2007 Aug 23
3
RData File Specification?
Hi,
I am developing a tool for converting a large data frame stored in an uncompressed binary (XDR) RData file to a delimited text file. The data frame is too large to load() and extract rows from on a typical PC. I'm looking to parse through the file and extract individual entries without loading the whole thing into memory.
In terms of some C source functions, instead of doing
2009 Dec 16
2
What is the fastest way to see what are in an RData file?
Currently, I load the RData file then ls() and str(). But loading the file
takes too long if the file is big. Most of the time, I only interested what
the variables are in the the file and the attributes of the variables (like
if it is a data.frame, matrix, what are the colnames/rownames, etc.)
I'm wondering if there is any facility in R to help me avoid loading the
whole file.
2009 Sep 11
1
[PATCH] guestfish: Redirect stdout when executing remote commands
...l");
+ else {
+ dup2 (fd, STDOUT_FILENO);
+ close (fd);
+ }
+}
+
/* Remote control server. */
void
rc_listen (void)
@@ -56,7 +175,7 @@ rc_listen (void)
char sockpath[128];
pid_t pid;
struct sockaddr_un addr;
- int sock, s, i, fd;
+ int sock, s, i;
FILE *fp;
XDR xdr, xdr2;
guestfish_hello hello;
@@ -111,13 +230,7 @@ rc_listen (void)
/* Now close stdout and substitute /dev/null. This is necessary
* so that eval `guestfish --listen` doesn't block forever.
*/
- fd = open ("/dev/null", O_WRONLY);
- if (fd == -1)
- perror ("/dev/nul...
2009 Aug 03
1
[PATCH 1/2] Convert all TABs-as-indentation to spaces.
...t; argc; ++i)
- fprintf (stderr, " %s", argv[i]);
- fprintf (stderr, "\n");
- }
-
- /* Run the command. */
- reply.r = issue_command (call.cmd, argv, NULL);
-
- xdr_free ((xdrproc_t) xdr_guestfish_call, (char *) &call);
-
- /* Send the reply. */
- xdrstdio_create (&xdr2, fp, XDR_ENCODE);
- (void) xdr_guestfish_reply (&xdr2, &reply);
- xdr_destroy (&xdr2);
-
- /* Exit on error? */
- if (call.exit_on_error && reply.r == -1) {
- unlink (sockpath);
- exit (1);
- }
+ /* We have to extend and NULL-terminate the argv array. */
+ argc...