Displaying 20 results from an estimated 10000 matches similar to: "strange behavior in data frames with duplicated column names"
2010 Apr 05
1
strange behavior of matrix
Dear R list,
I have discovered a seemingly peculiar feature when using a matrix to
index itself (yes, this is strange code, which I have now modified to
be more reasonable).
#this makes sense
s <- matrix(1:3,nrow=1)
s[s] #all three elements are shown
#but when I try
s <- matrix(1:2,nrow=1)
s[1] #fine, the first element is shown
s[2] #fine, the second element is
2015 Apr 26
1
CRAN submit page down
On 26.04.2015 13:23, William Revelle wrote:
> This still seems to be the case.
>
> I tried uploading the most recent version of psych and got as far as the Step 3 page which says that it has sent out an email.
> However, although normally this step takes agout 1 minute, nothing has happened for 16 hours.
>
> Should we just use the old system of uploading to the ftp site and
2024 Jan 17
1
Determining the size of a package
Dear fellow developers,
Is there an easy way to determine how big my packages (psych and psychTools) will be on various versions of CRAN?
I have been running into the dread 'you are bigger than 5 MB" message for some installations of R on CRAN but not others. The particular problem seems to be some of the mac versions (specifically r-oldrel-macos-arm64 and r-release-macos-X64 )
When
2018 Sep 17
3
diag(-1) produces weird result
Dear list
A strange bug in the psych package is due to the behavior of the diag function:
It gives the expected values for 1, a vector (-1,1), but not for -1
Is this a known feature?
> diag(1)
[,1]
[1,] 1
> diag(c(-1,1))
[,1] [,2]
[1,] -1 0
[2,] 0 1
> diag(-1)
Error in diag(-1) : invalid 'nrow' value (< 0)
Bill
William Revelle
2018 Sep 17
0
diag(-1) produces weird result
I would say it is a mis-feature. If the 'x' argument of diag() is a
vector of length 1, then it creates an identity matrix of that size,
instead of creating a 1x1 matrix with the given value:
? diag(3)
[,1] [,2] [,3]
[1,] 1 0 0
[2,] 0 1 0
[3,] 0 0 1
Of course this makes it cumbersome to use diag() in a package, when
you are not sure if the input vector is
2011 Nov 03
1
How to test package on Solaris
Dear R developers,
Is there a way to pretest a package on the Solaris-sparc and solaris-x86 systems equivalent to the win-builder check?
My psych package (1.1.10 and 1.1.11) passes all checks for the Mac on my system, on the win-builder checking system supported by Uwe, and then passes Kurt's tests to install on CRAN. But it then fails when being built for the solaris systems.
Rather
2011 May 07
3
how to not match partial names
Dear friends,
How do I stop partial matching of list names?
e.g.,
x <- list(AAAA="aaaaa", BBBBB="bbbbb")
is.null(x$A) #returns FALSE even though there is no element A.
if(is.null(x$A)) {result <- x$BBBB} else {result <- x$A}
result #is aaaa even though there is no x$A element
x <- list(CCCC="aaaaa", BBBBB="bbbbb")
if(is.null(x$A))
2015 Apr 26
0
CRAN submit page down
This still seems to be the case.
I tried uploading the most recent version of psych and got as far as the Step 3 page which says that it has sent out an email.
However, although normally this step takes agout 1 minute, nothing has happened for 16 hours.
Should we just use the old system of uploading to the ftp site and sending a confirming email?
Thanks of course to the CRAN maintainers
2010 Jul 26
1
problem with building package on CRAN
Dear friends,
I have just gotten a strange error message back from Uwe saying
that the most recent version of psych failed to pass R CMD check for
Windows.
The error message was less than helpful, in that it seems to have
failed when trying to include the Rcpp library, which I do not
directly call. (see below)
"* using log directory
2004 May 10
1
problem with loadURL -- claims newer version used
Dear list,
I am trying to prepare a handout showing how to use R for factor
analysis. As part of the exercise I want to save a correlation
matrix on a tutorial web page. I can save with no problem (saving
locally and then transferring to the web site). Although I can
load() the local file, I am having problems getting loadURL to read
the remote file. I have tried saving it as an ascii
2004 Jul 14
2
using "mean" in by(x,y,mean)
Dear list friends
I fail to understand how to find means for multiple groups using the
by() function. Help would be appreciated. Thanks.
Bill
x <- runif(20,0,10)
group <- rep(c("A","B"),10)
df <-data.frame(x,group)
#df #show the data
rm(x,group)
attach(df)
sd(x) # sd is defined
mean(x) #so is mean
by(x,group,sd) #this works for both groups
2007 Oct 04
2
plot from source file
Dear list
Maybe someone can help with the following problem:
I have a source file containing the following code for plotting:
pdf(file = 'data/mario/boxplot.pdf')
bwplot(sig100 ~ target | group, data = fish, main = 'Boxplot der
Signale in 100 Zellen nach Gruppe', xlab = '', ylab = 'Anzahl der
Signale')
dev.off()
pdf(file = 'data/mario/xyplot.pdf')
2007 Jun 13
1
lme() doesn't converge on IGF example
Running the Chapter 4 examples in Pinheiro & Bates' "Mixed-Effects
Models in S and S-PLUS" (2000), I get a message that the default
optimizer doesn't converge, but using "optim" for the optimizer
results in convergence:
> > library(nlme)
> > fm1IGF.lis <- lmList(IGF)
> > fm1IGF.lme <- lme(fm1IGF.lis)
> Error in lme.formula(fixed =
2007 Jul 02
1
download.file - it works on my Mac but not on Windows.
Hi:
I am working with someone remotely to allow them access to our data.
The follow command using "download.file" works perfectly on my Mac:
> > download.file(url="http://oceanwatch.pfeg.noaa.gov:8081/thredds/
> wcs/satellite/AG/ssta/14day?
> request=GetCoverage&version=1.0.0&service=WCS&format=NetCDF3&coverage=
>
2007 Oct 05
3
Mac GUI and .Renviron
The .Renviron and .First functions do not seem to work the same way on a
Mac OS 10.4 as on a Windows XP machine.
From working in Windows I am used to creating a new directory for each
data analysis project. In the new directory I place
First, an .Renviron file consisting of the following text:
R_HISTFILE="history.txt"
R_HISTSIZE=1000000
Second, an .RData file containing a .First
2007 Aug 03
4
FW: Selecting undefined column of a data frame (was [BioC] read.phenoData vs read.AnnotatedDataFrame)
Hi all,
What are current methods people use in R to identify
mis-spelled column names when selecting columns
from a data frame?
Alice Johnson recently tackled this issue
(see [BioC] posting below).
Due to a mis-spelled column name ("FileName"
instead of "Filename") which produced no warning,
Alice spent a fair amount of time tracking down
this bug. With my fumbling fingers
2007 Apr 01
1
Error with Ruby 1.8.6
Hi,
I just upgraded to Ruby 1.8.6 on my Mac development machine and
here''s what I''m seeing when I try to run mongrel (I have the latest
version of mongrel + fastthread installed). It seems to be an OS/X
thing, because this same combo works fine on our Linux server.
Here''s the error, have you guys seen anything like this?:
** Starting Mongrel listening at
2011 Oct 11
1
Labels in ICLUST
Dear all,
I can't get the labels slot in ICLUST to accept a character vector.
library(psych)
test.data <- Harman74.cor$cov
ic.out <- ICLUST(test.data,nclusters
=4,labels=letters[1:ncol(test.data)]) ##?Error in !labels : invalid
argument type
ic.out <- ICLUST(test.data,nclusters =4,labels=1:ncol(test.data)) ## OK
Any ideas?
2007 Nov 01
2
unable to install package ff
Hi all,
I've had one of my most miserable R weeks in memory. I'm trying to
deal with huge datasets (>1GB each) but am running up against those
pesky memory limits. The libraries filehash and g.data are not very
suitable for what I need. I haven't gotten into the sql thing yet.
Most recently I've been trying to install the new package ff (not yet
on the CRAN repository). I
2007 Apr 07
1
segmentation fault
Dear list,
I am having a segfault while working with large lists in R 2.4.1
patched (64-bit compilation) on an apple xserve xeon with 16GB RAM (I
don't know if this is reproducible on other configs since this is the
only computer with enough memory I have access to...)
You will find below a simple somewhat reproducible (usually it
crashes around 5.5GB of vsize, sometimes it gets into