Displaying 20 results from an estimated 767 matches for "mg".
Did you mean:
  msg
  
2013 Apr 03
1
Superscript and for loops
Hi,
If I have data as follows:
DATA_names<-c(
"A mg kg"
"B mg kg"
"C mg kg"
"D mg kg"
"E mg kg"
"F mg kg"
"G mg kg"
"H mg kg"
How do I convert to:
             -1
A (mg kg   )
             -1
B (mg kg   )
             -1
C (mg kg   )
             -1
D (mg kg   )...
2010 May 02
2
Calculation error
...R <- 1/(1 - exp(-k * tau))
  Cmaxss <- Cmax * AR
  Cminss <- Cmin * AR
  Cfluctss <- (Cmaxss - Cminss)
  Ct       <- (Cmaxss * exp(-k * t))
  dose_loading_vd <- round(Cmaxss * vd.pt,0)
  dose_loading_dm <- round(total_dose_tau * AR,0)
  options(digits=2)
c("Ther. Win. (mg)"=twlo,"to"=twhi,"Wt (kg)"=wtkg,"Vd (L)"=vd.pt,"CL
(L/hr)"=cl.pt,"Cave (mg)"=cave,"D/tau (mg/hr)"=doserate,"tau
(hr)"=tau,"Total Dose (mg)"=total_dose_tau,"Cmax (mg)"=Cmax,"Cmin
(mg)"=Cmin,"...
2013 Sep 13
1
Creating dummy vars with contrasts - why does the returned identity matrix contain all levels (and not n-1 levels) ?
...to
define explicitly that I want contr.treatment (contrasts) ?
2.       If it is not possible, how should I interpret the hazard ratios in
the Cox regression I am generating (I use glmnet for variable selection and
then generate a Cox regression)  - That is, if I get an HR of 3 for the
variable 300mg what does it mean ? the hazard is 3 times higher of what ?
 
Here is some code to reproduce the issue:
 
# Create a 4 level example factor
trt <- factor( sample( c("PLACEBO", "300 MG", "600 MG", "1200 MG"),
                       100, replace=TRUE )...
2012 Oct 12
4
dotchart ordering problem
I'm having an sorting problem in dotchart. I want to change the order of the
BA in groups to AB, but I haven't found any solution yet. What should I do?
And what if I want to change the groups order as well? At the bottom from
Conrol up to 10 mg/L on the top. Thank you!
x = c(39, 23, 23, 35, 30, 26, 30, 30, 29, 29, 26, 29, 34, 33)
y = c("Control", "DMSO", "0,1 mg/L", "0,3 mg/L", "1 mg/L", "3 mg/L", "10
mg/L")
a = matrix(data= x, nrow=2)
rownames(a) = c("A",&qu...
2003 Jan 23
2
send_files failed to open filename ...
...ese messages harmful or not ?
Here below my rsync command and some of the error messages :
rsync --delete -zrv --bwlimit=$bwlimit --timeout=1200 
--exclude-from='/etc/rsync/exclude'  $user\@" . $server . 
"::htdocs/$dir/ /var/www/htdocs/$dir/
send_files failed to open 
www.lft.mg/matieres/svt/Evaluations/CLASSE.GIF: No such file or directory
send_files failed to open 
www.lft.mg/matieres/svt/Evaluations/COUPES.GIF: No such file or directory
send_files failed to open 
www.lft.mg/matieres/svt/Evaluations/DBasalte.gif: No such file or directory
send_files failed to open 
www.l...
2004 Aug 27
3
reorder [stats] and reorder.factor [lattice]
It was recently pointed out on the lists that the S-PLUS Trellis suite has
a function called reorder.factor that's useful in getting useful ordering
of factors for graphs. I happily went ahead and implemented it, but it
turns out that R (not S-PLUS) has a generic called reorder (with a method
for "dendrogram"). Naturally, this causes R to think I'm defining a
method for
2005 Oct 11
1
a problem in random forest
Hi, there:
I spent some time on this but I think I really cannot figure it out, maybe I
missed something here:
my data looks like this:
> dim(trn3)
[1] 7361 209
> dim(val3)
[1] 7427 209
> mg.rf2<-randomForest(x=trn3[,1:208], y=trn3[,209], data=trn3, xtest=val3[,
1:208], ytest=val3[,209], importance=T)
my test data has 7427 observations but after prediction,
> dim(mg.rf2$votes)
[1] 7361 2
which has the same length as my training data.
but if I use
mg.rf<-randomForest(x=trn3[...
2012 Sep 28
1
Lattice bwplot(): Conditioning on one factor
I'm not able to create the proper syntax to specify a lattice bwplot() for
only one of two conditioning factors.
   The syntax that produces a box plot of each of the two conditioning
factors is:
bwplot(quant ~ param | era, data=mg.d, main='Dissolved Magnesium', ylab='Concentration (mg/L)')
   What I've tried unsuccessfully are:
bwplot(quant ~ param | factor(era=='Pre-mining'), data=mg.d,
main='Magnesium', ylab='Concentration (mg/L))
bwplot(quant ~ param | era, data=mg.d, main='M...
2007 Aug 10
1
Subsetting by number of observations in a factor
Hi,
I generally do my data preparation externally to R, so I
this is a bit unfamiliar to me, but a colleague has asked
me how to do certain data manipulations within R.
Anyway, basically I can get his large file into a dataframe.
One of the columns is a management group code (mg). There may be
varying numbers of observations per management group, and
he would like to subset the dataframe such that there are
always at least n per management group.
I presume I can get to this using table or tapply, then
(and I'm not sure how on this bit) creating a column nmg
containing...
2007 Nov 18
14
css image url''s and :img problem
...the stylesheet do not appear. They are in the
same /static folder, next to the stylesheet.css file.
link :rel => ''stylesheet'', :href => R(Static, ''stylesheet.css''), :type
=> ''text/css''
In the CSS file i try:
background: #333333 url(img01.gif) repeat-x;
The class is here: http://pastebin.com/f7c92f95a
Another problem is for images, i cant seem to make them appear in the
page using:
img :src => R(Static, ''img04.jpg''), :alt => ''test image''
I always get the alternate description (or a thu...
2011 Jul 13
1
How to remove last 3 letters
Hello to everybody
I have vector of drug dosage in string format
1.5 mg , 50 mg , 100 mg , 0.5 mg ...
The task is to remove last free symbols: ' mg'
Any suggestions are highly appreciated
2008 Apr 12
5
ZVOL access permissions?
How can I set up a ZVOL that''s accessible by non-root users, too? The intent is to use sparse ZVOLs as raw disks in virtualization (reducing overhead compared to file-based virtual volumes).
Thanks,
-mg
 
 
This message posted from opensolaris.org
2003 Mar 07
1
column name changes based on substrings
Hi peoples,
I'm trying to work out a function which will allow me to relace column names 
on the basis of substrings within the existing names. e.g.
I'd like:
   blah.Na  blah2.Na  blah3.Mg  blah4.Mg  blah5.K  blah6.K
R1       x         x         x         x        x        x
R2       x         x         x         x        x        x
...
to become:
    Na (%)    Na (%)    Mg (%)    Mg (%)  K (ppm)  K (ppm)
R1       x         x         x         x        x        x
R2       x...
2006 Nov 22
2
G722?
In a recent interview someone from Digum indicated that the G722 wideband codec was being worked into Asterisk. This will make Asterisk compatible with Polycom's new HDVoice products 
like the IP650 phone. This is very interesting, potentially exciting, but it brings up certain questions.
Who will benefit as long as calls must typically pass into existing PSTN infrstructure, and so be
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]]
2011 Nov 09
4
Interpreting Multiple Linear Regression Summary
I would appreciate pointers on what I should read to understand this
output:
  summary(lm(TDS ~ Cond + Ca + Cl + Mg + Na + SO4))
Call:
lm(formula = TDS ~ Cond + Ca + Cl + Mg + Na + SO4)
Residuals:
ALL 1 residuals are 0: no residual degrees of freedom!
Coefficients: (6 not defined because of singularities)
             Estimate Std. Error t value Pr(>|t|)
(Intercept)      125         NA      NA       NA
Con...
2010 Oct 13
5
Regular expression to find value between brackets
Hi,
this should be an easy one, but I can't figure it out.
I have a vector of tests, with their units between brackets (if they have
units).
eg tests <- c("pH", "Assay (%)", "Impurity A(%)", "content (mg/ml)")
Now I would like to hava a function where I use a test as input, and which
returns the units
like:
f <- function (x) sub("\\)", "", sub("\\(", "",sub("[[:alnum:]]+","",x)))
this should give "", "%", "...
2005 Mar 17
2
Repeated Measures, groupedData and lme
...il mineral data were collected : 99, 02, 04. 
In the experiment, there are 19 different treatments (treatmentcontrol,
treatment6TFYM, treatment 12TFYM etc),  which are replicated in 3
blocks.
For the magnesium soil data, I have created the following groupedData
object: 
magnesium<-groupedData(Mg~year|treatment, inner=~block) 
Where mg=magnesium Kg/ha
As it is a repeated measures I was going to use an lme.  I have looked
at Pinherio and Bates : Mixed-Effects models in S and S-plus and I am
getting slightly confused.  In order to fit the lme, should I specify
the data to use in the model as...
2011 Sep 20
1
Specifying Start/End Dates for X-axis Range in plot()/xyplot()
...tting a zoo object. I thought that
I had seen a message on this list that used start=as.Date("...")
end=as.Date("..."), but I cannot find that message. I've tried ?plot,
?plotxy, ?plot.zoo, and Sarkar's lattice book.
   I am trying to plot the time series for 'Burns Mg' generated by:
> sapply(names(z), function(nm) range(time(na.omit(z[, nm]))), simplify = FALSE)
$`Burns Mg`[1] "1994-01-20" "2009-11-11"
   This is a typical result of my trial-and-error approach:
> plot(z[, $'Burns Mg'], range(time(start = as.Date("199...
2010 Mar 18
5
One-time script to update 1000s of values in a single column in a table: nil error?
...9;') if self.strength.gsub!
('' g'', ''g'') != nil
 self.strength = self.strength.gsub!('' oz'', ''oz'') if
self.strength.gsub!('' oz'', ''oz'') != nil
 self.strength = self.strength.gsub!('' mg'', ''mg'') if
self.strength.gsub!('' mg'', ''mg'') != nil
end
When I try to run this, I always get the error:
NoMethodError: private method `gsub'' called for nil:NilClass
I''m sure this is a simple error and/or I''m...