Hi,
If you read French, you might find the following discussion interesting,
http://www.forum.math.ulg.ac.be/viewthread.html?id=45765
It contains some good suggestions to project an ellipsoid onto a
plane, which as I understand might be related to your question.
HTH,
b.
On 8 February 2012
R Michael Weylandt michael.weyla...@gmail.com
michael.weyla...@gmail.com
on Tue, 7 Feb 2012 20:23:57 -0500 writes:
Possibly as.character() is what the OP was seeking
Michael
or format() which is closer for numeric data
On Feb 7, 2012, at 7:15 PM, jim holtman
Dear David,
Thank you for your input. I was under the impression that it was not possible
to obtain survival times using the predict.coxph function. In a post to the R
help group I noticed someone had suggested calculating survival times in the
manner I have used although obviously this is
8-02-2012, 09:45 (+0100); Martin Maechler escriu:
R Michael Weylandt michael.weyla...@gmail.com
michael.weyla...@gmail.com
on Tue, 7 Feb 2012 20:23:57 -0500 writes:
Possibly as.character() is what the OP was seeking
Michael
or format() which is closer for numeric
8-02-2012, 04:22 (+); William Dunlap escriu:
Use
capture.output(print(yourData))
to capture would be printed by print as a vector
of a strings (one per line of printout). Paste
together if desired.
This will do it!!
Thanks.
--
Cheers,
Ernest
names1-recode(df$names,'BO'='BOO';'CL'='CLR';'C'='CC')
df1-data.frame(names1,price)
df1
names1 price
1BOO10
2 CC25
3CLR20
TY for the tip.
Any possibility to write this in one single line?
Arnaud Gaboury
A2CT2 Ltd.
-Original Message-
From: Berend Hasselman
Hi,
I am importing dataframe from an Excel file (xlsx package).
The columns contain acutally measurements for single species and
the column-length is of variable. As it is imported as a dataframe the
difference to the longest column is filled with NA.
To explain it with an example, my dataframe
Two possibilities are:
lapply(df, function (x) x[!is.na(x)])
and
lapply(df, na.exclude)
I hope it helps.
Best,
Dimitris
On 2/8/2012 11:54 AM, Johannes Radinger wrote:
Hi,
I am importing dataframe from an Excel file (xlsx package).
The columns contain acutally measurements for single
Hi,
lapply(df, function (x) x[!is.na(x)])
thats is really great!
Thank you!
Original-Nachricht
Datum: Wed, 08 Feb 2012 12:01:17 +0100
Von: Dimitris Rizopoulos d.rizopou...@erasmusmc.nl
An: Johannes Radinger jradin...@gmx.at
CC: R-help@r-project.org
Betreff: Re: [R] remove
Hi
We've found that when using parse_args(..., positional_arguments=FALSE),
it is permissible to invoke our script with either --myfoo=bar or
--myfoo bar; that is, whether or not the equals sign is present makes
no difference, and in fact both usage forms are demonstrated in the
optparse
Hi,
Is there a way to check which value in a vector is nearest to a given value?
so for example I have vector x:
x - c(1, 6, 12, 28, 33)
and I would like to get the position of the element of x that is nearest to 14
(in this case the third element).
thanks!
How about this:
x - c(1, 6, 12, 28, 33)
which.min(abs(x - 14))
I hope it helps.
Best,
Dimitris
On 2/8/2012 1:56 PM, Martin Batholdy wrote:
Hi,
Is there a way to check which value in a vector is nearest to a given value?
so for example I have vector x:
x- c(1, 6, 12, 28, 33)
and I
Hi
Hi,
Is there a way to check which value in a vector is nearest to a given
value?
so for example I have vector x:
x - c(1, 6, 12, 28, 33)
and I would like to get the position of the element of x that is nearest
to 14
(in this case the third element).
Easy. Smallest difference
great, thanks!
On 08.02.2012, at 14:00, Dimitris Rizopoulos wrote:
How about this:
x - c(1, 6, 12, 28, 33)
which.min(abs(x - 14))
I hope it helps.
Best,
Dimitris
On 2/8/2012 1:56 PM, Martin Batholdy wrote:
Hi,
Is there a way to check which value in a vector is nearest
A couple of thoughts.
1. More than 1/2 the work for survfit.coxph is computing standard
errors. If you don't need them adding se.fit=FALSE will help the speed.
2. Survival curves with time dependent covariates is a complex topic.
To get the probability of default in each month during next 2
Coxph is a regression model, so the coefficient for x is the change in
prediction value for each 1 unit change in x. Just like regression, it
won't matter if you code it as 0/1 or 1/2 or 105 vs 106. If you code it
as 0 vs 10 the coefficient will be divided by 10 though.
The relative hazard
Hi,
I want to melt my list and get certain deskriptive factors (length of a
vector etc.) into a dataframe. Best to describe it with an example:
A - seq(4)
B - seq(6)
C - seq(9)
ls - list(A,B,C) # this is my list with vectors of different length
# thats the dataframe how it should look like:
The Cox model predicts two things: the relative hazard (death rate)
associated with each variable, and a predicted survival curve for any
particular variable combination.
The predicted survival curve will look like a Kaplan-Meier curve:
multiple small steps, and will only rarely go all the way
I want to start JGR as a full sized/maximized window automatically, but how
to do this? For other applications I can add option --geometry 1440x900
to the launch command, but for JGR this do not work. Sugestions?
Iurie Malai
Senior Lecturer
Psychology Department
Ion Creanga Moldova Pedagogical
Try
list - list(1:4, 1:6, 1:9)
t(sapply(list, function(x) c(length(x), sum(x 5), sum(x 5
HTH,
Jorge.-
On Wed, Feb 8, 2012 at 8:50 AM, Johannes Radinger wrote:
Hi,
I want to melt my list and get certain deskriptive factors (length of a
vector etc.) into a dataframe. Best to describe
Hello,
I have to deal with numbers with a decimal part as quarter, coming from two
systems with different way to show decimals. I need to tell R these are in fact
the same number.
On one side my number are formatted this way : 2.2 , 2.4 and 2.6. On the other
side, I have 2.25, 2.50 and 2.75.
On 2/7/2012 1:29 PM, Samuel Bazzi wrote:
I have a 3xN matrix of parameters obtained from N regressions where the 3
parameters are jointly statistically significant. I would like to reproduce
a 3D confidence ellipsoid projecting 2D ellipses onto the XY plane as in
Figure 5.2 in this
will this do it for you:
x - c(2.2, 2.4, 2.6, 3.2, 3.4, 3.6)
# get integer part
x.i - as.integer(x)
# get fractional part
x.f - (x * 10) %% 10
# new result
result - x.i + ifelse(x.f == 2
+ , .25
+ , ifelse(x.f == 4
+ , .5
+
Have you tried plotting obvserved survival against X*Beta? I believe the usual
predictions from a cox model are just monotonic transformations of this.
-Alan
-Original Message-
From: Bonnett, Laura [mailto:l.j.bonn...@liverpool.ac.uk]
Sent: Wed 2/8/2012 1:52 AM
To: 'David Winsemius'
Cc:
TY Jim,
It do the trick.
I was trying to play without success with the format() options.
No simplest way so?
Arnaud Gaboury
A2CT2 Ltd.
-Original Message-
From: jim holtman [mailto:jholt...@gmail.com]
Sent: mercredi 8 février 2012 15:36
To: Arnaud Gaboury
Cc: r-help@r-project.org
On Feb 8, 2012, at 9:12 AM, Arnaud Gaboury wrote:
Hello,
I have to deal with numbers with a decimal part as quarter, coming
from two systems with different way to show decimals. I need to tell
R these are in fact the same number.
On one side my number are formatted this way : 2.2 , 2.4
Looks like something priced in eighths; we deal with similar notation for bonds
and similar instruments.
x - c(2.2, 2.4, 2.6, 3.2, 3.4, 3.6)
as.integer(x)+10*(x-as.integer(x))/8
[1] 2.25 2.50 2.75 3.25 3.50 3.75
Adjust the 10 and 8 if you have other denominators.
-- David
-Original
Here is a shorter way:
x - c(2.2, 2.4, 2.6, 3.2, 3.4, 3.6)
# get integer part
x.i - as.integer(x)
# get fractional part
x.f - x %% 1
result - x.i + x.f * 1.25
result
[1] 2.25 2.50 2.75 3.25 3.50 3.75
as.integer(x) + (x %% 1) * 1.25
[1] 2.25 2.50 2.75 3.25 3.50 3.75
On Wed, Feb 8, 2012
David,
You are not far indeed, as I trade commodities, and prices are the ones from
grain market: Corn, wheat and Soybeans.
They are quoted in 1/4, and my trading platform displays them in 2,4,6 and my
statements are in 25,50,75.
TY
Arnaud Gaboury
A2CT2 Ltd.
-Original Message-
On Feb 8, 2012, at 15:48 , David Reiner wrote:
Looks like something priced in eighths; we deal with similar notation for
bonds and similar instruments.
x - c(2.2, 2.4, 2.6, 3.2, 3.4, 3.6)
as.integer(x)+10*(x-as.integer(x))/8
[1] 2.25 2.50 2.75 3.25 3.50 3.75
Adjust the 10 and 8 if you
Hi,
Try
list - list(1:4, 1:6, 1:9)
t(sapply(list, function(x) c(length(x), sum(x 5), sum(x 5
thank you...the sapply approach seems straight forward, although I don't get
the names into an own column... When the list elements are named the name is
used for the rownames. I'd like to
On Wed, Feb 8, 2012 at 9:12 AM, Arnaud Gaboury arnaud.gabo...@a2ct2.com wrote:
Hello,
I have to deal with numbers with a decimal part as quarter, coming from two
systems with different way to show decimals. I need to tell R these are in
fact the same number.
On one side my number are
Thanks so much Peter. You are the man.
Easy way and working for me.
Arnaud Gaboury
A2CT2 Ltd.
-Original Message-
From: peter dalgaard [mailto:pda...@gmail.com]
Sent: mercredi 8 février 2012 16:15
To: David Reiner
Cc: Arnaud Gaboury; jim holtman; r-help@r-project.org
Subject: Re: [R]
On Wed, Feb 08, 2012 at 03:12:56PM +0100, Arnaud Gaboury wrote:
Hello,
I have to deal with numbers with a decimal part as quarter, coming from two
systems with different way to show decimals. I need to tell R these are in
fact the same number.
On one side my number are formatted this
Hi
I have a dataset with a few variables but two variables are very important.
One of them is say S1 and other S2. S1 is a numeric variable and S2 is a
categorical variable. Consider two cases of S1-S2 pair like S1 = 70.2, S2 =
A and S1 = 70.21, S2 = B. Assume my dataset has 20 instances of the
Does this do what you want:
list - list(A=1:4, B=1:6, C=1:9)
result - lapply(names(list), function(x){
+ data.frame(name = x
+ , length = length(list[[x]])
+ , gt5 = sum(list[[x]] 5)
+ , lt5 = sum(list[[x]] 5)
+ )
+ })
do.call(rbind, result)
name length
Thanks a lot, David.
Uh...this is not really an R question, but I couldn't find answer nowhere...
--
View this message in context:
http://r.789695.n4.nabble.com/How-to-have-columns-lined-up-tp4367928p4369262.html
Sent from the R help mailing list archive at Nabble.com.
I have these R code:
###
time.test.data-c(2.88645418326693, 2.91546949823027, 2.94130799329234,
2.93313338038109, 2.89478957915832, 2.86029757243540, 2.78648486664669,
2.80183167535133, 2.75435512226307, 2.78992352676563,
Dear R list,
I have a package downloaded and looked up a function in there. Now I find
that it uses C code (.C call) to do part of its job.
However, when I wanted to look that part up by using getAnywhere() I was
told that no object of that name could be found. Then I tried typing C.(
Confirmed fixed upstream.
Thanks,
David
On 2012-02-07 18:43, Ali Tofigh wrote:
Hi,
I'm currently using the R package e1071 to train naive bayes
classifiers and came across a bug: When the posterior probabilities of
all classes are small, the result from the predict.naiveBayes function
become
Thank you. The factor is useful.
What if I did not factor it,and the x is listed as 2 2 1 1 1 1 2 2 2 and so
on. How would I know the HR for coxph is group2/group1 or group1/group2? I
understand it's just inverse but how can I identify the exact HR?
--
View this message in context:
Hi Joshua,
Before I found your post here, I have viewed your source code for
'wilderSum'http://cran.r-project.org/src/contrib/TTR_0.21-0.tar.gz to
figure out how wilderSum works - I re-write a piece of R code to implement
the algorithm as in your source code, but failed to get the right
Hello,
I have a dataset with many rows, starting from a row that I choose I
would like to find the other rows in the dataset which are identical to
this row (with the same values per each column) and assign them to a
variable.
How could I do?
Thank you
Hello,
I used read.xlsx to read in Excel files but for large files it turned out to
be not very efficient.
For that reason I use a programme which writes each sheet in an Excel file
into tab-delim txt files.
After that I tried using read.table and read.delim to read in those txt
files.
I have these R code:
###
time.test.data-c(2.88645418326693, 2.91546949823027, 2.94130799329234,
2.93313338038109, 2.89478957915832, 2.86029757243540, 2.78648486664669,
2.80183167535133, 2.75435512226307, 2.78992352676563,
Hi,
How can I draw a random sample from a truncated distribution (especially
lognormal)?
I found the functions for truncated normal but not for many other
distributions.
Thanks
Nikhil
--
View this message in context:
I did a linear correlation of data using glm.fit and stored the output in the
object f:
f - glm.fit(x, y, w)
I am intereseted in estimating the quality of the correlation. I am used to
do it using pearson correlation coefficient r or r^2. Can I extract this
coefficient from the output of glm.fit?
I’ve a question on saving a earth object to disk.
Say m is the model then
print(object.size(m), units=”Mb”)
163.8 Mb
and save it off
save(m, “tmp.rda”)
and “tmp.rda” is roughly 171Mb file.
I would like this to be much smaller.
So I try
m$bx-NULL
then
print(object.size(m), units=”Mb”)
14.9 Mb
On 08.02.2012 15:35 (UTC+1), Jean Jacques Dureau wrote:
I have these R code:
###
time.test.data-c(2.88645418326693, 2.91546949823027, 2.94130799329234,
2.93313338038109, 2.89478957915832, 2.86029757243540,
On Feb 8, 2012, at 7:32 AM, hithit168 wrote:
Thanks a lot, David.
Uh...this is not really an R question, but I couldn't find answer
nowhere...
Questions that relate to how to use editors (and this is especially so
for Microsoft products) simply do NOT belong on R-help. There must be
Hi Ray,
Thanks for responding! However, it would certainly be very non-intuitive
if you're correct about the units for the projected coordinates. As I'm
sure you know, in a GIS geographic coordinates are usually in
degrees--although it's quite possible for these to be in radians instead, I
Yuanwei,
You are correct. The initial seed value is the raw sum, starting with
TTR_0.21-0.
As it says in the TTR/CHANGES file (among other things):
- Changed wilderSum to seed initial value with raw sum. This matches
Wilder's original calculations. Thanks to Mahesh Bp for the report.
HTH,
--
I don't know if this completely solves your problem, but here are some
arguments to read.table/read.delim you might try:
row.names=FALSE
fill=TRUE
The details section also suggests using the colClasses argument as the
number of columns is determined from the first 5 rows which may not be
Dear all, I know this problem was discussed many times in forum, however
unfortunately I could not find any way out for my own problem. Here I am
having Memory allocation problem while generating a lot of random number.
Here is my description:
rnorm(5*6000)
Error: cannot allocate vector of
On Wed, Feb 8, 2012 at 7:09 AM, mails mails00...@gmail.com wrote:
Hello,
I used read.xlsx to read in Excel files but for large files it turned out to
be not very efficient.
For that reason I use a programme which writes each sheet in an Excel file
into tab-delim txt files.
Note that that is
32 bit windows has a memory limit of 2GB. Upgrading to a computer thats
less than 10 years old is the best path.
But short of that, if you're just generating random data, why not do it in
two or more pieces and combine them later?
mat.1 - matrix(rnorm(5*2000),nrow=5)
mat.2 -
8-02-2012, 22:22 (+0545); Christofer Bogaso escriu:
And the Session info is here:
sessionInfo()
R version 2.14.0 (2011-10-31)
Platform: i386-pc-mingw32/i386 (32-bit)
Not an expert, but I think that 32-bit applications can only address
up to 2GB on Windows.
--
Bye,
Ernest
Hi all,
I want to do a linear regression with lm package in MASS, my data is 59199
rows by 29 column.
I got this error message can not allocate a vector of size 1.5Gb.
I have read some of the previous related posting on this but I couldnt still
got it right.
I have an Ubuntu machine of
Hye,
I am writing to request your help.
I am working on survival curve analysis with Cox model (cox.zph). After to test
the proportionality condition for each covariant (independence to the time),
the time effect is very significant and I must adapt my model, by the addition
of a function
Hi rainer,
how can I control dependend packages?
thanks
jj
Il 08 febbraio 2012 17:10, Rainer Hurling rhur...@gwdg.de ha scritto:
On 08.02.2012 15:35 (UTC+1), Jean Jacques Dureau wrote:
I have these R code:
###
On Wed, Feb 08, 2012 at 03:36:45PM +0100, Francisco wrote:
Hello,
I have a dataset with many rows, starting from a row that I choose I
would like to find the other rows in the dataset which are identical to
this row (with the same values per each column) and assign them to a
variable.
How
Howdy,
This should be simple, but I am finding that I can't find a simple
solution. I have a plot to which I am manually adding the annotations
to the y-axis with this command:
axis(2,
c(-4,-3,-2,-1,0,1,2,3,4,5,6,7),labels=c(-4,-3,-2,-1,0,1,2,3,4,5,6,7),cex.axis=8)
The issue is that,
On Wed, Feb 08, 2012 at 06:17:40AM -0800, n wrote:
Hi,
How can I draw a random sample from a truncated distribution (especially
lognormal)?
I found the functions for truncated normal but not for many other
distributions.
Hi.
A variable Y with a log-normal distribution may be obtained as
Hi--
I googled the above error and found previous postings about this error on
the list. I was having a little difficulty implementing the advice though.
The suggestions were to use: traceback() and checkRd(). I'm using R in
the directory in which the .Rd file with the problem is located, but
Dear John,
interesting. There must be a bottleneck somewhere, which possibly went
unnoticed because econometricians seldom use so many data points. In
fact 'plm' wasn't designed to handle only 700 Megs of data at a time;
but we're happy to investigate in this direction too. E.g., I was aware
of
It's compiled code so you can't view it in R. Download the source from CRAN (in
your browser, not through R), decompress it, and look through the src/
directory with your favorite text editor.
Michael
On Feb 8, 2012, at 8:51 AM, J. Augusiak jaugus...@googlemail.com wrote:
Dear R list,
I
Hi,
Is there a way to efficiently replace specified indices in a string with
another character? For example, if I had a vector of strings such as
[1] hellohowareyoudoing
[2] imgoodhowareyou
[3] goodandyou
[4] yesimgoodijusttoldyou
[5] ohyesthatsright
and had a list of positions that I want to
On 08.02.2012 17:14, oluwole oyebamiji wrote:
Hi all,
I want to do a linear regression with lm package in MASS, my data is
59199 rows by 29 column.
I got this error message can not allocate a vector of size 1.5Gb.
I have read some of the previous related posting on this but I couldnt
Hi Joy,
Perhaps not the easiest way, but the following seems to work:
x - c(hellohowareyoudoing, imgoodhowareyou, goodandyou,
yesimgoodijusttoldyou, ohyesthatsright)
pos - list(c(3, 9), c(3,4), c(4,7), 5:9, c(2, 5, 7, 12))
sapply(1:length(pos), function(i){
xx - strsplit(x, )[[i]]
And here's an alternative solution:
subchar - function(string, pos, char=-) {
for(i in pos) {
string - gsub(paste(^(.{, i-1, })., sep=), \\1-, string)
}
string
}
subchar(hellohowareyoudoing, 3)
[1] he-lohowareyoudoing
subchar(hellohowareyoudoing, c(3, 9))
[1]
On Wed, Feb 8, 2012 at 12:33 PM, Yang, Joy (NIH/NHGRI) [F]
joy.y...@nih.gov wrote:
Hi,
Is there a way to efficiently replace specified indices in a string with
another character? For example, if I had a vector of strings such as
[1] hellohowareyoudoing
[2] imgoodhowareyou
[3] goodandyou
Gang,
Maybe someone here has a different take on things. I'm afraid I have
no more insights on this unless you explain exactly what you are
trying to achieve, or more importantly why? That may help understand
what the problem really is.
Do you want to save an interactive session for future runs?
Dear all, let say I want to write a vector to a CSV file. So I can have
following syntax:
write.csv(rnorm(10), dat.csv)
Now I want to add one more column into that existing file. If I use the same
code then existing file will be destroyed. Is there any functionality to add
without
Thank you both! I was working along the lines of Jorge's method, but was taking
longer than it should. Sarah's is actually a lot faster.
Thanks again,
Joy
From: Sarah Goslee [sarah.gos...@gmail.com]
Sent: Wednesday, February 08, 2012 1:30 PM
To: Yang,
On 07.02.2012 15:23, anaraster wrote:
Hi!
I am new to BUGS and running BUGS from R. I am trying to run a regression
model from R, however I have this error message:
Error in file(con, wb) : cannot open the connection In addition: Warning
messages:
1: In file.create(to[okay]) : cannot
I run into a slight syntax proble while using nls that seems to require
some advice from the R community
I have a nonlinear regression problem where I observe the sum of the
responses (y) of many individuals (X1 Xn). The properties (x1..xn)
of these individuals have been measured but
On 06.02.2012 18:42, Timothy Bates wrote:
hi,
Does factanal() force the user to use the formula interface if they wish to
specify an na.action?
Yes, as the help page says:
na.action: The ‘na.action’ to be used if ‘x’ is used as a formula.
Uwe Ligges
v1-
On 08.02.2012 20:14, Ron Michael wrote:
Dear all, let say I want to write a vector to a CSV file. So I can have
following syntax:
write.csv(rnorm(10), dat.csv)
Now I want to add one more column into that existing file. If I use the same
code then existing file will be destroyed. Is there
On 08.02.2012 18:44, Ben Ganzfried wrote:
Hi--
I googled the above error and found previous postings about this error on
the list. I was having a little difficulty implementing the advice though.
The suggestions were to use: traceback() and checkRd(). I'm using R in
the directory in which
On 08.02.2012 19:32, Journals wrote:
I run into a slight syntax proble while using nls that seems to require
some advice from the R community
I have a nonlinear regression problem where I observe the sum of the
responses (y) of many individuals (X1 Xn). The properties (x1..xn)
of these
On 08.02.2012 17:43, Justin Fincher wrote:
Howdy,
This should be simple, but I am finding that I can't find a simple
solution. I have a plot to which I am manually adding the annotations
to the y-axis with this command:
axis(2,
I (and you as well) should have seen that before: use write.table in
order to append. The reason for that is given in ?write.table / ?write.csv:
‘write.csv’ and ‘write.csv2’ provide convenience wrappers for
writing CSV files. They set ‘sep’ and ‘dec’ (see below), ‘qmethod
=
Sorry Elai for the confusions.
Let me try to reframe my predicament. The main program myTest.R has
been written in interactive mode with many readline() lines embedded.
Suppose a user has already run the program once before in interactive
mode with all the answers saved in a text file called
On 06.02.2012 12:29, Karthi KN wrote:
hi all, i am new to r
It is called R - well, everything lower case, shift key is broken?
, i am trying to run data mining algorithms using map
reduce framework.. *
*i have few basic doubts*
*1. can i give file in hdfs to kmeans( ) ? ?I tried as
On 07.02.2012 16:03, Mark Na wrote:
Dear R-helpers,
Please see the attached plot.
The problem is that I have too much space between the x-axis label
(which is mtext in an outer margin) and the plots.
My par settings for this plot are:
Hi all, I have some time trying to find a way to stop a loop for( ) until the
user presses the enter key or any other one and the loop can continue.
This could
be an example:
library(MASS)
data - data.frame(mvrnorm(1000,rep(0,5),Sigma=diag(1,5)))
for(i in 1:dim(data)[2]){
On 12/08/2011 03:45 AM, Xavier Fernández i Marín wrote:
Hello,
Although I have used a general search engine, r-seek, and browsed
CRAN for contributed packages and R Gallery, I have not been able
to find an implementation of Hinton Diagrams for representing
weighting matrices using R.
A somewhat common idiom is to use readline() with Please press
Return to continue: as the prompt and not to store the value
anywhere.
Michael
On Wed, Feb 8, 2012 at 2:45 PM, Juan Andres Hernandez
jhernandezcabr...@gmail.com wrote:
Hi all, I have some time trying to find a way to stop a loop
On 08.02.2012 17:19 (UTC+1), Jean Jacques Dureau wrote:
Hi rainer,
how can I control dependend packages?
You did not tell us very much about your installation and versions of
packages you are using.
On my system sessionInfo() gives me the following after loading your
example:
Hi, I am wondering if it is possible to get an estimate of standard error of
the predicted posterior probability from LDA using lda() from MASS? Logistic
regression using glm() would generate a standard error for predicted
probability with se.fit=T argument in predict(), so would it make sense
Hi Uwe,
Thanks for the help. R version 2.14.0 (2011-10-31). The file in question
looks like this (w/ a few minor edits for privacy):
\name{curatedData-package}
\alias{curatedData-package}
\alias{curatedData}
\docType{package}
\title{Cancer Gene Expression Analysis}
\description{The curatedData
On Wed, Feb 08, 2012 at 01:30:55PM -0500, Sarah Goslee wrote:
And here's an alternative solution:
subchar - function(string, pos, char=-) {
for(i in pos) {
string - gsub(paste(^(.{, i-1, })., sep=), \\1-, string)
}
string
}
Hi.
Try the following modification.
Suppose I have a vector of strings:
c(A1B2,A3C4,B5,C6A7B8)
[1] A1B2 A3C4 B5 C6A7B8
where each string is a sequence of columnvalue pairs
(fixed width, in this example both value and name are 1 character, in
reality the column name is 6 chars and value is 2 digits).
I need to convert it to a
Okay, so I understood that appending can only happen row-wise. Therefore I
tried with following code:
write.csv(matrix(1:5, 1), dat.csv)
write.csv(matrix(1:5, 1), dat.csv, append = TRUE)
Warning message:
In write.csv(matrix(1:5, 1), dat.csv, append = TRUE) :
attempt to set 'append' ignored
Hi,there,
I am using R package boot to bootstrap. I have one question here: does
anybody possibly know how the boot package generates the indices which is
used in the statistic function?
I thought indices = sample(data, replace=TRUE), but when I replaced
indices with this command and used boot,
Hi, there is p value and number of events from coxph results. How can I keep
record of every p value and number of events automatically if I run 100
times?
Another question is how can I change the true or faulse statment to 1 and 0.
such as w=12, I want the value of w to be 1 not true.
Thank you.
To be clear, I can do that with nested for loops:
v - c(A1B2,A3C4,B5,C6A7B8)
l - strsplit(gsub((.{2}),\\1,,v),,)
d - data.frame(A=vector(length=4,mode=integer),
B=vector(length=4,mode=integer),
C=vector(length=4,mode=integer))
for (i in 1:length(l)) {
l1 -
On Feb 8, 2012, at 2:29 PM, Ron Michael wrote:
Okay, so I understood that appending can only happen row-wise.
Therefore I tried with following code:
write.csv(matrix(1:5, 1), dat.csv)
write.csv(matrix(1:5, 1), dat.csv, append = TRUE)
Warning message:
In write.csv(matrix(1:5, 1), dat.csv,
Hi Ray ( all),
Many apologies to Ray--apparently my intuition stinks!! The projection is
based on the unit sphere (R=1), so the projected coordinates really are
dimensionless--as you said! So to scale up to the earth, just multiply
the projected coordinate values from mapproject by your favorite
I suspect there are cleverer ways to do it, especially using packages
like stringr and gsubfn, but using base tools, you can hack it without
too much effort:
?gregexpr
is the key. To get started (x is your example vector of character strings):
gregexpr([[:alpha:]]+[[:digit:]]+,x)
[[1]]
[1] 1 3
1 - 100 of 149 matches
Mail list logo