Dear R-users,
we are happy to announce the release of our R package parcor.
The package contains tools to estimate the matrix of partial
correlations based on different regularized regression methods: Lasso,
adaptive Lasso, PLS, and Ridge Regression. In addition, parcor provides
On behalf of the editorial team, I am happy to inform you that the second
issue of The R Journal is now available:
http://journal.r-project.org/current.html
Note that an RSS feed is now in place: http://journal.r-project.org/rss.xml
I welcome Peter Dalgaard as the new Editor-In-Chief.
--
Hi, I'm running R 2.9.0 on OS X Tiger (10.5.8). When I use rJava I see
that it is using the 1.5.0 JRE. When I tried to reconfigure R to use
the 1.6 JDK that I have installed, I did
sudo R CMD javareconf
and I get
Java interpreter : /usr/bin/java
Java version : 1.5.0_16
Java home path :
WillP wrote:
Thanks Dieter. I had played with it before but was having trouble with
it.
I seem to be doing better now I have discovered prop.table!
Also have look at ctab in package catspec.
Dieter
--
View this message in context:
I would like to thank all those who wrote helpful and interesting
replies to my question. I could have saved myself the time for writing
it up had I simply read ?as.integer. However, under the circumstances in
which I first encountered as.integer's truncating behaviour this was not
so obvious
Dnia 8 stycznia 2010 9:20 S Devriese sdmaill...@gmail.com napisał(a):
Mhh, you could have a look at write.matrix in the MASS package, but I'm
afraid that you might have to specify the encoding explicitly (see
?connections, the section on encoding)
Thank you. The matrix that I write are coding
On 01/11/2010 06:47 PM, Carl-Göran CG. Pettersson wrote:
Dear all
R2.10 WinXP
I have a dataset dealing with the way different wheat cultivars build their
yield.
Wheat ears are organised in spikelets where the spikelets can be numbered from
the bottom, with even numbers on one side and odd
Are you asking how to add points to a plot with points in it ?
(for that there is ?points)
If not, please try to elaborate the question, since I didn't fully get it.
Contact
Details:---
Contact me: tal.gal...@gmail.com |
Hi jjh,
I wasn't able to understand: for what statistic do you want the standard
error for? (The coefficients, the R^2 ?)
Tal
Contact
Details:---
Contact me: tal.gal...@gmail.com | 972-52-7275845
Read me: www.talgalili.com
Thanks Dieter. I had played with it before but was having trouble with
it.
I seem to be doing better now I have discovered prop.table!
Will
From: Dieter Menne [via R]
[mailto:ml-node+1010645-1539655...@n4.nabble.com]
Sent: 10 January 2010 12:00 pm
To: Will Parry
Subject: Re: [R] Simple
Dear all,
I just installed the new version of R, 2.10.1, and I am currently
using the package sparseM. (I also use a 64 bit windows version)
I got a problem that I never had: when I try to multiply with a
kronecker product (%x%) two sparse matrixes I get the following
message:
Error in dim(x) -
K-means recluster data with given cluster centers
Dear R user,
I have several large data sets. Over time additional new data sets will be
created.
I want to cluster all the data in a similar/ identical way with the k-means
algorithm.
With the first data set I will find my cluster centers and
Hi Group,
I'm looking for a method to calculate sample size for a
non-inferiority survival analysis.
Initially I've used cpower() of Hmisc, switching the roles of type-I
and type-II errors, as cpower() assumes no treatment difference as the
null hypothesis.
Now, I would like to introduce event
Dear List
As a fairly new R programmer I seem to have run into a strange problem -
probably my inexperience with R
After reading and merging successive files into a single data frame, I find
that order does not sort the data as expected.
I have multiple references in each file but each
Dear R-users,
I have a complex line by xy-values (ordered by z).
And I would like to get interpolated y-values on the positions of x = 0:600.
How do I get the correct points?
That kmeans returns an error if there is an empty cluster is a bit of a
nuisance.
It should not be too difficult to get rid off the kmeans function for what
you call reclustering. You could write your own function that assigns
every point of the new data to the closest initial center. That
On 11/01/2010 7:37 AM, Steve Sidney wrote:
Dear List
As a fairly new R programmer I seem to have run into a strange problem -
probably my inexperience with R
After reading and merging successive files into a single data frame, I find
that order does not sort the data as expected.
I have
Do you have the same problem with the example
on the help page?
?'%x%-methods'
Works for me on Windows Vista (32-bit OS) and
R version 2.10.1 Patched (2010-01-05 r50896).
-Peter Ehlers
alessia matano wrote:
Dear all,
I just installed the new version of R, 2.10.1, and I am currently
using
... and this one I received this morning:
Hi folks, Which is the best statistical package out there. I am out of work
and looking to get the best buck for my money.
Thanks,
Mike.
I guess this is still better than those AOL disks.
On Thu, Jan 7, 2010 at 3:49 AM, Liviu Andronic
Hello World,
I have a function that makes pairwise comparisons between two strings. I would
like to apply this function to my data (which consists of columns with
different strings) in the way that it compares the first with the second entry,
and then the third with the fourth, and then the
Thanks a lot for the quick response!
The suggested code worked fine up to a certain point: the actual plotting from
the datasets...
With the sample dataset in samp my code looks like this at the end:
for(cultivar in 1:6)
+ boxplot(unlist(samp[samp$cn==cultivar[cultivar],]),
+
On Jan 11, 2010, at 7:44 AM, René Mayer wrote:
Dear R-users,
I have a complex line by xy-values (ordered by z).
And I would like to get interpolated y-values on the positions of x
= 0:600.
How do I get the correct points?
x
=
c
On Jan 11, 2010, at 7:49 AM, Duncan Murdoch wrote:
On 11/01/2010 7:37 AM, Steve Sidney wrote:
Dear List
As a fairly new R programmer I seem to have run into a strange
problem - probably my inexperience with R
After reading and merging successive files into a single data
frame, I find that
Dear Saji Ren,
Dieter Menne has already pointed out that you lost the negative values in
the transformation. Another point is that since you selected the
transformation based on the started data c888.dl.ma080 + 1200, then you
should transform c888.dl.ma080 + 1200 and not c888.dl.ma080. But as
On Jan 11, 2010, at 7:55 AM, Peter Ehlers wrote:
Do you have the same problem with the example
on the help page?
?'%x%-methods'
Works for me on Windows Vista (32-bit OS) and
R version 2.10.1 Patched (2010-01-05 r50896).
-Peter Ehlers
alessia matano wrote:
Dear all,
I just installed the
Hi:
It wasn't clear to me precisely what you wanted, but here are a couple of
ideas in the hope that it will help.
I used ggplot2 for the graphics, so it requires some manipulation of your
dataset from 'wide' format to 'long'.
I also add an indicator for side of the ear (odd is side one (L?),
Dear all,
I just installed the new version of R, 2.10.1, and I am currently
using the package sparseM. (I also use a 64 bit windows version)
I got a problem that I never had: when I try to multiply with a
kronecker product (%x%) two sparse matrixes I get the following
message:
Error in dim(x) -
First, if I have an S4 class boo should I define S3 method for
printing print.boo(..) or should I define S4 method print(..).
I mainly need to define print function only because some user might
call it and then I would like to dispatch the call to
right function instead.
Second, it seems
Standard errors for the coefficients. Thanks!
Tal Galili wrote:
Hi jjh,
I wasn't able to understand: for what statistic do you want the standard
error for? (The coefficients, the R^2 ?)
Tal
Contact
Details:---
David , Duncan
Thanks for the swift response.
You guys hit the nail on the head. That's exactly what the problem was.
All the best
Steve
- Original Message -
From: David Winsemius dwinsem...@comcast.net
To: Duncan Murdoch murd...@stats.uwo.ca
Cc: Steve Sidney sbsid...@mweb.co.za;
Hi,
On Mon, Jan 11, 2010 at 8:41 AM, Laetitia Schmid laeti...@gmt.su.se wrote:
Hello World,
I have a function that makes pairwise comparisons between two strings. I
would like to apply this function to my data (which consists of columns with
different strings) in the way that it compares
Env: Win XP, R 2.9.2]
It's a minor annoyance, but I find that after I run example(), the
console state of prompting to press Enter for
each new graph remains as it is under example. It's more annoying that
it seems difficult to turn this behavior
off!
In a fresh session:
Many thanks for your suggestions,
fortunately when I closed R and opeedn it again, it did not give again
that error. However, now there is something more strange happening,
related again to sparse matrix, and I am afraid it could concern
memory problems (I put 4000 of memory limit).
I am
On Jan 11, 2010, at 9:18 AM, Steve Lianoglou wrote:
Hi,
On Mon, Jan 11, 2010 at 8:41 AM, Laetitia Schmid
laeti...@gmt.su.se wrote:
Hello World,
I have a function that makes pairwise comparisons between two
strings. I would like to apply this function to my data (which
consists of
On 11/01/2010 9:28 AM, Michael Friendly wrote:
Env: Win XP, R 2.9.2]
It's a minor annoyance, but I find that after I run example(), the
console state of prompting to press Enter for
each new graph remains as it is under example. It's more annoying that
it seems difficult to turn this
am == alessia matano alexis@gmail.com
on Mon, 11 Jan 2010 15:38:39 +0100 writes:
am Many thanks for your suggestions,
am fortunately when I closed R and opeedn it again, it did not give again
am that error. However, now there is something more strange happening,
am
On Jan 11, 2010, at 9:28 AM, Michael Friendly wrote:
Env: Win XP, R 2.9.2]
It's a minor annoyance, but I find that after I run example(), the
console state of prompting to press Enter for
each new graph remains as it is under example. It's more annoying
that it seems difficult to turn
Many thanks for it.
However it is strange that when I put the numbers rather than ncol(R)
(a matrix with ncol=36698) it worked. Look below
dim(res2)
[1] 170471 25822
D- as.matrix.csr(0,nrow(tmpb),25822)
D- as.matrix.csr(0,nrow(tmpb),ncol(res2))
Error in if (length(x) == nrow * ncol) x -
Sorry for the delay in response. I had a somewhat similar need
recently with the difference that I used a logit link for a bioassay.
The design had different dose-response replicates that I modeled as
blocks. It looks like you are concentrating on estimation of fixed
effects and thus the
MT == Magnus Torfason zulutime@gmail.com
on Thu, 07 Jan 2010 10:01:28 -0500 writes:
MT There have been some really great responses to this question. I would
MT like to make a minor contribution by throwing the 'gmp' package into
the
MT mix.
MT On 1/7/2010 8:12 AM,
To initialize an list:
foo - list()
## and then extend it as in your code
foo - c(foo, list(x=1))
foo
$x
[1] 1
foo - c(foo, list(y=1))
foo
$x
[1] 1
$y
[1] 1
At 7:16 PM +0530 1/10/10, anupam sinha wrote:
Hi Uwe,
Thanks for your suggestion . Here's my code. I am
Hi mates,
I have a problem. I am new to R and want to conduct the Fama/French asset
pricing test. As I am from Germany, I cannot use the already computed
factors from French's website, but need to compute them myself. So I have to
sort a number of stocks into different portfolios using one
Check out the interaction.plot function.
On Fri, 8 Jan 2010, lse1986 wrote:
l
l Hi i want do a line graph.
l
l My y axis contains numeric values. My x axis contains non numeric
l statements.
l
l This is what i want the graph to look like.
l
l When i try to plot this graph on R it
Werner,
I know that S-Plus package Finmetrics has a NLSUR function.
This is a commercial package, but maybe if you write the authors asking
for code only, or some hints...
Rick
--
From: Werner W. pensterfuz...@yahoo.de
Sent: Friday, January 08,
I had an earlier problem where cutting and pasting from a help window
caused obscure problems. Prof Ripley suggested trying example() and
that did show that the example on the help page worked. I just ran
example(`%x%`), as well as example(matrix.csr) and encountered no
errors. I also
On 1/11/2010 10:37 AM, Martin Maechler wrote:
Magnus Torfasonzulutime@gmail.com wrote:
Of course there is still the problem that:
1+1 == sqrt(2)*sqrt(2)
[1] FALSE
and gmp will not solve this . I don't know if there is an R-package for
arbitrary-precision reals floating around, but
There are a couple of points to keep in mind when doing a log-transform of an
exponential model, such as --
y = a*exp(b*x)
1. The implicit statistical model is multiplicative in the error. The
implied
statistical model of the log transform is --
log(y) = log(a) + b*x
Hi everyone. I have just started using R a couple of months ago, so I have a
lot to learn yet.
Anyway, I have fitted a linear mixed model for my data, with variable
intercept and slope. I would like to plot the median estimate (wich I
already know how to do) and uncertainty in the regression by
I can't reproduce this on my mac:
sessionInfo()
R version 2.10.1 (2009-12-14)
x86_64-apple-darwin9.8.0
locale:
[1] C
attached base packages:
[1] graphics grDevices datasets utils stats methods base
other attached packages:
[1] fortunes_1.3-7 quantreg_4.44 SparseM_0.83
I haven't used any of these yet, and don't know how they would fit in
with Tomcat, but a few R web options are rapache
(http://biostat.mc.vanderbilt.edu/rapache/), R.rsp
(http://cran.case.edu/web/packages/R.rsp/index.html) and CGIwithR
(http://www.omegahat.org/CGIwithR/).
-- John
On 1/3/10, Tal
Dear Peter,
Many thanks!
Your code works perfectly. I hope this method will also be helpful to other
users with similar problems.
Best regards,
Jianghua
Peter Ehlers wrote:
Use the 'scales=' argument together with formatC:
x - 1:10
y - sample(10)
xyplot(y ~ x,
scales = list(
Thanks a lot for your help! I have tried Peter's code: it works perfectly.
Hopefully, this method will also be helpful to others with similar problems.
Best regards,
Jianghua
--
View this message in context:
Dear all,
do you know if there is any particular version of R to implement with
windows 64 bit, in such a way to increase the amount of memory it can
use?
How should I increase the memory, and more importantly to set a higher
max vector size? It still stops me saying Could not allocate vector
of
On 11/01/2010 11:29 AM, alessia matano wrote:
Dear all,
do you know if there is any particular version of R to implement with
windows 64 bit, in such a way to increase the amount of memory it can
use?
There are two that I know of. Revolution Computing sells one, built
with a commercial
Try this version (beta of development version):
http://www.stats.ox.ac.uk/pub/RWin/Win64/R-2.11.0dev-win64.exe
On Mon, Jan 11, 2010 at 2:29 PM, alessia matano alexis@gmail.com wrote:
Dear all,
do you know if there is any particular version of R to implement with
windows 64 bit, in such a
My problem is that x values increas with y until some point then the pattern
reverses. The whole line is a kind of U-shape with a right-buttom to
middel-top diagonal at the end of it (a look at the plot makes it
clearer). The interpolation (approx, spline) makes a zick-zack aut of
it. What
From: bbslover
now I am learining random forest and using random forest
package, I can get
the OOB error rates, and test set rate, now I want to get the
training set
error rate, how can I do?
pgp.rf-randomForest(x.tr,y.tr,x.ts,y.ts,ntree=1e3,keep.forest
=FALSE,do.trace=1e2)
using
Many thanks for all your suggestions.
And do you think then there is any particular issue to increase the
amount of memory to be used?
2010/1/11 Henrique Dallazuanna www...@gmail.com:
Try this version (beta of development version):
On 11.01.2010 17:56, alessia matano wrote:
Many thanks for all your suggestions.
And do you think then there is any particular issue to increase the
amount of memory to be used?
It allocates up to 8Gb on my machine (that does not have more RAM). But
note: it is experimental.
Uwe Ligges
On Jan 11, 2010, at 11:49 AM, René Mayer wrote:
My problem is that x values increas with y
x is mostly decreasing in the order you presented:
plot(x, type=l)
until some point then the pattern
reverses. The whole line
which line?
is a kind of U-shape with a right-buttom to middel-top
On Jan 8, 2010, at 6:45 AM, jjh wrote:
Hello-
Is it possible to estimate standard errors for a multiple regression
model
using a randomization test approach? I have seen a lot on using the
procedure to get a test statistic, but nothing that talks about
getting
actual standard errors.
Hello, I have 49 paired data, x, y.
I have sampled x (where replacement is true), and find its mean.
How can I find the corresponding mean y, which is the paired data of above
sample x?
Thank you very much,
Annie
--
View this message in context:
On Jan 11, 2010, at 12:42 PM, luciferyan wrote:
Hello, I have 49 paired data, x, y.
I have sampled x (where replacement is true), and find its mean.
If you show how you did that, then we can show you the next steps.
How can I find the corresponding mean y, which is the paired data of
On 1/10/10 5:46 AM, anupam sinha wrote:
Hi Uwe,
Thanks for your suggestion . Here's my code. I am confused as
to how to initialize an empty list . Here I have used pairlist()
*list.files()-org_xml_dirs
## the following is much preferred:
org_xml_dirs - list.files()
for
Annie,
If I understand what you are asking, you want to sample some number of
observations, with replacement, then find the mean of x and y for those
observations.
In this case, you would want to sample the row indices instead of the
values. For example,
#test data
set.seed(1)
df -
Here is how I tried to do a simple side-by-side boxplot:
# Create new dataframe (cultivar, values, idx)
# cbind goes by column so the cn column is repeated for us
cultivars - cbind(cultivar=wheat$cn, stack(wheat[2:15]))
boxplot(values ~ cultivar, data=cultivars,
main=Kernel distribution,
I have a weekly data set imported via:
tsSource=ts(sh1$I000,start=c(2004,1),freq=52)
I am now getting to some 'spit and polish' but I realize something I can't
wrap my head around.
Given an outlier I find at say tsSource[54] ... how can get translate index
54 into the date\week. I mean I can
Hello folks,
I am having a problem installing pbatR package. (My R version is 2.8.1.)
As I execute a command
install.packages(lib='/usr/local/apps/R-2.8.1/lib64/R/library', pbatR)
it detects lack of rootSolve package and attempts to install it. But
cannot seem to compile it, and the rest
Have a simple bwplot with 24 ordered factors across the x axis. I would like
to only label every 4th tick mark so that the labels fit. I tried
scales=list(x=list(tick.number=6)), but I still seem to get 24 tickmarks and
24 labels. Full code is below:
bwplot(SumOfIn.Use ~ Hour | Period,
Hello,
I am new to R and am trying to figure out how to specify an exponential
distribution with scale and shape parameters. I can specify an exponential
distribution with an inverse scale but would like to know how to specify the
distribution with a shape parameter as well.
thanks much,
John
On Jan 11, 2010, at 2:42 PM, GL wrote:
Have a simple bwplot with 24 ordered factors across the x axis. I
would like
to only label every 4th tick mark so that the labels fit. I tried
scales=list(x=list(tick.number=6)), but I still seem to get 24
tickmarks and
24 labels. Full code is
On 11/01/2010 2:56 PM, John Schexnayder wrote:
I just wanted to add that it is not only caused by the FIND.EXE, but I
also noticed the same problem with DOSKEY.EXE. It too causes the same
fault, but the redirection (nul) prevents the fault just like Duncan
pointed out with FIND. I imagine
Hi,
I was wondering if function eigen() does something different from the
function call eigen() in SAS.
I'm in the process of translating a SAS code into a R code and the values of
the eigenvectors and eigenvalues of a square matrix came out to be different
from the values in SAS.
I would
I got that same email from Steve Blum:
Hi folks,
Which is the best statistical package out there. I am out of work and looking to get the best buck for my money.
Tx - ed
--j
Max Kuhn wrote:
... and this one I received this morning:
Hi folks, Which is the best statistical package
I just wanted to add that it is not only caused by the FIND.EXE, but I
also noticed the same problem with DOSKEY.EXE. It too causes the same
fault, but the redirection (nul) prevents the fault just like Duncan
pointed out with FIND. I imagine there are number of other executables
that would
Dear Helpers:
I spend more than half a day to solve this problem in R:
Let x be a vector of a string of 0s and 1s, such as
x-c(0,0,1,1,0,0,0,0,1,1,0,0,0,0). It can be a very long vector.
How to sub vectors of 0s? In the above example, I would like get the vectors
(0,0), (0,0,0,0), (0,0,0,0).
On 12/01/2010, at 8:31 AM, jso717 wrote:
Hi,
I was wondering if function eigen() does something different from the
function call eigen() in SAS.
I'm in the process of translating a SAS code into a R code and the
values of
the eigenvectors and eigenvalues of a square matrix came out to be
Try this:
with(rle(x), lapply(lengths[values == 0], rep, x = 0))
On Mon, Jan 11, 2010 at 7:19 PM, boshao zhang zbos...@yahoo.com wrote:
Dear Helpers:
I spend more than half a day to solve this problem in R:
Let x be a vector of a string of 0s and 1s, such as
On Jan 11, 2010, at 2:31 PM, jso717 wrote:
Hi,
I was wondering if function eigen() does something different from the
function call eigen() in SAS.
I'm in the process of translating a SAS code into a R code and the
values of
the eigenvectors and eigenvalues of a square matrix came out to be
I just realized (after many discussion with friends), that I might need to
solve a (classical) graph theory problem with R.
My specific problem is called:
Minimum vertex cover http://en.wikipedia.org/wiki/Vertex_cover#Definition for
a hypergraph http://en.wikipedia.org/wiki/Hypergraph (Please see
-Original Message-
From: r-help-boun...@r-project.org
[mailto:r-help-boun...@r-project.org] On Behalf Of boshao zhang
Sent: Monday, January 11, 2010 1:20 PM
To: r-help@r-project.org
Subject: [R] help needed to find zero areas in a vector
Dear Helpers:
I spend more than half a
On 01/12/2010 12:41 AM, Carl-Göran CG. Pettersson wrote:
Thanks a lot for the quick response!
The suggested code worked fine up to a certain point: the actual plotting from
the datasets...
With the sample dataset in samp my code looks like this at the end:
for(cultivar in 1:6)
+
John Westbury jrwestbury at gmail.com writes:
Hello,
I am new to R and am trying to figure out how to specify an exponential
distribution with scale and shape parameters. I can specify an exponential
distribution with an inverse scale but would like to know how to specify the
You cannot faithfully map year and week to ts since years do not have
the same number of weeks and ts can only represent regular series. If
you wish to use ts for this and you want it to be faithful then use
ts(x) and 1 will represent the first week, 2 the second, etc. Then if
o is a Date class
Hi,
I'm running some data simulations using (mixed effects)* regression models
that show difficulty to converge. Therefore, I seek a way of capturing
warnings (of false convergence) inside a loop.
Inside that loop, I modify data and estimate a model. I do so many times
with slightly different
-Original Message-
From: r-help-boun...@r-project.org
[mailto:r-help-boun...@r-project.org] On Behalf Of Rense
Sent: Monday, January 11, 2010 3:07 PM
To: r-help@r-project.org
Subject: [R] warning inside loop
Hi,
I'm running some data simulations using (mixed effects)*
What type of error do you get if it has a false converge? Does it raise an
error (if so, ?try). Is there some value you can test for? You need to
provide more details as to what happens.
On Mon, Jan 11, 2010 at 6:06 PM, Rense rense.nieuwenh...@gmail.com wrote:
Hi,
I'm running some data
John Westbury wrote:
Ben,
Say you have some variable (x) ~ exp f(x|lambda,theta) where f(x|lambda,
theta) = lamba*(e^(minus lambda*(x-theta)))
Lambda is the inverse scale parameter and theta is a location parameter
(I erred in calling theta a shape parameter in the original question).
Ben,
Say you have some variable (x) ~ exp f(x|lambda,theta) where f(x|lambda,
theta) = lamba*(e^(minus lambda*(x-theta)))
Lambda is the inverse scale parameter and theta is a location parameter (I
erred in calling theta a shape parameter in the original question).
John
On Mon, Jan 11, 2010 at
Hi Sven --
Sven Laur wrote:
First, if I have an S4 class boo should I define S3 method for printing
print.boo(..) or should I define S4 method print(..).
I mainly need to define print function only because some user might call
it and then I would like to dispatch the call to
right function
Hi user,
I would like to know how can I compute credit rating migration matrix using R.
I have 10 years data (monthly rates for each firm) and I would like
to compute 12 (and more) months ahead migrations.
Any hints?
Best
Rick
[[alternative HTML version deleted]]
Hi R-users,
I have a question relating to the HoltWinters() function. I am trying to
forecast a series using the Holt Winters methodology but I am getting some
unusual results. I had previously been using R for Windows version 2.7.2 and
have just started using R 2.9.1. While using version
I'd like to get a long data set of minimum values from groups in another data
set.
The following almost does what I want. (Note, I'm using the word factor
differently from it's meaning in R; bad choice of words)
myframe = data.frame(factor1 = rep(1:2,each=8), factor2 =
rep(c(a,b),each=4,
Thank you, Andy
I just read a paper, and they try to compare error rate among oob, test set,
and training set and throung a figure showing random forest is not overfitting.
when error rate in the training set come to zero, and oob and test set error
rate do not increase.
I am just a
Hi,
I have a 100x15 matrix and in each row a set of 15 random numbers out of 25.
for example:
b - c(1:25)
a -matrix(0,10,15)
for (i in 1:10){
a[i,] - sample(b,15,replace = FALSE)
}
I would like to create another matrix (25x100), for example d with the
probability of each number from the first
Therefore I need to track, for example, if number 1 is present in the first
row (d[1,1]) (which would give me an probability of 1 out of 1).
Just to make it clear, I need to track on matrix a if number 1 is present
in the first row to fill the spot d[1,1] where the first collumn is related
to
On Jan 11, 2010, at 7:58 PM, JustinNabble wrote:
I'd like to get a long data set of minimum values from groups in
another data
set.
The following almost does what I want. (Note, I'm using the word
factor
differently from it's meaning in R; bad choice of words)
myframe =
Tena koe Justin
Try aggregate(): e.g.,
aggregate(myframe[,4], myframe[,1:3], min)
HTH
Peter Alspach
-Original Message-
From: r-help-boun...@r-project.org
[mailto:r-help-boun...@r-project.org] On Behalf Of JustinNabble
Sent: Tuesday, 12 January 2010 1:58 p.m.
To:
On Jan 11, 2010, at 9:38 PM, Márcio Resende wrote:
Hi,
I have a 100x15 matrix and in each row a set of 15 random numbers
out of 25.
for example:
b - c(1:25)
a -matrix(0,10,15)
for (i in 1:10){
a[i,] - sample(b,15,replace = FALSE)
}
I would like to create another matrix (25x100), for
On Jan 11, 2010, at 10:16 PM, David Winsemius wrote:
On Jan 11, 2010, at 9:38 PM, Márcio Resende wrote:
Hi,
I have a 100x15 matrix and in each row a set of 15 random numbers
out of 25.
for example:
b - c(1:25)
a -matrix(0,10,15)
for (i in 1:10){
a[i,] - sample(b,15,replace = FALSE)
}
1 - 100 of 107 matches
Mail list logo