Displaying 20 results from an estimated 20000 matches similar to: "add names to data frame"
2012 Oct 25
3
Change to daily digest
Hello folks,
I am currently receiving a lot of emails from the list which proves that this is a very important place to get good feedbacks and tips and that the community is here to help .. Excellent thing.
I am not though able to login to my subscriber space to change the email reception into daily digest, or I am not looking to the right place, if someone can point me to the right URL that
2012 Sep 19
1
Wilcoxon Test and Mean Ratios
Hello All,
I am writing to ask your opinion on how to interpret this case. I have two vectors "a" and "b" that I am trying to compare.
The wilcoxon test is giving me a pvalue of 5.139217e-303 of a over b with the alternative "greater". Now if I make a summary on each of them I have the following
> summary(a)
Min. 1st Qu. Median Mean 3rd Qu.
2008 Jul 18
2
source code functions
>na.contiguous
function (object, ...)
UseMethod("na.contiguous")
<environment: namespace:stats>
this is what I get when I look for the source code for some functions- Is
there a way to look at the source code?
--
Let's not spend our time and resources thinking about things that are so
little or so large that all they really do for us is puff us up and make us
feel like
2008 Feb 18
3
tabulation on dataframe question
I have a data frame with data similar to this:
NameA GrpA NameB GrpB Dist
A Alpha B Alpha 0.2
A Alpha C Beta 0.2
A Alpha D Beta 0.4
B Alpha C Beta 0.2
B Alpha D Beta 0.1
C Beta D Beta 0.3
Dist is a distance measure between two entities. The table displays
all to all distances, but the
2008 Jan 03
2
Help needed in Changing default P - value
Dear all,
I'm using friedman rank test in R. I need to know which P value
is used default and procedure to change the threshold P value.
With regards
jeevitesh
2009 Dec 11
3
how to creat a matrix
Dear R family
I am attempting to create a matrix. e.g.,
0 0 0 0 1
1 0 0 0 0
0 1 0 0 0
0 0 1 0 0
0 0 0 1 0
How could I write a R program?
Later I want to extend it to a N by N case.
Thanks in advance
best
Moohwan
2005 Jan 17
5
find source code
I am using R 2.0.2 on a WinXP
I am trying to get the code of the Kruskal-Wallis test but
> kruskal.test
function (x, ...)
UseMethod("kruskal.test")
<environment: namespace:stats>
> ls(3)
[1] "acf" "acf2AR" "add.scope"
..............
[181] "kruskal.test" "ks.test"
2009 Nov 30
3
bug or bizarre feature?
Hello,
I'm running into a very strange problem:
> xrange <- c(-2.5,2.5)
> xdim <- 100
> mobility <- 0.1
> slope <- 1.16
> urange <- slope*xrange
> udim <- max(slope*xdim,5)
> du <- (urange[2]-urange[1])/udim
> uvec <- urange[1]+(1:udim-0.5)*du
> # type dependent weight function
> ckern <-
2009 Oct 22
1
loop vs. apply(): strange behavior with data frame?
Hi everybody,
I noticed a strange behavior when using loops versus apply() on a data frame.
The example below "explicitly" computes a distance matrix given a
dataset. When the dataset is a matrix, everything works fine. But when
the dataset is a data.frame, the dist.for function written using
nested loops will take a lot longer than the dist.apply
######## USING FOR #######
dist.for
2012 Dec 11
1
converting manual command to loop command
Dear useRs,
i have certain commands for some operations in R. They are good if you have a small dataset but my dataset, apart from what i used in the recent past, is prety large. I want to convert these massive sets of commands into a simple loop.
Your help is required on it
thanks in advance
eliza
kindly note:
"e" is matrix whose each column has to be executed into a distance vector
2004 Aug 03
2
lme fitted correlation of random effects: where is it?
The print method for lme *prints out* the fitted correlation matrix for
the random effects. Is there any way to get these values as an object in
R? I have examined the components of the lme object (called "junk" in the
example below) and the components of summary(junk) without finding these
numbers.
(How I did this: I dumped the entire lme object to a text file and then
used egrep to
2010 Apr 27
2
when setting environment: target of assignment expands to non-language object
Hi,
I am trying to place my own functions in the nlme environment:
The following statement works:
environment(coef.corSPT) <- environment(getS3method("coef","corSpatial"))
but this one returns an error:
environment(get("coef<-.corSPT")) <-
environment(getS3method("coef<-","corSpatial"))
Error in
2006 Mar 16
2
Surv object in data.frame and Design package
Dear All,
there seems to be some strange influence of the Design package on
data.frame. If I build a data.frame containing a Surv object without
loading the package Design, the data frame is usable to coxph. If instead I
just load Design and build a data.frame afterwards, the naming of the Surv
object is different and it does not work with coxph.
(In my real application I loaded Design to use the
2019 Oct 09
2
S3 lookup rules changed in R 3.6.1
tl;dr: S3 lookup no longer works in custom non-namespace environments as of
R 3.6.1. Is this a bug?
I am implementing S3 dispatch for generic methods in environments that are
not
packages. I am trying to emulate the R package namespace mechanism by
having a
?namespace? environment that defines generics and methods, but only exposes
the
generics themselves, not the methods.
To make S3 lookup work
2008 Feb 26
1
combine vector and data frame on field?
I have managed to create a data frame like this:
> tsus_same_mean[1:10,]
PID Grp Dist PercAln PercId
1 12638 Acidobacteria 0.000000000 1.0000000 1.0000000
2 87 Actinobacteria 0.000000000 0.9700000 0.9700000
3 92 Actinobacteria 0.008902000 1.0000000 0.9910000
4 94 Actinobacteria 0.000000000 1.0000000 1.0000000
5 189 Actinobacteria 0.005876733
2007 Oct 10
3
as.dist with diagonal unequal zero
Hello and sorry that I still haven?t found a solution for my problem.
I need to extract the lower and upper triangle from a square matrix
including the diagonal. This diagonal is not zero in that special case.
I tried with as.dist
w<-as.dist(w, diag = TRUE)
> w
1 2 3 4 5
1 0
2 2 0
3 3 8 0
4 4 9 14 0
5 5 10 15 20 0
but found no way to keep the diagonal that is in the
2005 Feb 11
3
getAnywhere and functions starting with "." (PR#7684)
Full_Name: Mark Bravington
Version: 2.0.1
OS: Windows XP
Submission from: (NULL) (140.79.22.104)
'getAnywhere' crashes when its argument starts with a period:
> getAnywhere( '.onLoad')
Error in exists(x, envir, mode, inherits) :
invalid first argument
One fix might be to replace the line
if ( !is.null(f <- getS3method(gen, cl, TRUE))) {
with
if ( nchar( gen)
2010 Apr 01
1
Using a Data Frame/Matrix outside a function
I have code that creates the same matrices , "a" and "b". The code creating
"a" is not in a function and the code creating "b" is in a function. I would
like to do operations on "b" like I can on "a", however I can't figure out
how I can return a matrix (or data frame) from a function. Thanks for your
help!
> r <- 5; c <- 5
2007 Apr 25
1
dist label names
Hello,
I am trying to do a multi-dimensional scaling of the World Bank's quality
of governance indicators for the Balkan region. I am having trouble
labelling my plot. Could some kind person help me out. How do I set the
attribute Label by a variable (say, "Code")? At present I get this:
>qog.dist<-dist(Balkans.data, method = "euclidean", diag = FALSE, upper =
2008 Feb 28
4
standard errors
Hi, guess my problem has simple solution.
I want to extract ONLY Std. Errors of Max. Lik. estimates
(my_fit<-mle(object,...)), the same as I can do with estimates by:
x<-as. matrix(coef(my_fit)).
I could not find any function similar to 'coef(my_fit)', which extracts only
Standard Errors. So far all I can do is to type: summary(my_fit) and then
get the whole output (with Standard