Displaying 20 results from an estimated 20 matches for "code2".
Did you mean:
code
2010 Jul 21
1
xtable with ifelse statement
...atement 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 Usa
$code2
Code code2
Nation Spain
the second one is like this
$code 1
var1 87
var2 73
$code2
var1 34
var2 23
As you can see the two list have the same names.I tried to implement the
following ifelse...
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 (vertica...
2010 Jul 18
2
Namibia becoming NA
...ry 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 HTML version deleted]]
2007 Feb 22
2
[LLVMdev] opt -verify
...assneeds
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
complaints. However, if I then try run "opt -simplifycfg -verify -o
code3.bc code2.bc," I get the assertion failure below. If thought that
the verify option should have made sure that bytecode written to
code2.bc was correct. Am I incorrect?
opt: Reader....
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 as 3 functions and
source them from another script.
But maybe there is a way of having them run one by one as such?
Thanks a lot!
--...
2007 Feb 22
3
[LLVMdev] opt -verify
...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 I run "opt -mypass -verify -o code2.bc code1.bc" I get no
>> complaints. However, if I then try run "opt -simplifycfg -verify -o
>> code3.bc code2.bc," I get the assertion failure below. If thought that
>> the verify option should have made sure that bytecode written to
>> code2.bc was correct...
2011 Oct 19
1
Square ended segments
...1318997163, NA, 1318997842, NA, 1319000172, 1319001123), class = c("POSIXct", "POSIXt"), tzone = ""), Code.end = structure(c(1318996828, 1318997168, NA, 1318997884, NA, 1319000229, 1319001142), class = c("POSIXct", "POSIXt"), tzone = ""), Code2.begin = structure(c(1318996823, 1318997163, NA, 1318997842, 1318997962, NA, 1319001123), class = c("POSIXct", "POSIXt"), tzone = ""), Code2.end = structure(c(1318996828, 1318997168, NA, 1318997884, 1318998120, NA, 1319001142), class = c("POSIXct", "POSIX...
2011 Jun 11
0
problems with geom_vline, histograms, scale=free and facets in ggplot
...red")
p
###########################################################
###########################################################
# This one does not work
# Create a test data set
set.seed(100)
my.data=data.frame(code1=rep(c("A","B","C"),each=30),
code2=rep(rep(c("D","E","F"),each=10),3),
n=runif(90))
# Create a data frame with the mean value, to add to each facet
mean.data=tapply(my.data$n,INDEX=list(my.data$code1,my.data$code2),mean)
mean.data=melt(mean.data)
colnames(mean.data)=c("code1"...
2007 Feb 22
0
[LLVMdev] opt -verify
...gt;>(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 I run "opt -mypass -verify -o code2.bc code1.bc" I get no
>>>complaints. However, if I then try run "opt -simplifycfg -verify -o
>>>code3.bc code2.bc," I get the assertion failure below. If thought that
>>>the verify option should have made sure that bytecode written to
>>>code2.bc...
2007 Feb 22
0
[LLVMdev] opt -verify
...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 I run "opt -mypass -verify -o code2.bc code1.bc" I get no
> complaints. However, if I then try run "opt -simplifycfg -verify -o
> code3.bc code2.bc," I get the assertion failure below. If thought that
> the verify option should have made sure that bytecode written to
> code2.bc was correct. Am I incorrec...
2011 Feb 03
1
Getting variable names in function output
...the code, but I could not find a way to get the names of the objects in
addition to their contents.
Any suggestion will be welcome
Sebastien
rm(list=ls(all=T))
code1 <- paste('l <- list(a=1,b=2,c=3)',
'm <- matrix(1:15,nrow=3)', sep='\n')
code2 <- 'g <- rnorm(100,10,2)'
myf <- function(code=NULL){
start <- ls(all=T)
eval(parse(text=code))
end <- ls(all=T)
end <- end[-which(end=='start')]
return(lapply(end[!end%in%
start],function(x) eval(parse(text=x))))
}
myf(code1)
myf(code2)
[[alterna...
2007 Jul 23
1
CHAR(STRING_ELT( - OK but CHAR(asChar(STRING_ELT( - not, why?
...ier versions, but it used to be different in
2.4):
install.packages("inline")
library(inline)
sig <- signature(x="character")
code1 <- "
for (int i = 0; i < LENGTH(x); i++ )
Rprintf(\"%s\\n\", CHAR(STRING_ELT(x, i)));
return R_NilValue;
"
code2 <- "
for (int i = 0; i < LENGTH(x); i++ )
Rprintf(\"%s\\n\", CHAR(asChar(STRING_ELT(x, i))));
return R_NilValue;
"
setCMethod(c("p1","p2"), list(sig,sig), list(code1,code2))
#----------------------------------------------------------
p1(c(&qu...
2007 Feb 22
1
[LLVMdev] opt -verify
...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 I run "opt -mypass -verify -o code2.bc code1.bc" I get no
>>>>complaints. However, if I then try run "opt -simplifycfg -verify -o
>>>>code3.bc code2.bc," I get the assertion failure below. If thought that
>>>>the verify option should have made sure that bytecode written to
>>...
2013 Mar 08
4
Substitute value
...I can't get it to work.
This is my example and attempt:
sim.code<-c("1.1234.1a.1","1.1234.1a.2","1.3245.2c.5","4.6743.3c.","4.3254.6b.4","3.5463.2a.")
sim.val<-c(4,5,3,6,4,7)
sim.df<-data.frame(sim.code,sim.val)
sim.df$sim.code2<-sub(".$",".1",sim.df$sim.code)
sim.df
but this changes all the ends to ".1"
Thanks,
Chris
--
View this message in context: http://r.789695.n4.nabble.com/Substitute-value-tp4660699.html
Sent from the R help mailing list archive at Nabble.com.
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.
- What I need: a contingency table in the form:
Groupcode code1 code2 .. coden
P
C
B
S...
2000 Oct 08
1
OpenSSH-2.2.0 problem with ssh.com ssh-agent2
...uthfd.c Sun Oct 8 17:45:28 2000
--- authfd.c.orig Tue Aug 22 20:46:24 2000
***************
*** 223,229 ****
/* Get message type, and verify that we got a proper answer. */
type = buffer_get_char(&auth->identities);
! if (agent_failed(type)) {
return NULL;
} else if (type != code2) {
fatal("Bad authentication reply message type: %d", type);
--- 223,229 ----
/* Get message type, and verify that we got a proper answer. */
type = buffer_get_char(&auth->identities);
! if (type == SSH_AGENT_FAILURE) {
return NULL;
} else if (type != code2) {...
2013 Feb 22
0
[LLVMdev] An error:Pass 'Runtime Evaluation' is not initialized
...}
};
}
char HSASupportedRuntimeEval::ID = 0;
static RegisterPass<RuntimeEval> X("Eval", "Runtime Evaluation");
it can be compiled successful, but when i run it with command: './Release+Asserts/bin/opt -load ./Release+Asserts/lib/LLVMRuntimeEval.so -Eval < code2.bc',
i meet an error:
Pass 'HSA Supported Runtime Evaluation' is not initialized.
Verify if there is a pass dependency cycle.
Required Passes:
opt: /home/ccwang/software/LLVM/LLVM3.2/llvm-3.2.src/lib/VMCore/PassManager.cpp:616: void llvm::PMTopLevelManager::schedulePass(llvm::Pass...
2012 Feb 08
1
Having issues with remote command execution - ssh -t host 'sudo command'
...uence of the following code blocks. If successful first runs code block1
and then block2, otherwise the opposite.
code1:
debug2: channel 0: rcvd eof
debug2: channel 0: output open -> drain
debug2: channel 0: obuf empty
debug2: channel 0: close_write
debug2: channel 0: output drain -> closed
code2:
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: client_input_channel_req: channel 0 rtype eow at openssh.com reply 0
debug2: channel 0: rcvd eow
debug2: channel 0: close_read
debug2: channel 0: input open -> closed
Any help appreciated..
thanks
2019 Jan 31
2
[RFC] Late (OpenMP) GPU code "SPMD-zation"
...your<br>> changes. I would put together an example with this directive structure:<br>> <br>> #pragma omp target teams distribute<br>> for(...){<br>> <code1><br>> #pragma omp parallel for<br>> for(...) {<br>> <code2><br>> }<br>> <code3><br>> }<br>> <br>> which forces the use of the master-worker scheme (non-SPMD mode) without
any<br>> other distractions.<br><br>The atomic stuff I used to determine correctness. I haven't yet look...
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,