similar to: Superscript and for loops

Displaying 20 results from an estimated 8000 matches similar to: "Superscript and for loops"

2013 Apr 03
3
Superscript
Hi, How do I write a superscript within gsub? I have the following: gsub("_mgkg",expression(paste("mg kg"^{-1})),names[1]) Thanks -- Shane [[alternative HTML version deleted]]
2010 May 02
2
Calculation error
Dear Rxperts, Running the following code: ======================================================= twlo=10; twhi=20; wt=154; vd=0.5; cl=0.046; tau=6; t=3; F=1; wtkg <- wt/2.2 # convert lbs to kg vd.pt <- wtkg * vd # compute weight-based vd (L) cl.pt <- wtkg * cl # compute CL (L/hr) k <- cl.pt/vd.pt # compute k (hr^-1) cave <-
2005 Mar 17
2
Repeated Measures, groupedData and lme
Hello I am trying to fit a REML to some soil mineral data which has been collected over the time period 1999 - 2004. I want to know if the 19 different treatments imposed, differ in terms of their soil mineral content. A tree model of the data has shown differences between the treatments can be attributed to the Magnesium, Potassium and organic matter content of the soil, with Magnesium being the
2017 Sep 25
2
Subset
myDF <- data.frame(a = c("<0.1", NA, 0.3, 5, "Nil"), b = c("<0.1", 1, 0.3, 5, "Nil"), stringsAsFactors = FALSE) # you can subset the b-column in several ways myDF[ , 2] myDF[ , "b"] myDF$b # using the column, you make a logical vector ! is.na(as.numeric(myDF$b)) # This can be used to select the
2017 Sep 22
3
Subset
Super, Thanks On Fri, Sep 22, 2017 at 4:57 PM, Boris Steipe <boris.steipe at utoronto.ca> wrote: > > a <- c("<0.1", NA, 0.3, 5, "Nil") > > a > [1] "<0.1" NA "0.3" "5" "Nil" > > > b <- as.numeric(a) > Warning message: > NAs introduced by coercion > > b > [1] NA NA 0.3
2017 Sep 25
0
Subset
Hi, Lets say this was a dataframe where I had two columns a <- c("<0.1", NA, 0.3, 5, "Nil") b <- c("<0.1", 1, 0.3, 5, "Nil") And I just want to remove the rows from the dataframe where there were NAs in the b column, what is the syntax for doing that? Thanks in advance On Fri, Sep 22, 2017 at 5:04 PM, Shane Carey <careyshan at
2017 Sep 25
1
Subset
Always via logical expressions. In this case you can use the logical expression myDF$b != "0" to give you a vector of TRUE/FALSE B. > On Sep 25, 2017, at 8:00 AM, Shane Carey <careyshan at gmail.com> wrote: > > This is super, really helpfull. Sorry, one final question, lets say I wanted to remove 0's rather than NAs , what would it be? > > Thanks >
2005 Feb 15
1
Trellis barchart, column display order issue
I have searched the archives and instructions high and low but have not found what I need. I have a dataframe named Data with columns: AdjResND0 - the numeric result Parameter - the classification (chemical name) Sort - the order I want the chemical names to appear, with leading zeros so all are the same length Client.Name - the sample name I am trying to generate a series of 1 page barcharts,
2017 Sep 25
0
Subset
This is super, really helpfull. Sorry, one final question, lets say I wanted to remove 0's rather than NAs , what would it be? Thanks On Mon, Sep 25, 2017 at 12:41 PM, Boris Steipe <boris.steipe at utoronto.ca> wrote: > myDF <- data.frame(a = c("<0.1", NA, 0.3, 5, "Nil"), > b = c("<0.1", 1, 0.3, 5, "Nil"), >
2012 Dec 04
1
control point size of superscript when labeling axes with title()
Hi- A journal has asked me to make all of my text annotations on a figure at 10-point size. For the most part this is easy, e.g. by creating figures with: pdf(..., family='Times', pointsize=10) But where I have superscripts (or subscripts) in axis labels, the default seems to be to shrink the superscripted text slightly. For example this code:
2017 Jul 31
0
Superscript and subscrib R for legend x-axis and y-axis and colour different subjects in longitudinal data with different colours
Hi Rosa something like plot(1,1, sub=expression(lambda^"2")) So with your example, do you want something like plot(c(1:5), CRP7raw[1,], type = "n", xlim=c(1,5), ylim=c(-10,5) , xlab="Day in ICU", ylab="CRP (mg/dL)", sub = mtext(expression(lambda^2))) CRP7graph <- apply(CRP7, 1, lines, col="gray") Cheers Petr >
2011 Oct 24
1
Different symbols for select points
Dear R users,  I hope you can help me as you have done before.  I was wondering if I can make some of the points on my graph a different colour and symbol? Some of my soil samples are enriched and I wanted them to be shown with a red triangle and the samples which are not enriched I wanted to show with a blue square. I can't seem to find a way of doing this if there is a way?  My script:  
2013 Sep 26
1
R not ploting lines in the correct order
Hi, I have a set of x, y points where x represents dates and y actual values. I am trying to plot a line graph of the data with points on top, but R is connecting the wrong points with lines. Does anyone know how I can rectify this. Please see sample below: x= 24/09/2009 09:13 16/10/2009 11:17 24/10/2009 21:43 11/09/2009 18:34 22/08/2009 15:45 10/08/2009 00:30 14/08/2009 14:52 24/09/2009
2017 Jul 28
3
Superscript and subscrib R for legend x-axis and y-axis and colour different subjects in longitudinal data with different colours
I am trying to make a x-axis and y-axis titles with both a special character and a subscript. I am not being able to do this. I think its just a placing of my parenthesis, but I've tried (seemingly) everything. Even more, when I try the blog users code it works. Is it because I?m using longitudinal data? Even more. Is it possible to colour each one of the 15 lines with a different
2017 Jul 31
0
Superscript and subscrib R for legend x-axis and y-axis and colour different subjects in longitudinal data with different colours
Hi Martin see in line > -----Original Message----- > From: Martin Maechler [mailto:maechler at stat.math.ethz.ch] > Sent: Monday, July 31, 2017 10:52 AM > To: PIKAL Petr <petr.pikal at precheza.cz> > Cc: Rosa Oliveira <rosita21 at gmail.com>; r-help mailing list <r-help at r- > project.org> > Subject: Re: [R] Superscript and subscrib R for legend x-axis and
2012 May 29
1
Boxplot superscript y-axis
Dear list, I need to include in a superscript number (-1) in a y-axis label of a boxplot graphic. I tried the following line: >boxplot(five$gr13~five$Code, xlab="Species code", ylab=substitute(paste("DGL growth (cm.yr"^{-1},")"))) It returns the following error message: Error in "DGL growth (cm.yr"^{ : non-numeric argument to binary operator I used
2017 Sep 22
2
Subset
Hi, How do I extract just numbers from the following list: a=c("<0.1",NA,0.3,5,Nil) so I want to obtain: 0.3 and 5 from the above list Thanks -- Le gach dea ghui, *Shane Carey* *GIS and Data Solutions Consultant* [[alternative HTML version deleted]]
2017 Jul 31
2
Superscript and subscrib R for legend x-axis and y-axis and colour different subjects in longitudinal data with different colours
> Hi Rosa > something like > plot(1,1, sub=expression(lambda^"2")) > So with your example, do you want something like > plot(c(1:5), CRP7raw[1,], type = "n", xlim=c(1,5), ylim=c(-10,5) , > xlab="Day in ICU", > ylab="CRP (mg/dL)", > sub = mtext(expression(lambda^2))) OOps! Either plot( ..., sub = *) or
2017 Jul 31
0
Superscript and subscrib R for legend x-axis and y-axis and colour different subjects in longitudinal data with different colours
Hi, everyone, Before everything, thanks. Lots of thanks ;)!!!! I don?t think you understood everything I need to do. I want to write t_i instead of "Day in ICU? [i subscript for t] and y_ij instead of "CRP (mg/dL)? [ij superscript for y]. The label of the axis? :( Can you help me on that task? Thanks!!!!! Best, Rosa Oliveira > On 31 Jul 2017, at 10:28, Martin Maechler
2013 Mar 26
6
How do I show real values on a log10 histogram
Hi, I have a histogram with values logged to the base 10 hist(log10(x),breaks=60) How do I show the log values on the x-axis and a second x-axis showing the real values? Thanks -- Shane [[alternative HTML version deleted]]