similar to: xtable with ifelse statement

Displaying 20 results from an estimated 300 matches similar to: "xtable with ifelse statement"

2009 Nov 10
1
Data transformation
Dear all, I have a dataset as below: id code1 code2 p 1 4 8 0.1 1 5 7 0.9 2 1 8 0.4 2 6 2 0.2 2 4 3 0.6 3 5 6 0.7 3 7 5 0.9 I just want to rewrite it as this (vertical to horizontal): id var1 var2 var3
2011 Feb 03
1
Getting variable names in function output
Dear R-users, I would like to have some advises about a problem illustrated by the following snippet. Within myf, I need to evaluate a piece of R code that is passed as a character argument and then return the objects that are created by this code. The difficulty comes from the fact that the content of the code is variable and unknown to me (obviously not in this illustration!). With the
2007 Jul 23
1
CHAR(STRING_ELT( - OK but CHAR(asChar(STRING_ELT( - not, why?
Any idea why CHAR(asChar(STRING_ELT( produces NA whereas CHAR(STRING_ELT( gets a pointer to a string? It's generally expected that STRING_ELT should already be a character, but why the coercion does not work? Here is a simple example (consistent over R2.5.1-R2.6 rev 42284, I didn't check earlier versions, but it used to be different in 2.4): install.packages("inline")
2011 Feb 24
4
Running code sequentially from separate scripts (but not functions)
Hello! I am wondering if it's possible to run - in sequence - code that is stored in several R scripts. For example: Script in the file "code1.r" contains the code: a = 3; b = 5; c = a + b Script in the file "code2.r" contains the code: d = 10; e = d - c Script in the file "code3.r" contains the code: result=e/a I understand that I could write those 3 scripts
2007 Feb 22
2
[LLVMdev] opt -verify
I am writing an interprocedural compiler pass. Because the passneeds information from a FunctionPass, e.g., the post-dominance frontier (PDF), and because a ModulePass is not permitted to require a FunctionPass, I am forced to make my pass a FunctionPass and do majority of its work in the doFinalization() method. When I run "opt -mypass -verify -o code2.bc code1.bc" I get no
2007 Feb 22
3
[LLVMdev] opt -verify
I followed what you said and called verifyModule() with the AbortProcessAction option. verifyModule() returns false, but does not abort and does not print out any information about what caused the verification to fail. Chris Lattner wrote: > On Wed, 21 Feb 2007, Ryan M. Lefever wrote: >> I am writing an interprocedural compiler pass. Because the passneeds >> information from a
2007 Feb 22
0
[LLVMdev] opt -verify
On Wed, 21 Feb 2007, Ryan M. Lefever wrote: > I am writing an interprocedural compiler pass. Because the passneeds > information from a FunctionPass, e.g., the post-dominance frontier > (PDF), and because a ModulePass is not permitted to require a > FunctionPass, I am forced to make my pass a FunctionPass and do majority > of its work in the doFinalization() method. ok > When
2007 Feb 22
0
[LLVMdev] opt -verify
I also tried iterating through the functions of the module and calling verifyFunction(), which also returns false, but does not cause an abort or report anything to stderr about what caused the verification to fail. From the doxygen for verifyFunction() and verifyModule(), it seems like they both should print information to stderr if the verification fails and should abort opt if
2007 Feb 22
1
[LLVMdev] opt -verify
I think I misread the doxygen. verifyFunction & verifyModule return false if no errors are detected. However, my question now becomes why does the code produced by my transform pass verification, but it causes an assertion failure in the byte reader when it (the code produced by my transform) is passed to another invocation of opt? Ryan M. Lefever wrote: > I also tried iterating
2011 Jun 11
0
problems with geom_vline, histograms, scale=free and facets in ggplot
Dear list, I?m having a little trouble with adding vertical lines to a histogram. I need to draw a matrix of histograms (using facets), and in each histogram add a vertical line indicating the mean value of the data in each facet. According to the last example in the geom_hline help, to display different lines in each facet I need to provide a data frame. I modified this example to make a plot
2001 Apr 02
0
Constructing a contingency table
Greetings. I'm having some trouble constructing a contingency table from raw data (actually read in via RPgSQL). Here's the deal: - What I've got: a data frame in the form: Groupcode code1 code2 code3 code4 code5 .. coden where groupcode is one of {P,C,B,S,U,X} and code{1..n} is TRUE or FALSE. code{1..n} are NOT mutually exclusive, so between 0 and n of them can be TRUE. -
2011 Oct 19
1
Square ended segments
Good Afternoon R Community, I am working on plotting behavior codes over short durations of time (a few seconds at a time over 1-2 hrs). I am utilizing as.POSIXct to store the time. I wanted to make a quasi time line using these time. I utilized the segments function to represent these times. However the segments rounds off at the ends and does not have the crisp look I need for my purposes.
2010 Jul 18
2
Namibia becoming NA
I have a data file in which one of the columns is country code and NA is the code for Namibia. When I read the data file using read.csv, NA for Namibia is being treated as null or "NA" How can I prevent this from happening? I tried the following but it didn't work input <- read.csv("padded.csv",header = TRUE,as.is = c("code2")) thanks, Suresh [[alternative
2012 Feb 08
1
Having issues with remote command execution - ssh -t host 'sudo command'
I've been trying to find an answer on other sites however I could not resolve my problem. spec: os: ubuntu 10.0, OpenSSH_5.5p1 Debian-4ubuntu4, OpenSSL 0.9.8o problem: When trying to restart deamons on remote pcs having the same specs, sometimes deamons are executed succesfully and sometimes not. I am using the following command: ssh -t -vvv "$host" 'sudo
2013 Mar 08
4
Substitute value
Hi, I have a large data frame and within this there is one column which contains individual codes (eg. 1.1234.2a.2). I am splitting these codes into their 4 components using strsplit (eg. "1", "1234", "2a", "2"). However there are some individual codes which do not have a last component (eg. 2.4356.3b. ), I want to give these codes a "1" as their
2003 Jul 13
1
Problems Simulating (PR#3471)
Full_Name: Stan Miles Version: 1.5.0. OS: Windows 2000 Server Submission from: (NULL) (130.63.74.220) Short Description of the Problem: I use R to simulate a random variable, with mean 0.14 and variance 0.2 . I simulate 20 sets, 30000 realizations/set. I take the average of each set, and all 20 of the averages are much higher than 0.14. In fact, they are All about 2-3 stdev higher. It
2019 Jan 31
2
[RFC] Late (OpenMP) GPU code "SPMD-zation"
<font size=2 face="sans-serif">Hi Johannes,</font><br><br><font size=2 face="sans-serif">Thank you for the explanation.</font><br><br><font size=2 face="sans-serif">I think we need to clarify some details about code generation in Clang today:</font><br><br><font size=2
2001 May 09
0
compiling samba 2.2.0 on IRIX 6.5.x
Hi everyone, I have a problem compiling the new version of samba 2.2.0 on my IRIX machine. The configure script in the source directory works well, but when I try to make the make command, it start compiling and suddenly stop and I have this error message: ... ... compiling rpc_server/srv_spoolss_nt.c: in function 'getprinterdriverdir_level1' compiling rpc_server/srv_spoolss_nt.c: 5779:
2007 Aug 30
0
percentage explained by fixed effects in random model
Hi, I realise this has come up before in various reincarnations but I couldnt find the answer... I wish to quote the "percentage variance explained" by each of three components in my mixed model. If I didnt have a random effect I would just use r squared. I can work out the percentage explained by the random effect using summary() but this doesnt give variance for the fixed effects.
2000 Oct 08
1
OpenSSH-2.2.0 problem with ssh.com ssh-agent2
The OpenSSH and ssh.com agents use a completely different set of messages for dealing with DSA keys, so I don't expect the OpenSSH client to be able to get DSA keys from ssh-agent2. However, if I'm running "ssh-agent2 -1", I expect OpenSSH to be able to use RSA keys stored in ssh-agent2's agent1 compatibility box. And it does. However, there's a problem. If I'm