Hi,
I'm having difficulty importing my textfile that looks something like this:
#begin text file
Timepoint 1
ObjectNumber Volume SurfaceArea
1 5.3 9.7
2 4.9 8.3
3 5.0 9.1
4 3.5
Hi,
I had heard that Expat is was faster. Your mail actually made me go check
google for some comparisons and that does not seem the case ... do you have
any insight into this?
Thanks, Joh
On Saturday 24 October 2009 20:38:23 Duncan Temple Lang wrote:
Hi Joh.
What particular aspects of
Thanks for your input. If I understand correctly, XPath requires the whole
document to be resident in memory. That is not an option given the size of
documents I'm facing ... I'll go with the standard streaming implementation of
the XML package and see how far I get.
Thanks, Joh
On Saturday
Dear sir,I have a data set which name is c78p,now I want to deal with it with
bagging. % of data from c78p as training set is 50%,and number of bootstrap
random samples with replacement from c78p is 5,use SVM in each run,can you help
me to write the code?Thanks.Best regards,Jie
On Sun, Oct 25, 2009 at 5:48 AM, Yihui Xie xieyi...@gmail.com wrote:
Hi everyone,
I wonder if there already exists any R packages containing all the
data sets for the book The Statistical Sleuth
(http://www.proaxis.com/~panorama/home.htm; also available at StatLib
'The R Inferno' page 59.
Patrick Burns
patr...@burns-stat.com
+44 (0)20 8525 0696
http://www.burns-stat.com
(home of The R Inferno and A Guide for the Unwilling S User)
mau...@alice.it wrote:
I can define a list containing NULL elements:
myList - list(aaa,NULL,TRUE)
names(myList) -
I have got part of the way to what I want by playing with a small example:
example2
ano census total.pop class
1 222 96 113111
2 222 1 124512
3 239 96 392111
4 239 1 450312
5 260 1 421811
6 269 1 118512
On 25-Oct-09 09:52:42, Patrick Burns wrote:
'The R Inferno' page 59.
Patrick Burns
patr...@burns-stat.com
+44 (0)20 8525 0696
http://www.burns-stat.com
(home of The R Inferno and A Guide for the Unwilling S User)
Which essentially says that
If you want the component [x1[comp] of the
[Apologies -- I inadvertently omitted an example, essential for
clarity, from the examples below. Now corrected.]
On 25-Oct-09 09:30:51, Ted Harding wrote:
On 25-Oct-09 09:52:42, Patrick Burns wrote:
'The R Inferno' page 59.
Patrick Burns
patr...@burns-stat.com
+44 (0)20 8525 0696
On 10/25/2009 03:43 PM, mau...@alice.it wrote:
I can define a list containing NULL elements:
myList- list(aaa,NULL,TRUE)
names(myList)- c(first,second,third)
myList
$first
[1] aaa
$second
NULL
$third
[1] TRUE
length(myList)
[1] 3
However, if I assign NULL to any of the
I have got part of the way to what I want by playing with a small example:
example2
ano census total.pop class
1 222 96 113111
2 222 1 124512
3 239 96 392111
4 239 1 450312
5 260 1 421811
6 269 1 118512
7
Hi,
I'd like to store the path from which I opened a file with tkgetOpenFile and
use it as the initial path for the next function call of tkgetOpenFile. What
is the best way of doing this? The following works fine on my Windows
computer. However, I'm not sure if it works on other platforms.
On Oct 25, 2009, at 1:51 AM, Kang Min wrote:
Hi Milton,
The matrix can be generated using
p = matrix(1:50, nrow=5)
If I just use levelplot(p), it gives me a graph that is vertical. How
can I rotate it so it becomes horizontal?
I cannot do
q = t(p); levelplot(q)
because this is
I'm wondering whether there is a character to let R know to expect more
input for a command on subsequent lines. Here is an example:
test_1.R:
x - c(1,2,3,4)
/ c(1,2,3,4)
x
R CMD BATCh test_1.R produces test_1.Rout:
x - c(1,2,3,4)
/ c(1,2,3,4)
Error: unexpected '/' in /
Execution
On Oct 25, 2009, at 5:07 AM, Murray Jorgensen wrote:
I have got part of the way to what I want by playing with a small
example:
example2
ano census total.pop class
1 222 96 113111
2 222 1 124512
3 239 96 392111
4 239 1 450312
5
On 25/10/2009 8:53 AM, Neil Stewart wrote:
I'm wondering whether there is a character to let R know to expect more
input for a command on subsequent lines. Here is an example:
No, the rule R uses is to stop when the statement is complete.
test_1.R:
x - c(1,2,3,4)
/ c(1,2,3,4)
x
The
On Oct 25, 2009, at 8:53 AM, Neil Stewart wrote:
I'm wondering whether there is a character to let R know to expect
more
input for a command on subsequent lines. Here is an example:
test_1.R:
x - c(1,2,3,4)
/ c(1,2,3,4)
x
R CMD BATCh test_1.R produces test_1.Rout:
x - c(1,2,3,4)
/
I am trying to obtain the AICc after performing logistic regression
using the Design package. For simplicity, I'll talk about the AIC. I
tried building a model with lrm, and then calculating the AIC as
follows:
likelihood.ratio -
unname(lrm(succeeded~var1+var2,data=scenario,x=T,y=T)$stats[Model
Hi Murray,
You were very close.
cast(mexa2, ... ~ variable + census)
Should do the trick.
-Ista
On Sun, Oct 25, 2009 at 5:10 AM, Murray Jorgensen m...@waikato.ac.nz wrote:
I have got part of the way to what I want by playing with a small example:
example2
ano census total.pop class
1
On Oct 25, 2009, at 9:24 AM, Kyle Werner wrote:
I am trying to obtain the AICc after performing logistic regression
using the Design package. For simplicity, I'll talk about the AIC. I
tried building a model with lrm, and then calculating the AIC as
follows:
likelihood.ratio -
On Oct 24, 2009, at 8:13 PM, brett schug wrote:
Hello:
Is there an easy way to fit a correlated hazard model in R?
Basically, I have two events of interest for each individual, and I
suspect
there is some
correlation involved. I want to be able to fit two separate hazard
models,
Hello,
I am basically using a script that is designed to first create an rgl 3d
scatter plot followed by a barplot on the same data. After this is done, the
program is to first save the barplot as a .tiff file then to save the rgl 3d
graph as a .png file. Once this is done, it is to repeat this
On Sunday 25 October 2009 00:38:54 you wrote:
xmlEventParse() is intended for handling files that we don't want to keep
in memory. The branches parameter does make it easier to deal with
sub-trees as the document is being parsed. And within these branches one
can use XPath.
Very
Here are two ways:
1. wrap the line in braces:
x - {
/...}
2. maybe more awkward in general, but sometimes useful:
x - `/`(... ,
...)
-Peter Ehlers
Neil Stewart wrote:
I'm wondering whether there is a character to let R know to expect more
input for a command on
jamesgia...@aol.com wrote:
Hello,
I am basically using a script that is designed to first create an rgl 3d scatter plot
followed by a barplot on the same data. After this is done, the program is to first save
the barplot as a .tiff file then to save the rgl 3d graph as a .png file. Once this
On 25/10/2009 11:43 AM, Peter Ehlers wrote:
Here are two ways:
1. wrap the line in braces:
x - {
/...}
That doesn't work. You're probably thinking of the way the parsing of
if versus if/else depends on braces:
if (TRUE) print(TRUE)
else print(FALSE)
is a syntax error,
I'm using xyplot in a very simple way---a scatter plot of several data
sets. I'm having a problem getting auto.key to display different
point characters.
The following produces a plot that employes different colors, all with
pch(1), for the different groups, with a matching key.
On Oct 25, 2009, at 9:10 AM, jamesgia...@aol.com wrote:
Hello,
I am basically using a script that is designed to first create an
rgl 3d scatter plot followed by a barplot on the same data. After
this is done, the program is to first save the barplot as a .tiff
file then to save the rgl
David,
Thank you for your reply. I am not using glm, but instead lrm. I am
consulting the documentation to try to parse out what the output
Model L.R. actually means:
http://lib.stat.cmu.edu/S/Harrell/help/Design/html/lrm.fit.html
(model likelihood ratio chi-square)
From my read of the
try this:
# read in the file
x - readLines(textConnection(#begin text file
+ Timepoint 1
+ ObjectNumber Volume SurfaceArea
+ 1 5.3 9.7
+ 2 4.9 8.3
+ 3 5.0 9.1
+ 4 3.5
On Oct 25, 2009, at 12:55 PM, Kyle Werner wrote:
David,
Thank you for your reply. I am not using glm, but instead lrm.
Does not matter. lrm is giving you the same output as would glm with
a logistic link.
I am
consulting the documentation to try to parse out what the output
Model L.R.
柯洁 wrote:
Dear sir,I have a data set which name is c78p,now I want to deal with it with bagging. % of data from c78p as training set is 50%,and number of bootstrap random samples with replacement from c78p is 5,use SVM in each run,can you help me to write the code?Thanks.Best regards,Jie
As usual, you're Duncan. Should have tested it. Thanks for the correction.
-Peter Ehlers
Duncan Murdoch wrote:
On 25/10/2009 11:43 AM, Peter Ehlers wrote:
Here are two ways:
1. wrap the line in braces:
x - {
/...}
That doesn't work. You're probably thinking of the way the
Rainer M Krug wrote:
Hi
I am using Ubuntu Hardy, and I installing many packages from source. I am
keeping my R packages fairly up to date.
My question is: is there a way, of keeping the source packages, so that when
I am installing a new version of R, an update.packages(checkBuilt=TRUE) will
Peter Ehlers wrote:
As usual, you're Duncan. Should have tested it. Thanks for the correction.
Well, at least I assume that you're still Duncan.
Meant to say, of course: as usual, you're _right_, Duncan.
Particularly slow fingers today.
Please accept apology.
-Peter Ehlers
-Peter
On 25/10/2009 9:10 AM, jamesgia...@aol.com wrote:
Hello,
I am basically using a script that is designed to first create an rgl
3d scatter plot followed by a barplot on the same data. After this is
done, the program is to first save the barplot as a .tiff file then
to save the rgl 3d graph as
Stephen Kennedy wrote:
I'm using xyplot in a very simple way---a scatter plot of several data
sets. I'm having a problem getting auto.key to display different
point characters.
The following produces a plot that employes different colors, all with
pch(1), for the different groups, with
Hi Everyone,
I am a beginner running R 2.9.2 under Ubuntu and typically use Emacs w/ESS.
However, I am confused with history() command. When I issue command
history() in Emacs within an R session, this is what get:
history()
Error in savehistory(file) : no history available to save
Similarly,
Hello
I have a 3x3 matrix (A), which I would have to reduce to Reduced Row echelon
form. Besides, at every iteration k, the elementary row matrix Ek has to be
printed and also print the product of sum Ei (i=1 to k) and A.
Any ideas how to go about doing this.
KS.
Kanchana Srinivasan wrote:
Hello
I have a 3x3 matrix (A), which I would have to reduce to Reduced Row
echelon form. Besides, at every iteration k, the elementary row matrix Ek
has to be printed and also print the product of sum Ei (i=1 to k) and A.
Can you convince us that this
-Original Message-
From: r-help-boun...@r-project.org
[mailto:r-help-boun...@r-project.org] On Behalf Of delnatan
Sent: Saturday, October 24, 2009 8:32 PM
To: r-help@r-project.org
Subject: [R] Importing data from text file with mixed format
Hi,
I'm having difficulty importing
Dear David,
Thank you for the reference to Frank Harrell's excellent text. I will
read up to correct my statistical deficiencies offline.
Thank you.
On Sun, Oct 25, 2009 at 1:24 PM, David Winsemius dwinsem...@comcast.net wrote:
On Oct 25, 2009, at 12:55 PM, Kyle Werner wrote:
David,
I don't know if there is a way to do this in R but I want to subtract
within the same column from different rows. I want to subtract
c(r)-c(r-1) and continue down the column until they are all calculated
and form another column. Again I don't know if R can do this but I
thought I would ask.
Dear KS,
Some time ago, I posted a solution to this problem (minus the ERO matrices)
to the r-help list. You'll find the relevant functions at
http://socserv.socsci.mcmaster.ca/jfox/Courses/R-programming/matrixDemos.R
.
Regards,
John
-Original Message-
From:
This solution uses strapply in gsubfn. It assumes the timepoints are
1, 2, 3, ... (although later we remove this restriction just in case).
The first line reads in myfile. The second line reads the numeric rows
into matrix s. The third line reads in the column names. The fourth
line converts to
If I understand what you're asking this is one (although probably not
the easiest or best) way:
X - as.data.frame(matrix(runif(50), nrow=10))
X.tmp - rbind(rep(NA, dim(X)[2]), X[1:(dim(X)[1]-1),])
X.new - X - X.tmp
-Ista
On Sun, Oct 25, 2009 at 5:45 PM, Marsha Melnyk mmel...@stevens.edu
Lines sent to R by C-c C-n and related commands are excluded
from the R history. They appear only in the ESS history.
This, along with everything else, is documented in the file
/ess/doc/html/ess.html
Questions on ESS should be sent to the ESS list
ess-h...@stat.math.ethz.ch
Rich
On Oct 25, 2009, at 4:04 PM, Tariq Perwez wrote:
Hi Everyone,
I am a beginner running R 2.9.2 under Ubuntu and typically use Emacs
w/ESS.
However, I am confused with history() command. When I issue command
history() in Emacs within an R session, this is what get:
history()
Error in
CRAN (and crantastic) updates this week
New packages
* cudaBayesreg (0.1-1)
Adelino Ferreira da Silva
http://crantastic.org/packages/cudaBayesreg
Compute Unified Device Architecture (CUDA) is a software platform for
massively parallel high-performance computing on NVIDIA
Marsha Melnyk wrote:
I don't know if there is a way to do this in R but I want to subtract
within the same column from different rows. I want to subtract
c(r)-c(r-1) and continue down the column until they are all calculated
and form another column. Again I don't know if R can do this
On Sat, 24 Oct 2009, Carlos J. Gil Bellosta wrote:
Hello,
Adding to Thomas' email, you could also use package colbycol which
allows you to load into R files that a simple read.table cannot cope
with, study columns independently, select those you are more interested
in and, finally, set up a
It is perhaps also worth mentioning that this is the very first question in the
actual R questions section of the R FAQ.
7.1 How can I set components of a list to NULL?
You can use
x[i] - list(NULL)
to set component i of the list x to NULL, similarly for named components. Do
not set
Note that read.csv.sql in the sqldf package could be used to avoid
most of the setup:
library(sqldf)
DF - read.csv.sql(myfile.csv, sql = select ...)
It will setup the database, read the file into it, apply the select
statement, place the result into data frame DF and destroy the
database all in
can you explain that a little more detailed?
Perhaps I miss the background knowledge - but it seems just absurd
to me.
0.1+0.1+0.1 is 0.3 - there is no rounding involved, is there?
why is
x - 0.1 + 0.1 +0.1
not equal to
y - 0.3
Remember that this is in BINARY arithmetic. It's
I am sure there is something I am just not understanding about agrep
functionality.
str1 - c(ab,aba,abc)
agrep(abc,str1, max.distance = list(insertions=0, substitutions=0,
deletions=1), value=T)
returns:
[1] ab aba abc
Why is aba a match? It seems to me that this should require a
Neil Stewart wrote:
I'm wondering whether there is a character to let R know to expect
more input for a command on subsequent lines.
Hi Neil,
Not that I know of, but I use exactly the method you noticed, the
trailing operator. There was a discussion similar to this not long ago
about the
Hi David,
Thanks a lot for the simple but effective solution. I got what I
wanted by doing a levelplot(t(q2)).
Kang Min
On Oct 25, 8:46 pm, David Winsemius dwinsem...@comcast.net wrote:
On Oct 25, 2009, at 1:51 AM, Kang Min wrote:
Hi Milton,
The matrix can be generated using
p =
On Oct 25, 2009, at 10:17 PM, Paul Galpern wrote:
I am sure there is something I am just not understanding about agrep
functionality.
str1 - c(ab,aba,abc)
agrep(abc,str1, max.distance = list(insertions=0, substitutions=0,
deletions=1), value=T)
returns:
[1] ab aba abc
Why is aba a
Hello,
I'm aware that not everyone who uses R is an astronomer, and so
apologies in advance to those people for the nature of this email. I
need to convert right-ascension and declination (RA DEC) coordinates
for an object on the sky into physical pixel positions in a FITS image
in R.
I found an old Internet posting and it solved my problem.
For those who is suffering from the same problem, try this:
channel - odbcDriverConnect(connection=Driver={Microsoft ODBC for
Oracle};DSN=abc;UID=abc;PWD=abc, case = 'oracle')
x - sqlQuery(channel, paste(select * from db_name.tbl_name))
I'm trying to extract the points above and below a particular lsfit. I
can only get the residuals from the original fit though.
x = runif(100, 0, 10)
plot(x)
abline(lsfit(1:100, test))
abline(lsfit(1:100, test + sd(test))) #I want the points above THIS
line.
Is there a way to use the
61 matches
Mail list logo