similar to: Making Knitr work

Displaying 20 results from an estimated 900 matches similar to: "Making Knitr work"

2013 Jan 11
1
Patch for setwd() to show path in error message
Below is a patch for setwd() to show path in error message. Current it just gives error messages such as: Error in setwd(libdir) : cannot change working directory with the patch it should (read untested) give: Error in setwd(libdir) : cannot change working directory to 'path/that/fails/' PATCH: % diff -u util.c "util,patch.c" --- util.c 2012-12-16 13:13:05.002249900
2012 Aug 02
4
Subseting
Hi everyone I have banking data set in long format with 4 columns.One of these columns is bank name which consist of 49 banks and I want the data for only 40 banks out of these 49 so can anyone help me on how to get this 40 banks data My data looks like Year Name totalliabilties assets 1990 a 90 10 1991 a 89 48 1992 a 87
2012 Jul 10
2
define stuff to be only usable in the same file
Hello R-Help! I've looked around and have not found: A simple(short) way to hide functions and variables from the global environment. What i want is for a few of them to only be accessable from the scriptfile they're in. I probably could do fun things with environments , but that seems quite a hassle. As example: I have a file that gets me stuff from the database and creates an R object
2012 Oct 09
2
append for .Rdata?
Can i somehow append objects to an .Rdata file? I didn't see an option for it in the save() method. dump() won't work since i have s4 objects in there.
2012 Oct 10
2
Strange email i'm getting whenever i post to the list
From: ?????? <NAVER-MAILER at naver.com> Subject: [???? ??] envy721c at naver.cobSDsnLzroZwg66mU7J287J20IOyghOyGoeuQmOyngCDrqrvtlojsig==teuLiOuLpC4= The only plain english in the message is that the mail was denied by the receiver Anyone else getting this?
2012 Apr 27
2
Where would i put feature requests for a library?
Hi! If i found a problem with the code of one of the libraries (not core), or, in my current case, would wish something minor changed for convenience, where can i get contact? Can i put it in the "official" bug repository? (Problem discription for anyone interested: Why call the default function kpca for a matrix with kpar=list(sigma=0.2), instead of putting this default sigma into the
2012 Mar 26
1
normalization of multi-value string variable
Hi All, I need to normalize/scale string variable which represents interests of customers (e.g., 'cycling, rollerblading, swimming' etc). Does anybody know how to do this, I want then use it along with other numeric variables for SVM classification. Appreciate for any advice. -Alex [[alternative HTML version deleted]]
2012 Apr 03
1
e1071 tune.control() random parameter
I'm not sure what the parameter specifies: random if an integer value is specified, random parameter vectors are drawn from the parameter space. What are the parameter vectors and what is the parameter space? What means drawn? greetings Jessi [[alternative HTML version deleted]]
2012 Apr 26
1
kernlab kpca code
Hi! how do i get to the source code of kpca or even better predict.kpca(which it tells me doesn't exist but should) ? (And if anyone has too much time: Now if i got that right, the @pcv attribute consists of the principal components, and for kpca, these are defined as projections of some random point x, which was transformed into the other feature space -> f(x), projected onto the actual
2012 Jun 28
1
plot.prcomp() call/eval
Hi! I am getting a lot of numbers in the background of the pca screeplots if i use call("plot") and eval(somecall). Til now, creating the calls and plotting later on this way worked fine. Example: pcaI<-prcomp(iris[,1:4]) plot(pcaI) x<-call("plot",pcaI) eval(x) Anyone got an idea how i can avoid that? (also it might take a second or so for the numbers to appear,
2012 Oct 09
1
other way of making a table?
I'm making tables for prediction results of classifiers (2 classes) that show the usual numbers, true positives, false positives, etc I used the command table(predictedLabels,realLabels) to make those. I just had a case though ,where one of the label vectors had only one class in it. This will result in only half a table. Compare: x<-c(1,1,1,0,0) y<-c(1,1,1,0,1) table(x,y) to
2012 Dec 20
2
Filling Lists or Arrays of variable dimensions
Following problem: Say you have a bunch of parameters and want to produce results for all combinations of those: height<-c("high","low") width<-c("slim","wide") then what i used to do was something like this: l<-list() for(h in height){ l[[h]]<-list() for(w in width){ l[[h]][[w]] <- doSomething() } } Now those parameters aren't
2011 Mar 18
1
help please: put output into dataframe
Dear R community members I have been struggling on this simple question, but never get appropriate solution. So please help. # my data, though I have a large number of variables var1 <- rnorm(500, 10,4) var2 <- rnorm(500, 20, 8) var3 <- rnorm(500, 30, 18) var4 <- rnorm(500, 40, 20) datafr1 <- data.frame(var1, var2, var3, var4) # my unsuccessful codes nvar <- ncol(datafr1)
2004 Mar 24
2
debugging a code
Hello just learned HowTo but R, reminded me with the way Perl does it but with much less on-line commands, R "AFAIK" has n, c, Q and where and cann't debug outside the {}. 1) is there a more versatile/flexable debugging method for R? I have saved 2 functions in an ASCII file "digfun". "getdata" function calls "squash" function and both use loops. In
2006 Jun 26
1
Passing arguments from a function within another function
Hi all, I have a function getSomeData() that is called from command line - getSomeData(id='1240'). The function getSomeData() calls another function getData that needs the exact same argument passed to getSomeData(). I am using the function call getData(paste(names(args[1]), "=", sQuote(args[[1]]))). The argument passed is- id='1240'. The problem is that in
2006 Jun 29
1
Problems Creating an R package
Hi all, When I check my package using "Rcmd check ..\myPackage\R.mykg" on Windows in Command Prompt, this is what get:- * using log directory 'C:/R/bin/R.getdata.Rcheck' * using Version 2.3.1 (2006-06-01) * checking for file 'R.getdata/DESCRIPTION' ... OK * checking extension type ... Package * this is package 'R.getdata' version '1.0' * checking
2003 Jan 30
2
Weird options(digits=n) behaviour
I noticed some very weird behaviour of the function: options(digits=n), where n is the number of digits you would expect to get in R calculations. Let's take a example: > options(digits=4) > getdata(caso.pool.k3.r3.e2) [1] 6.053 2.641 -3.639 14.259 6.082 Which works fine... now, trying again, with different data: > options(digits=4) > getdata(controle.pool.k3.r3.e2)
2004 Feb 28
1
when .Call can safely modify its arguments
Hi, "Writing R Extensions Guide" clearly states that a C-function interfaced via .Call() should not modify any of its arguments. However I wonder if there are exceptions to this rule, i.e. when .Call can safely modify the arguments. For example when a function creates a list that is then populated by a call to a C function: getData <- function() { data <- list(a=double(2),
2012 Jan 27
1
Overimposing one map in ssplot onto another
Hello! I have 2 maps - both created in ssplot and both identical in terms of outline. Is there any way to superimpose Map1 (which has black borders between Canadian provinces) onto Map2 (which is also a map of Canada)? Thanks a lot for your hints! Dimitri ### A. Reading in Canada data at the province and then at the county level: library(raster) getData('ISO3') # Canada's code is
2012 Nov 06
1
how Can make function for selecting the products
HI. I make this code: getdata<-function('a','b','c' ,'d','e','f'){ drv <- dbDriver("SQLite") con<-dbConnect(drv, "sqlite.db") lt<-dbListTables(con) myf<-data.frame(NULL) for (i in 1:length(lt)) { myfile<-dbReadTable(con,lt[i]) myfile1<-myfile[-c(14:44)] myfile1$MODEL<-gsub(" ",