Displaying 20 results from an estimated 130 matches similar to: "Square ended segments"
2010 Jul 21
1
xtable with ifelse statement
Hi there,
I'm very new on R and I hope someone can help me to solve the problem in
using the ifelse statement with the xtable function(library xtable).
I'm trying to get the printing of the elements of two lists in a sorted way.
These two list have in common the their names.
I will try to give an example:
the first list looks like this:
$code1
Code code1
Nation
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
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
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
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
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
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
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
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")
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.
-
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
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
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 Feb 22
0
[LLVMdev] An error:Pass 'Runtime Evaluation' is not initialized
Hi,all:
I am a new at writing LLVM PASS, i write a pass like this :
using namespace llvm;
namespace {
class RuntimeEval : public ModulePass {
public:
static char ID; // Pass identification, replacement for typeid
RuntimeEval() : ModulePass(ID) {
}
virtual bool runOnModule(Module &M) {
return false;
}
};
}
char HSASupportedRuntimeEval::ID = 0;
2019 Jan 22
7
[RFC] Late (OpenMP) GPU code "SPMD-zation"
Where we are
------------
Currently, when we generate OpenMP target offloading code for GPUs, we
use sufficient syntactic criteria to decide between two execution modes:
1) SPMD -- All target threads (in an OpenMP team) run all the code.
2) "Guarded" -- The master thread (of an OpenMP team) runs the user
code. If an OpenMP distribute region is encountered,
2003 Jun 04
4
Strip location and grid colour in Lattice
I am probably missing something quite obvious, but any help would be
appreciated. I am continually getting people misreading the lattice plots
because they are expecting the strip (with the factor names in them) to be
below the graph. Is there anyway of achieving this.
Secondly, from a more personal note I find the grid formed by the axes to be
a bit overpowering and would like to make it a