similar to: create new variable with ifelse? (reproducible example)

Displaying 20 results from an estimated 400 matches similar to: "create new variable with ifelse? (reproducible example)"

2005 Jan 13
1
how to use solve.QP
At the risk of ridicule for my deficient linear algebra skills, I ask for help using the solve.QP function to do portfolio optimization. I am trying to following a textbook example and need help converting the problem into the format required by solve.QP. Below is my sample code if anyone is willing to go through it. This problem will not solve because it is not set up properly. I hope I
2007 May 06
1
Sweave and size10.clo
Using Sweave on Windows (MikTeX 2.5 and R 2.4.1), I've ran into a bit of a problem with the tex -> DVI process. First, I've corrected the common \usepackage error by using \usepackage{"C:/Program Files/R/R-2.4.1/share/texmf/Sweave"} to get around the spacing problem. That is, LaTeX is finding the Sweave.sty, which has been a common problem in past postings here. However, my
2005 Sep 28
1
confidence variability bands for kernel estimators
I'm using nonparametric regression (packeges ksmooth and ks). My question: is there any way to compute confidence bands (or variability bands) with R. Confidence bands for functions are intervals [CLO(x);CUP(x)] such that with probability 1-alpha the true curve is covered by the band [CLO(x);CUP(x)]. Thanks very much for any help you can offer. Michael G??lger
2012 Aug 13
0
rjags error. Error parsing model file:,syntax error on line 5 near ""
Greetings, I am running a factor analysis model in rjags and have received the following error Error parsing model file: syntax error on line 5 near "" Line 5 is model { Here is my syntax. Any insight would be greatly appreciated. require(rjags) modelstring = " model { for (i in 1 : nData) { for (j in 1 : nIndicators) { y[i,j] ~ dnorm(mu[i,j],psi[j]) ephat[i,j] <-
2004 Jul 01
1
\middle in Rd.sty conflicts with newer LaTeX?
Rd.sty defines \newlength{\middle} which seems to be in conflict with the my latex installation. Here is a minimal example: \documentclass{article} \newlength{\middle} \begin{document} \end{document} It runs fine on a Linux box: carp:136% latex test.tex This is TeX, Version 3.14159 (Web2C 7.3.1) (test.tex LaTeX2e <2000/06/01> Babel <v3.7h> and hyphenation patterns for american,
2005 Aug 05
3
Latex error with Sweave example
I created a tex file following the example in the Sweave help which produced the following files in my working directory. Sweave-test-1-006.eps Sweave-test-1-006.pdf Sweave-test-1-007.eps Sweave-test-1-007.pdf Sweave-test-1.tex When I run latex on this, I get a latex error, log file below. I am running R 2.1.1 on Windows XP. I have installed "small MiKTeX" and I have added
2008 Apr 16
2
count of active tcp sockets?
Hi List, Is there an easy way to get a count of the number of active socket connections, or even better, number of socket connections in the time_wait state? (Something lightweight... under /proc/sys/net/ipv4/? I'd like to avoid the impact of listing out all the connections a-la netstat.) Thanks! -Jeff
2005 Feb 10
2
Problem with "R CMD Rd2dvi": Rd.sty not found
Hi, I run into a problem with "R CMD Rd2dvi" command: it gives me "File `Rd.sty' not found" error (See the output message on the bottom). I get the same error when running "RCMD check". My system is: Windows 2000, R version 2.0.1, MiKTeX version 2.4. I do have a Rd.sty file in R_HOME/share/texm directory. I looked through newsgroups for any related discussions
2005 Oct 02
1
Problem Sweaving vignettes: MiKTeX's texi2dvi reports errors
Hi, I am trying to create a Bioconductor package. Everything installs and checks fine. Now I'm on my last step, which is to create a vignette. I'm trying to test the Sweave process, to make sure I can build a vignette. I am stuck at the texi2dvi stage, which fails when I try to process the example Sweave-test-1.tex file. I am using Windows binary R distributions, and have the same
2012 Feb 07
1
replace elements of a data frame
Hello, I am getting mad at finding a simple way to replace elements of a df. Here is a short df : > names<-c("BO","C","CL") > price<-c("10","25","20") > df<-data.frame(names,price) I want to replace "BO" by "BOB", "C" by "CR", "CL" by "CLO", and the list is
2002 May 16
2
2.2.4 and "veto files" -> cpu maxed out
linux 2.2.19/rh6x I use in a share veto files = /.*/ whenever you connect to it the client process hangs, the smbd starts consuming cpu time and cannot be killed but with "kill -9". This is the last part of the smbd log [2002/05/16 05:49:51, 3] smbd/sec_ctx.c:set_sec_ctx(319) 3 user groups: 100 6 19 [2002/05/16 05:49:51, 3] smbd/trans2.c:call_trans2findfirst(863)
2006 Jul 31
1
Sweave error in example code
Hi.. I am running R version 2.3.1 on a Windows XP machine with the latest Miktex 2.5 installed. I get no errors from R when running the Sweave example, testfile <- system.file("Sweave", "Sweave-test-1.Rnw", package = "utils") However, when I tex the resulting .tex file (after installing a4.sty) I get the error below. This is pdfeTeX, Version
2004 Jan 29
2
Finding Sweave.sty and other problems
Hi, I've just tried to run example-3 from Friedrich Leish. I'm using R 1.8.1 and MiKTeX 2.2 on Windows XP. I go === > library(tools) > Sweave("example-3.Snw") Writing to file example-3.tex Processing code chunks ... 1 : term hide 2 : echo term verbatim 3 : term tex 4 : term verbatim eps pdf You can now run LaTeX on example-3.tex === The file example-3.tex
2000 Jun 28
1
Rd2dvi
I'm trying to use R CMD Rd2dvi and I end up at a Latex (I think) command prompt. What's missing or what am I suppose to do? Paul Gilbert _______ paul at breman:/apps/dse-versions/2000.6/dse#R CMD Rd2dvi syskern This is TeX, Version 3.14159 (Web2C 7.3) (Rd2.tex LaTeX2e <1998/12/01> Babel <v3.6k> and hyphenation patterns for american, french, german, ngerman, nohyphenation,
2010 Jun 16
5
Latex and r
Dear R?ers I?m trying to get a summary table using latex and summary in the rms package to no avail. I?m running R 2.10.1, Mac OS X snow leopard and I have the mactex 2009 distribution installed. Any obvious things I?m missing? //M options(digits=3) set.seed(173) sex <- factor(sample(c("m","f"), 500, rep=TRUE)) age <- rnorm(500, 50, 5) treatment <-
2008 Oct 28
1
Sweave Error
dear R users, I am using sweave to generate report for my data analysis. I recently updated R ro 2.8.0, and now I have the following results when compile the the tex file generated from R. This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6) %&-line parsing enabled. entering extended mode (./Lajos.tex LaTeX2e <2005/12/01> Babel <v3.8h> and hyphenation patterns for english,
2002 Jul 17
2
Problems with make pdf (R-patched_2002-07-15.tar.gz)
After configure, make and make check on a linux Suse 7.3 box, I run make dvi and make info with no problems but get a lot of garbage to my screen during make pdf. Is this normal? Is there a bug in this part of the installation? This is part of what I get on the screen: humboldt:/usr/local/R-patched # make pdf make[1]: Entering directory `/usr/local/R-patched/doc' make[2]: Entering
2013 Mar 25
1
Rd.sty not found
I'm trying to build and check a new package. But keep getting the warning: * checking PDF version of manual ... WARNING LaTeX errors when creating PDF version. This typically indicates Rd problems. When I go into the package.Rcheck directory, package-manual.pdf is created. however if I do a pdflatex on package.tex I get the following: This is pdfTeX, Version 3.1415926-2.4-1.40.13
2008 Apr 12
1
2.7.0 beta (rev 45263) failing 'make vignettes'
Dear list, On Fedora 8 I downloaded the beta version of R via svn. make and make check-all worked fine, but make vignettes is failing with: make[1]: Entering directory `/home/gavin/R/2-7-patched/build/src/library' building/updating vignettes for package 'grid' ... processing 'displaylist.Snw' /usr/bin/texi2dvi: pdflatex exited with bad status, quitting. Error in
2009 Apr 16
2
there are fontencoding problem in Sweave
I want write article by russian language using Sweave. For cyrillic text LaTeX use T2A encoding \usepackage[T2A]{fontenc} But in Sweave.sty we find: \RequirePackage[T1]{fontenc} It is source of critical problem. For example Rnw file $ cat estimation.Rnw \documentclass[A4paper]{article} \usepackage[T2A]{fontenc} \usepackage[utf8]{inputenc} \usepackage[russian,english]{babel}