[R] New mask.ok option for libraries

2021-01-07 Thread Magnus Torfason
ny users who are not ready to switch over to a strict conflicts.policy, to nevertheless be able to suppress messages about expected conflicts using mask.ok and thus only get messages when unexpected masking occurs. = Best, Magnus [[alternative HTML version deleted]] ___

Re: [R] Inserting 17M entries into env took 18h, inserting 34M entries taking 5+ days

2013-11-08 Thread Magnus Thor Torfason
of the help, Magnus On 11/4/2013 8:20 PM, Thomas Lumley wrote: On Sat, Nov 2, 2013 at 11:12 AM, Martin Morgan mtmor...@fhcrc.org mailto:mtmor...@fhcrc.org wrote: On 11/01/2013 08:22 AM, Magnus Thor Torfason wrote: Sure, I was attempting to be concise and boiling it down

Re: [R] Inserting 17M entries into env took 18h, inserting 34M entries taking 5+ days

2013-11-04 Thread Magnus Thor Torfason
There are around 16M unique values. After accounting for equivalence, the number is much smaller (I don't know how much smaller, since my program has not completed yet :-) Yes, I meant that B and C are also equivalent. The original version was a typo. Best, Magnus On 11/1/2013 3:45 PM, jim

Re: [R] Inserting 17M entries into env took 18h, inserting 34M entries taking 5+ days

2013-11-04 Thread Magnus Thor Torfason
to be with entries of the form: O-G O-M Which imply that all of O/M/G are equivalent, but they are not detected as such. Will consider whether there is a good way around this. Best, Magnus Here's a function that returns a unique identifier (not well tested!), allowing for transitive relations

Re: [R] Inserting 17M entries into env took 18h, inserting 34M entries taking 5+ days

2013-11-04 Thread Magnus Thor Torfason
to create final data set That might work ... Thanks! Magnus On 11/1/2013 4:52 PM, William Dunlap wrote: Have you looked into the 'igraph' package? Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r

[R] Inserting 17M entries into env took 18h, inserting 34M entries taking 5+ days

2013-11-01 Thread Magnus Thor Torfason
, which is contingent on the data I am encountering, and on the contents of the hash table at each moment. Does anyone have a good recommendation for alternatives to implement huge, fast, table-like structures in R? Best, Magnus __ R-help@r

Re: [R] Inserting 17M entries into env took 18h, inserting 34M entries taking 5+ days

2013-11-01 Thread Magnus Thor Torfason
this is sufficiently interested to crack the problem Best, Magnus On 11/1/2013 1:49 PM, jim holtman wrote: It would be nice if you followed the posting guidelines and at least showed the script that was creating your entries now so that we understand the problem you are trying to solve. A bit more

Re: [R] min(NA,bla) != min(bla, NA)

2013-09-27 Thread Magnus Thor Torfason
Thanks for putting together such a quick fix! Unfortunately the policy for the system that I'm working on doesn't allow unreleased versions, so I'll have to work around this for a little bit longer. But I'll ask my sysadmins to install 3.0.3 as soon as it gets released. Best, Magnus On 9/27

[R] min(NA,bla) != min(bla, NA)

2013-09-26 Thread Magnus Thor Torfason
way? Best, Magnus ps. Tested on R 3.0.1, 32 bit for Windows (as well as some older versions) __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html

[R] RCURL ftp upload - ASCII or Binary type?

2012-09-26 Thread Magnus Eriksson
? How? System: windows 7 R version: 2.15.0 Thanks for your help Best regards Magnus Eriksson __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html

[R] [R-pkgs] Major update: paramlink version 0.6-1

2012-02-04 Thread Magnus Dehli Vigeland
with an introduction to the main features: http://cran.r-project.org/web/packages/paramlink/vignettes/paramlink.pdf Feedback, bug reports and feature requests are most welcome. Regards, Magnus -- Magnus Dehli Vigeland, PhD Department of Medical Genetics University of Oslo Norway E-mail: magnu...@medisin.uio.no

[R] Inconvenient behavior of as.data.frame() for lists without names

2010-09-15 Thread Magnus Thor Torfason
would be intelligent enough to never create names longer than - say 30 characters. Of course, explicit names should be honored. Anyway, that's my thoughts on this issue. No patch attached, and I will work around this, but at least it is out there now. Best, Magnus Thor

[R] How do I convert a XML file to a data.frame?

2010-07-12 Thread Magnus Statistik
compared to the one that can be used with the xmlToDataFrame), var1 value=/ to convert the XML file to a meaningful data.frame with both categorical and quantitative data. Any tips or tricks? They are highly appreciated. Thanks, Magnus

[R] Trying to tile wireframe plots (using lattice package)

2010-06-25 Thread Magnus Torfason
)) # Top-left, as expected plot(rnorm(100),rnorm(100)) # Top-right, as expected plot(rnorm(100),rnorm(100)) # But the volcano fills the whole the device ... wireframe(volcano) ## End of example All has been to no avail up until now. I'd be grateful for any suggestions you may have. Best, Magnus

Re: [R] Trying to tile wireframe plots (using lattice package)

2010-06-25 Thread Magnus Torfason
(1,1,2,2) , more=TRUE ) print(top.right, split=c(2,1,2,2) , more=TRUE ) print(bottom.left , split=c(1,2,2,2) , more=TRUE) print(bottom.right , split=c(2,2,2,2) ) ## Example ends Thanks again! Magnus On 6/25/2010 2:59 PM, Greg Snow wrote: The layout function is base graphics, wireframe from

Re: [R] Deleting duplicate rows in a matrix at random

2010-06-03 Thread Magnus Torfason
I need to remove all but one of each [row in a matrix], which must be chosen at random. This request (included in full at the bottom), has been unanswered for a while, but I had the same problem and ended up writing a function to solve it. I call it duplicated.random() and it does exactly

[R] Memory warning (Reached total allocation of ...) - but no error

2010-05-05 Thread Magnus Torfason
that the whole point of GC, that it gets triggered when memory is running out? I'd be grateful for advise on this: Should I just ignore these warnings as long as there are no errors, should I bite the bullet and call gc() manually, or is there a third way to deal with this? Best, Magnus ps. The reason

Re: [R] Advantages of using SQLite for data import in comparison to csv files

2010-01-14 Thread Magnus Torfason
. Unless you need to use bigger data sets, the simplest way is probably to just use csv files, read the contents into a data.frame with read.csv, and then use sqldf on the data.frame if you need to do complicated subsetting) Best, Magnus On 1/14/2010 2:12 AM, Juliet Jacobson wrote: But then why has

Re: [R] = returns wrong result? Why

2010-01-13 Thread Magnus Torfason
/R/e9/help/10/01/index.html#718 Best, Magnus On 1/13/2010 3:25 AM, Stephan Kolassa wrote: take a look at FAQ 7.31. Trafim Vanishek wrote: Does anybody know the probable reason why = gives false when it should give true? __ R-help@r-project.org

Re: [R] Ask about large data set

2010-01-13 Thread Magnus Torfason
you that reading 1 rows should be a piece of cake on any decent computer. Different estimation techniques are different in terms of computational intensity. Trying it is the best approach. If you run into problems, you could come back with specific questions of optimization. Best, Magnus

Re: [R] Conditional Sampling

2010-01-12 Thread Magnus Torfason
Would the following work, or is there a reason why it would not? risk.set - 1:100 first.10 - sample(risk.set, 10) remainder - setdiff(risk.set, first.10) for ( i in 1:1000 ) { next.5 - sample(remainder, 5) do.something.with(next.5) } Best, Magnus On 1/12/2010 9:00 AM

Re: [R] Solving graph theory problems with R ? (minimum vertex cover)

2010-01-12 Thread Magnus Torfason
-rigged to solve your problem. Even if not, the people involved may be able to help. For example, the igraph mailing list (igraph-h...@nongnu.org) is pretty active and the developers are very helpful. Best, Magnus __ R-help@r-project.org mailing list

Re: [R] Strange behaviour of as.integer()

2010-01-11 Thread Magnus Torfason
On 1/11/2010 10:37 AM, Martin Maechler wrote: Magnus Torfasonzulutime@gmail.com wrote: Of course there is still the problem that: 1+1 == sqrt(2)*sqrt(2) [1] FALSE and gmp will not solve this . I don't know if there is an R-package for arbitrary-precision reals floating around

Re: [R] Newbie question on precision

2010-01-08 Thread Magnus Torfason
Paul Evans wrote: How can I get R to change the default precision value? For example: x=0.9 1-x [1] 0 Is there a way that I can get a non-zero value using some parameter, or some package? many thanks. The 'gmp' package allows calculation with arbitrary precision rationals

Re: [R] Newbie question on precision

2010-01-08 Thread Magnus Torfason
On 1/8/2010 1:29 PM, Magnus Torfason wrote: Paul Evans wrote: How can I get R to change the default precision value? For example: x=0.9 1-x [1] 0 Is there a way that I can get a non-zero value using some parameter, or some package? many thanks. The 'gmp' package allows

Re: [R] Naming functions for the purpose of profiling

2010-01-07 Thread Magnus Torfason
) ## And thanks to Jim Holtman who contacted me off-line and gave me some helpful advice on profiling in general. Best, Magnus On 1/5/2010 2:58 PM, Magnus Torfason wrote: Hi all, I have some long-running code that I'm trying to profile. I am seeing a lot of time spent inside the Anonymous

Re: [R] Strange behaviour of as.integer()

2010-01-07 Thread Magnus Torfason
for arbitrary-precision reals floating around, but probably not. However, Wolfram Alpha will return the correct answer: http://tr.im/1plus1equals2 Best, Magnus __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

[R] Naming functions for the purpose of profiling

2010-01-05 Thread Magnus Torfason
for advanced profiling issues would be appreciated as well (I know of summaryRprof of course, but it can be difficult to get the full picture from the summaryRprof output if the calling structure is complicated). Best, Magnus __ R-help@r-project.org mailing

[R] Problems when using lag() in plm package

2009-12-29 Thread Magnus Torfason
$x) 1-1 1-2 1-3 1-5 1-6 1-7 2-1 2-2 NA 1 2 3 4 5 NA 7 8 attr(,class) [1] integer Best regards, Magnus __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

[R] The RSQLite version of dbGetQuery drops colums

2009-12-18 Thread Magnus Torfason
) Any thoughts? Is this a bug, and are the developers of RSQLite reading this? Best regards, Magnus __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting

Re: [R] Creating a list of empty lists

2009-10-14 Thread Magnus Torfason
()), and then perform an assignment using an argument of the length I want (using mapply()). The empty list is then recycled enough times to hold the corresponding values. Best, Magnus __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r

Re: [R] lapply / mapply and assignments

2009-10-13 Thread Magnus Torfason
Thank you so much, relist and SIMPLIFY both work. See more comments below ... On 10/12/2009 5:35 PM, Charles C. Berry wrote: On Mon, 12 Oct 2009, Magnus Torfason wrote: I want to achieve the following: l - list( list(a=1,b=2), list(a=3,b=4)) l[[]][a] - 5:6 See ?relist something

[R] Creating a list of empty lists

2009-10-13 Thread Magnus Torfason
()) } But it is not very neat to do this in a loop. Are there any cuter ways to do this? Best, Magnus __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org

Re: [R] Creating a list of empty lists

2009-10-13 Thread Magnus Torfason
Live and learn ... Thank you! On 10/13/2009 9:57 AM, Romain Francois wrote: On 10/13/2009 03:48 PM, Magnus Torfason wrote: l = list(list()) for ( i in sequence(length-1) ) { l = list(unlist(l,recursive=FALSE), list()) } About this : rep( list(list()), 3 ) [[1

[R] lapply / mapply and assignments

2009-10-12 Thread Magnus Torfason
# This will not actually work l[[]][a] - 5:6 unlist(lapply(l, [[, a)) [1] 5 6 I figure mapply is the solution to the problem, and I tried the following: mapply( [-, l, a, 5:6) But the result is not the same shape as the original. Any thoughts? Best, Magnus

Re: [R] Basic question: Reading in multiple choice question responses to a single column in data frame

2009-08-20 Thread Magnus Torfason
. My more comprehensive example assumed that you needed to be able to match individual multi-choice selections with other questions through the observation ID after the processing. If that is not needed, the one-liner should be adequate. Best, Magnus

Re: [R] Basic question: Reading in multiple choice question responses to a single column in data frame

2009-08-19 Thread Magnus Torfason
5 4 3 6 4 4 7 5 1 Best, Magnus On 8/19/2009 3:12 PM, Damion Dooley wrote: I'm using read.delim to successfully read in tab delimited data, but some columns' values are comma seperated, reflecting the fact that user chose a few answers on a multi-select question. I understand that each answer

[R] Selecting variables from a list of data.frames

2009-01-06 Thread Magnus
and regards, Magnus __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

[R] Exact test in nxm contingency table

2008-09-17 Thread Magnus Pettersson
in this general table. Does there exist a general function for this test. Best regards, Magnus Pettersson Statistikkonsulterna Gårdavägen 1 412 50 Göteborg 0703-731297 www.statistikkonsulterna.se [[alternative HTML version deleted]] __ R

[R] Using ODBC/RODBC with DBI

2008-06-30 Thread Magnus Torfason
unlikely considering the wide use of ODBC, but you never know. I hope it's just me doing something wrong. Best, Magnus [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do