similar to: enclosing with() in a function

Displaying 20 results from an estimated 8000 matches similar to: "enclosing with() in a function"

2011 Apr 13
2
FW: how to enclose two xyplot
Dear R-users, I have to plot two xyplot, and I wish to enclose this two graphs with just one headline, the same x scale, the same grid etc. These parameters should tie in, in order to obtain, visually, a unique graph formed by two xyplot. I try to give an idea: xyplot1: |_|_|_| xyplot2: |_|_|_| what i want: | | | | |_|_|_| I tried to use the command
2009 Dec 11
4
get the enclosing function name
Hi, Is there a way to get the enclosing function name within a function? For example, I would like to have a function getEnclosingFunctionName(). It works like below f = function(){ print(getEnclosingFunctionName()) } f() # will print "f" Thanks Jeff
2012 Aug 02
2
ggplot does not show in knitr
Hello, I'm having some issues getting a ggplot figure to show up in the knitr output, when placed in a loop. Specifically, I have a loop inside a knitr chunk : ```{r fitting, warning=FALSE, fig.width=10, fig.height=10, fig.keep='high'} for (t in 1:T) { # do a regression of tgt.vals ~ predictors and compute coeffs and fitted values (fit.vals / fit.adj.vals) plot(
2010 Jul 07
2
How not to print '\\' as '\\'
Hello All, '\\' is printed as '\\', but it is actually only one character. Sometimes, I'd rather print it as a single '\'. Is there a function to do so in R? > nchar('\\') [1] 1 > print('\\') [1] "\\" -- Tom
2011 Apr 13
2
How to get the names of all the packages that depend on a give package?
Dear All, I want to check what packages depends on a given package. For example, glmnet depends on Matrix. I want get the names of all the packages that depend on Matrix on CRAN. Is there a way to do so? Thanks! > library(glmnet) Loading required package: Matrix Loading required package: lattice -- Tom
2010 Jul 07
3
Weired problem when passing arguments using ...?
Hello All, I'm trying to pass the argument col.names to write.csv using '...'. But I got the following warnings. Maybe it is very simple. But I'm not sure what I am wrong. Could you please help point to me what the problem is? ##################### fun=function(x, ...) { fr=parent.frame() tmp=get(x, envir=fr) write.csv( tmp , file=paste(x, '.csv',
2010 Jul 14
2
How to define a function (with '<-') that has two arguments?
Hi All, The last line if the following code returns the error right below this paragraph. Essentially, I use the operator %:% to retrieve a variable in a nested frame. Then I want to use the same operator (with '<-') to change its value. I'm not sure if this is possible in R with %:% operator. Would you please help and let me how to correct the code if it is possible? Error in
2011 Feb 18
0
ERROR : Enclosing class/module 'mMysql2' for class Client not known
hi everybody , i am trying to test a simple webapplication but got the following error : molay@molay-VirtualBox:~$ gem install mysql2 Building native extensions. This could take a while... Successfully installed mysql2-0.2.6 1 gem installed Installing ri documentation for mysql2-0.2.6... Enclosing class/module ''mMysql2'' for class Client not known Installing RDoc documentation
2013 Apr 27
0
[LLVMdev] initializer for function local static variable called enclosing function
Hello, Today I encountered a problem when viewing some code. When executing the complied binary it aborted and give the error message. "initializer for function local static variable called enclosing function" The code is like this, static bool isDumpEnabled = getenv("env_dump_something") ! = 0 When executing this code, this error occurred once. But I don't know
2014 Feb 27
0
[Bug 10475] New: Delete based upon enclosing folder
https://bugzilla.samba.org/show_bug.cgi?id=10475 Summary: Delete based upon enclosing folder Product: rsync Version: 3.1.0 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P5 Component: core AssignedTo: wayned at samba.org ReportedBy: me at haravikk.com
2010 May 07
1
writing string values from a matrix to a file without enclosing quotes
I am trying to format data for the Geneland package I need to write a series of paired numbers and paired "000" to a plain ascii file without surrounding the numerals with quotes, the original data is in a matrix formatted paired strings, and written to file using write.table(x,"output filename",col.names=F,row.names=F) thus "77 79" "132 132" "000
2010 Jul 07
2
What does `_data` mean in transform()?
Hi All, I meant to take the min row by row. But the result is apparently not what I want. Changing min to pmin solve the problem. > df=data.frame(X=1:10, Y=1:10) > transform(df, Z=min(X,10-Y)) X Y Z 1 1 1 0 2 2 2 0 3 3 3 0 4 4 4 0 5 5 5 0 6 6 6 0 7 7 7 0 8 8 8 0 9 9 9 0 10 10 10 0 I try to look at the source code to understand what transform() does. I know
2010 Aug 02
2
Why do the results of paste() depend on how the argument (data.frame) is constructed?
Hi, The following two 'df's should be the same, although their constructions are different. But the results of paste() are different. I don't see this is explained in ?paste. Could you help me understand why it is like this? > df=data.frame(X=c(1, 2, 3), Y=c(4, 5, 6)) > df X Y 1 1 4 2 2 5 3 3 6 > paste(df) [1] "c(1, 2, 3)" "c(4, 5, 6)" >
2010 May 28
2
How to get the definition of a function if it is masked by a variable?
Hello, Normally, if I type a function name, it shows the function definition. When the function is masked by a variable with the same name, it doesn't show the function definition any more. Can anyone please tell me a way how to retrieve the function definition even if it is masked by a variable? > x=1:3 > length(x) [1] 3 > length function (x) .Primitive("length") >
2010 May 13
2
What functions are called internally in R to resolve what variable is referred?
Hello All, If I refer to a variable 'x', 'x' will be searched in the current frame or the parent frame, or the parent of the parent frame, etc., until it is found (or not found at all)? Could you please show me what code in R source that handles this? Is it in the C code or the R code? Thanks, Tom
2013 Mar 27
1
[LLVMdev] PROPOSAL: struct-access-path aware TBAA (new version)
Hello, After discussions with Daniel, Dan and others, here is an updated proposal for struct-access-path aware TBAA. Given an example struct A { int x; int y; }; struct B { A a; int z; }; struct C { B b1; B b2; int *p; }; struct D { C c; }; The purpose of struct-path-aware TBAA is to say "C::b1.a" will alias with "B::a.x", "C::b1.a" will alias with
2013 Mar 09
3
Feedback – Regarding R Programming Language Version 2.15.1 (2012-06-22) Usage
Dear Sir / Madam, I am using R Programming Language Version 2.15.1 (2012-06-22) for sometime in a 32 bit PC running Windows OS (Platform: i386-pc-mingw32/i386 (32-bit)). During the execution / interpretation of the R script, sometimes it is found that behavior of the program is not consistent with the program structure. For example, it has been seen that, even if a condition inside an IF
2012 Apr 25
2
On the Design of the R Language
http://www.cs.purdue.edu/homes/jv/pubs/ecoop12.pdf A new paper out on R the language -- I'm not all the way through it but it's been an interesting read so far. Thought it might be of interest to the list. Michael Weylandt [[alternative HTML version deleted]]
2011 Oct 03
4
distance coefficient for amatrix with ngative valus
Hi, I need to run a PCoA (PCO) for a data set wich has both positive and negative values for variables. I  could not find any distancecoefficient other than euclidean distace running for the data set. Are there any other coefficient works with negtive values.Also I cannot get summary out put (the eigen values) for PCO as for PCA.   Thanks. Dilshan [[alternative HTML version deleted]]
2011 Aug 25
3
Segment out of the Graph
Hello everyone, I have a graph and a segment parallel to the x axis at y=-10, x=0, and bars on it. Now the question is, Is there a way to leave the segment there but let the graph axis start from the origin? In this way the segment will be out of the graph Thanks [[alternative HTML version deleted]]