Hello,
I'd like to convert R data frames into xml-trees. I wrote (and copied)
this little program to do this:
convertToXML - function(df,name)
{
xml - xmlTree(Test)
xml$addNode(name, close=FALSE)
for (i in 1:nrow(df)) {
xml$addNode(value, close=FALSE)
for (j in names(df)) {
T.Wunder wrote:
convertToXML - function(df,name)
{
xml - xmlTree(Test)
xml$addNode(name, close=FALSE)
for (i in 1:nrow(df)) {
xml$addNode(value, close=FALSE)
for (j in names(df)) {
xml$addNode(j, df[i, j])
}
xml$closeTag()
}
xml$closeTag()
Hello,
Quoting Dieter Menne dieter.me...@menne-biomed.de:
T.Wunder wrote:
convertToXML - function(df,name)
{
xml - xmlTree(Test)
xml$addNode(name, close=FALSE)
for (i in 1:nrow(df)) {
xml$addNode(value, close=FALSE)
for (j in names(df)) {
xml$addNode(j, df[i, j])
}
On Fri, Feb 12, 2010 at 5:19 AM, stvienna wiener stvie...@gmail.com wrote:
- interactive input of graphs (or external program and import via GraphML)
Perhaps latticist, rggobi?
Is R the right programming language for that? (I think it is...)
Are there any pointers? Books or tutorials on
Hi all,
In Continue to this old thread, I just fixed a wordpress plugin to allow
for R syntax highlighting using GeSHi version 1.0.8.6:
http://www.r-statistics.com/2010/02/r-syntax-highlight-on-your-blog-a-wordpress-plugin/
Hope some of you will find it useful in the future.
My thanks to all of
T.Wunder wrote:
Well, now I get a warning message like
In xmlRoot.XMLInternalDocument(currentNodes[[1]]) : empty XML document
if I use this function. How could this be fixed?
By telling use how you used that function.
I'm sorry. I have a data frame df and typed
You were completely right with your guesses. I'm sorry, that I didn't
told you all the details. Didn't think about that.
Thanks for your help, Tom
Quoting Dieter Menne dieter.me...@menne-biomed.de:
T.Wunder wrote:
Well, now I get a warning message like
In
Dear All,
For logistic regression models: is it possible to use validate (rms
package) to compute bias-corrected AUC, but have variable selection
with AIC use step (or stepAIC, from MASS), instead of fastbw?
More details:
I've been using the validate function (in the rms package, by Frank
To achieve this goal, it seems there are several ways, such as
WP-Syntax (http://wordpress.org/extend/plugins/wp-syntax/),
SyntaxHighlighter2
(http://mohanjith.com/2009/03/syntaxhighlighter2.html), etc. However,
these plugins seem not support R language by default, so you may have
to write some
On 11.02.2010 22:38, Tim Clark wrote:
Dear List,
I am trying to plot several separate polygons on a graph. I have figured out
how to do it by manually, but have too much data to use such a tedious method.
I would appreciate your help. I have made a simple example to illustrate the
Dear R helpers
Suppose e.g. I have a csv file having three variables defined and each of these
variables have data items of say 40, 50, 45 length. When I open this csv file
in 'R', I get 10 trailing 'NA's under first column and 5 'NA' s in case of 3rd
column.
How do I get rid of these NA's
Pat Burns makes a good point. -Peter
Original Message
Subject: Re: [R] Using seq_len() vs 1:n
Date: Fri, 12 Feb 2010 09:01:20 +
From: Patrick Burns pbu...@pburns.seanet.com
To: Peter Ehlers ehl...@ucalgary.ca
References: 4b746aef.10...@ucalgary.ca
If you want your code to
Try this:
#DF - read.table(...)
lapply(DF, function(col)col[!is.na(col)])
On Fri, Feb 12, 2010 at 9:31 AM, Amelia Livington
amelia_living...@yahoo.com wrote:
Dear R helpers
Suppose e.g. I have a csv file having three variables defined and each of
these variables have data items of say 40,
Nice, Uwe.
Small correction: make that nrow=4:
x1 - as.numeric(rbind(matrix(rep(x, each=2), nrow=4), NA))
-Peter Ehlers
Uwe Ligges wrote:
On 11.02.2010 22:38, Tim Clark wrote:
Dear List,
I am trying to plot several separate polygons on a graph. I have
figured out how to do it by
On 12.02.2010 12:54, Peter Ehlers wrote:
Nice, Uwe.
Small correction: make that nrow=4:
x1 - as.numeric(rbind(matrix(rep(x, each=2), nrow=4), NA))
Whoops, thanks!
Uwe
-Peter Ehlers
Uwe Ligges wrote:
On 11.02.2010 22:38, Tim Clark wrote:
Dear List,
I am trying to plot several
Hello,
Has anybody solved this?
Thanks, Joh
__
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,
On 12-Feb-10 11:48:15, Henrique Dallazuanna wrote:
Try this:
#DF - read.table(...)
lapply(DF, function(col)col[!is.na(col)])
On Fri, Feb 12, 2010 at 9:31 AM, Amelia Livington
amelia_living...@yahoo.com wrote:
Dear R helpers
Suppose e.g. I have a csv file having three variables defined
On 10/02/2010 11:07 AM, Michael Friendly wrote:
Duncan Murdoch wrote:
On 10/02/2010 9:33 AM, Michael Friendly wrote:
[Env: Tested under Win Xp, R 2.9.2 and R 2.10.1; sessionInfo() at end]
This is probably a bug in rgl, and I can reproduce it. Bugs in
contributed packages are best sent to
Assuming that you are using the xts package, try this:
data(sample_matrix)
sample.xts - as.xts(sample_matrix)
open - as.vector(sample.xts[,1])
month - as.Date(time(sample.xts))
plot(open, month, type=l)
-Peter Ehlers
JSmaga wrote:
Basically it works, but I use the xts format and the
Hi
r-help-boun...@r-project.org napsal dne 11.02.2010 20:36:31:
Hello,
With a dataset that is about 1.4e6 rows long
my.dat[seq(1:20),]
date Cell_ID Classification WT_Depth Frac_ET_Satsfd
1999-04-08 974 3 3.5850830.244561400
1999-04-081188
Dear colleges,
I am traying to restrict the value of one coefficient in my glm model, see
example:
medparmodel - glm(los ~ white * (-0.21) + type2 + type3 + hmo,
family=poisson(), data=medpar)
but this does not work, and searching in other help webpages I did not manage
to get any good hint.
Hi all,
Problem is solved.
The solution is I needed to pass the whole string driver=SQL Server;server=
01hd166373 as a parameter and not only the servername.
my-function(servername,dbname,dbtable){
library(RODBC)
channel- odbcDriverConnect(paste(servername)
init_data-
Hi r-users,
I have this code below but I don't understand the error message:
cumdensity - function(z)
{ alp - 2.0165;
rho - 0.868;
# simplified expressions
a - alp-0.5
c1 - sqrt(pi)/(gamma(alp)*(1-rho)^alp)
c2 - sqrt(rho)/(1-rho)
t1 - exp(-z/(1-rho))
t2 -
Hello,
I used the function Fstats (in the package strucchange) and would like to
transform the F probability given by Fstats in P value. This transformation
can be made while making a plot, but I need to have the numerical P value
which are ploted... and I can't find out how to do.
Here a is an
have a look at ?offset().
I hope it helps.
Best,
Dimitris
Rosario Garcia Gil wrote:
Dear colleges,
I am traying to restrict the value of one coefficient in my glm model, see
example:
medparmodel - glm(los ~ white * (-0.21) + type2 + type3 + hmo,
family=poisson(), data=medpar)
but this
sebastien wrote:
Hello,
I used the function Fstats (in the package strucchange) and would like to
transform the F probability given by Fstats in P value. This transformation
can be made while making a plot, but I need to have the numerical P value
which are ploted... and I can't find out how to
Dear list,
I have a list with 1000 x1000 lines and columns do you know how I can
convert it to matrrix or data.frame.
Thanks.
Juan
--
Juan Tomás Sayago
Universidad Central
http://sites.google.com/site/juantomassayago/
Objetivo: Garantizar a cada ser humano que habite en el país, una cantidad
Hi Linlin,
I am afraid I wasn't clear.
In my post I fixed the current WP-Syntax plugin so it WILL support the R
syntax :)
The link to the article is:
http://www.r-statistics.com/2010/02/r-syntax-highlight-on-your-blog-a-wordpress-plugin/
Best,
Tal
Contact
Hi there
I'm trying to find the mle fo a multinomial model -*L(N,h,S¦x)*. There
is only *N* I want to estimate, which is used in the number of successes
for the last cell probability. These successes are given by:
p^(N-x1-x2-...xi)
All the other parameters (i.e. h and S) I know from somewhere
On Fri, 12 Feb 2010, sebastien wrote:
Hello,
I used the function Fstats (in the package strucchange) and would like to
transform the F probability given by Fstats in P value. This transformation
can be made while making a plot, but I need to have the numerical P value
which are ploted... and I
Exactly what are you expecting the 'if' statement to do? By
definition, the 'if' only takes a single value and your expression is
probably a vector with many values and the error message is just
saying it will use only the first value to determine what to do. Are
you trying to check if 'any' or
Wow! Your reply amply demonstrates the power of understanding the
math (or finding someone who does) before turning on the computer.
One last R question...how could I efficiently enumerate all
distinguishable permutations of a vector of signs?
vect - c( -1, -1, 1, 1, 1)
permn(vect) #length:
On 12-Feb-10 13:14:29, Juan Tomas Sayago wrote:
Dear list,
I have a list with 1000 x1000 lines and columns do you know how I can
convert it to matrrix or data.frame.
Thanks.
Juan
as.data.frame() will convert it to a dataframe. If you then apply
as.matrix() to the result you will get a
I have saw it now. Thank you for your excellent works.
On Fri, Feb 12, 2010 at 9:15 PM, Tal Galili tal.gal...@gmail.com wrote:
Hi Linlin,
I am afraid I wasn't clear.
In my post I fixed the current WP-Syntax plugin so it WILL support the R
syntax :)
The link to the article is:
Ramon Diaz-Uriarte wrote:
Dear All,
For logistic regression models: is it possible to use validate (rms
package) to compute bias-corrected AUC, but have variable selection
with AIC use step (or stepAIC, from MASS), instead of fastbw?
More details:
I've been using the validate function (in
Hello,
I'm currently using the unif_rand() function of R to get a random number
from the uniform distribution in the C-part of a R package. The
unif_rand() is heavily used. Now I would like to spawn several threads
within the package in which the function is also heavily used. Is it
safe and
The OP may be interested in using low-level readBin() and writeBin()
instead. One can then either assign dimension attributes to the
object to access the data as a matrix/an array. Note that assigning
dimension attributes will probably(?) allocate a copy. If that is not
wanted, it is not that
Some of the examples in the JSS paper http://www.jstatsoft.org/v28/i01
might be useful for integrating contour3d results with lattice.
luke
On Thu, 11 Feb 2010, Waichler, Scott R wrote:
I am looking for examples of how to plot with contour3d() to a PNG or PDF file,
add axes and other
Dear useRs,
Just a little post to provide the answer of a problem that took me
some time to resolve !
Hope that reading this will permit the others to avoid that error.
When using the subset function, writing
subset (data, data$columnname == X) or subset (data, columnname == X)
do the same
Hello R Experts,
How can I assign the name of a data frame with the argument of a
function? Specifically I am using RODBC to build local dataframes
from SAS datasets on a
remote server. I would like the local dataframe have the same name as
the source SAS dataset, and the function below is what
On Fri, Feb 12, 2010 at 9:22 AM, Arnaud Mosnier a.mosn...@gmail.com wrote:
Dear useRs,
Just a little post to provide the answer of a problem that took me
some time to resolve !
Hope that reading this will permit the others to avoid that error.
When using the subset function, writing
x=10
f=function() {print('in f')}
g=function() {f(); print(x)}
g()
Suppose I have the above code, I want to know what functions and
variables have been used in the function g (in this case, f and x). Is
there a function to do so?
__
Ted.Harding at manchester.ac.uk writes:
On 12-Feb-10 13:14:29, Juan Tomas Sayago wrote:
Dear list,
I have a list with 1000 x1000 lines and columns
Lists have neither lines nor columns. Can you explain exactly what you have?
E.g. show us the code that created your list?
do you know how
On Feb 12, 2010, at 8:19 AM, mah wrote:
Hello R Experts,
How can I assign the name of a data frame with the argument of a
function? Specifically I am using RODBC to build local dataframes
from SAS datasets on a
remote server. I would like the local dataframe have the same name as
the
The next version of S+ will have seq_len in
it. Currently the CSAN package Rcompat contains
it.
Parsing the name seq_len can be a problem, since
S+ 8.1 still allows the use of the underscore
for assignment (it warns about its use, but
allows it). Either parse your code file in R mode
by calling
If S+ has seq(length=...), that would solve any parsing problems. /Henrik
On Fri, Feb 12, 2010 at 4:59 PM, William Dunlap wdun...@tibco.com wrote:
The next version of S+ will have seq_len in
it. Currently the CSAN package Rcompat contains
it.
Parsing the name seq_len can be a problem, since
On Fri, Feb 12, 2010 at 1:38 AM, Sharpie ch...@sharpsteen.net wrote:
djhurio wrote:
I believe there is not such thing as source code for a variable. I believe
if you define x=y*y, x is keeping only the values of y*y, but not how they
were computed. Am I right?
In general yes. Basic
Hi all,
I have a .First - function() {...} in the Rprofile.site file. Through
.First() I'm adding several menus to the GUI to access several functions
I've been developing for own use.
However, I also need to launch R scripts silently in a batch way, and
in this case I get the error message:
Hello, I am trying to start using Sweave. I copy the example from help Sweave
testfile - system.file(Sweave, Sweave-test-1.Rnw, package = utils)
## enforce par(ask=FALSE)
options(device.ask.default=FALSE)
## create a LaTeX file
Sweave(testfile)
## This can be compiled to PDF by
Duncan Murdoch wrote:
I tracked this down. It's a bug in rgl, but likely also a bug in
heplots. At line 93 of heplot3d.mlm.R, called from line 198 in the
same file, there's a call
texts3d(x[which.max(x[,2]),] + offset*ranges, adj=0,
texts=label, color=col, lit=FALSE)
At this
Use Nelder-Mead as the method in optim. This will give you the correct
solution.
m1 - mle2(mfun, start=svec, vecpar=TRUE, fixed=svec[1:(l-1)], method=Nelder)
Hope this is helpful,
Ravi.
Ravi Varadhan, Ph.D.
Assistant
Dear Frank,
Thanks a lot for your response. And apologies for the question,
because the answer was obviously in the help.
As for the caveats on selection: yes, thanks. I think I am actually
closely following your book (eg., pp. 249 to 253), and one of the
points I am trying to make to my
I've never heard of 'Portable MikeTex'. Is this (Portable) MiKTeX?
What you are doing wrong is declaring texidvi to be pdflatex, and it
simply is not. I think what you actually want is to include the
MiKTeX bin directory in your path, or to set options(texi2dvi=) to the
path to texi2dvi.exe
Ramon Diaz-Uriarte wrote:
Dear Frank,
Thanks a lot for your response. And apologies for the question,
because the answer was obviously in the help.
As for the caveats on selection: yes, thanks. I think I am actually
closely following your book (eg., pp. 249 to 253), and one of the
points I am
Some of the examples in the JSS paper http://www.jstatsoft.org/v28/i01
might be useful for integrating contour3d results with lattice.
Thank you, Luke, for pointing me to your paper with examples beyond what is in
R help. The example of using contour3d and wireframe in lattice in Section 4.4
hI
I have to calculate V statistic for each row of a large dataframe (28000). I
can not use multtest package for paired wilcox test. I have been using for
loop which are. Is there a way to speed the computation with another method
like using apply or tapply?
My data set looks like this:
Frank, let me make sure I understand:
On Fri, Feb 12, 2010 at 5:57 PM, Frank E Harrell Jr
f.harr...@vanderbilt.edu wrote:
Ramon Diaz-Uriarte wrote:
Dear Frank,
Thanks a lot for your response. And apologies for the question,
because the answer was obviously in the help.
As for the
On 12/02/2010 11:22 AM, jgar...@ija.csic.es wrote:
Hi all,
I have a .First - function() {...} in the Rprofile.site file. Through
.First() I'm adding several menus to the GUI to access several functions
I've been developing for own use.
However, I also need to launch R scripts silently in a
Thanks a lot guys,
looks like there are -as usual- a gazillion options ;))
f = function(x, vars) x[complete.cases(x[vars]),] seems to be the
most appropriate in my case though.
Best
Philipp
Benilton Carvalho wrote:
On Thu, Feb 11, 2010 at 4:18 PM, Philipp Rappold
philipp.rapp...@gmail.com
Hello list:
Is there an easy way (preferably through one of the standard R packages) of
obtaining summary statistics for grouped data? I could split the data into
classes by hist, and then progressively calculate all the columns i need to
obtain the mean and standard deviation, but i was
Ramon Diaz-Uriarte wrote:
Frank, let me make sure I understand:
On Fri, Feb 12, 2010 at 5:57 PM, Frank E Harrell Jr
f.harr...@vanderbilt.edu wrote:
Ramon Diaz-Uriarte wrote:
Dear Frank,
Thanks a lot for your response. And apologies for the question,
because the answer was obviously in the
Hi All,
I'm trying to use expression() for y-label in plot(). I'm not able to write
Average(space)PM(subscript)10. I'm trying:
ylab=expression(Average PM[10])
and its not working, because of a space between Average and PM. Thanks,
Peng
[[alternative HTML version deleted]]
Thanks for clarifying it Frank. (Yes, no univariate screening prior to
feeding the model to validate. And the bias correct I guess is from
my spanglish factory of new terminology ;-)
Best,
R.
On Fri, Feb 12, 2010 at 6:26 PM, Frank E Harrell Jr
f.harr...@vanderbilt.edu wrote:
Ramon
There are several depending on what specifically you want to do. Some of the
things to look at include: tapply, aggregate, the plyr package.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
-Original Message-
From:
gauravbhatti gaurav15984 at hotmail.com writes:
hI
I have to calculate V statistic for each row of a large dataframe
(28000). I can not use multtest package for paired wilcox test. I have
been using for loop which are. Is there a way to speed the computation
with another method like
You might find the summaryBy function in the doBy package useful.
Regards
Søren
Fra: r-help-boun...@r-project.org [r-help-boun...@r-project.org] P#229; vegne
af jose romero [jlauren...@yahoo.com]
Sendt: 12. februar 2010 18:23
Til: r-help@r-project.org
Try this:
expression(Average~PM[10])
On Fri, Feb 12, 2010 at 3:29 PM, Peng Cai pengcaimaill...@gmail.com wrote:
Hi All,
I'm trying to use expression() for y-label in plot(). I'm not able to write
Average(space)PM(subscript)10. I'm trying:
ylab=expression(Average PM[10])
and its not
Good Afternoon R Help!
On of my users is seriously thinking about moving to R from Splus. In his
testing, he has already found some benefits to it. He has, however run
into one issue, calling his Fortran functions in R. Previously, in Splus,
he would do the following:
1. Compile via f90 the
At 6:44 PM +0100 2/12/10, Søren Højsgaard wrote:
You might find the summaryBy function in the doBy package useful.
Regards
Søren
see also the describe.by function in the psych package.
Fra: r-help-boun...@r-project.org
[r-help-boun...@r-project.org]
Hello All:
Can somebody please tell me how I can have the average of 'y' on the graph
for different values of 'x in the following code?
ofn - xy.png
bitmap(ofn, type = png256, width = 21, height = 30, pointsize = 30, bg =
white,res=50)
ifn - sprintf(xy.txt)
data - read.table(ifn)
Hello my friends,
here is a code I wrote with no loops on matrix that is taking too long (2
seconds and I call him 720 times -- 12 minutes):
mat1 and mat2 are both matrix with 103 columns and 164 rows.
sequence - matrix(seq(1 : ncol(mat1)))
returns - apply(sequence, 1, function, mat1= mat1,
Thanks to Prof Ripley, I modified Rprofile.site with:
.First - function() {
Sys.setenv(JAGS_HOME=replace.substring.wild(R.home(), R-*, JAGS-1.0.3))
Sys.setenv(LATEX=replace.substring.wild(R.home(),R*,PortableUSB/PortableApps/MikeTex/miktex/bin/latex.exe))
PathNew -
Hi,
Every time I run a svm regression program, I got different RMSE value.
Could you please tell me what the reason for that?
Cheers,
Amy
_
If it exists, you'll find it on SEEK.
blue sky wrote:
x=10
f=function() {print('in f')}
g=function() {f(); print(x)}
g()
Suppose I have the above code, I want to know what functions and
variables have been used in the function g (in this case, f and x). Is
there a function to do so?
Try findGlobals() from the
Here is one quick way using the combinat package:
library(combinat)
tmpfun - function(x) {
+ tmp - rep(1,5)
+ tmp[x] - -1
+ tmp
+ }
combn(5,2, tmpfun)
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
[1,] -1 -1 -1 -111111 1
[2,] -1111
Hello,
I have a .First function in my personnal Rprofile file. Through the .First
function I want to load an R data base at position 2 in the search list but
R complains with:
Attempting to load the environment 'package:stats'
and further down the initialization process, when .First.sys() is
Marc,
Thank you for your help. I had tried assign, but I did not enclose the
table name in quotes in my function call. I needed to see what someone else
had written before I ever would have noticed it!
On Fri, Feb 12, 2010 at 10:00 AM, Marc Schwartz marc_schwa...@me.comwrote:
On Feb 12,
Ravi Varadhan rvaradhan at jhmi.edu writes:
Use Nelder-Mead as the method in optim. This will give you the correct
solution.
m1 - mle2(mfun, start=svec, vecpar=TRUE, fixed=svec[1:(l-1)],
method=Nelder)
Hope this is helpful,
Ravi.
Well-meaning though it is, this solution doesn't
Hi,
I am trying to submit a form to the EXPASY protscale server (
http://www.expasy.ch/tools/protscale.html). I am using the RCurl package and
the postForm function available in it. I have extracted the variables for
the form from the HTML source page. According to the syntax of postForm, I
just
Ravi Varadhan rvaradhan at jhmi.edu writes:
Use Nelder-Mead as the method in optim. This will give you the correct
solution.
m1 - mle2(mfun, start=svec, vecpar=TRUE, fixed=svec[1:(l-1)],
method=Nelder)
Hope this is helpful,
Ravi.
{Resending because it doesn't seem to have gone
First of all, please send a reproducible code. Your code is wrong and it does
not execute: naming a function called function is a bad idea.
Ravi.
Ravi Varadhan, Ph.D.
Assistant Professor,
Division of Geriatric Medicine and
Sorry guys, but I have another one:
I want to write a function that returns a certain column of a
dataframe. The function accepts two argument: the dataframe and the
name of the column, but the column is not given as a string but as
a variable name.
EXAMPLE
--
On Fri, 12 Feb 2010, Peng Cai wrote:
Hi All,
I'm trying to use expression() for y-label in plot(). I'm not able to write
Average(space)PM(subscript)10. I'm trying:
ylab=expression(Average PM[10])
and its not working, because of a space between Average and PM. Thanks,
quote(Average PM[10])
Hi,
I am trying to submit a form to the EXPASY protscale server (
http://www.expasy.ch/tools/protscale.html). I am using the RCurl package and
the postForm function available in it. I have extracted the variables for
the form from the HTML source page. According to the syntax of postForm, I
just
Sent from my iPod
__
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.
Philipp Rappold wrote:
Sorry guys, but I have another one:
I want to write a function that returns a certain column of a
dataframe. The function accepts two argument: the dataframe and the
name of the column, but the column is not given as a string but as
a variable name.
k -
Sunando Roy wrote:
Hi,
I am trying to submit a form to the EXPASY protscale server (
http://www.expasy.ch/tools/protscale.html). I am using the RCurl package and
the postForm function available in it. I have extracted the variables for
the form from the HTML source page. According to the
?profile
Bert Gunter
Genentech Nonclinical Statistics
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of anna
Sent: Friday, February 12, 2010 10:29 AM
To: r-help@r-project.org
Subject: [R] Code working but too slow, any idea for how
Thanks Uwe! And Peter for the correction. I would never have come up with
that!
Tim
Tim Clark
Department of Zoology
University of Hawaii
--- On Fri, 2/12/10, Uwe Ligges lig...@statistik.tu-dortmund.de wrote:
From: Uwe Ligges lig...@statistik.tu-dortmund.de
Subject: Re: [R] Formatting
Hi Duncan,
Thanks for your help. I changed the P but the output that I get is not what
I expect. The form gets aborted without any actual output. I get the same
result with
postForm(http://www.expasy.ch/tools/protscale.html;)
just with an added message that there was no input passed on. But
Hi:
Hi:
Observe that if you quote the name of the variable in your original
function,
everything is fine; in fact, you can ask for multiple variables.
k - function(df, col) df[col]
k(testdata, 'var1')
var1
1 0.91663902
2 0.60470753
3 0.09599891
k(testdata, 'censor')
censor
1 0
On Fri, Feb 12, 2010 at 1:36 PM, Sharpie ch...@sharpsteen.net wrote:
blue sky wrote:
x=10
f=function() {print('in f')}
g=function() {f(); print(x)}
g()
Suppose I have the above code, I want to know what functions and
variables have been used in the function g (in this case, f and x). Is
My dearest,
I appreciate very much a little help. I have changed my R 2.9 version to the
new one R 2.10 version. I uninstall the old one, I cancel also the old
library and I install everything again. When I load the package mgcv it
appears the following message:
This is mgcv 1.6-1. For overview
On Fri, Feb 12, 2010 at 01:26, seydahmet ercan seydahmeter...@gmail.com wrote:
Hello all,
I am trying to run a simulation. the simulation presented below.
rep=5
sr=.10 # selection ratio
pmin=.10 # minority ratio
nap=1000 # total number of applicant
nsle=sr*nap # number of ee selected
Here's a simple function (same idea):
f - function(x){
lenx - length(x)
negx - sum(x 0)
mat - matrix(1, lenx, choose(lenx,negx))
for(i in seq_len(choose(lenx, negx))){
mat[combn(lenx,negx)[, i], i] - -1
}
mat
}
x - c(-1,-1,-1,1,1,1,1)
f(x)
[combn() is now in utils]
-Peter
I created a logistic regression model for the data set immediately below and
obtained the following parameter estimates:
Coefficients :
Estimate Std. Error t-value Pr(|t|)
altc -0.064539 0.359398 -0.1796 0.8575
alts -0.287682 0.381881 -0.7533 0.4513
Then I reformatted the data
anna lippelanna24 at hotmail.com writes:
Hello my friends,
here is a code I wrote with no loops on matrix that is taking too long (2
seconds and I call him 720 times -- 12 minutes):
mat1 and mat2 are both matrix with 103 columns and 164 rows.
Could you provide some example code creating
Hello All,
I am trying to make a figure with 3x2 plots in it. Let us name the plots as
such:
1 2
3 4
5 6
I begin my script with:
par(mfcol=c(3,2))
par(oma=c(0,0,0,0)) -- This is for a postscript figure so I really don't
need the outer margins.
d=5
par(mar=c(d,d,d,d)) -- This applies
Hello R users,
I am trying to calculate the stochastic lambda for a published matrix
population model using the popbio package.
Unfortunately, I have been unable to match the published results. Can
anyone tell me whether this is due to slightly different methods being
used, or have I gone
Sorry, maybe it's easy but I haven't found anything useful:
how can I obtain a list C that contains all the members in the list B that are
not in list A? This are lists of nanes, not numbers!
Thank you
Gabriele Zoppoli, MD
Ph.D. Fellow, Experimental and Clinical Oncology and Hematology,
1 - 100 of 132 matches
Mail list logo