Displaying 20 results from an estimated 2000 matches similar to: "difficulty with R expressions in text/legend"
2012 Nov 14
2
vectorized plotmath expressions via substitute()
hi all - i've seen versions of this question before, but none seem to get
directly at my solving my (probably very simple) issue:
i simply want to annotate the tick marks on an axis with (superscripted)
10^x notation, and tried this:
axis(1, at = axTicks(1), as.expression(substitute(10^foo, list(foo =
axTicks(1))))
thinking the as.expression/substitute would create the appropriate
2007 Mar 05
1
Setting Sip Headers From Dial App?
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
This might sound strange, but is there anyway for Asterisk to set extra
sip headers based on a sip phone returning a 302 in a dialplan?
Example:
PSTN => Asterisk => SIP-Phone, SIP-Phone returns 302 Redirect, Asterisk
sets X-Something: Some_Value & X-Somethingelse: Some_Other_Value, then
sends the new invite with added headers.
Stu Sheldon
2010 Feb 02
0
[LLVMdev] jit X86 target compilation callback bug
Hello
> We are running llvm jit x86 on MS Visual Studio 2005. It seems there
> is a bug in asm code in function X86CompilationCallback in file
> X86JITInfo.cpp. Current code sets stack pointer to invalid value in
> instruction "and esp, 16". Depending on current stack pointer value
> it sometimes overwrites ecx and edx registers with next three lines.
How so? The stack
2023 Apr 12
1
Split String in regex while Keeping Delimiter
On Wed, 12 Apr 2023 08:29:50 +0000
Emily Bakker <emilybakker at outlook.com> wrote:
> Some example data:
> ?leucocyten + gramnegatieve staven +++ grampositieve staven ++?
> ?leucocyten ? grampositieve coccen +?
> ?
> I want to split the strings such that I get the following result:
> c(?leucocyten +?, ??gramnegatieve staven +++?,
> ??grampositieve staven ++?)
>
2005 Oct 01
2
Multiple expressions, when using substitute()
expression() accepts multiple expressions as arguments, thus:
plot(1:2, 1:2)
legend("topleft",
expression(y == a * x^b,
"where "* paste(y=="wood; ",
x=="dbh")))
Is there a way to do this when values are to be substituted
for a and b? i.e., the first element of the legend argument
to legend() becomes,
2010 Oct 01
3
scoping goes wrong when some functions are used within others.
Dear,
I'm following the r tag on stackoverflow.com, and couldn't but notice
there are quite some questions popping up that deal with scoping in
relation to custom functions. I grinded my teeth on it already, and I
have absolutely no clue what goes wrong. The general pattern is as
follows :
ff <- function(x){
y <- some_value
some_function(y)
}
> ff(x)
Error in eval(expr,
2007 Jun 11
5
string conversion?
Hi there!
Is it possible to do something string converison like in puppet?
My problem:
I have a variable that contains a path ($variable = "some/value"). This
variable is passed on as an option to an external script, which uses the
variables content to generate I) a path and II) a filename, converting
the "/" to "_" for that filename.
I don´t really see a way to
2011 Nov 22
4
Data Frame Search Slow
Hey All,
So - I promise to write a blog post on this topic and post it somewhere on
the internet once I get to the bottom of this. Basically, the set-up to the
problem is like this:
1. I have a data frame with dim (2547290, 4)
2. I need to make SQL like lookups on the dataframe. I have been using the
following sort of syntax:
a.dataframe[a.dataframe[[column_index]] %in% some_value, ]
3.
2002 Sep 23
1
calling a DLL/shared lib from R directly?
Is it possible to call a basic function/subroutine in a DLL/shared lib from
within R without having to build an R package?
I have a function like:
void __stdcall testfunc2(
unsigned long a,
double b,
unsigned long c )
{
return a * b * c;
}
or=20
subroutine fortran_2002_bh_age (sp,site,total_age,bh_age)
integer*2 sp
real*4 site=20
real*4 total_age
integer*2 bh_age
2009 Aug 25
3
math symbol + value of a variable in legend.
Hi R users:
I will like to have a legend with math symbols and also with
the value of a variable.
But I cannot obtain both at the same time (symbol + value of a
variable):
Here is a reproducible example:
m1<-5
m2<-12
plot(1:5,1:5,type="n")
legend("topleft",legend=c(paste(expression(mu),"=",m1),expression(paste(mu,"=",m2))),lty=1:2)
Thank you for
2009 Aug 25
3
math symbol + value of a variable in legend.
Hi R users:
I will like to have a legend with math symbols and also with
the value of a variable.
But I cannot obtain both at the same time (symbol + value of a
variable):
Here is a reproducible example:
m1<-5
m2<-12
plot(1:5,1:5,type="n")
legend("topleft",legend=c(paste(expression(mu),"=",m1),expression(paste(mu,"=",m2))),lty=1:2)
Thank you for
2007 Jun 08
2
legend + expression
Dear all;
A simple? question.
I'm having a problem with a math expression in the legend of a plot
and I haven't found the way to get this to work, so any help will be
appreciate. Basically I want to include in the plot is the R-squared
and its numerical value, so I tried this:
R2c<-0.82879 # R-squared of calibration model
plot(1:10,1:10)
legend("topleft",
2003 Jul 11
1
metapost device in R (again ;-)
Hi,
I read the 2000 thread on a MetaPost device in R. If I understand
correctly, the main problem with the concept is that R wants the device
driver to give back information on the size of strings/labels.
To the bet of my knowledge, MetaPost _does_ make it possible to
measure the bounding box of text (see section 7.3: Measuring text in
the MetaPost manual). For example, one could get the size of
2010 Jan 25
2
Two == expressions in bquote
Hi,
I want to put text on a plot containing something like: a = b^2 = <squared numeric value of b> using bquote.
Example:
mu = 5
plot(1:10,1:10)
text(2,8, bquote(delta == mu^2)) # This works
text(2.5,8, bquote(phantom(0) == .(mu^2))) # but is unpredictable
text(2,8, bquote(delta == mu^2 == .(mu^2))) # This doesn't work
The last text function returns the error:
2009 Nov 20
1
How to concatenate expressions
Dear R-users,
I am developing a plotting function, which receives expressions and
character/numerical vectors as part of the many input arguments and
which tries to concatenate them before displaying the result to the
plot. I currently cannot find a way to make this concatenation works. I
have read several posts in the list that solved this problem by pasting
the different elements together
2012 Oct 11
4
characters, mathematical expressions and computed values
Hello,
I have to add "Age (bar(x)=14.3) as a title on a chart. I am unable to get
this to working. I have tried bquote, substitute and expression, but they
are only doing a part of the job.
new<-
c(14.3, 18.5, 18.1, 17.7, 18, 15.9, 19.6, 17.3, 17.8, 17.5, 15.4,
16.3, 15, 17.1, 17.1, 16.4, 15.2, 16.7, 16.7, 16.9, 14.5, 16.6,
15.8, 15.2, 16.2, 15.6, 15, 17.1, 16.7, 15.6, 15, 15.8, 16.8,
2006 Jun 26
3
syntax for observe_field( :with =>
Greetings!
What is up with the syntax of this thing? I mean, if the only thing I can send back using :with is the field being observed, then why in the world is the syntax so convoluted? For example, what I''ve been able to get working is:
<%= text_field_tag(''date'', illness_date, :size => 30) %></p>
<%= observe_field(''date'', :url
2009 Dec 11
1
Array of legend text with math symbols from predefined variables
Hello,
I am trying to include legend text with math symbols from a predefined
character variable that is read in from a file.
?
If there is only one line of text in the legend, the following, although
cumbersome, works for me:
? > LegendText = " 'U' [infinity], '=10 m/s' "?? # (read in from a file)
??> LegendName = paste("bquote(paste(",LegendText,
2010 Feb 02
3
[LLVMdev] jit X86 target compilation callback bug
Hi!
We are running llvm jit x86 on MS Visual Studio 2005. It seems there
is a bug in asm code in function X86CompilationCallback in file
X86JITInfo.cpp. Current code sets stack pointer to invalid value in
instruction "and esp, 16". Depending on current stack pointer value
it sometimes overwrites ecx and edx registers with next three lines.
We have fixed this problem by changing this
2003 Jun 20
6
How can convert user expired days in human readable ?
Hello all,
On my system, some users have expire day user settings. I write a
(python) script
then parse the: 7.th selection in the master.passwd
blabla:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:1064005200:xxxx:xxxx:xxxx:xxxx
How can I conver the number like 1064005200 to human readable date format ?
Or, there is a way to collect the information from a command interactively ?
Regards,
Murat Ustuntas