search for: code1

Displaying 20 results from an estimated 22 matches for "code1".

Did you mean: code
2010 Jul 21
1
xtable with ifelse statement
...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 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 t...
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...
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....
2011 Jun 11
0
problems with geom_vline, histograms, scale=free and facets in ggplot
...;free") p <- p + geom_vline(aes(xintercept = wt.mean), mean.data,col="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...
2011 Feb 03
1
Getting variable names in function output
...e and unknown to me (obviously not in this illustration!). With the following script, myf returns the content of the objects created by 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[-...
2007 Jul 23
1
CHAR(STRING_ELT( - OK but CHAR(asChar(STRING_ELT( - not, why?
...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") 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; " s...
2003 Jul 13
1
Problems Simulating (PR#3471)
...le with the mean I ask for. The Details: I simulate Prices [Pt] and Returns that are defined as Rt = [P(t)-P(t-1)]/P(t-1). The returns have Normal distribution => Rt is has N(mu=0.14, sigmaSquared=0.2) distribution. To do the task above, I use the following files: c:\ProgramFiles\R\rw1050\Code1.txt consists of the following text: ==================== gpsim1_function(t,runs,mu,delta,stdev){ jold=0 xx_rep(0,t*runs) for(i in 1:runs){ ind=(i-1)*t xx[ind+1]=1 for(j in 2:t) { xx[ind+j]_xx[ind+j-1]* exp(rnorm(n=1,mean=mu*delta*delta,sd=stdev*delta)) } } xx } ======================= File &qu...
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...
2007 Aug 30
0
percentage explained by fixed effects in random model
...roups Name Variance Std.Dev. fosterbrood (Intercept) 1.0747 1.0367 Residual 1.1363 1.0660 # of obs: 476, groups: fosterbrood, 61 Fixed effects: Estimate Std. Error DF t value Pr(>|t|) (Intercept) -3.187028 1.011828 473 -3.1498 0.001737 ** carot.code1 0.201951 0.098442 473 2.0515 0.040771 * weight16 0.168861 0.054273 473 3.1114 0.001975 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Correlation of Fixed Effects: (Intr) crt.c1 carot.code1 0.035 weight16 -...
2001 May 09
0
compiling samba 2.2.0 on IRIX 6.5.x
...verdir_level1' compiling rpc_server/srv_spoolss_nt.c: 5779: 'FALSE' undeclared (First use in this function) compiling rpc_server/srv_spoolss_nt.c:5779: (Each undeclared identifier is reported only once) compiling rpc_server/srv_spoolss_nt.c:5779: For each function it appears in ***Error code1 (bu21) Is there somebody who had the same problem as I have or where can I get help with it? (What is Error code1 (bu21)?) Thanks a lot Eric __________________________________________________ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
2007 Feb 22
2
[LLVMdev] opt -verify
...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.cpp:1978:...
2007 Feb 22
3
[LLVMdev] opt -verify
...inance 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 i...
2007 Feb 22
0
[LLVMdev] opt -verify
...DF), 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 corr...
2007 Feb 22
0
[LLVMdev] opt -verify
...unctionPass, 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 incorrect? Yes....
2007 Feb 22
1
[LLVMdev] opt -verify
...itted 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 >>>>c...
2012 Jul 26
4
Variables in a Tabular form. easily saved in a txt file
Dear all, I would like to save few variable-names with their values in a tabular form, with that I mean that files can be printed easily in R in a tabular form and also saved in a ascii file that when one opens it see also the variables in a nice tabular format. IS that possible? Below a small example of how should look results in R and in a txt file.              Postal Code | Superb
2008 Apr 07
3
rsync installation _error exit code1
Skipped content of type multipart/alternative-------------- next part -------------- # ./configure configure.sh: Configuring rsync 3.0.1 checking build system type... hppa2.0w-hp-hpux11.11 checking host system type... hppa2.0w-hp-hpux11.11 checking target system type... hppa2.0w-hp-hpux11.11 checking for gcc... no checking for cc... cc checking for C compiler default output file name... a.out
2012 Feb 08
1
Having issues with remote command execution - ssh -t host 'sudo command'
...39;sudo /usr/local/sbin/program' which asks me for a pass and then continues. From the debug log I can see that the difference from a successfull and unsuscesful run depends on sequence 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...
2012 Feb 01
2
Problem with xtable- rescaling a table
Dear R users, I am new to Latex and I am using the R package xtable to generate tables. I want to produce a table that is very long. in the landscape format, but I would need to rescale the table so that it fits in the page. xtable enables me to have the landscape format, but I cannot rescale it, and there seems to be a problem, if I use scalebox in Latex on my output produced with stable and the
2010 Nov 18
0
On efficiency, Vectorize and loops
...n each of my B bootstrap loops, where B should be 1000 but is more likely to be 500 or 200 if I'm willing to graduate before March! # 'code0' is used for simulation and test purposes only; # The model is the same as in Bathia, Yao, Ziegelmann p.13 # The code used for estimation is 'code1' rm(list=ls(all=TRUE)) n<-100 # Number of observations d<-4 # Dimension of X a<-0 # Lower bound b<-1 # Upper bound p<-5 # [See Bathia, Yao, Ziegelmann p. 5) ####################################### # Building the error function 'epsilon' #######################...