search for: jonsleepi

Displaying 20 results from an estimated 23 matches for "jonsleepi".

Did you mean: jonsleepy
2009 Dec 20
2
read.table: mysterious line omissions
Hello again, I am simply trying to import a rectangular table of strings. The table's dimensions are 1990 x 2, yet my read.table() command can only find 362 of the rows (and they're not the first 362). I would've taken the time to figure out how to use scan, readLines, or some other tool that can read in character strings, and then parse and input to a table, but that seems like
2010 Feb 08
7
data frames; matching/merging
Hi all, I'm feeling a little guilty to ask this question, since I've written a solution using a rather clunky for loop that gets the job done. But I'm convinced there must be a faster (and probably more elegant) way to accomplish what I'm looking to do (perhaps using the "merge" function?). I figured somebody out there might've already figured this out: I have
2010 Feb 08
1
Follow-up Question: data frames; matching/merging
Wow.. thanks for the deluge of responses! Aggregate seems like the way to go here. But, suppose that instead of integers in column V2, I actually have dates (and instead of keeping the minimum integer, I want to keep the earliest date): > df =
2010 Jul 22
2
using "sample()" for a vector of length 1
Hi All, I'm trying to use the "sample" function within a loop where the vector being sampled from (the first argument in the function) will vary in length and composition. When the vector is down in size to containing only one element, I run into the "undesired behaviour" acknowledged in the ?sample help file. I don't want sample(10,1) to return a number from
2011 May 05
3
factors
Hi, I'm requesting you don't berate me for asking this question: I clearly don't have the gist of factors. I have two dataframes, A and B. Each of them has a column containing strings (they're labels). I want to, one-by-one in a loop, compare the particular string in an entry from dataframe A to an entry in B, to see if they're the same. The problem, when posing the
2009 Dec 19
3
integer(0) and NA do not equal FALSE
Hi, A noobie question: I'm simply trying to run a conditional statement that evaluates if a substring is found within a larger string. I find that if it IS found, my function returns TRUE (great!), but if not, the condition does not evaluate to FALSE. ex): if( grep("hi", "hop", fixed = TRUE) ) print('yes, your substring is in your string') else
2010 May 20
4
max number from a list of numbers
Hi all, I'm hoping this question has a simple answer, but I can't find it through searching or trying commands. I have a list of numeric vectors called 'husk'. I'd just like to treat the set of all numbers from all vectors in the list as if it were one large vector, because I'd like to extract information, such as what is the max entry from all the numbers. > husk
2009 Dec 20
1
how to count the total number of (INCLUDING overlapping) occurrences of a substring within a string?
Last one for you guys: The command: length(gregexpr('cus','hocus pocus')[[1]]) [1] 2 returns the number of times the substring 'cus' appears in 'hocus pocus' (which is two) It's returning the number of **disjoint** matches. So: length(gregexpr('aa','aaa')[[1]]) [1] 1 returns 1. **What I want to do:** I'm looking for a way to count
2010 Feb 11
2
difftime result for days not an integer?
Anybody have an idea why I would get a non-integer value for the number of days here? > difftime('2004-08-05','2001-01-03',units='days') Time difference of 1309.958 days Would you just round off? Best, Jon
2010 Mar 09
1
ks.test; memory problems
Hi R-help, I am interested in comparing two vectors of data observations to see if they come from the same distrubution (and have settled on the Kolmogorov-Smirnov test to do this).. I'd prefer to use all my data points, but computationally speaking, this is proving to be troublesome due to the size of my vectors (the larger of the two is about 90 million observations). I suppose I could
2012 Jul 30
1
problem plotting in a grid
Hi all, I'm trying to generate a grid of four plots. The first 2 appear just fine, but the final 2 will not appear in the grid, instead overwriting the first two. Any ideas on how to get them all in the same window would be greatly appreciated. Cheers, Jonathan library(fields) par(mfrow=c(2,2)) #2x2 plot windows plot(c(2,4),c(2,2)) # works fine plot(c(2,4),c(2,2)) # works fine
2010 Feb 16
1
difftimes; histogram; memory problems
Hi All: Let's say I have two dataframes (Condition1 and Condition2); each being on the order of 12,000 and 16,000 rows; 1 column. The entries contain dates. I'd like to calculate, for each possible pair of dates (that is: Condition1[1:10,000] and Condition2[1:10,000], the number of days difference between the dates in the pair. The result should be a matrix 12,000 by 16,000. Really,
2011 Jun 08
2
accessing files from subfolders
Hi, There must be an easy way to do this, but I'm not finding it.. I'd just like to know the syntax to move up and down folder levels, without necessarily entering a full file path. Also, how to construct file and folder paths using variables. For example 1, if I wanted to print to the screen the contents of a file called myFile.txt using the bash shell, I'd use the following:
2010 Apr 23
3
reordering of matrix rows to maximize the sum of the diagonal
Hi r-help community, This question isn't so much a syntax/coding one, but here goes: Let's say I have matrix of arbitrary dimensions and I'd like to reorder the rows in such a way that I could maximize the sum of the entries along the diagonal. For example, for this 3x3 matrix: [,1] [,2] [,3] [1,] 3 4 13 [2,] 9 1 2 [3,] 2 11 1 rearranging the rows
2010 Jan 26
2
unidentifiable problem..
Hi All, My R installation is acting strangely and I'm hoping somebody might have an idea what's going on: I can't seem to load the "RMySQL" function. It seems to have installed without a problem, but when I enter: library(RMySQL) R tells me: Error in utils::readRegistry("SOFTWARE\\MySQL AB", hive = "HLM", maxdepth = 2) : Registry key
2010 Feb 12
5
logical operations with lists
Sorry, maybe it's easy but I haven't found anything useful: how can I obtain a list C that contains all the members in the list B that are not in list A? This are lists of nanes, not numbers! Thank you Gabriele Zoppoli, MD Ph.D. Fellow, Experimental and Clinical Oncology and Hematology, University of Genova, Genova, Italy Guest Researcher, LMP, NCI, NIH, Bethesda MD Work: 301-451-8575
2010 May 14
2
operations between two aggregated data frames?
Hi All, I've come up with a solution for this problem that relies on a for loop, and I was wondering if anybody had any insight into a more elegant method: I have two data frames, each has a column for categorical data and a column for date. What I'd like to do, ideally, is calculate the number of days between all pairs of dates in data frame 1 and data frame 2 (*but only for members
2010 Jan 03
2
bio3d package not installing
Is it just me, or is the bio3d package no longer available? Is there another way to do a reasonable nucleic acid sequence alignment in R? Thanks, Jonathan [[alternative HTML version deleted]]
2010 Mar 05
1
plotting ecdf; R is stalled
Dear R-help: I am trying to plot the cumulative distribution function of a vector of around 33 million numeric observations. > plot.ecdf(myDataVector) R has been non-responsive for about an hour, and my guess is that it's probably not going to finish. Does anybody have a sense whether this a reasonable experience (and if so, is there a way to get the desired effect, or am I SOL)?
2010 May 20
1
intersect() without discarding duplicates?
Hi all, The ?intersect entry kindly points out that it discards duplicate entries. I'm looking, however, to get the intersection while KEEPING duplicate entries, and there are no instructions on how to accomplish this using intersect(). Does anybody have any idea how this might be done, or am I going to need to program something from scratch (something like ordering the vectors and then