[R] Failed Convergence when using mi to generate synthetic data

2012-05-09 Thread Rob James
I was hoping to use mi to generate a synthetic version of a database.  The
strategy (see code below) was simple: use the diamonds dataset from
ggplot2,  subset it focus on  3K single-color, then create a blank record
for every "real" record, and throw the new dataset at mi to see if it would
populate the blank records.  I kept getting failed convergence.

I think I have simplified the dataset down to the point where either I am
doing it wrong or something is wrong (conceptually) with what I am doing. I
would welcome suggestions:

library(ggplot2)
library(mi)
data(diamonds)
#use only 2800 or so observations!
diamonds1 <-subset(diamonds, color=="J")
rm(diamonds)
#simplify the data structure
diamonds1 <-subset(diamonds1, select=-c(x, z, y, cut, clarity, depth,
table))
str(diamonds1)

#generate a blank table

emptydiamonds1 <-diamonds1
for(j in 1:dim(diamonds1)[2]) {
emptydiamonds1[,j] <- NA
 }

#throw up a dummy variable for imputation
diamonds1$impute=0
emptydiamonds1$impute=1

#package the two into one dataset

d2 <-rbind(diamonds1, emptydiamonds1)
str(d2)

#run in.info
miinfo <-mi.info(d2)

#pre_process
mi_pre <-mi.preprocess(d2)

#impute

Imp1 <-mi(mi_pre, n.iter=49)

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Quantile scores as dependent variables.. an R and general method question

2012-02-28 Thread Rob James
I have a dataset that does not include native scores, but only serial
quantile rankings for a set of units.

Clearly these observations are dependent (in that you can't alter one
observation without also altering others).

Are there methods for dealing with quantile dependent variables. My atempt
to find such methods has not bee successful.

Any leads to theory, texts or R code would be most appeciated.

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] plot methods for summary of rms objects

2011-10-11 Thread Rob James
The integration of plot methods for various outputs from rms packages is 
a great appreciated aspect of the rms package.


I particularly like to use:

plot(summary(model))

for my own purposes, but... for publication/presentation I need to 
modify details like variable names, or the number of signficant digits 
used in the figure annotations.


Is there a simple way to modify the plot inputs arising from summary, or 
is it necessary to hack the summary object?


Thanks

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] rms:fastbw variable selection differences with AIC .vs. p value methods

2011-08-19 Thread Rob James
I want to employ a parsimonious model to draw nomograms, as the full 
model is too complex to draw nomograms readily (several interactions of 
continuous variables).  However, one interesting variable stays or 
leaves based on whether I choose "p value" or "AIC" options to 
fastbw().  My question boils down to this: Is there a theoretical reason 
to prefer one over another?



Consider:

fastbw(model94c, aic=1e10)

 DeletedChi-Sq d.f. P  Residual d.f. P  AIC
 ToD  0.11  3   0.99030.11   3   0.9903   -5.89
 Experience * ToD 2.56  3   0.46462.67   6   0.8487   -9.33
 Experience * Assoc   0.45  2   0.79703.13   8   0.9262  -12.87
 RatePressure 2.99  3   0.39396.11  11   0.8658  -15.89
 DW_height_t  2.92  3   0.40479.03  14   0.8293  -18.97
 TBV * Experience 3.46  3   0.3260   12.49  17   0.7698  -21.51
 Experience * Sex 0.05  1   0.8153   12.54  18   0.8181  -23.46
 Experience   0.18  1   0.67212.72  19   0.8526  -25.28
 Sex  1.19  1   0.2745   13.91  20   0.8348  -26.09
 Assoc6.09  2   0.0475   20.01  22   0.5826  -23.99
 Experience * Pulse  10.53  3   0.0146   30.53  25   0.2049  -19.47
 Sex * ToD   18.24  3   0.0004   48.77  28   0.0088   -7.23
 PulsePressure   21.15  3   0.0001   69.92  31   0.00017.92
 Race19.87  2   0.   89.79  33   0.   23.79
 Pulse   25.31  3   0.  115.09  36   0.   43.09
 Age * Experience   202.80  3   0.  317.89  39   0.  239.89
 TBV282.41  3   0.  600.30  42   0.  516.30
 Location   310.19 14   0.  910.50  56   0.  798.50
 Age809.64  3   0. 1720.13  59   0. 1602.13



The ordering of variables is expected, and is consistent with the 
substantial knowledge I have about the outcome.


The problematic variable is Sex * TOD .  When I use p value as the rule, 
with an SLS of 0.01, the variable is retained, but when I use AIC , 
Sex*TOD is not retained. This reflects the fact that while the Sex*TOD 
interaction is theoretically interesting, the AIC value is negative and 
relatively small in magnitude, even as the p value skirts below 0.01.   
Is this judgement territory or are their statistical considerations that 
should be invoked? Caveats?




Is there a theoretical reason to choose AIC over p value methods, or is 
either acceptable?


__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] When models and anova(model) disagree...

2011-06-15 Thread Rob James


I have a situation where the parameter estimates from lrm identify a 
binary predictor variable ("X") as clearly non-significant (p>0.3), but 
the ANOVA of that same model gives X  a chi^2-df rank of > 200, and 
adjudicates X  and one interaction of X and a continuous measure as 
highly significant.  The N is massive and X has two categories, each 
with > 100,000 observations.  I would expect X to have a significant 
impact on the outcome.


The full model includes a large number of continuous (coded with rcs 
with 3 knots)  and categorical variables, as well as a plethora of 
interactions between the categorical and continuous variables. Only one 
of the interactions between the binary variable and the other 
categorical or continuous variables is statistically significant.


Can anyone offer a suggestion on what might explain this discordance?

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Removal of elements from nomograms

2011-06-02 Thread Rob James
The rms package includes the nomogram function, which generates a list 
object that can be passed to plot for graphical production of nomograms.


I would like to remove  the "linear predictor" line in the graph, which 
means (I suspect) removing it from the nomogram output object.  I've 
looked at the nomogram output object, but it is not clear to me if or 
how it might be edited to remove the linear predictor content. Similarly 
, I do not see how to coax  nomogram()  into not producing this output 
in the first place.


As ever, thanks in advance are likely due to Frank Harrell, without whom 
many things would be much more difficult.


__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Nomograms from rms' fastbw output objects

2011-04-28 Thread Rob James
There is both a technical and a theoretical element to my question... 
Should I be able to use the outputs which arise from the fastbw function 
as inputs to nomogram().  I seem to be failing at this, -- I obtain a 
subscript out of range error.


That I can't do this may speak to technical failings, but I suspect it 
is because Prof Harrell thinks/knows it injudicious. However,  I can't 
invent a reason why nomograms should be restricted to the full models, 
if the purpose of fastbw is to generate parsimonious models with 
appropriate standard errors.


I'd welcome comments on either the technical or the theoretical issues.

Many thanks in advance,

Rob James

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Baseline terms for lrm

2011-01-18 Thread Rob James

I should rephrase my question.

When using the notation rcs(V1, N) within the lrm function in the rms 
package, the associated model reports out N-1 values for the associated 
variable. Fine.


The rcs-constructed temporary variables are denoted V1,  V1', V1'' when 
one looks at the model output, but the model output is not explicit 
about which values of V1 are associated with variables V1, V1', V1'' .  
Yes, specs() tells you what the splits are for rcs, but is there a way 
to explicitly generate the associations between the model outcome 
variables, and the associated ranges,


Here's the idea:

e.g:

Variable LowHigh
V  02
V' 36
V' 722
...

Is there existing functionality to do this? If not, it suggest it would 
be a helpful addition.


Rob

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Baseline terms for lrm

2011-01-18 Thread Rob James

Dear R-help and Prof. Harrell:

My question concerns the baseline state for continuous variable in lrm() 
within the RMS package.


I have a model which can be reduced to:

lrm(FT ~ rcs(V1, c(0, 1,5))

The model makes perfect sense if the baseline state is where V1>=5 but 
the model makes no sense if the baseline category is 0 (which I had 
expected).
Can someone point me to a reference, or suggest a command/test, to get 
the model to fess up to the baseline state. The variable V1 and V1' are 
shown in the model output, but there is no clear association between 
these pseudo-variables and the ranges specified in the cut. Thus, it is 
seems possible to misidentify the baseline value for the term.


Many thanks,

Rob

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Dealing with Latex output in Openoffice

2011-01-17 Thread Rob James
I am making considerable use of Harrell's rms package, but I do not use 
Latex for writing.  (I have enough trouble convincing my co-authors to 
use Openoffice!).   rms makes copious use of Latex output for various 
mixed graphical and text outputs, amongst other things.


Does someone have a convenient strategy for dealing with Latex output 
and openoffice, either within or outside of a OdfSweave environment?


Thanks,

Rob

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Reorder factor and address embedded escapes

2010-12-10 Thread Rob James
I am trying to reorder a factor variable that has embedded escape 
characters.  The data begins as a csv file with a factor that includes 
embedded new line characters.  By the time read.table has rendered it 
into a data frame, the variable now has an extra backslash.


e.g.
"This\nLabel" in the csv becomes "This\\nLabel" in the data frame.

So, I am trying to reorder the factor and deal with the introduction of 
a secondary  \ .   Here's a small example:



A = c("A\\nB", "C\\nD")
test <-data.frame(A)
str(test)
test$reorderA <-factor(test$A, c("C\\nD", "A\\nB"))
str(test)
test$reorderB <-sub("n", "\n", test$reorderA)
str(test)

When sub is applied to the now-correctly ordered factor, it returns to 
the default ordering.


Suggestions?

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Recovering x/y coordinates from a scatterplot image

2010-10-15 Thread Rob James
Do I recall correctly that there is an R package that can take an image, 
and help one estimate the x/y coordinates?  I can't find the package, 
thought it was an R-tool, but would appreciate any leads.


Thanks,

Rob

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] XML getNodeSet syntax for PUBMED XML export

2010-09-08 Thread Rob James
 I am looking for the syntax to capture XML tags marked with 
/DescriptorName MajorTopicYN="Y"/ , but the combination of the internal 
space (between "Name" and "Major" and the embedded quote marks are 
defeating me. I can get all the "DescriptorName" tags, but these include 
both MajroTopicYN = "Y" and "N" variants. Any suggestions?

Thanks in advance.

Prototype text from PUBMED



Antibodies, Monoclonal


Blood Platelets
immunology
physiology
ultrastructure





[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] HMisc/rms package questions

2010-08-17 Thread Rob James
1) How does one capture the plots from the plsmo procedure? Simply 
inserting a routing call to a graphical device (such as jpeg, png, etc) 
and then running the plsmo procedure (and then dev.off()) does not route 
the output to the file system. 1b) Related to above, has anyone thought 
of revising the plsmo procedure to use ggplot? I'd like to capture 
several such graphs into a faceted arrangement.


2) The 2nd issue is more about communications than software. I have 
developed a model using lrm() and am using plot to display the model. 
All that is  fairly easy. However, my coauthors are used to traditional 
methods, where baseline categories are rather broadly defined (e.g. 
males, age 25-40, height 170-180cm, BP 120-140, etc) and results are 
reported as odds-ratios, not as probabilities of outcomes.


Therefore, and understandably, they are finding the graphs which arise 
from lrm->Predict->plot difficult to interpret. Specifically, in one 
graph, the adjusted to population is defined one way, and in another 
graph of the same model (displaying new predictors) there will be a new  
"adjusted to" population. Sometimes the adjusted populations are 
substantially distinct, giving rise to event rates that vary 
dramatically across graphs. This can prove challenging when trying to 
present the set of graphs as parts of a whole.  It all makes sense; it 
just adds complexity to introducing these new methods.


One strategy might be to manually define the baseline population across 
graphs; this way I could attempt to impose some content-specific 
coherence to the graphs, by selecting the baseline populations. Clearly 
this is do-able, but I have yet to see it done. I'd welcome suggestions 
and comments.


Thanks,

Rob

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Specifying interactions in rms package... error

2010-08-02 Thread Rob James
I am encountering an error I do not know how to debug. The error arises 
when I try to add an  interaction term involving two continuous 
variables (defined using rcs functions) to an existing (and working) model.


The new model reads:

 model5 <- lrm( B_fainting ~   gender+  rcs(exactage, 7) +  
rcs(DW_nadler_bv, 7) +   rcs(drawtimefrom8am, 7)+  DW_firsttime+ 
  DW_race_eth +

 rcs(DW_BPS, 5)+  rcs(DW_BPD, 5)+  rcs(pulse3, 5)+  locat2+
(rcs(exactage, 3) * rcs(drawtimefrom8am, 3))
  )

This gives rise to the following error:


Error in dimnames(X)[[2]] <- atr$colnames :
  length of 'dimnames' [2] not equal to array extent
In addition: Warning message:
In names(nmiss)[jz] <- fname[asm != 9] :
  number of items to replace is not a multiple of replacement length


The sessionInfo() output is below, but I think relatively unremarkable.  
The dataset is very large (about 550K observations, although the outcome 
(B_fainting)  is relatively sparse with only 1500 events in this 
sample.   I do not get this error when the interaction term is replaced 
by two categorical variables (data not shown).  I can replicate this 
error when there is just one continuous variable and one categorical 
variable.



I'd welcome suggestions. Thank you in advance.





sessionInfo()
R version 2.11.0 (2010-04-22)
x86_64-pc-linux-gnu

locale:
 [1] LC_CTYPE=en_CA.UTF-8   LC_NUMERIC=C   
LC_TIME=en_CA.UTF-8
 [4] LC_COLLATE=en_CA.UTF-8 LC_MONETARY=C  
LC_MESSAGES=en_CA.UTF-8

 [7] LC_PAPER=en_CA.UTF-8   LC_NAME=C  LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_CA.UTF-8 
LC_IDENTIFICATION=C


attached base packages:
[1] splines   stats graphics  grDevices utils datasets  
methods   base


other attached packages:
[1] gmodels_2.15.0  rms_3.0-0   Hmisc_3.8-2 survival_2.35-8 
odfWeave_0.7.14 XML_3.1-0

[7] lattice_0.18-8

loaded via a namespace (and not attached):
[1] cluster_1.13.1 gdata_2.8.0grid_2.11.0gtools_2.6.2   MASS_7.3-7

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Fidelity of lattice graphics captured to jpeg or png... followup

2010-04-29 Thread Rob James
Subsequent investigations (via GIMP) show that the problem is in OO, and 
now with the images themselves.

Off to the OO forums.


 Original Message 
Subject:Fidelity of lattice graphics captured to jpeg or png
Date:   Thu, 29 Apr 2010 08:05:04 -0700
From:   Rob James 
To: r-help@r-project.org



I am generating images via lattice from Frank Harrell's RMS package.
These images are characterized by coloured lines and grey-scale
confidence intervals.  I need to port them to Openoffice/etc, and have
tried both png and jpeg (at high quality), but in neither format can I
subsequently see the the grey scale confidence intervals.  Other than
moving to LaTex, does anyone have other suggestions?



[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Fidelity of lattice graphics captured to jpeg or png

2010-04-29 Thread Rob James
I am generating images via lattice from Frank Harrell's RMS package. 
These images are characterized by coloured lines and grey-scale 
confidence intervals.  I need to port them to Openoffice/etc, and have 
tried both png and jpeg (at high quality), but in neither format can I 
subsequently see the the grey scale confidence intervals.  Other than 
moving to LaTex, does anyone have other suggestions?


__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] logical(0) response from lrm

2010-04-25 Thread Rob James

What causes the error report:

logical(0)

to arise in the rms function lrm?

Here's my data:

But both the dependent and the independent variable seem fine...

> str(AABB)
'data.frame':1176425 obs. of  9 variables:
 $ sex : int  1 1 0 1 1 0 0 0 0 0 ...
$ faint   : int  0 0 0 0 0 0 0 0 0 0 ...

Here's the simplified model and error

AABB$model1 < lrm (faint ~  sex)
logical(0)


But the data seem fine

> table(AABB$faint)

  0   1
11734752950
> table(AABB$sex)

 0  1
502551 673874

Suggestions?

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] odfWeave & XML error in post-processing

2009-10-10 Thread Rob James
Just to close out my earlier posting, I have identified and resolved the 
following odfWeave/XML error:



xmlParseStartTag: invalid element name



I  used odfWeave to call various logistic regression models which 
included the above mentioned variable. odfWeave failed to generate the 
destination file throwing multiple lines of the above error.


It happened that the dataset originated in STATA (probably irrelevant),  
and included a variable which had five levels. Two of those levels had 
values of
"(1)<3500" and "(5)=>5000".   

So, while these codes did not appear in the source document, these codes 
appear in the odfWeave destination file.   The results were displayed in 
the document using the following crude method:


results <-glm(..

and subsequently reported out using :

odfTable(

as.matrix(results[,c(X1, X2, X3)],)

horizontal = TRUE)

odfTableCaption("Selected Logistic Regression Results for RXN3 outcome")


@

I received xmlParseStartTag errors for each such table.  Editting of the 
XML file in gedit highlighted the above values as problematic.


I then removed the two problematic value for this variable, and re-ran 
odfWeave, which generated the output I needed.


So, it appears that these values of this variable operated as invalid 
xmlParseStartTags, and that the process of wrapping up content_1.xml 
back into an ODF file failed because of the mis-recognition of these 
ParseStartTags found embedded in the data.   I think this is likely to 
be regarded more as a feature than as a bug, but it is none-the-less a 
cautionary tale.


__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] odfWeave & XML error in post-processing

2009-10-09 Thread Rob James

Just so we complete (partially) the web-record...

Some further hunting determined that  the &apos  was an  apostrophe - 
obvious only in retrospect!  Removal of this character has resolved the 
Entity errors, but not the xmlParseStartTag: invalid element name errors.


I had assumed that the two errors were dependent, but they are not.

odfWeave does have some ability with its translate command to address 
some XML/OO special characters, but I have not explored this facet of 
odfWeave yet, and I was a bit surprised that the use of this common 
grammatical mark generated an error, but..


Now, in search of a cause for the invalid element name error(s).

Thanks to Duncan for his help.



Duncan Temple Lang wrote:

Hi Rob.

Without the file content_1.xml or any information
from the R call stack (e.g. options(error = recover)
and then run the command and dynamically explore the
state of affairs when the error occurs), there is
no way for us to know what the problem might be.

Somehow, the XML parser appears to be seeing a
   

I've been happily building a file with odfWeave, and just as the hour
draws nigh for it to be sent off, odfWeave or XML throws  the following
catastrophic error:


...this is the tail of entirely uneventful processing of input file.

31 : term xml(label=LR_Fall_Model_Results)
 32 : term verbatim(label=LR_Model_Fall_graph)
 33 : term xml(label=LR_OMC_tab)

'content_1.xml' has been Sweaved

Removing content.xml

Post-processing the contents
xmlParseStartTag: invalid element name
Entity 'apos' not defined
Entity 'apos' not defined


This triplet of errors XMLParse, and duplicate "Entity" lines is
reported several times, then XML or odfWeave  packs up its toys, and
goes home without an output file.

I'd (desperately) love any insights anyone might have.

Thanks,

Rob

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.






__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] odfWeave & XML error in post-processing

2009-10-08 Thread Rob James
I've been happily building a file with odfWeave, and just as the hour 
draws nigh for it to be sent off, odfWeave or XML throws  the following 
catastrophic error:



...this is the tail of entirely uneventful processing of input file.

31 : term xml(label=LR_Fall_Model_Results)
 32 : term verbatim(label=LR_Model_Fall_graph)
 33 : term xml(label=LR_OMC_tab)

'content_1.xml' has been Sweaved

Removing content.xml

Post-processing the contents
xmlParseStartTag: invalid element name
Entity 'apos' not defined
Entity 'apos' not defined


This triplet of errors XMLParse, and duplicate "Entity" lines is 
reported several times, then XML or odfWeave  packs up its toys, and 
goes home without an output file.


I'd (desperately) love any insights anyone might have.

Thanks,

Rob

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Dependencies for binaries install of R 2.8.2 under Ubuntu 648.1 (Intrepid)

2009-01-14 Thread Rob James
 Problem resolved. This error occurred because of a mixture of hardy
and intrepid sources in my sources.list .
 Thanks to Phil Spector, Dirk Eddelbuettel and others for their
input.
 
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Dependencies for binaries install of R 2.8.2 under Ubuntu 64 8.1 (Intrepid)

2009-01-14 Thread Rob James
  BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px; }I
can't seem to perform an install from CRAN (stat.sfu.ca, specifically)
for Ubuntu 64 8.1 (Intrepid) and 2.8.2  of R. Here is the log:
 Looks like some dependencies cannot be satisfied.
 Suggestions?  Thanks in advance.
 sudo apt-get install r-base
 Reading package lists... Done
 Building dependency tree   
 Reading state information... Done
 Some packages could not be installed. This may mean that you have
 requested an impossible situation or if you are using the unstable
 distribution that some required packages have not yet been created
 or been moved out of Incoming.
 Since you only requested a single operation it is extremely likely
that
 the package is simply not installable and a bug report against
 that package should be filed.
 The following information may help resolve the situation:
 The following packages have unmet dependencies:
   r-base: Depends: r-base-core (>= 2.8.1-1intrepid0) but it is not
going to be installed
   Depends: r-recommended (= 2.8.1-1intrepid0) but it is not
going to be installed
 E: Broken packages
 r...@u8:~$ 
 r...@u8:~$ sudo apt-get install r-base-core
 Reading package lists... Done
 Building dependency tree   
 Reading state information... Done
 Some packages could not be installed. This may mean that you have
 requested an impossible situation or if you are using the unstable
 distribution that some required packages have not yet been created
 or been moved out of Incoming.
 Since you only requested a single operation it is extremely likely
that
 the package is simply not installable and a bug report against
 that package should be filed.
 The following information may help resolve the situation:
 The following packages have unmet dependencies:
   r-base-core: Depends: libc6 (>= 2.8~20080505) but 2.7-10ubuntu4 is
to be installed
Depends: libgfortran3 (>= 4.3) but it is not
installable
Depends: libpango1.0-0 (>= 1.21.6) but
1.20.5-0ubuntu1 is to be installed
 E: Broken packages
 r...@u8:~$ 
 r...@u8:~$ 
 
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Graphics for proportion within factor

2008-11-30 Thread Rob James
  BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px; }I
am looking to draw what I hoped was a simple plot of proportion WITHIN
a strata, save % males by site. I seem to be able to get proportion of
males, by
 site, where the proportion is across the whole dataset, but not the
proportion within each site.
 thanks in advance,
 Rob
 
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] odfWeave error

2008-10-23 Thread Rob James
Sender: [EMAIL PROTECTED]
On-Behalf-Of: [EMAIL PROTECTED]
Subject: [R] odfWeave error
Message-Id: <[EMAIL PROTECTED]>
Recipient: [EMAIL PROTECTED]




This information is being sent at the recipient's request or with their 
specific understanding. The recipient acknowledges that by sending this 
information via electronic means, there is no absolute assurance that the 
information will be free from third party access, use, or further 
dissemination. This e-mail contains information that is privileged and/or 
confidential and may be subject to legal restrictions and penalties regarding 
its unauthorized disclosure or other use. You are prohibited from copying, 
distributing or otherwise using this information if you are not the intended 
recipient. Past performance is not necessarily indicative of future results. 
This is not an offer of or the solicitation for any security which will be made 
only by private placement memorandum that may be obtained from the applicable 
hedge fund. If you have received this e-mail in error, please notify us 
immediately by return e-mail and delete this e-mail and all attachments from 
your system. Thank You.
--- Begin Message ---
odfWeave is throwing up a cryptic error, after successfully processing a 
file with a large number of figures (~30) and many \Sexpr{} calls.  The 
error is (at least to me) cryptic. I am not sure where to look to 
correct this problem.


Here's the error:


Post-processing the contents
Error in .Call("RS_XML_Parse", file, handlers, endElementHandlers, 
as.logical(addContext),  :

 attempt to apply non-function


Is there any way to figure out what this means, or where I might look 
for the error in the source?


Here's a capture of the associated log. I am running R 2.8 under Ubuntu 
8.04.



Thanks,


> odfWeave("/home/rob/Trauma/Report_2_draft.odt", 
"/home/rob/Trauma/Report_2_draft_out.odt")

 Copying  /home/rob/Trauma/Report_2_draft.odt
 Setting wd to  /tmp/Rtmp2tlRz0/odfWeave23115040235
 Unzipping ODF file using unzip -o Report_2_draft.odt
Archive:  Report_2_draft.odt
extracting: mimetype   
  creating: Configurations2/statusbar/
 inflating: Configurations2/accelerator/current.xml 
  creating: Configurations2/floater/

  creating: Configurations2/popupmenu/
  creating: Configurations2/progressbar/
  creating: Configurations2/menubar/
  creating: Configurations2/toolbar/
  creating: Configurations2/images/Bitmaps/
 inflating: layout-cache   
 inflating: content.xml
 inflating: styles.xml 
extracting: meta.xml   
 inflating: Thumbnails/thumbnail.png 
 inflating: settings.xml   
 inflating: META-INF/manifest.xml  


 Removing  Report_2_draft.odt
 Creating a Pictures directory

 Pre-processing the contents
 Sweaving  content.Rnw

 Writing to file content_1.xml
 Processing code chunks ...
   1 : term hide(label=loadData)
d2 : term verbatim(label=SiteHist)
ate()
   3 : term verbatim(label=AgeSex)
   4 : term verbatim(label=Sitesex)
   5 : term verbatim(label=SiteHeadNeck)
   6 : term verbatim(label=SiteFace)
   7 : term verbatim(label=SiteChest)
   8 : term verbatim(label=SiteAbdomnen)
   9 : term verbatim(label=SiteGCS_Eyes)
  10 : term verbatim(label=SiteGCS_Verbal)
  11 : term verbatim(label=SiteGCS_Motor)
  12 : term verbatim(label=SiteGCS_total)
  13 : term verbatim(label=SBP)
  14 : term verbatim(label=DBP)
  15 : term verbatim(label=HR)
  16 : term verbatim(label=RESPIRATION)
  17 : term verbatim(label=PF_ADMIT)
  18 : term verbatim(label=O2_admit)
  19 : term verbatim(label=Ph_admit)
  20 : term verbatim(label=DEFICIT)
  21 : term verbatim(label=lactic_acid)

 'content_1.xml' has been Sweaved

 Removing content.xml

 Post-processing the contents
Error in .Call("RS_XML_Parse", file, handlers, endElementHandlers, 
as.logical(addContext),  :

 attempt to apply non-function
In addition: There were 50 or more warnings (use warnings() to see the 
first 50)

> date()
[1] "Thu Oct 23 12:18:18 2008"

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
--- End Message ---
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] odfWeave error

2008-10-23 Thread Rob James
odfWeave is throwing up a cryptic error, after successfully processing a 
file with a large number of figures (~30) and many \Sexpr{} calls.  The 
error is (at least to me) cryptic. I am not sure where to look to 
correct this problem.


Here's the error:


Post-processing the contents
Error in .Call("RS_XML_Parse", file, handlers, endElementHandlers, 
as.logical(addContext),  :

 attempt to apply non-function


Is there any way to figure out what this means, or where I might look 
for the error in the source?


Here's a capture of the associated log. I am running R 2.8 under Ubuntu 
8.04.



Thanks,


> odfWeave("/home/rob/Trauma/Report_2_draft.odt", 
"/home/rob/Trauma/Report_2_draft_out.odt")

 Copying  /home/rob/Trauma/Report_2_draft.odt
 Setting wd to  /tmp/Rtmp2tlRz0/odfWeave23115040235
 Unzipping ODF file using unzip -o Report_2_draft.odt
Archive:  Report_2_draft.odt
extracting: mimetype   
  creating: Configurations2/statusbar/
 inflating: Configurations2/accelerator/current.xml 
  creating: Configurations2/floater/

  creating: Configurations2/popupmenu/
  creating: Configurations2/progressbar/
  creating: Configurations2/menubar/
  creating: Configurations2/toolbar/
  creating: Configurations2/images/Bitmaps/
 inflating: layout-cache   
 inflating: content.xml
 inflating: styles.xml 
extracting: meta.xml   
 inflating: Thumbnails/thumbnail.png 
 inflating: settings.xml   
 inflating: META-INF/manifest.xml  


 Removing  Report_2_draft.odt
 Creating a Pictures directory

 Pre-processing the contents
 Sweaving  content.Rnw

 Writing to file content_1.xml
 Processing code chunks ...
   1 : term hide(label=loadData)
d2 : term verbatim(label=SiteHist)
ate()
   3 : term verbatim(label=AgeSex)
   4 : term verbatim(label=Sitesex)
   5 : term verbatim(label=SiteHeadNeck)
   6 : term verbatim(label=SiteFace)
   7 : term verbatim(label=SiteChest)
   8 : term verbatim(label=SiteAbdomnen)
   9 : term verbatim(label=SiteGCS_Eyes)
  10 : term verbatim(label=SiteGCS_Verbal)
  11 : term verbatim(label=SiteGCS_Motor)
  12 : term verbatim(label=SiteGCS_total)
  13 : term verbatim(label=SBP)
  14 : term verbatim(label=DBP)
  15 : term verbatim(label=HR)
  16 : term verbatim(label=RESPIRATION)
  17 : term verbatim(label=PF_ADMIT)
  18 : term verbatim(label=O2_admit)
  19 : term verbatim(label=Ph_admit)
  20 : term verbatim(label=DEFICIT)
  21 : term verbatim(label=lactic_acid)

 'content_1.xml' has been Sweaved

 Removing content.xml

 Post-processing the contents
Error in .Call("RS_XML_Parse", file, handlers, endElementHandlers, 
as.logical(addContext),  :

 attempt to apply non-function
In addition: There were 50 or more warnings (use warnings() to see the 
first 50)

> date()
[1] "Thu Oct 23 12:18:18 2008"

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.