Displaying 20 results from an estimated 60000 matches similar to: "confusion matrix"
2010 Oct 29
7
date calculation
Hi list,
Could someone explain to me why the following result is not a integer?
> difftime(strptime("24NOV2004", format="%d%b%Y"), strptime("13MAY2004",
>format="%d%b%Y"), units="days")
Time difference of 195.0417 days
I'm using R2.12.0 on WinXP.
Thanks!
...Tao
2012 Apr 23
2
.rda vs. .RData
Are they the same with .RData being the newer format?? Thanks,
...Tao
2012 Nov 29
3
what's this character?
Hi list,
I've encounter this problem (see below).? I know it's particularly R-related and it's easy to get by but it still bothers me a lot.?
It looks the last character of "N.C. " is a space to me, but it's clearly not.? Can someone tell me a way to figure out what character is in the last position.
Thanks!
Tao
> levels(dat$flag)[3]
[1] "N.C.?"
>
2012 Feb 21
4
barplot with both color and shading
Hi list,
I want to draw a bar plot with color indicating one grouping and different shading on top of the color indicating another grouping.? How should I proceed?
Thanks!
...Tao
2012 Oct 15
2
warning message
Hi list,
Can somebody explain why there are these warning messages?? I just don't get it.? I'm using R 2.15.1 on WinXP.
Thanks!
Tao
> x
[1] -2.143510 -1.157450 -1.315581? 1.033562 -1.225440 -1.179909
>? ifelse(x>0, log2(x), -log2(-x))
[1] -1.099975 -0.210950 -0.395700? 0.047625 -0.293300 -0.238675
Warning messages:
1: In ifelse(x > 0, log2(x), -log2(-x)) : NaNs produced
2012 Apr 24
2
load only one object from a .RData file
Hi list,
Is there a way to load one specific object from a .RData file which contains multiple data objects?? Thanks,
...Tao
2011 Mar 31
3
read password-protected files
Hi list,
I have a bunch of .csv files that are password-protected. I wonder if there is
a way to read them in in R without manually removing the password protection for
each file?
Thank you very much!
...Tao
[[alternative HTML version deleted]]
2011 Jun 24
3
extract worksheet names from an Excel file
Hi list,
Is there a R function I can use to extract the worksheet names from an Excel file?? If no, any other automatic ways (not using R) to do this?
thanks!
...Tao
2010 Nov 19
4
calculating martingale residual on new data using "predict.coxph"
Hi list,
I was trying to use "predict.coxph" to calculate martingale residuals on a test
data, however, as pointed out before
http://tolstoy.newcastle.edu.au/R/e4/help/08/06/13508.html
predict(mycox1, newdata, type="expected") is not implemented yet. Dieter
suggested to use 'cph' and 'predict.Design', but from my reading so far, I'm not
sure they can
2012 Sep 05
1
Sweave encoding option
Hi list,
I was running Sweave on one of my .rnw file.? Everything was fine, until I came back from the vacation.? Nothing changed (at least to my knowledge), but now I have this problem:
>???? Sweave("myfile.rnw")
Error: ?COLO001final.rnw? is not ASCII and does not declare an encoding
After snooping around on the web, I found this solution:
> Sweave("myfile.rnw",
2010 May 14
1
"rpart": how to use each variable only once?
Hi list,
Is there a way in "rpart" to force the variables only used once when doing the splits?
This is how the question came about. Often time, the tree constructed uses the same variable (say X1) for the first and second splits, for example. However, due to practical reason, the researcher doesn't like this. The prefer to see the second split using other variables (say X2).
2011 Feb 17
1
which functions are being debugged?
Hi list,
Is there a function that can let me know which functions are being debugged? I
know I'm probably not doing a very good job of keeping track of things, but it
does get messier when you dig into different layers of a function. I know there
is "isdebugged", but it only works on one function at a time.
Thanks!
...Tao
[[alternative HTML version deleted]]
2011 Jun 09
1
a bug in heatmap.plus?
Hi Allen and list,
See the code below.? I've tried it on R2.13 and R2.8.0 using either heatmap.plus 1.3 or the latest.? All gave the same results.? The problem is in the last line: when I tried to plot two different color bars, the one corresponding to "cm.colors(10)" is not correct (it starts with one black and one red.? Not sure where they're from?)
Any ideas?
Thanks!
2013 Feb 07
1
compare objects in two different workspaces
Hi list,
Is there a easy way to compare objects in two different workspace files (i.e. .RData files) in R?? I can use some generic file compare softwares (e.g. BeyondCompare) to binary comparison, but when it says they're different you can't tell where the difference are from.
Thanks!
Tao
2007 May 18
1
How to extract R codes that embedded in a HTML file
> -------- Original Message --------
> Subject: Re: [R] How to extract R codes that embedded in a HTML file
> using Stangle?
> Date: Thu, 17 May 2007 17:01:30 +0000
> From: Tao Shi <shitao at hotmail.com>
> To: ligges at statistik.uni-dortmund.de, lecoutre at stat.ucl.ac.be
> CC: r-help at stat.math.ethz.ch
> : <jmcconnell at
2004 Apr 25
5
a simple suggestion for the next version of R windows
Is it possible to replace the word "R Console" on the title bar (is it what
it's called? It's the blue area above menu bar) with the name of the work
space file you're using or loaded, so people who are runing multple R
sessions at same time can identify them immediately. I'm using 1.9.0 in SDI
mode.
Thanks,
...Tao
2004 Apr 25
5
a simple suggestion for the next version of R windows
Is it possible to replace the word "R Console" on the title bar (is it what
it's called? It's the blue area above menu bar) with the name of the work
space file you're using or loaded, so people who are runing multple R
sessions at same time can identify them immediately. I'm using 1.9.0 in SDI
mode.
Thanks,
...Tao
2010 May 05
1
'matplot' for matrix with NAs: broken lines
Hi list,
I know that points involving NAs are not plotted in 'matplot', but when I plot them as lines, I still want the lines to connect all the points (i.e. not broken where there are NAs).? Please see the example below.? How can I achieve this in 'matplot'?? If I can't, any good alternatives so I don't have to use 'plot' + 'lines' and loop through all the
2010 May 12
4
a question about "latex" in Hmisc
Hi list,
Excuse me b/c this is probably a more "TeX" then "R"
question.
I've been using "latex" function in my .Rnw file to
generate tables, but I've always been using it without assigning the
result to a object, i.e.
x <- matrix(1:6, nrow=2,
dimnames=list(c('a','b'),c('c','d','this that')))
latex(x)
so, I
2008 Jun 26
2
a question regarding package building
Hi List,
In Windows, if I do " R CMD build mypkg", then I'll get 'mypkg_1.0.tar.gz'. Any option in R CMD build lets me to change the version, i.e. gives me 'mypkg_2.0.tar.gz"? It seems "-version" option doesn't do anything for me.
Is it OK if I just change the version number in the file name manually?
Thanks,
...Tao