Displaying 20 results from an estimated 20000 matches similar to: "documentation inconsistency for [.data.frame ?"
2013 Jul 15
1
pmatch inconsistency
The pmatch help (see also section 4.3.2 in the R Language Definition)
claims that pmatch with duplicates.ok=FALSE provides the same
functionality as R's argument matching algorithm, modulo how empty
strings are matched.
Here's an undocumented inconsistency between pmatch and R's argument
matching algorithm:
> sessionInfo()
R version 3.0.1 (2013-05-16)
Platform:
2011 Aug 16
2
merge(join) problem
I have two datasets:
A with columns Open and Name (and many others, irrelevant to the merge)
B with columns Time and Name (and many others, irrelevant to the merge)
I want the dataset AB with all these columns
Open from A - a difftime (time of day)
Time from B - a difftime (time of day)
Name (same in A & B) - a factor, does NOT index rows, i.e., there are
_many_ rows in both A & B with
2012 Mar 04
1
Could not compute QR decomposition of Hessian.
Hi,
I created the model below, which returns me the following warning message:
In sem.default(ram = ram, S = S, N = N, param.names = pars, var.names =
vars, :
Could not compute QR decomposition of Hessian.
Optimization probably did not converge.
######### Model ########
mDPDF =
data.frame(mj1,mj2,mj3,mj4,mj5,eL1,eL2,eL3,eL4,eL5,aC1,aC2,aC3,aC4,disR1,disR2,disR3,disR4,disR5,
2013 Mar 11
2
how to convert a data.frame to tree structure object such as dendrogram
I have a data.frame object like:
> data.frame(x=c('A','A','B','B'), y=c('Ab','Ac','Ba','Bd'))
x y
1 A Ab
2 A Ac
3 B Ba
4 B Bd
how could I create a tree structure object like this:
|---Ab
A---|
_| |---Ac
|
| |---Ba
B---|
|---Bb
Thanks,
Zech
[[alternative HTML version deleted]]
2008 Mar 17
1
Inconsistency in gsub in R.2.6.2 (PR#10978)
Hi,
May this be an oversight?
R version 2.6.2 Patched (2008-03-13 r44783)
Copyright (C) 2008 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
...
> x <- "ab?"
> Encoding(x)
[1] "latin1"
> Encoding(gsub("?","", x))
[1] "unknown"
> Encoding(gsub("?","", x, perl = TRUE))
[1] "latin1"
2010 May 29
3
adding statistical output to a plot
I have written a function to emulate minitab's QQ plotting output (with SW
test and AD test results on the graph):
mtab.norm<-function(x)
{ library(nortest)
library(lattice)
x<-as.numeric(x)
x<-as.vector(x)
plot.ht<-4.6
plot.wd<-4.6
pt.ht=plot.ht/5
txt.sz<-(plot.ht/7.5)
X11(width=plot.wd, height=plot.ht, bg='gray96')
qqplot(x, pch=16, cex=pt.ht,
2006 Mar 28
0
ansari.test (one tailed)
Hello.
I am probably wrong... I am wondering if it could have a mistake
in the code of the ansari.test function. For me, it seems that the function
do not recover the p value at the correct side of the normal law N(0, 1) when it
use
the normal approximation (presence of ties) in a one tailed test.
Exemple :
quanti<-c(197, 205, 228, 234, 237, 195, 233, 226, 244, 227, 259, 185, 198, 253,
207,
2012 Sep 26
1
Change in order of names after applying "plyr" package
Dear R helpers
I have following two data.frames viz. equity_data and param.
equity_data = data.frame(security_id = c("Air", "Air", "Air", "Air", "Air", "Air", "Air", "Air", "Air", "Air", "Air", "Air", "AB", "AB", "AB", "AB",
2011 Aug 18
2
Selecting subset of factor levels
Dear r-help,
I would like to select a subset of levels from a factor variable in a data frame and return a data frame.
The data set consists of 3 variables, 2 of which are factors (Site, Fish) and one numeric (Datavalue) as follows:
Site Fish Datavalue
AB 2-1 2.3
AB 2-1 2.4
AB 2-1 2.2
AB 2-2 2.6
AB 2-2 2.5
AB 2-2 2.7
AB 2-3
2013 May 10
2
How can I extract part of the data with a selection criterion?
Hi,
As an example, how can I get the data such that field a of ab, ab["a"],
equals 3? I expect the answer to be the union of 2 and 4, as
Thanks,
> a<-c(1,3,4,3,5,6,5)
> b<-c(2,4,6,7,3,1,2)
> ab<-data.frame(a,b)
> ab
a b
1 1 2
2 3 4
3 4 6
4 3 7
5 5 3
6 6 1
7 5 2
> ab[a==3]
Error in `[.data.frame`(ab, a == 3) : undefined columns selected
>
2008 Jul 23
1
R2WinBUGS problem
Dear friends - I'm on winXP, R 2.71 - I have with some help dveloped
this multivariate normal model, which gives very plausible results in
WinBUGS even without any
initial values specified. However, when I then try to run the same model
via the bugs function in R2WinBUGS with inits specified as inits=NULL
the program stops in a dead end. So I have tried to make inits for the
bugs function
2011 Apr 28
1
AutomaticTRUE/FALSE Matrix Generation
Dear All,
I am a newbee in R an have the following problem. I have variables AB,BC,CD
to which outputs are assigned. Now AB[,1], for example, outputs a list,
which is a random combination of the following characters: "AB", "BC", "CD".
What I want to do is to build a 3x3 matrix with colnames and rownames equal
to "AB", "BC", "CD". Matrix
2010 May 18
2
Counting Frequencies in Data Frame
Hi,
I am sure there is an easy way to do it, but I can't find it.
I have a data frame that has 15 columns and 7000 rows.
The only values inside the data.frame are "aa", "ab", "bb" as you can see an
example bellow.
1 2 3
1 aa ab ab
2 ab ab ab
3 aa aa aa
4 bb bb bb
What I would like to do, is to generate a vector (or another data.frame)
with 7000 rows, and 3
2019 Sep 10
2
Calling a LAPACK subroutine from R
Hello R-helpers!
I am trying to call a LAPACK subroutine directly from my R code using .Fortran(), but R cannot find the symbol name. How can I register/load the appropriate library?
> ### AR(1) Precision matrix
> n <- 4L
> phi <- 0.64
> AB <- matrix(0, 2, n)
> AB[1, ] <- c(1, rep(1 + phi^2, n-2), 1)
> AB[2, -n] <- -phi
> round(AB, 3)
[,1] [,2] [,3]
2019 Sep 10
2
Calling a LAPACK subroutine from R
Hello R-helpers!
I am trying to call a LAPACK subroutine directly from my R code using .Fortran(), but R cannot find the symbol name. How can I register/load the appropriate library?
> ### AR(1) Precision matrix
> n <- 4L
> phi <- 0.64
> AB <- matrix(0, 2, n)
> AB[1, ] <- c(1, rep(1 + phi^2, n-2), 1)
> AB[2, -n] <- -phi
> round(AB, 3)
[,1] [,2] [,3]
2010 May 26
1
Fill a matrix using logical arguments?
Hello all,
I am going slightly mad trying to create a table for running
co-correspondence analysis.
What I have is seed bank and vegetation data, and my aim is to see if
the vegetation found in a site (containing several seed bank samples)
can predict the composition of a seed bank sample within that site. So
for this I need two tables with matching rows.
I have created an empty matrix,
2012 Oct 05
2
Using variables from different environments in one function
Dear R-community,
I have been experiencing this issue with functions within a function and
I can kind of feel where the problem is (environments, closures etc),
but I don't manage to solve it.
I will sketch it with an example:
#We have two simple "inner" functions:
############## INNER FUNCTION1 #################
innerfunction1<-function()
{
ab<-a+b
2019 Sep 12
1
Calling a LAPACK subroutine from R
Followup:
I have checked my package nleqslv which uses dgemv only from Fortran, on Kubuntu 18.04 with the development version of R.
No errors or problems.
Berend
> On 12 Sep 2019, at 08:57, Berend Hasselman <bhh at xs4all.nl> wrote:
>
>
> I have tried what I proposed in a virtual Kubuntu 18.04 which uses gfortran 7.4.
> I used the latest development version of R.
>
2019 Sep 11
1
Fw: Calling a LAPACK subroutine from R
On 2019-09-11 22:16, Avraham Adler wrote:
> Can you write a small C function that calls LAPACK call that fro your
> Fortran code? Yes, an extra step but maybe less traumatic than rewriting
> parts of LAPACK directly.
Yes, I know how to do that, but I find it somewhat bizarre that it is
impossible to call a Fortran subroutine from Fortran. And rewriting
'dgemv' was simple:
2020 Oct 08
0
Lahman Baseball Data Using R DBI Package
Hi Philip,
You've probably realized by now that R doesn't like column names that
start with a number. If you try to access an R-dataframe column named
2B or 3B with the familiar "$" notation, you'll get an error:
> library(DBI)
> library(RSQLite)
> con2 <- dbConnect(SQLite(), "~/R_Dir/lahmansbaseballdb.sqlite")
> Hack12Batting <-