search for: clumsy

Displaying 20 results from an estimated 450 matches for "clumsy".

2011 Aug 02
3
identifying weeks (dates) that certain days (dates) fall into
...by="week")) week # each week starts on a Monday I also have a vector of dates I am interested in, e.g.: july4<-as.Date(c("2010-07-04","2011-07-04")) I would like to flag the weeks in my weekly$week that contain those 2 individual dates. I can only think of a very clumsy way of doing it: myrows<-c(which(weekly$week==weekly$week[weekly$week>july4[1]][1]-7), which(weekly$week==weekly$week[weekly$week>july4[2]][1]-7)) weekly$flag<-0 weekly$flag[myrows]<-1 It's clumsy - because actually, my vector of dates of interest (july4 above) is much longer....
2009 Sep 17
3
generating unordered combinations
Hi, I am trying to generate all unordered combinations of a set of numbers / characters, and I can only find a (very) clumsy way of doing this using expand.grid. For example, all unordered combinations of the numbers 0, 1, 2 are: 0, 0, 0 0, 0, 1 0, 0, 2 0, 1, 1 0, 1, 2 0, 2, 2 1, 1, 1 1, 1, 2 1, 2, 2 2, 2, 2 (I have not included, for example, 1, 0, 0, since it is equivalent to 0, 0, 1). I have found a way to generate...
2011 May 17
4
subsetting a list of dataframes
...only those dataframes in the list that meet a certain criterion. Specifically, I need to generate a second list which only includes those dataframes whose number of rows is > 1. Could someone suggest how to do this? I have come close to what I need with loops and such, but there must be a less clumsy way... Many thanks, Lara [[alternative HTML version deleted]]
2011 May 26
3
change function scope?
...environment?? (So that somefunction() returns 99). I've tried various uses of eval() and assign() with their keywords in the definition of somefunction and have had no luck at all. I do see that i could define thefunction in some external file and source it inside somefunction, but that seems clumsy. thanks!! James [[alternative HTML version deleted]]
2011 Aug 16
2
Assignment working differently inside ifelse()
Hello all, I need to extract rows and columns from a data frame and put them in a matrix. In some cases, there are no rows in the data frame meeting the selection criteria. For those rows I want to put a row of 0's in the matrix. Here's my clumsy code: tab1.m1 <- matrix(0, nrow=2, ncol=4) tab1.m1[1,] <- ifelse(length(as.matrix(tab1[tab1$comp==the.comp & tab1$schlid==the.schl & tab1$ext.obs==0, 4:7])) > 0, as.matrix(subset(tab1, tab1$comp==the.comp & tab1$schlid==the.schl & tab1$ext.obs==...
2006 Jun 24
4
session alternatives
...ession hash and it''s beginning to seem to me that this might not be a good idea. Before I add another model to the mess - is there a better way? Do I have to create some table to store the current ''find'' criteria? It seems as though, this would slow me down and be rather clumsy. Any suggestions appreciated Craig
2009 Nov 23
2
categorisation of continuous variables in R
Dear all, I'm looking for a function comparable to switch, to categorize a continuous variable in a few levels. Off course that can be done with a series of ifelse statements, but that looks rather clumsy. I looked at switch, but couldn't figure out how to use it for this. I guess that's not possible, as it only works with characters or integers, not with intervals. Basically, I'm looking for a clean way to do : test <- runif(10,1,100) testFunc <-function(x){ x <- ifelse(test...
2010 May 25
2
website address for the pseuso-XLS files
...amail.rossoalice.alice.it/messages/readMessageFrameset.aspx?DeliveryID=ba40cf18-29db-4404-a3ce-af26f760ecf9 Please, paste the website address above shown in your web browser address field. Make sure the whole string is pasted with no space or any other character. Telecom couldn't generate more clumsy website addresses .... Sorry for that. Thank you in advance, Maura tutti i telefonini TIM! [[alternative HTML version deleted]]
2007 Oct 20
2
formatting a list
Hi, I am new to R and need to read in a file with 19 columns and 7000 rows and make it into a list of 7000 lists with 19 items each. For a simpler case of 10 by 10 table I used x <-scan("file", list(0,0,0,0,0,0,0,0,0,0)), perhaps clumsy, but it did the job. However with the large 19x7000 (which needs to be transposed) I am not sure how to go about it. Coudl somebody suggest a way? Thanks, Tomas
2002 Apr 30
4
generating graphical output when DISPLAY is not set?
...tsize, : unable to start device PNG In addition: Warning message: unable to open connection to X11 display`' I want to have a process running on a server call R to generate graphical output, and the problem is that I'm not guaranteed to have a valid DISPLAY set. I have some clumsy workarounds, but it would be cleaner if if I had some way to have R not require the DISPLAY. Thanks, -Simon -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "hel...
2009 Oct 24
2
warnings details
...sed a warning message? last.warning gives me the last warning, but I do not have any indication what the statement was that caused the message. I can of course store last warning before I run a statement and then compare last.warning with this stored message to see if it has changed, but that is a) clumsy b) still does not cover situations when I get the same warning as the last one by coincidence. -- Erich Neuwirth, University of Vienna Faculty of Computer Science Computer Supported Didactics Working Group Visit our SunSITE at http://sunsite.univie.ac.at Phone: +43-1-4277-39464 Fax: +43-1-4277-...
2008 May 30
2
Including a tilde in a plotmath-type call
Suppose I have a plot plot(1:10, pch = "") And I want some text to indicate a Normal distrubition. I could do this: text(5, 6, substitute(X~~~~N(mu, sigma^2)), adj = 0) text(5.35, 6, "~", adj = 0) But that's clumsy, and depending on your plotting device, might not even look sensible. I'd prefer to be able to do it more directly and simply the way these do: text(5, 1, expression(X %~~% N(mu, sigma^2)), adj = 0) text(5, 2, expression(X %prop% N(mu, sigma^2)), adj = 0) text(5, 3, expression(X %=~% N(mu, si...
2011 May 13
2
Creating dataframes
I would like to create a certain number of dataframes out of one dataframe where each of the dataframes is related to a factor. This should be possible with a loop or a function, as is very clumsy to do it manually when there are quite a lot factors. For example having a dataframe called "exmpl": Site Value 1 12 1 15 1 18 1 21 1 12 1 13 2 15 2 12 2 58 2 62 2 22 2 65 2 29 3 21 3 55 3 11 3 98 I would like to create 3 dataframes, where "exmpl_01" equals: 1 12 1 15...
2002 Jul 03
2
Scientific notation
I'm writing a load of output to a file using cat(...), but I can't work out how to turn off scientific notation for small numbers. When I originally tried this a while a go I ended up building up a string variable, which is rather clumsy... Many thanks, David -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To...
2013 Mar 26
2
edit.data() read-only?
...fit on the screen (especially when there are many columns). Very useful when scanning through a dataset (row & column are conveniently identified by the labels at the side and above). However, there seens to be no option to set it "read-only" on start-up, with the consequence that a clumsy key-press or mouse-click could cause a change in the data which would then be stored after quitting edit.data(). Is there a possibility of a read-only option? Or some other function which could offer similar viewing capability without the risk of data change? With thanks, Ted. ------------------...
2011 Nov 18
1
couting events by subject with "black out" windows
...e day the event of interest is counted).   The solution should count only the following events per subject(per the 30-day blackout rule):   ID Date  auto1 1/1/2010  auto2 2/12/2010  auto2 4/21/2011  auto3 3/1/2010  auto3 5/3/2010    I have created a multistep process to do this, but it is extremely clumsy (detailed below).  I have to believe that one of you has a much more elegant solution.  Thank you all in advance for any help!!!!   ##     example data data1 <- structure(list(ID = structure(c(2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L,3L, 4L, 4L, 4L, 4L, 4L), .Label = c("", "auto1", &qu...
2006 Nov 25
2
patch for old APC Smart-UPS 600
...OPQRSUVWXYZ", 0 }, + { "D5", "789ABCEFGKLMNOPQRSUVWXYZ", 0 }, + { "D4", "789ABCEFGKLMNOPQRSUVWXYZ", 0 }, /* CS 350 */ { "5.4.D", "\1ABPQRSUYbdfgjmnx9", 0 }, I understand that it is a clumsy way to make it work but it was the easiest for me. I am not sure how many more old Smart-UPS 600 are still in use and if it's worth including into NUT. Thanks, -- Kastus Shchuka
2013 Feb 05
2
How to subset a data frame to include only first events
...., the row corresponding to the earliest event. So if I had, say, 1000 rows of 100 IDs doing an average of ten events each, I'd run this trimming procedure and end up with a data frame containing 100 rows (one for each ID), where each row record that ID's first event. I can think of slow, clumsy, for-loop ways to trim the data frame, but I'm hopeful that there is some slick "R" way to do it that someone here can help me find. But so deep is my ignorance that I can't even come up with useful search terms to use on Rseek.org (I investigated "merge" but had no luc...
2013 Feb 23
2
Wikipedia plots and tables?
Hello, All: What facilities exist for plots and tables of data in the standard MediaWiki software beyond the obvious standards? The standard MediaWiki tables and graphics capabilities seem to me to be rather clumsy, and I wonder if I'm missing some available extensions? The standard MediaWiki tables are described in a Wikipedia article on "Help:Table". Wikimedia Foundation projects ask users to upload photos and graphics Wikimedia Commons -- preferably in scalable vector graphics (...
2005 Mar 29
4
slide show with R
...(zzz,sin(zzz),lwd=2) points(zzz,rep(0,length(zzz)),col="red",pch="|") Wrapping the following around each command works, sort of : a<-expression(<command>) x<-readline(a) eval(a) However, this doesn't work properly for the function definition, and it gets very clumsy to display two or three lines as a block and then evaluate. Any help would be much appreciated. <>=<>=<>=<>=<>=<>=<>=<>=<>=<>=<> George Heine, PhD Mathematical Analyst National IRM Center U.S. Bureau of Land Management voice (30...