similar to: Don't dput() data frames?

Displaying 20 results from an estimated 1000 matches similar to: "Don't dput() data frames?"

2005 Apr 07
2
axis colors in pairs plot
The following command produces red axis line in a pairs plot: pairs(iris[1:4], main = "Anderson's Iris Data -- 3 species", pch = "+", col = c("red", "green3", "blue")[unclass(iris$Species)]) Trying to fool pairs in the following way produces the same plot as above: pairs(iris[1:4], main = "Anderson's Iris Data -- 3
2013 Jan 01
3
translate grouped data to their centroid
Given a data set with a group factor, I want to translate the numeric variables to their centroid, by subtracting out the group means (adding back the grand means). The following gives what I want, but there must be an easier way using sweep or apply or some such. iris2 <- iris[,c(1,2,5)] means <- colMeans(iris2[,1:2]) pooled <- lm(cbind(Sepal.Length, Sepal.Width) ~ Species,
2010 Sep 21
5
removed data is still there!
I'm confused, hope someone can point out what is not obvious to me. I thought I was creating a new data frame by 'deleting' rows from an existing dataframe - I've tried 2 methods. But this new data frame seems to remember values from its parent - even though there are no occurences. Where does it get the values versicolor and virginica from and give then a count of 0? What
2008 Sep 02
2
cluster a distance(analogue)-object using agnes(cluster)
I try to perform a clustering using an existing dissimilarity matrix that I calculated using distance (analogue) I tried two different things. One of them worked and one not and I don`t understand why. Here the code: not working example library(cluster) library(analogue) iris2<-as.data.frame(iris) str(iris2) 'data.frame': 150 obs. of 5 variables: $ Sepal.Length: num 5.1 4.9 4.7
2018 Jan 28
0
Newbie wants to compare 2 huge RDSs row by row.
The diffobj package (https://cran.r-project.org/package=diffobj) is really helpful here. It provides "diff" functions diffPrint(), diffStr(), and diffChr() to compare two object 'x' and 'y' and provide neat colorized summary output. Example: > iris2 <- iris > iris2[122:125,4] <- iris2[122:125,4] + 0.1 > diffobj::diffPrint(iris2, iris) < iris2 >
2018 Jan 28
1
Newbie wants to compare 2 huge RDSs row by row.
Thanks, I think I've found the most succinct expression of differences in two data.frames... length(which( rowSums( x1 != x2 ) > 0)) gives a count of the # of records in two data.frames that do not match. // ________________________________________ From: Henrik Bengtsson [henrik.bengtsson at gmail.com] Sent: Sunday, January 28, 2018 11:12 AM To: Ulrik Stervbo Cc: Marsh Hardy ARA/RISK;
2015 Mar 08
2
AWS/EC2 server selection
Digital ocean offers ssd on all the virtual machines. Uptime is good. Jai Rangi Www.didforsale.com www.cebodtelecom.com www.cebod.com > On Mar 8, 2015, at 8:11 AM, Jeff LaCoursiere <jeff at jeff.net> wrote: > > > Amazon instances are shared resources. I wouldn't want to count on timing or disk throughput, and you can't just ask them to do "ssd" - its a
2005 Jul 08
3
pairs() uses col argument for axes coloring
Hi list, not sure if this is the wanted behavior, but running the following code: > version platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status major 2 minor 1.1 year 2005 month 06 day 20 language R > n <- 500 > d <- 4 > m <- matrix(runif(n*d, -1, 1), ncol=d) > c <- hsv(apply(m, 1, function(x) {sum(x*x)/d}),
2005 Jul 08
3
pairs() uses col argument for axes coloring
Hi list, not sure if this is the wanted behavior, but running the following code: > version platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status major 2 minor 1.1 year 2005 month 06 day 20 language R > n <- 500 > d <- 4 > m <- matrix(runif(n*d, -1, 1), ncol=d) > c <- hsv(apply(m, 1, function(x) {sum(x*x)/d}),
2006 Jul 11
2
R newbie: logical subsets
Hello! I'm a newcomer to R hoping to replace some convoluted database code with an R script. Unfortunately, I haven't been able to figure out how to implement the following logic. Essentially, we have a database of transactions that are coded with a geographic locale and a type. These are being loaded into a data.frame with named variables city, type, and price. E.g., trans$city
2013 May 01
2
Catch SIGINT from user in backend C++ code
Hi, I was wondering if anybody knew how to trap SIGINTs (ie Ctrl-C) in backend C++ code for R extensions? I'm writing a package that uses the GPU for some hefty matrix operations in a tightly coupled parallel algorithm implemented in CUDA. The problem is that once running, the C++ module cannot apparently be interrupted by a SIGINT, leaving the user sat waiting even if they realise
2009 Feb 12
2
barplot() x axes are not updated after removal of categories from the dataframe
Hi all, I'd be grateful for your help. I am a new user struggling with a barplot issue. I am plotting categories (X axis) and their mean count (Y axies) with barplot(). The first call to barplot works fine. I remove records from the dataframe using final=[!final$varname == "some value",] I echo the dataframe and the records are no longer in the dataframe. When I call plot again
2014 Apr 02
0
special handling of row.names
Hello, I think there is an inconsistency in the handling of the compact form of the row.names attributes. When n is the number of rows of a data.frame, the compact form is c(NA_integer_,-n), as in: > d <- data.frame(x=1:10) > .Internal(inspect(d)) @104f174a8 19 VECSXP g0c1 [OBJ,NAM(2),ATT] (len=1, tl=0) @103a7dc60 13 INTSXP g0c4 [] (len=10, tl=0) 1,2,3,4,5,... ATTRIB: @104959380
2005 Aug 10
5
more patches
Here are a few patches 2 small changes and one a little hefty. All are to *.i files. SpinCtrl.patch - Changes cWxSpinCtrl.klass to mWxSpinCtrl in rb_define_method. Dialog.patch - Removed the %ignore wxDialog::wxDialog line, this line prevents Dialogs working with XRC. Window.i - Added special code for find_window_* methods so the correct object type is returned, this is very important when
2016 Sep 09
2
forgive possible repost: alternate bzip2 library
Hi, I am resubmitting a question, mainly because I suspect I may have inadvertently cancelled it, while it was awaiting moderator approval. It's about manually compiling R-3.3.1 and using, not the standard system's (ver 1.0.5), but an alternate a bzip2 (v1.0.6) which is located in a non-standard location. I usually lean on pkg-config to deal with issues like this. I've create an
2007 Apr 24
1
NA and NaN randomForest
Dear R-help, This is about randomForest's handling of NA and NaNs in test set data. Currently, if the test set data contains an NA or NaN then predict.randomForest will skip that row in the output. I would like to change that behavior to outputting an NA. Can this be done with flags to randomForest? If not can some sort of wrapper be built to put the NAs back in? thanks, Clayton
2004 Jul 28
1
automating sequence of multinomial regressions
Disclaimer first: I only heard about R fairly recently, so I apologize if this is either a simple or impossible request, but R looked like it might be a good framework for this sort of thing... Is it possible to write a script to run stepwise multinomial regressions on many *dependent* variables, and then compare results to a validation data set (e.g., Chow test)? Essentially, automate the
2004 Aug 03
1
Any small colleges/universities using PBX or Voicemail?
What an ACTIVE newsgroup! I'm in the early stages of researching Asterisk. My current environment is a small college (~1000 sets/~400 student sets), Avaya Definity G3si/Seimens Rolm Phonemail. As you can imagine, the maintenance, licensing, and equipment costs are HEFTY. So.. are there any small colleges/universities using PBX or Voicemail? If so, I'd be interested in your migration
2008 Oct 29
1
cmirror - CentOS
Greetings, I might have missed something in the list here.. But could someone point out some introductory material / docs regarding cmirror? Is there something (even beta would do) in CentOS to read and understand about this? OT- On Fossils: While I cannot claim "Fossil state" anywhere near some of the people who were doing cards -- I knew about them though -- when I was born, I have
2004 Aug 06
2
kicking clients
Hello Is there a way to set a connection time limit for clients, or a way to kick a client? I'm running Icecast2 on a hosted box and I think some people have been tuned into it for days...and that could some day run up a hefty bandwidth charge. You'd hope that people would disconnect when they were done listening..but they don't all do that. <p><p>--- >8 ---- List