similar to: special symbols into a text string

Displaying 20 results from an estimated 10000 matches similar to: "special symbols into a text string"

2008 Jan 13
3
product of vector elements
All, I would like to find a simper method that I now have to find the product of all elements in a vector: #get product of vector elements: (1,2,3,4,5) vec.product <- exp(sum(log(c(1,2,3,4,5)))) I have not found a vector product function, if one has been written. Thanks, Gerard [[alternative HTML version deleted]]
2012 Aug 20
1
Inserting superscripts in free-format text line
I would like to insert a superscript in a body of text (e.g., a title or axis label), where the superscript is not necessarily at the end of the text. For example, suppose a title read, "This is a Test^1 of the Emergency Broadcast System" where there is a superscript 1 after the word Test. As a starting point for what I'm trying to do, the following shows a superscript:
2007 Feb 15
3
something missing in summary()
I just noticed that two key pieces of information are not given by the summary() command: N and SD. we are given the N missing, but not the converse. I know these summary value can be obtained easy, but can't understand why these two pieces of information are not provided with the other info. Thanks, Gerard
2008 Aug 01
1
Properly Parsing Pre-Superscripts & Displaying Them With grid.text
Hi all... I?m making a chart dealing with frequencies of isotopes of various elements. For instance, I'd like the following text to appear on a chart with the "35" and "37" as superscripts: Based upon: 35Cl: 75% 37Cl: 25% I am having problems properly parsing the superscript that preceeds the "Cl", since there is no character ahead of the superscript (I saw
2005 Jun 05
1
Superscript text in axis labels
Hello, I am guessing this is not a difficult question. But at the same time, I haven't had much luck figuring this issue out from the R documentation and help pages. How can I create superscript text in the labels of a plot? The parameter along my y-axis is volume and my desire is for the y-axis label to read "Volume (cm^3)" except with the "3" in the superscript
2007 Sep 07
2
R first.id last.id function error
Hi R users, I have a test dataframe ("file1," shown below) for which I am trying to create a flag for the first and last ID record (equivalent to SAS first.id and last.id variables. Dump of file1: > file1 id rx week dv1 1 1 1 1 1 2 1 1 2 1 3 1 1 3 2 4 2 1 1 3 5 2 1 2 4 6 2 1 3 1 7 3 1 1 2 8 3 1 2 3 9 3 1 3
2008 Sep 23
1
superscript text style in axis label in graph
Hi all, I'd like to use superscript or subscript in the axis label of a graph. Is that possible in R? For instance in xlab="Ce (mmol/m3)", I'd need the "3" of cubic meter in superscript. Regards/Cordialement ------------- Benoit Boulinguiez Ph.D Ecole de Chimie de Rennes (ENSCR) Bureau 1.20 Equipe CIP UMR CNRS 6226 "Sciences Chimiques de Rennes" Campus
2012 Feb 20
1
question on axis labels
Hi All, I'm trying to label my plot axis with times (HH:MM) that correspond to a numeric index (values 0:6) for my time variable. I'd like to plot "08:00", "12:00", and so on, instead of 0 through 6. I have used the following line of code: axis(1, 0:6, labels=c("08:00", "12:00", "16:00", "20:00", "24:00",
2006 Aug 04
2
expression() - Superscript in y-axis, keeping line break in string
I've tried several different ways to accomplish this, but as yet to no avail. My y-axis for a plot has a rather long label, and thus I have been using "/n" to break it into two lines. However, to make it technically correct for publication, I also need to use superscript in the label. For example: par(oma=c(0,0,2,0),mar=c(5,6,0.25,2),lheight=1) plot(1:10,
2010 Oct 22
2
superscript characters in title with '+'
Hi, How can I get the '2+' into superscript in the following title: '[Ca2+]i onsets' I tried the command below, but it doesn't work. What am I missing? hist(X, main=expression(([Ca*]i^2+) 'onsets'), xlab = 'sec') -- View this message in context: http://r.789695.n4.nabble.com/superscript-characters-in-title-with-tp3006981p3006981.html Sent from the R
2010 Oct 06
4
problem with abline
Hi All, I am running a scatter plot and trying to add a best fit line. I use an abline function, but get no line drawn over the points. I also get no error. I arm using V 2.10.0 on Windows 7. Here is my code, including the SAS transport file import: require (foreign) require (chron) require (Hmisc) require (lattice) clin <- sasxport.get("y:\\temp\\subset.xpt") attach(clin)
2018 May 21
3
strange behavior of plotmath
hi there, I find the following codes produce strange output. plot(1:10, xlab = expression(NO[3]^-~(mg/L))) you will notice that the unit, mg/L is in superscript format. That means that "~" is not for space. However, the help page of plotmath does not mention this behavior. Best, Jinsong [[alternative HTML version deleted]]
2008 Jan 01
3
if statement problem
Hi All, I have a small dataset named das (43 cases) in which I am trying to create a binary outcome (1/0) based on the following code: if (das$age>65 && das$bmi>30) {das$danger<-1} else das$danger<-0 I am setting a flag called 'danger' to 1 of the subject is over 65 and has a BMI > 30. I find that my statement evaluates the first record in the data.frame and
2010 Jan 29
1
Plotmath: suprscript on scalable delimiter?
ComRades, How do you put a superscript on a scalable delimiter? I want to put 'b' as the power of the expression in the following plot: t <- 1:25 K <- 0.2 y <- ((1-exp(-K*t))/(1-exp(-K*t)*exp(K)))^3 plot(t,y,"l",main="K=0.2, b=3") text(15,5,expression(bgroup("(",frac(1-e^-Kt,1-e^-Kt*e^K),")"))) Plotmath examples in demo(plotmath) do not
2007 Sep 20
2
Plotmath issue superscript "-"
Dear List, I'm trying to typeset some chemical ions in axis labels. These have both super and subscript components, and for some, I need a superscript "-". In LaTeX I might use $NO_3^-$ to do the typesetting, but I'm having a problem getting the correct invocation for expression: > expression(NO^{-}[3]) Error: syntax error, unexpected '}' in
2008 Jan 29
1
Convert string for expression in plot
Hi, Although I understand how to use expression and paste to add superscripts and symbols to my graphs, I have a problem with adding superscripts to an existing string. For example, I read in the following from a separate file: 25Mg(p,g) I want to convert that to superscripts etc. (in LaTex format): $^{25}$Mg(p,$\gamma$) This needs to then be put into a graph title. Any ideas? I know that I
2010 Aug 01
3
Constructing arguments for plotmath
Colleagues, I am encountering difficulty adding formatted text to a graphic. Specifically, I want to add a superscript in the middle of a text string but I would like to format the text string on the fly. The commands: plot(1,1) ARG <- bquote('TEXT'^'\u00ae') mtext(ARG, line=-2, side=1) yield the desired output. However, my goal is to paste together a string, then pass
2004 May 18
7
Isotopic notation in plots
I really like to use R for all my graphs, and as I work with stable isotopes I want to have a proper chemical notation in my plots I have looked at ?plotmath, but didn't find the answer and also searched the R website. ------------------------------------------------------------------------ -- plot(1:10,xlab=expression(^{14}*C)) # I want to have a superscript with nothing in front, but it
2006 Nov 30
3
Expression
Hi all, I have a question about expression. In a figure I want to include the term D*obs with the star as as superscript and obs as subscript. I have even just tried to get the star to be superscript. The code I tried was text(Dstar+7,120,expression(paste({}D,^*))), but that doesn't work and I get a syntax error. I can't seem to find anything in the help files that explains it.
2004 Aug 09
4
Simultaneous subscripts and superscripts
Dear List, I'd like to add text to a plot where a text symbol has both a superscript and subscript. For example, the variable S with a superscript 2 and a subscript t. I have been able to accomplish this using either expression( paste(S,atop(scriptstyle(2),scriptstyle(t))) ) or expression( {S[t]}^2 ) but the spacing isn't quite right (or rather what I'd like) using either of