similar to: Idea/package to "linearize a curve" along the diagonal?

Displaying 20 results from an estimated 8000 matches similar to: "Idea/package to "linearize a curve" along the diagonal?"

2012 Dec 27
3
Retrieve indexes of the "first occurrence of numbers" in an effective manner
Hi, That sounds simple but I cannot think of a really fast way of getting the following: c(1,1,2,2,3,3,4,4) would give c(1,3,5,7) i.e., a function that returns the indexes of the first occurrences of numbers. Note that numbers may have any order e.g., c(3,4,1,2,1,1,2,3,5), can be very large, and the vectors are also very large (which prohibits any loop). The best I could think of is: tmp =
2012 Mar 12
3
How to plot diagonal line at any coordinate range in R
Dear expert How can we plot diagonal across (from bottom-left-hand corner to top right-hand corner), at any given coordinate range For example > plot(c(-2,3), c(-1,5), type = "n", xlab="x", ylab="y", asp = 1) or > plot(c(0,1000), c(0,334), type = "n", xlab="x", ylab="y", asp = 1) I tried abline with the following but failed:
2011 Aug 14
1
FYI : XML 3.4.2 still breaks odfWeave 0.7.17
Dear list, perusing the GMane archive shows that the issue with XML 3.4.x still bugs odfWeave users. I just checked that the newer XML 3.4.2 version still give the same problem. Using it to weave a bit of documentation written with LibreOffice 3.3.3 (current in Debian testing) leads me to a 192 Kb, 590 pages document, whereas reinstalling XML 3.2.0 gives me a 4 pages, 24Kb file (not
2012 Mar 11
1
Which non-parametric regression would allow fitting this type of data? (example given).
Hi, I'm wondering which function would allow fitting this type of data: tmp=rnorm(2000) X.1 = 5+tmp Y.1 = 5+ (5*tmp+rnorm(2000)) tmp=rnorm(100) X.2 = 9+tmp Y.2 = 40+ (1.5*tmp+rnorm(100)) X.3 = 7+ 0.5*runif(500) Y.3 = 15+20*runif(500) X = c(X.1,X.2,X.3) Y = c(Y.1,Y.2,Y.3) plot(X,Y) The problem with loess is that distances for the "goodness of
2006 Sep 13
3
group bunch of lines in a data.frame, an additional requirement
Thanks for pointing me out "aggregate", that works fine! There is one complication though: I have mixed types (numerical and character), So the matrix is of the form: A 1.0 200 ID1 A 3.0 800 ID1 A 2.0 200 ID1 B 0.5 20 ID2 B 0.9 50 ID2 C 5.0 70 ID1 One letter always has the same ID but one ID can be shared by many letters (like ID1) I just want to keep track of the ID, and get
2012 Dec 27
4
Finding (swapped) repetitions of numbers pairs across two columns
Hi, I've had this problem for a while and tackled it is a quite dirty way so I'm wondering is a better solution exists: If we have two vectors: v1 = c(0,1,2,3,4) v2 = c(5,3,2,1,0) How to remove one instance of the "3,1" / "1,3" double? At the moment I'm using the following solution, which is quite horrible: v1 = c(0,1,2,3,4) v2 = c(5,3,2,1,0) ft <-
2012 Apr 19
3
How to "flatten" a multidimensional array into a dataframe?
Hi, I have a three dimensional array, e.g., my.array = array(0, dim=c(2,3,4), dimnames=list( d1=c("A1","A2"), d2=c("B1","B2","B3"), d3=c("C1","C2","C3","C4")) ) what I would like to get is then a dataframe: d1 d2 d3 value A1 B1 C1 0 A2 B1 C1 0 . . . A2 B3 C4 0 I'm sure there is one function to do
2014 Jan 30
2
CentOS 6.5: NFS server crashes with list_add corruption errors
Hi, I'm running CentOS 6.5 as NFS server (v3 and v4) and exporting Ext4 and XFS filesystem. After many months that all works fine today the server crash: Jan 30 09:46:13 qb-storage kernel: ------------[ cut here ]------------ Jan 30 09:46:13 qb-storage kernel: WARNING: at lib/list_debug.c:26 __list_add+0x6d/0xa0() (Not tainted) Jan 30 09:46:13 qb-storage kernel: Hardware name: PowerEdge
2008 Aug 12
1
which(df$name=="A") takes ~1 second! (df is very large), but can it be speeded up?
Dear All, I have a large data frame ( 2700000 lines and 14 columns), and I would like to extract the information in a particular way illustrated below: Given a data frame "df": > col1=sample(c(0,1),10, rep=T) > names = factor(c(rep("A",5),rep("B",5))) > df = data.frame(names,col1) > df names col1 1 A 1 2 A 0 3 A 1 4 A
2009 Aug 12
3
Random sampling while keeping distribution of nearest neighbor distances constant.
Dear All, I cannot find a solution to the following problem although I imagine that it is a classic, hence my email. I have a vector V of X values comprised between 1 and N. I would like to get random samples of X values also comprised between 1 and N, but the important point is: * I would like to keep the same distribution of distances between the X values * For example let's say N=10 and
2007 Apr 20
1
A particular shuffling on a vector
Hello, I was wondering if anyone can think of a straightforward way (without loops) to do the following shuffling: Let's imagine a vector: c(1,1,1,2,2,3,3,3) I would like to derive shuffled vectors __where the same digits are never separated__, although they can be at both ends (periodicity). So the following shuffled vectors are possible: c(2,2,1,1,1,3,3,3) c(2,1,1,1,3,3,3,2)
2007 Aug 21
2
(Most efficient) way to make random sequences of random sequences
Hi, I was wondering the what would be the (most efficient) way to generate a sequence of sequences, i mean: if I have 1,2 and 3. I'd like to generate a sequence of length N*3 (N ~ 1,000,000 or more) Where random permutations of the sequence 1,2,3 follow each other. i.e 1,2,3,1,3,2,3,2,1 /!\ The thing is that there should never be twice the same number of in the same sub-sequence,
2011 Mar 22
1
Best HMM package to generate random (protein) sequences?
Dear All, I would like to generate random protein sequences using a HMM model. Has anybody done that before, or would you have any idea which package is likely to be best for that? The important facts are that the HMM will be fitted on ~3 million sequential observations, with 20 different states (one for each amino acid). I guess that 2-5 hidden states should be enough, and an order of 3 would
2012 May 11
1
How to re-order clusters of hclust output?
Hello, The heatmap function conveniently has a "reorder.dendrogram" function so that clusters follow a certain logic. It seems that the hclust function doesn't have such feature. I can use the "reorder" function on the dendrogram obtained from hclust, but this does not modify the hclust object itself. I understand that the answer should be within the "heatmap"
2008 Oct 20
1
Mclust problem with mclust1Dplot: Error in to - from : non-numeric argument to binary operator
Dear list members, I am using Mclust in order to deconvolute a distribution that I believe is a sum of two gaussians. First I can make a model: > my.data.model = Mclust(my.data, modelNames=c("E"), warn=T, G=1:3) But then, when I try to plot the result, I get the following error: > mclust1Dplot(my.data.model, parameters = my.data.model$parameters, what = "density")
2003 Jun 09
7
Quickbooks revisited
I did testing on generating this report from a 130 MB Quickbooks file. Locally, 15 seconds. Samba Server, 1:35. Shared off of my win98 Workstation, 2+ mins. I do not understand the reason it is SOO slow. I know it is a fairly large file. The only explanation I can come up with is the way QuickBooks is accessing the files. Maybe jumping all around the file, requiring many operations on the
2002 May 10
3
Samba + Quickbooks
This is set up with Win2K boxes sharing a QB file on a SAMBA share. It may be quite different than with 95-98x-ME(Miserable Edition). There are two or more problems - one thing I identified is that it is possible for two computers to connect to the QB(QuickBooks) share using the same quick books logon - something that will cause data corruption. (Something that could have been easily
2010 Nov 16
1
problem with PDF/postcript, cannot change paper size: "‘mode(width)’ and ‘mode(height)’ differ between new and previous"
Hi, The pdf function would not let me change the paper size and gives me the following warning: pdf("figure.pdf", width="6", height="10") Warning message: ?mode(width)? and ?mode(height)? differ between new and previous ==> NOT changing ?width? & ?height? If I use the option paper = "a4r", it does not give me a warning but still prints on a
2003 May 28
5
Slow performance with QuickBooks
I have spent much of the day today researching performance tuning with samba. I have tried everything that I can find out about how to make performance faster. I checked disk performance with Bonnie, installed FTP and tested a transfer that way, achieving 6-7 MB / second. about 30 seconds for 150 MB file. I was finally able to achieve those speeds on a file transfer to the server through
2009 Apr 29
2
Directory and File Perms
I have a directory shared out via Samba for Quickbooks and seem to have some issues with permissions. The directory being shared is a subdirectory in an ext3 partition being mounted with the acl option. It has been setup as follows: chown root:DOMAIN\AD_Group /mnt/Intuit_Data/ chmod 2770 /mnt/Intuit_Data/ And the Samba share config is has: create mask = 0660 directory mask =