I am using VEGAN ordistep function for stepwise model selection. By
default the Pin and Pout values are set to .05 and .1
Is it appropriate to use a family wise correction ( such as bonferroni or
one of the alternatives) to adjust these values where there are several
(5-10), potentially correla
I am working on the package "datation" and it is not on CRAN.
On Sun, Jun 10, 2012 at 8:28 AM, R. Michael Weylandt <
michael.weyla...@gmail.com> wrote:
> I presume your problem is that you are looking for non-exported
> methods in some unstated package.
>
> Generally the pattern is something like
I presume your problem is that you are looking for non-exported
methods in some unstated package.
Generally the pattern is something like this
methods(plot) # shows all plot.* methods
methods(class = "lm") # shows all *.lm methods
Those marked with a star are not exported but you can get at the
Dear R-helpers,
I want to see the code used when printing (using print(object) or by just
typing the object name) for a class from a package.
I can see the summary code using packagename::summary.classname but nothing
for print method and also plot methods.
In general, how can I see the COMPLETE c
Dear R users,
I'm estimating a two-level regresion model but having difficuly in finding
a good R syntax example.
Let me use an example to explain what I'm doing. The dependent variable is
math score (mathscore). Predictors are at two levels. At the student level,
they are household income (hinc)
On Jun 9, 2012, at 11:00 PM, Andras Farkas wrote:
Dear All,
I am using the following commands to generate a given dataset:
a <-c(0.348,0.007,0.503,0.58,0.21)
cov <-
c
(0.0448,0,0,0,0,0.0001,0.0001,0,0,0
,-0.0055
,-0.0005,0.0495,0,0,0.0218,0.0009
,-0.0253,0.1103,0,-0.0102,-0.0007,0.00631,
On Jun 9, 2012, at 5:07 PM, wcheckle wrote:
Dear R users:
I have a continuous outcome variable and four predictors, two
continuous and
two dichotomous. i would like to use the lattice plot to create
scatter
plots for the continuous predictors and boxplots for the dichotomous
predictors.
Dear All,
I am using the following commands to generate a given dataset:
a <-c(0.348,0.007,0.503,0.58,0.21)
cov
<-c(0.0448,0,0,0,0,0.0001,0.0001,0,0,0,-0.0055,-0.0005,0.0495,0,0,0.0218,0.0009,-0.0253,0.1103,0,-0.0102,-0.0007,0.00631,0.0067,0.0132)
b <-matrix(cov,nrow=5, ncol = 5, byrow = TRUE,
Thanks Pascal, but all my packages are current. That is not the problem.
Regards,
--
View this message in context:
http://r.789695.n4.nabble.com/Matrix-package-loading-problem-Error-object-kronecker-is-not-exported-by-namespace-methods-tp4632861p4632911.html
Sent from the R help mailing list arc
Hello,
'cbind' means column bind and 'rbind', row bind.
So, apparently, all you have to do is replace one letter.
ONLY in the do.call, it will surelly do what you want, my only doubt is
with cbinding the Length column, it should recycle the values.
Hope this helps,
Rui Barradas
Em 09-06-2012
Hi all,
i managed to (with the help of most posts here) using bellow code :
>setwd("C:/Users/mpavlic/Desktop/test")
>txt_files = list.files(pattern = '*.ddf');
>flist<-txt_files
>flistNew <- sub("^channel 1 ([0-9 ]+).*", "\\1", flist)
>coordinate<-read.cs
Dear R users:
I have a continuous outcome variable and four predictors, two continuous and
two dichotomous. i would like to use the lattice plot to create scatter
plots for the continuous predictors and boxplots for the dichotomous
predictors.
with 4 continuous variables, this is what i have been
Dear R users:
I have a continuous outcome variable and four predictors, two continuous and
two dichotomous. i would like to use the lattice plot to create scatter
plots for the continuous predictors and boxplots for the dichotomous
predictors.
with 4 continuous variables, this is what i have been
Hi,
Try this:
dat1<- read.table(text="
V1 V2
8098 11
9099 001100
0023 110011
6545 11
",sep="",colClasses=c(V1="character",V2="character"),header=TRUE)
dat2<-as.data.frame(apply(dat1,2,FUN=function(x){do.call(rbind,strsplit(x,""))})$V2)
dat2<-data.frame(V1=dat1$V
I'm trying to suppress the output of:
makeCluster(detectCores())
and haven't had luck.
So far, I've tried invisible, sink, and capture.output.
Any ideas are appreciated. Thanks.
--
View this message in context:
http://r.789695.n4.nabble.com/suppress-output-of-makeCluster-tp4632904.html
Sent f
Dear Ashley,
I am one of the co-authors for these scripts. I just downloaded the example
files from the ESA archives and ran in naively on some data and it worked
fine. My guess is that the problem lies in a portion of the script that you
did not provide. If I had to be more certain with my gue
On Jun 9, 2012, at 1:02 PM, Onur Uncu wrote:
Thank you Michael. One follow up question: In the solution using
apply(), why are we feeding x[2] inside testfun instead of x[[2]]?
Aren't we supposed to feed the vector of values to the function, which
is achieved by x[[2]]?
`apply` sends the colu
Thank you Michael. One follow up question: In the solution using
apply(), why are we feeding x[2] inside testfun instead of x[[2]]?
Aren't we supposed to feed the vector of values to the function, which
is achieved by x[[2]]?
Thnks.
On Sat, Jun 9, 2012 at 3:38 PM, R. Michael Weylandt
wrote:
> N
Max, thanks for your answer!
> predict.train() will handle the formulas. If you want to compare the
> models in terms of their predictive performance, set the seeds prior
> to running the model. This will ensure that the same resampling
> indices are used in train(). If you do this, the resamples()
On 09/06/12 13:20, peter dalgaard wrote:
>> I guess I overlook the corresponding part in the manual but how can I
>> modify the distance between the text and the line in a legend?
>>
>> Thank you for any hints!
>
> You mean like this?
>
> plot(0)
> legend(1, .5, legend=c("foo","bar"), lty=1:2, pc
On 09.06.2012 03:57, Ashley Stasko wrote:
Hello,
I'm using R code that includes a residual permutation that was written as a
supplement to the paper:
Turner et al. 2010. A general hypothesis-testing framework for stable isotopes
ratios in ecological studies. Ecology 91:2227-2233.
The supple
On 05.06.2012 21:44, jween wrote:
Hi there!
I have two date columns in a dataframe I need to selectively collapse based
on missing values and which date comes first (imported from an text file).
This is what I did:
RHSSP$CT<- as.POSIXct(RHSSP$CT,
format='%m/%d
On 05.06.2012 18:30, Guillaume2883 wrote:
Dear all,
I just wrote a script to have each of my three mcmc chins running on a
different computer core to improve computation speed. To do it I use the
function sfLapply from the package snowfall.
Before using parallell computation, I did my diagnost
I want to use the caret package to train linear models. I want to
compare these models when using different degrees (aka degrees of
interaction). This is possible for the 'earth' method (using the
'.degree' parameter) but I found no possibility of customizing the
degree for the 'lm' method. This mi
> ldiff <- function(x)c(TRUE, x[-1]!=x[-length(x)]) # "logical" diff function
> d[ldiff(d$DataValue), ]
ElpsdTime DataValue
1 0 1
490 2
6 150 3
7 180 2
8 210 3
ldiff does the first half of what rle does.
B
On Jun 9, 2012, at 13:16 , wl2776 wrote:
>
> $sample.interval
> [1] 0.02
>
> $sampling.time
> [1] 0.02
>
> Apparently, it is about twise faster.
Too fast to measure, I'd say. Try system.time, and/or multiple replications.
--
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Busi
No worries -- it's an important question and it introduces you to one
of the most important R idioms. [And you get bonus points for having a
well formed question!]
You're probably looking for something like this:
apply(testframe, 1, function(x) testfun(x[2]))
Which goes row-by-row and substitute
Apologees the novice question. Currently climbing up the learning curve of R.
Suppose I have the following function and the data.frame:
testfun<-function(x=1,y=2) x+y
testframe=data.frame(col1=c(1,2),col2=c(3,4))
When evaluating testfun, I want to use the default value for y (which
is 2) and fo
Perhaps something like this:
x <- c("11", "001100", "001001") # Test data
strsplit(x,"") # See what strsplit does
do.call(rbind, strsplit(x,"")) # Now combine the list elements nicely.
Incidentally, your question was grossly malformed, involving both
incomplete data and that in a non-reprod
Take a look at this:
x <- matrix(1:9, 3)
x[2,2] <- Inf
x[3,1] <- NA
rowMeans(x * is.finite(x), na.rm = TRUE)
I at first thought you could simply use x[is.finite(x)] but that
looses the matrix-ness of it so instead, we use the fact that 0 * Inf
= NaN which gets killed by na.rm = TRUE. Also see my
On Jun 08, 2012 at 5:37pm Heidi Bertels wrote [fwd: Iuri Gavronski]:
> The dependent variable is "problematic" because of its distribution.
> It is zero-inflated (many projects did not receive funding), and for
> those projects that did receive funding, the distribution is
> loglinear. I believ
Sorry, here are the profiles:
summaryRprof("get_tau")
$by.self
self.time self.pct total.time total.pct
"cbind" 0.02 50 0.04 100
"unlist" 0.02 50 0.0250
$by.total
total.time total.pct self.time self.pct
"cbind" 0.04
I've created another get_tau implementation, using sapply and apply.
http://pastebin.com/3FaHAL1i
However, the second variant, with expand.grid still appeals me most.
I don't undestand, why it is so slow.
--
View this message in context:
http://r.789695.n4.nabble.com/More-simple-implementation
Dear all,
I have a data frame with 2 columns and 102500 rows. The data looks like
below
V1V2
809811...
9099001100...
0023110011...
654511...
. .
. .
. .
. .
. .
I want to split the colu
Hi all,
I have a csv matrix "KT.csv" and it has Inf and NA
I want to calculate the mean of each row so I use
rowMeans(KT,na.rm = TRUE) but with this Inf cannot be omminted.
I´m trying to use before running rowMeans(KT,na.rm = TRUE)
KT<-range(KT,finite=TRUE)
but it doesn´t works...
Do you kno
library(ggplot2)
p <- ggplot(data=tempTable, aes(x=Bands8, y=AvailableMWNewFormat,
fill=as.factor(FuelTypeNum))) +
geom_bar(position="stack", stat="identity")+
coord_flip() + scale_fill_discrete("test") +
scale_fill_manual("FuelTypeNum",values= c("1" = "blue", "2" = "red"
Take a look at ?replicate.
Michael
On Jun 9, 2012, at 5:16 AM, Rody wrote:
> Hi everyone
>
> I need to make a work for school in R and one of my questions is to create
> 225 datasets of 100 observations and they need to be t_225 distributed. So,
> I know how to make one dataset (rt(100,df=225
On Jun 9, 2012, at 13:04 , Sebastian Schubert wrote:
> Hi,
>
> I guess I overlook the corresponding part in the manual but how can I
> modify the distance between the text and the line in a legend?
>
> Thank you for any hints!
You mean like this?
plot(0)
legend(1, .5, legend=c("foo","bar"), l
On Jun 9, 2012, at 11:08 , wl2776 wrote:
> Hi all.
> I'm developing a function, which must return a square matrix.
>
> Here is the code:
> http://pastebin.com/THzEW9N7
>
> These functions implement an analog of two embedded for cycles.
>
> The first variant creates the resulting matrix by colu
Hi,
I guess I overlook the corresponding part in the manual but how can I
modify the distance between the text and the line in a legend?
Thank you for any hints!
Sebastian
signature.asc
Description: OpenPGP digital signature
__
R-help@r-project.org
On Jun 9, 2012, at 11:36 , John wrote:
> The capabilities(tcltk) query yields TRUE.
>
> Searching the /usr tree does not locate any file "tk.h."
So the fix is to install it. Depending on your unstated Linux variant, that'll
be tk-dev, tk-devel or so and install via yum, apt-get, or ...
--
Hello,
It is not an R issue but a Linux issue. Please check you have tcl/tk installed
on your system.
Best Regards,
Pascal
- Mail original -
De : John
À : r-help@r-project.org
Cc :
Envoyé le : Samedi 9 juin 2012 18h36
Objet : [R] Error when attempting to install tkrplot
I am getting
Hi everyone
I need to make a work for school in R and one of my questions is to create
225 datasets of 100 observations and they need to be t_225 distributed. So,
I know how to make one dataset (rt(100,df=225)), but how can I store those
225 in one vector, array,.. ?
--
View this message in conte
I am getting following error when attempting to install the tkrplot
package.
...
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I/usr/include/tcl8.5
-I/usr/include/tcl8.5 -fpic -O3 -pipe -g -c tcltkimg.c -o
tcltkimg.o tcltkimg.c:2:16: fatal error: tk.h: No such file or
directory compilat
Hi all.
I'm developing a function, which must return a square matrix.
Here is the code:
http://pastebin.com/THzEW9N7
These functions implement an analog of two embedded for cycles.
The first variant creates the resulting matrix by columns, cbind()-ing them
one by one.
The second variant creates
45 matches
Mail list logo