Displaying 20 results from an estimated 10000 matches similar to: "Help"
2018 Mar 30
0
getting all circular arrangements without accounting for order
New function below is a bit faster due to more efficent memory handling.
for-loop FTW!
directionless_circular_permutations2 <- function( n ) {
n1 <- n - 1L
v <- seq.int( n1 )
ix <- combinations( n1, 2L )
jx <- permutations( n-3L, n-3L )
jxrows <- nrow( jx )
jxoffsets <- seq.int( jxrows )
result <- matrix( n, nrow = factorial( n1 )/2L, ncol = n )
k
2011 Mar 11
1
Error in plot.lm
I am encountering an error with plot.lm:
> tstdf <- data.frame( y=c(1.01,1.98,3.02,3.99),x=c(1,2,3,4))
> plot(lm(I(y) ~ x, data=tstdf))
Hit <Return> to see next plot:
Hit <Return> to see next plot:
Error in object$coefficients : $ operator is invalid for atomic vectors
Obviously I don't need the I() in this example, but I have been working
with regressions that involve
2018 Mar 27
0
unable to move temporary installation of package
Have you investigated the issue Kevin Thorpe suggested?
--
Sent from my phone. Please excuse my brevity.
On March 27, 2018 2:31:31 PM PDT, Paul Lantos <paul.lantos at duke.edu> wrote:
>I deleted my library, reinstalled R, and had the same issue -- couldn't
>install anything into its newly created library.
>
>-----Original Message-----
>From: Jeff Newmiller
2018 Mar 27
1
unable to move temporary installation of package
I don't believe I've gotten a reply from a Kevin Thorpe.
-------- Original message --------
From: Jeff Newmiller <jdnewmil at dcn.davis.ca.us>
Date: 3/27/18 5:57 PM (GMT-05:00)
To: Paul Lantos <paul.lantos at duke.edu>
Cc: r-help at r-project.org
Subject: RE: [R] unable to move temporary installation of package
Have you investigated the issue Kevin Thorpe suggested?
--
Sent
2017 Jun 07
0
Adding zeros in each dimension of an array
Please read
https://www.lifewire.com/how-to-send-a-message-in-plain-text-from-gmail-1171963
Re your question: easy is in the eye of the beholder.
a <- array( 1:12, dim = c( 2, 2, 3 ) )
b <- array( 0, dim = dim( a ) + 1 )
b[ 1:2, 1:2, 1:3 ] <- a
If you want to do a lot of this, it could be wrapped for convenience
though implementing that last expression without hardcoding the sequences
2018 Mar 27
2
unable to move temporary installation of package
I deleted my library, reinstalled R, and had the same issue -- couldn't install anything into its newly created library.
-----Original Message-----
From: Jeff Newmiller [mailto:jdnewmil at dcn.davis.ca.us]
Sent: Tuesday, March 27, 2018 2:26 PM
To: Paul Lantos <paul.lantos at duke.edu>
Cc: r-help at r-project.org
Subject: RE: [R] unable to move temporary installation of package
Do you
2018 Mar 27
0
unable to move temporary installation of package
Do you have other instances of R open at the time you are doing this? Did
you already have mgcv installed in your personal library when you tried
installing it again?
There is clearly something preventing you from writing to your library, or
at least to specific packages in your library.
On Tue, 27 Mar 2018, Paul Lantos wrote:
> Thanks,
>
> Here's the error, for example:
>
2017 Jun 29
1
Different date formats in one column
Thanks Jeff. This is a nice way of solving this problem. What about the cases with 0015-02-21?Many thanks.?Best,Farnoosh
On Wednesday, June 28, 2017 10:49 PM, Jeff Newmiller <jdnewmil at dcn.davis.ca.us> wrote:
I doubt your actual file looks like the mess that made it to my email
software (below) because you posted HTML-format email. Read the Posting
Guide, and in particular
2017 Jul 16
0
readLines without skipNul=TRUE causes crash
So you are saying there are two problems... one that produces a corrupt file from a valid compressed file, and one that segfaults when presented with that corrupt file? Can you please confirm the file name and run md5sum on it and share the result so we can tell when the file problem has been reproduced?
--
Sent from my phone. Please excuse my brevity.
On July 16, 2017 3:21:21 AM PDT, Anthony
2006 Dec 26
4
Rating competitors
I am looking for hints on how to estimate ratings for competitors
in an ongoing pairwise competition using R... my particular area of
interest being the game of Go, but the idea of identifying ratings
(on a continuous scale) rather than relative rankings seems easily
generalized to other competitions so I thought someone might be
studying something related already.
I presume the rating of a
2011 Nov 12
1
With an example - Re: rbind.data.frame drops attributes for factor variables
When I use rbind() or rbind.data.frame() to add a row to an existing
dataframe, it appears that attributes for the column of type "factor" are
dropped. See the sample example below to reproduce the problem. Please
suggest How I can fix this.
Thanks,
Sammy
a=c("Male", "Male", "Female", "Male")
b=c(1,2,3,4)
c=c("great", "bad",
2017 Jul 16
0
readLines without skipNul=TRUE causes crash
I am stuck. The archive package won't compile for me on Ubuntu, and the CRANextra repo seems to be down so I cannot install packages on Windows right now. Perhaps you can zip the corrupt text file and put it online somewhere? Don't use the archive package to pack it since there seem to be issues with that tool on your machine.
I would discourage you from harassing the Brazilian
2017 Jul 17
1
readLines without skipNul=TRUE causes crash
hi, thanks again for taking the time. since corrupted compression prompted
the segfault for me in the first place, i've just posted the text file
as-is. it's a 2.4GB file so to be avoided on a metered internet
connection. i've updated the bugzilla report at
https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=17311 with more
relevant info. these lines of code crash both windows R
2017 Jun 29
0
Different date formats in one column
I doubt your actual file looks like the mess that made it to my email
software (below) because you posted HTML-format email. Read the Posting
Guide, and in particular figure out how to send plain text email.
You might try the "anytime" contributed package, though I suspect it too
will choke on your mess. Otherwise, that will pretty much leave only a
brute-force series of regular
2017 Jul 15
0
readLines without skipNul=TRUE causes crash
I am not able to reproduce your segfault on a Windows 7 platform either:
##########################
fn1 <- "d:/DADOS_ENEM_2009.txt"
sessionInfo()
## R version 3.4.1 (2017-06-30)
## Platform: x86_64-w64-mingw32/x64 (64-bit)
## Running under: Windows 7 x64 (build 7601) Service Pack 1
##
## Matrix products: default
##
## locale:
## [1] LC_COLLATE=English_United States.1252
## [2]
2017 Jul 16
2
readLines without skipNul=TRUE causes crash
hi, yep, there are two problems -- but i think only the segfault is within
the scope of a base R issue? i need to look closer at the corrupted
decompression and figure out whether i should talk to the brazilian
government agency that creates that .rar file or open an issue with the
archive package maintainer. my goal in this thread is only to figure out
how to replicate the goofy text file so
2018 Mar 30
2
getting all circular arrangements without accounting for order
Jeff,
I wanted to let you know that your function is faster than generating the directional circular permutations and weeding.
Here is the time for n = 10. I compared with just doing the permutations, there is no point in proceeding further with the weeding since it is slower at the start itself.
system.time(directionless_circular_permutations(10))
user system elapsed
1.576 0.000
2017 Jul 16
3
readLines without skipNul=TRUE causes crash
hi, thank you for attempting this. it looks like your unix machine unzipped
the txt file without corruption -- if you copied over the same txt file to
windows 7, i don't think that would reproduce the problem? i think it
needs to be the corrupted text file where R.utils::countLines( txtfile
) gives 809367. i am able to reproduce on two distinct windows machines
but no guarantee i'm
2017 Jul 17
0
readLines without skipNul=TRUE causes crash
The original file had a lot of trailing null bytes so I tried making a
similar file with:
tf <- tempfile(); file <- file(tf, "wb")
for(i in 1:(2^15-1))writeBin(rep(as.raw(32:127), len=2^16), file)
for(i in 1:(2^15-1))writeBin(rep(as.raw(0L), len=2^16), file)
close(file)
log2(file.size(tf))
#[1] 31.99996
Reading this with readLines() caused R-3.4.0 to segfault in Rf_con_pushback
2017 Jul 15
2
readLines without skipNul=TRUE causes crash
I see the problem on Windows 10, R-3.4.0, R.exe. It is not compiled for
debugging but gdb gives some information when I attach the debugger after
the 'R..has stopped working' popup appears. I don't know how reliable it
is:
(gdb) info threads
Id Target Id Frame
* 4 Thread 11848.0x1500 0x00007ffe38dc8861 in ntdll!DbgBreakPoint ()
from