Hello
I have questions about gbm package. It seems we have to devide data to two
part (training set and test set) for first.
1- trainig set for running of gbm function
2- test set for gbm.perf
is it rigth?
I have 123 sample that I devided 100 for trainig and 23 for test.
So,
Hi, everyone,
Night. I have three questions about multiple linear regression in R.
Q1:
y=rnorm(10,mean=5)
x1=rnorm(10,mean=2)
x2=rnorm(10)
lin=lm(y~x1+x2)
summary(lin)
## In the summary, 'Residual standard error: 1.017 on 7 degrees of freedom',
1.017 is the estimate of the constance variance?
Dear Sir,
We need to use genetics packages at our end. We have installed R packages. When
i try to choose genetics package and install, it is giving an error. Please see
the attachment for the error. How can i resolve it and make it work?
Thanking you
A Padmavathi Devi
Technical Officer
Centre
-- Original Message --
From: pa...@ccmb.res.in
To: r-help@r-project.org
Date: Wed, 23 Jun 2010 12:19:28 +0530 (IST)
Subject: reg: R genetics problem
Dear Sir,
We need to use genetics packages at our end. We have installed R packages. When
i try to choose genetics package and install, it is giving
On 23.06.2010 08:52, A Padmavathi Devi padma wrote:
-- Original Message --
From: pa...@ccmb.res.in
To: r-help@r-project.org
Date: Wed, 23 Jun 2010 12:19:28 +0530 (IST)
Subject: reg: R genetics problem
Dear Sir,
We need to use genetics packages at our end. We have installed R packages. When
i
Just to clarify - I am using the XML library and the xml which is an
xmlTree has the xml in it. I just need to save it to a file so that I
can view, print etc.
Thanks.
On Jun 22, 2:45 pm, Nick nick.st...@gmail.com wrote:
I'm probably being dense but I can't work out how to add the second
Dear Joris,
thanks for your reply - it is the sem case which interests me. Suppose
for example I use sem to construct a CFA for a set of variables, with
a single latent variable, then this could be equivalent to a PCA with
a single component, couldn't it? From the PCA I could save the
scores as
On Tue, 2010-06-22 at 23:11 -0700, cc super wrote:
Hi, everyone,
Night. I have three questions about multiple linear regression in R.
Q1:
y=rnorm(10,mean=5)
x1=rnorm(10,mean=2)
x2=rnorm(10)
lin=lm(y~x1+x2)
summary(lin)
## In the summary, 'Residual standard error: 1.017 on 7
It was the Panda antivirus installed in the main corporate server of my company.
This antivirus program was corrupting the zip files containing the packages for
Windows systems.
The problem was solved by including CRAN repositories as trustable webpages.
Best,
Rubén
On 06/22/2010 11:20 PM, John Kane wrote:
...
Well yes, I've used it myself I think, but I was hoping for something a bit
'sexier'.
Quantitative aggregation manager. Double your pay, easy.
Jim
__
R-help@r-project.org mailing list
On 06/23/2010 02:10 AM, Pedro Mota Veiga wrote:
Hi people of R forum,
I´m trying to install de Event Package, but I can´t find it.
Where I can get it?
Thanks in advance.
Best Regards
Hi Pedro,
I can't find an Event package, and the best guess I can make is that
you want the survival package
Quantitative aggregation manager. Double your pay, easy.
I love it.
It's up there with Conflict resolution manager==Army officer
--- On Wed, 6/23/10, Jim Lemon j...@bitwrit.com.au wrote:
From: Jim Lemon j...@bitwrit.com.au
Subject: Re: [R] Popularity of R, SAS, SPSS, Stata...
To: John
Dear All,
a quick xtable question. I do have quite a bunch of tables in my latex
document which I produce with xtable. That works fine so far.
But I wonder is it possible set some values such as environement,
caption.placement, or size globally so that it applies for table
unless otherwise
I should have specified: lavaan is not familiar to me. I'm also not
familiar enough with the sem package to tell you how to obtain the
scores, but all information regarding the fit is in the object. With
that, it shouldn't be too difficult to get the scores you want. This
paper might give you some
Been and R-user for about 5 years now in an industrial setting, and
always find the mailing list most helpful. I have run into problem
compiling igraph on R. I have contacted the maintainer of igraph, and
he has determined that it is not an igraph problem.
System is FreeBSD 7.2, R-2.10.1 [also
Thank you ver much.
Is there is a function in R which is doing penalized cubic regression, say
spl.plr(), that if I have weeks = 1:9 I can use somthing like pp -
spl.plr(weeks,c(1,3,5,7)) and for 8 and 9 will be linear? Is rcs()
library(Design) doing this?
Many thanks,
Samuel
--- On Tue,
http://lmgtfy.com/?q=R+large+data+sets
Cheers
Joris
On Wed, Jun 23, 2010 at 6:38 AM, 나여나 dllm...@hanmail.net wrote:
Hi all!
This is an R workspace memory processing question.
There is a method which from the R will control 10GB data at 500MB units?
my work environment :
R
Dear Joris,
thanks again for these very useful insights.
Your point about PCA, sem, FA is clear to me now.
And I understand what you say about it not being the point of sem to
make corrections in a model and then try to save the scores for
another analysis. But still I am wondering what would
Dear all,
I have the following program for a multiple comparison procedure.
There are two functions for the two steps. First step is to calculate the
critical values,
while the second step is the actual procedure [see below: program with two
functions].
This work fine. However, However I
On 23.06.2010 13:29 (UTC+1), jim smith wrote:
Been and R-user for about 5 years now in an industrial setting, and
always find the mailing list most helpful. I have run into problem
compiling igraph on R. I have contacted the maintainer of igraph, and
he has determined that it is not an igraph
use Rprof to determine where your function is spending time.
What is the problem you are trying to solve?
Sent from my iPhone.
On Jun 23, 2010, at 5:21, li li hannah@gmail.com wrote:
Dear all,
I have the following program for a multiple comparison procedure.
There are two functions for
Dear R users in Hong Kong,
Hello. Any HK R users in HK would like to organize a regular users'
group meeting like LA, NY, London, Osaka... etc ? Maybe some
demonstrations, lightning talks, beginner tutorials. Thanks.
Regards,
CH
--
CH Chan
__
On 06/23/2010 06:30 AM, Samuel Okoye wrote:
Thank you ver much.
Is there is a function in R which is doing penalized cubic
regression, say spl.plr(), that if I have weeks = 1:9 I can use
somthing like pp- spl.plr(weeks,c(1,3,5,7)) and for 8 and 9 will be
linear? Is rcs() library(Design) doing
You should look at packages like ff, bigmemory, RMySQL, and so on. However,
you should really consider moving to a different platform for large-data
work (Linux, Mac, or Windows 7 64-bit).
Jay
-
This is an R workspace memory processing question.
Let's say you have a dataframe of car trade-ins. For example, each row
contains
oldcar newcar qty
and a typical entry could be
lexus bmw1
I put the qty column to allow for fleet purchases, where one purchase
may convert multiple cars at once.
I'd like to show what's going on. I
If anybody has quick fix, that would be helpful.
Write your own function that wraps xtable...
Hadley
--
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/
__
R-help@r-project.org mailing
Hi the list,
Using flextClust, we can cluster data using k-mean with some
user-define distances. Is there something similar for fuzzy k-means ?
Christophe
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do
Hello all,
I am trying to make a genome association plot for p-values related to SNPs
and was fortunate to find that R contains a package that produces Manhattan
plots which is what's preferred for my current project. The function
mhtplot() is found in the 'gap' package which I installed in R
Most of the computation time is in the functions qvnorm. You can win a
little bit by optimizing the code, but the gain is relatively small.
You can also decrease the interval used to evaluate qvnorm to win some
speed there. As you look for the upper tail, no need to evaluate the
function in
I've used this package before, and it always gives me the message:
NOTE: THIS PACKAGE IS NOW OBSOLETE.
So I stopped using it. I just tried installing it and it gave me some
new errors (below). Maybe you should also post your sessionInfo().
library(genetics)
Loading required package: combinat
On Wed, 23 Jun 2010 14:37:07 +0200
Rainer Hurling rhur...@gwdg.de wrote:
I am working with R-2.11.1 on FreeBSD 9.0-CURRENT (amd64). On several
systems there had been no problems with installing igraph (0.5.3).
This is what I get from my igraph.so library:
#ldd
Dear R community,
I am running some rather large scripts either by executing single blocks of
them separately or by executing them at once via
source('script.R')
Now there is a lot of code in those scripts that I only want to run when I run
them manually, so I wonder whether there is any
On 2010-06-22 15:40, moleps wrote:
Dear All,
I´ve been trying to find an option to scatter3D from rcmdr to remove the
individual points from the plots but to no help so far. Removing the residuals
is easy, but I cannot find a similar point option. Is there such an option that
can be set to
?dotchart perhaps?
--- On Wed, 6/23/10, Bill Harris bill_har...@facilitatedsystems.com wrote:
From: Bill Harris bill_har...@facilitatedsystems.com
Subject: [R] Analyzing large transition matrix
To: r-help r-help@r-project.org
Received: Wednesday, June 23, 2010, 9:30 AM
Let's say you have a
Dear All,
I am using the plotrix library to plot some matrices.
I have a problem: some of my data are outliers, hence using a linear
color scale does not work very well (you would see too many cells having
a similar, indistinguishable color). See the code snipped at the end of
the email.
Plotting
Dear expeRts,
shouldn't this...
x - 1:10
myplot - xyplot(x~x,col=red)
trellis.device(postscript,color=FALSE,file=plot.ps)
print(myplot)
dev.off()
... give a black/white plot?
Cheers,
Marius
__
R-help@r-project.org mailing list
Hi,
I use the following clustering methods and get the
corresponding dendrograms for single, complete, average, ward and
kmeans clustering.
This gives the dendrograms, but doesn't show the calculation-way.
My question: is there a possibility to show this calculation steps
(cluster steps) in
Look at the interactive function, it may do what you want.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-
project.org] On Behalf Of
Dear Marius,
From the documentation (see ?trellis.device):
Note that this only applies to the initial choice of colors, which
can be overridden using 'theme' or subsequent calls to
'trellis.par.set' (and by _arguments supplied directly in high level
calls for some settings_). [emphasis added]
On Wed, 23 Jun 2010, Jannis wrote:
Dear R community,
I am running some rather large scripts either by executing single blocks of
them separately or by executing them at once via
source('script.R')
Now there is a lot of code in those scripts that I only want to run when
I run them
Cheers Chuck and Greg for your help!
only Chucks solution though worked for my problem, for Gregs solution I would
have had to start R in interactive mode which I do not do as I start the
scripts still from an interactive GUI.
Thanks a lot!
Jannis
--- Charles C. Berry cbe...@tajo.ucsd.edu
Hi Ralph,
In case of hclust, the dendrogram does show the steps (they are the
heights presented in the graph).
You can present them also in a matrix using cutree, for example:
dat - (USArrests)
n - (dim(dat)[1])
hc - hclust(dist(USArrests))
cutree(hc, k=1:n)
You might then visualize the
Thanks, Deepayan
I read your presentation and understand how this works for the case you
presented, but I can't
get it to work for my case, where I want to superimpose model fitted
lines over individual
subject regression lines. Here's what I tried
library(nlme)
library(lattice)
##
Hi all,
I have two very large samples of data (1+ data points) and would
like to perform normality tests on it. I know that p .05 means that
a data set is considered as not normal with any of the two tests. I am
also aware that large samples tend to lead more likely to normal
results (Andy
In addition to the previous email:
What plots would you suggest in addition to density / histogram plots
and how can I produce them with R ? Perhaps one of you has an example
?
Thanks a lot,
Ralf
__
R-help@r-project.org mailing list
look at:
?qqnorm
and
?qqline
Examples are in their help.
Tal
Contact
Details:---
Contact me: tal.gal...@gmail.com | 972-52-7275845
Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |
www.r-statistics.com
On 2010-06-23 12:05, Ralf B wrote:
Hi all,
I have two very large samples of data (1+ data points) and would
like to perform normality tests on it. I know that p .05 means that
a data set is considered as not normal with any of the two tests. I am
also aware that large samples tend to lead
Ralf:
Don't bother testing. You will reject normality.
But don't bother paying attention to the results of the normality testing
anyway -- normality testing is generally useless. (IMO -- others disagree).
DO pay attention to the plots; I would place a modest bet that you will find
that your
Before doing normality tests look at fortune(117) and fortune(234). If you
still feel the need to have the computer print out a p-value for a test of
exact normality, then try SnowsPenultimateNormalityTest in the TeachingDemos
package. If you want a test that is more meaningful, then look at
Finally, FWIW, 1 is not considered very large these days; maybe
10,000,000,000 might be...
It's off topic, but I rather like Mike Driscoll's definition of big
data: it's too big to fit on a single machine and must be stored on
many (http://www.slideshare.net/dataspora/s-4455027). A small
On Wed, Jun 23, 2010 at 10:01 AM, Lorenzo Isella
lorenzo.ise...@gmail.com wrote:
Dear All,
I am using the plotrix library to plot some matrices.
I have a problem: some of my data are outliers, hence using a linear
color scale does not work very well (you would see too many cells having
a
I am trying to do something in R and would appreciate a push into the
right direction. I hope some of you experts can help.
I have two distributions obtrained from 1 datapoints each (about
1 datapoints each, non-normal with multi-model shape (when
eye-balling densities) but other then
I am running a simple SQL SELECT statement that involvs 50k + data
points using R and the RJDBC interface. I am facing very slow response
times in both the RGUI and the R console. When running this SQL
statement directly in a SQL client I have processing times that are a
lot lot faster (which
Hello,
For this project I have been tasked with emulating an old Dynamic Linear
Modelling paper's results in the R programming language with the same data. The
majority of the work (creating the model, filtering, smoothing, forecasting,
etc.) has been done via the dlm package, and I have been
?qqplot
Bert Gunter
Genentech Nonclinical Biostatistics
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Ralf B
Sent: Wednesday, June 23, 2010 12:34 PM
To: r-help@r-project.org
Subject: [R] Comparing distributions
I am trying
Hi Ralf,
Ralf B wrote:
I am running a simple SQL SELECT statement that involvs 50k + data
points using R and the RJDBC interface. I am facing very slow response
times in both the RGUI and the R console. When running this SQL
statement directly in a SQL client I have processing times that are a
any clue??
hello R-helpers,
I have an array
acuracia - array(NA, dim = c(1, 1, A, B, C))
which is first defined and in the example above with dimensions 1x1xAxBxC.
My array is then filled using 3 loops (I am not well familiar yet with
lapply or sapply functions so I am still a loop-user):
On Wed, Jun 23, 2010 at 7:13 AM, Peter Dalgaard pda...@gmail.com wrote:
Gustaf Rydevik wrote:
Oh, I forgot to mention that the workaround of using as.double (or
as.numeric) works fine, and I've done that.
It's just that it can take quite a while (as in several hours) to
figure out that the
I'm looking for goodness of fit tests for gamma distributions with large data
sizes and for different data.
I have a matrix with around 4.000 data values about losses and there is a
heavy right-tail in it.
I have fitted a gamma distribution with fitdistr.
You can see the example:
Dear all,
I am aware of the URLdecode(..) function and was wondering if there
was something similar for HTML?
For example, I would like to convert strings like this:
x - isnapos;t
into this:
isn't
Many thanks for your time,
Tony Breyal
# O/S: Windows Vista 32 bit
# R version 2.11.0
Sir,
I'm writing a program in R that requires the user to provide a funtion. On
the basis of the user provided function the program will proceed further and
give results. Is there any technique in R that allow a user to give his own
function and on the basis of that function the program will work.
Hi,
it seems a simple problem, but I can not find a clear way.
I have a list:
lst=list(m=c('a','b','c'),n=c('c','a'),l=c('a','bc'))
lst
$m
[1] a b c
$n
[1] c a
$l
[1] a bc
how can I get list elements that include a given subset? for example, for given
subset {'a','c'}, the answer should be
Dea'R' helpers
I have following data -
prob = c(0.1, 0.2, 0.3, 0.4, 0.5)
frequency = c(100, 75, 45, 30, 25)
no_trials = c(10, 8, 6, 4, 2)
freq1 = rbinom(frequency[1], no_trials[1], prob[1])
freq2 = rbinom(frequency[2], no_trials[2], prob[2])
freq3 = rbinom(frequency[3], no_trials[3], prob[3])
Hello:
In the example below (or for a censored data) using survfit.coxph, can
anyone point me to a link or a pdf as to how the probabilities appearing in
bold under summary(pred$surv) are calculated? Do these represent
acumulative probability distribution in time (not including censored time)?
Hi:
I am practicing with the attached shapefile and was wondering
if I can get some help. Haven't used 'rgdal' and 'maptools' much
but it appears to be a great way bring map data into R.
Please take a look at the comments and let me know if I need to
explain better what I am trying to accomplish.
Hi all,
I have a distribution, and take a sample of it. Then I compare that sample with
the mean of the population like here in Wilcoxon signed rank test with
continuity correction:
wilcox.test(Sample,mu=mean(All), alt=two.sided)
Wilcoxon signed rank test with continuity correction
For some reason the shapefile can't get attached.
The shapefile is too large to put it in dput..Is there
another way to do this?
- Original Message
From: Felipe Carrillo mazatlanmex...@yahoo.com
To: Tom Hopper tomhop...@gmail.com
Cc: r-h...@stat.math.ethz.ch;
Sarah -
If you're willing to forgo the loop,
res = unlist(mapply(rbinom,frequency,no_trials,prob))
res[res == 0] = 1
will give you what you want.
- Phil Spector
Statistical Computing Facility
Sorry for the lack of details. Since I run the same SQL first directly
on MySQL (using the MySQL Query Browser) and then again using R
through the RJDBC interface, I assume that I won't simply have a badly
constructed SQL query. However, just to clear possible objection, here
the SQL:
# Extracts
Yuan -
There may be faster ways, but
names(lst)[sapply(lst,function(i)'a' %in% i 'c' %in% i)]
seems to do what you want.
- Phil Spector
Statistical Computing Facility
On Wed, 23 Jun 2010, suman dhara wrote:
Sir,
I'm writing a program in R that requires the user to provide a funtion. On
the basis of the user provided function the program will proceed further and
give results. Is there any technique in R that allow a user to give his own
function and on the
lst - list(m=c('a','b','c'),n=c('c','a'),l=c('a','bc'))
f - function(list, set) vapply(lst, function(el)all(is.element(set, el)),
FUN.VALUE=logical(1))
# if you have an old version of R use as.logical(sapply(...))
# instead of vapply(..., FUN.VALUE=logical(10)
i - f(lst, c(a,c))
Tena koe Yu
One possibility:
lst[sapply(lst, function(x) length(x[x%in% c('a','c')])==2)]
HTH ...
Peter Alspach
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-
project.org] On Behalf Of Yuan Jian
Sent: Thursday, 24 June 2010 1:35 a.m.
To:
A qqplot would indeed help. ?ks.test for more formal testing, but be
aware: You should also think about what you call similar
distributions. See following example :
set.seed(12345)
x1 - c(rnorm(100),rnorm(150,3.3,0.7))
x2 - c(rnorm(140,1,1.2),rnorm(110,3.3,0.6))
x3 -
fair enough!
I was just hoping there was some free lunch...
thanks and best from Rotterdam,
Stefan
On Wed, Jun 23, 2010 at 4:26 PM, Hadley Wickham had...@rice.edu wrote:
If anybody has quick fix, that would be helpful.
Write your own function that wraps xtable...
Hadley
--
Assistant
On Jun 23, 2010, at 11:17 AM, M.Ribeiro wrote:
any clue??
hello R-helpers,
I have an array
acuracia - array(NA, dim = c(1, 1, A, B, C))
which is first defined and in the example above with dimensions
1x1xAxBxC.
My array is then filled using 3 loops (I am not well familiar yet with
On Jun 23, 2010, at 4:57 PM, Felipe Carrillo wrote:
For some reason the shapefile can't get attached.
The shapefile is too large to put it in dput..Is there
another way to do this?
If you dput or dump it and then label the output as sth.txt it will
generally pass the server's scrutiny.
On Wed, Jun 23, 2010 at 10:27 PM, Atte Tenkanen atte...@utu.fi wrote:
Hi all,
I have a distribution, and take a sample of it. Then I compare that sample
with the mean of the population like here in Wilcoxon signed rank test with
continuity correction:
wilcox.test(Sample,mu=mean(All),
Hopefully the attachment will make it this time...
Hi:
I am practicing with the attached shapefile and was wondering
if I can get some help. Haven't used 'rgdal' and 'maptools' much
but it appears to be a great way bring map data into R.
Please take a look at the comments and let me know if I
Dear all,
I just changed from linux to a solaris server and I'm having trouble
building R from source. I can't use the binaries because I don't have a
permission to write to /usr/local.
I followed the online instructions regarding the configuration with readline
and the GNU version of iconv:
On Wed, Jun 23, 2010 at 9:03 PM, Parminder Mankoo pkmanko...@gmail.com wrote:
Hello:
In the example below (or for a censored data) using survfit.coxph, can
anyone point me to a link or a pdf as to how the probabilities appearing in
bold under summary(pred$surv) are calculated? Do these
Dear R users:
I was trying to fit a HMM with mixture of Gaussian into the dataset, and I
tried to implement it by R2Winbugs. But I got the following errer.
*
Error in FUN(X[[1L]], ...) :
.C(..): 'type' must be real for this format*
Does anybody know what's the problem? Does R2Winbugs accept
Forgive me if I missunderstand a basic Eigensystem but when I present the
following matrix to most any other LinearAlgebra system:
1 3 1
1 2 2
1 1 3
I get an answer like:
//$values
//[1] 5.00e+00 1.00e+00 -5.536207e-16
//$vectors
// [,1] [,2] [,3]
Another variation on the same theme :
lst=list(m=c('a','b','c'),n=c('c','a'),l=c('a','bc'))
set - c('a','c')
f -function(lst,set) sapply(lst,function(x) sum(set %in% x)==length(set) )
i - f(lst,set)
names(i[i])
Doesn't serve anybody but keeps my mind fresh.
For long lists, you might benefit
Which other Linear Algebra system, and which function did you use in R?
Cheers
Joris
On Thu, Jun 24, 2010 at 12:32 AM, rkevinbur...@charter.net wrote:
Forgive me if I missunderstand a basic Eigensystem but when I present the
following matrix to most any other LinearAlgebra system:
1 3 1
Dear all,
While I was trying to build R source, I found an error at datasets package
(there was no error before that)
../../../library/datasets/R/datasets is unchanged
Error in dir.create(Rdatadir, showWarnings = FALSE) :
file name conversion problem
Calls: Anonymous - Anonymous -
Dear all,
While I was trying to build R source, I found an error at datasets package
(there was no error before that)
../../../library/datasets/R/datasets is unchanged
Error in dir.create(Rdatadir, showWarnings = FALSE) :
file name conversion problem
Calls: Anonymous - Anonymous - dir.create
On Thu, Jun 24, 2010 at 12:41 AM, Joris Meys jorism...@gmail.com wrote:
Which other Linear Algebra system, and which function did you use in R?
Cheers
Joris
Never mind, off course you used eigen()...
Eigenvectors are only determined up to a constant. If I'm not mistaken
(but check the help
Why compile from source? 2.11.1 installs fine on XP from the binary,
so that's the more obvious solution.
Cheers
Joris
On Thu, Jun 24, 2010 at 12:39 AM, Geun Seop Lee clarmas...@gmail.com wrote:
Dear all,
While I was trying to build R source, I found an error at datasets package
(there was
Eigenvectors are unique only up to a constant factor, so any scalar multiple
of an eigenvector is also an eigenvector. By convention, most (all)
packages normalize the eigenvectors such that their norm is 1. Therefore,
eigenvectors are unique up to their sign, i.e. if (+x) is an eigenvector
Kevin,
At 3:32 PM -0700 6/23/10, rkevinbur...@charter.net wrote:
Forgive me if I missunderstand a basic Eigensystem but when I
present the following matrix to most any other LinearAlgebra system:
1 3 1
1 2 2
1 1 3
I get an answer like:
//$values
//[1] 5.00e+00 1.00e+00
Hello,
I am trying to create a data frame with a unique name, based on indexing
of for loop. I was wondering if there is a way to do this, I keep
running into errors when I try to do this. Below is a brief example, I
am trying to get two data frames (name1 and name2).
Any suggestions are
\Why not put all the data frames in a list?
Kjetil
On Wed, Jun 23, 2010 at 6:56 PM, Douglas M. Hultstrand
dmhul...@metstat.com wrote:
Hello,
I am trying to create a data frame with a unique name, based on indexing of
for loop. I was wondering if there is a way to do this, I keep running
Check out the KL divergence test
http://en.wikipedia.org/wiki/Kullback%E2%80%93Leibler_divergence
http://en.wikipedia.org/wiki/Kullback%E2%80%93Leibler_divergence
@tommychheng
Programmer and UC Irvine Graduate Student
Find a great grad school based on research interests:
Hello, everyone,
I have a question about integration of product of two densities.
Here is the sample code; however the mean of first density is a function of
another random variable, which is to be integrated.
##
f=function(x) {dmvnorm(c(0.6, 0.8), mean=c(0.75, 0.75/x))*dnorm(x, mean=0.6,
Try this:
lst[colSums(mapply('%in%', list(set), lst)) == 2]
On Wed, Jun 23, 2010 at 10:35 AM, Yuan Jian jayuan2...@yahoo.com wrote:
Hi,
it seems a simple problem, but I can not find a clear way.
I have a list:
lst=list(m=c('a','b','c'),n=c('c','a'),l=c('a','bc'))
lst
$m
[1] a b c
$n
The main problem is that your function is not vectorized. Here is one
solution:
require(mvtnorm)
f=function(x){ sapply(x, function(y) {dmvnorm(c(0.6, 0.8), mean=c(0.75,
0.75/y))*dnorm(y, mean=0.6, sd=0.15)}) }
integrate(f, lower=-Inf, upper=Inf)
0.1314427 with absolute error 4e-05
Hope
On 06/23/10 11:08 PM, Mathew Fox wrote:
Dear all,
I just changed from linux to a solaris server and I'm having trouble
building R from source.
First, you might be better posting on r-devel. I know this seems unuual, and
installation problems are usually handled on the help or support lists,
Here is an alternative:
lst - list(m = c('a','b','c'), n = c('c','a'), l = c('a','bc'))
set - c(a, c)
(w - sapply(lst, function(x) all(set %in% x)))
m n l
TRUE TRUE FALSE
names(w)[w]
[1] m n
-Original Message-
From: r-help-boun...@r-project.org
Thanks!
Both suggestions are very helpful.
One more question:
Can I use Vectorize to solve double integration question ?
Now that
f=function(x, y) {dnorm(y, mean= 0.75/x)*dnorm(x, mean=0.6,
sd=0.15)}
And I want to integrate x first,then y. Ravi used sapply, which is good, but
it seems to be
1 - 100 of 116 matches
Mail list logo