search for: njhuang86

Displaying 15 results from an estimated 15 matches for "njhuang86".

2009 Aug 29
3
Sequence generation
Hey guys, I was wondering how to create this sequence: 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3... with the '1, 2, 3' repeated over 10 times. Also, is there a simple method to generate 1, 1, 1, 2, 2, 2, 3, 3, 3? Anyways, any help with be greatly appreciated! -- View this message in context: http://www.nabble.com/Sequence-generation-tp25205593p25205593.html Sent from the R help mailing list
2009 Jun 11
2
need help with strsplit function
Hi, if I have this string: "a.b.c.d" and I use this function: unlist(strsplit("a.b.c.d", "\\.")), I get this as my output: "a", "b", "c", and "d". Is there a way to just split on the first period so I obtain only two pieces like: "a" and "b.c.d"? Anyways, thanks in advance! -- View this message in context:
2009 Jun 12
2
Creating this vector, any suggetions?
Suppose I have the first vector: c(1, 6, 8, 9) I will like to create a second vector of size 10 composed of 0 and 1's. The second vector will be composed of four 1's and six 0's. The position of the 1's will be specificed by the first vector. So essentially, I want a second vector in the form: c(1, 0, 0, 0, 0, 1, 0, 1, 1, 0) Any help is greatly appreciated! -- View this message
2009 Jun 23
2
Vector of string
Hi all. Suppose I have a vector of strings ie: ["12384", "TYU123123", "AVC3939", "hhr1919", "TYU0029"] Is there an efficient method that would allow me to return a vector of the position of strings that start with "TYU"? So essentially, I would like to get back in return [2, 5]. Anyways, any help with be greatly appreciated! -- View
2009 Jul 07
1
find duplicates... need help!
Hi all, Suppose I have x = c('a', 't', 'c', 'y', 'g') and also y = c('a', 'a', 'g', 's') If I do something like x%in%y, I obtain a vector like this: [TRUE, FALSE, FALSE, FALSE, TRUE] which I can easily turn into this: [1, 0, 0, 0, 1]. I was wondering is there anyway for me to get a vector back in return in the form of: [2, 0,
2009 Aug 30
1
Re moving the numbers of the X/Y axis
Hi all, Suppose I have some data that I plot using the histogram command - ie. hist(x) Is there an option that will allow me to remove the numbers that appear along the X and Y axis as I'm just interested in the overall distribution of the data and not the actual values? Anyways, any help is greatly appreciated! -- View this message in context:
2009 Jun 18
2
Any method to speed up this problem?
Hi all, Suppose I have a vector like this: [1] "STAT1" "STAT1" "STAT1" "STAT1" "GAPDH" "GAPDH" "GAPDH" "ACTB" "ACTB" [10] "ACTB" "DDR1" "RFC2" "HSPA6" "PAX8" "GUCA1A" "UBE1L" "THRA" "PTPN21" [19]
2009 Jun 16
2
Question regarding dataframes, matrix, frame, etc...
Hi all, As of now, I have a 15x8 matrix (name is "asdf"). The first seven columns contain numbers while the last column contains a string. The class of each column is "character". When I use the plot function to display a scatter plot between any of the two columns, ie. plot(asdf[, 1], asdf[, 2]) everything works fine. However, if I want to use the command "pairs" to
2009 Sep 25
1
Function question
Hi. I was wondering how I can write a function that generates the outcome values for a user specified equation. For example, function(x^2, 4) will return back 16 and function(x^3 - 10, 2) will give back -2... I've been playing around with various lines of code but somehow, I just cannot get R to recognize the equation that I pass to it is just a random variable and doesn't need to be
2009 Jun 12
0
R: Creating this vector, any suggetions?
try this > a<-c(1, 6, 8, 9) > 1*(1:10 %in% a) [1] 1 0 0 0 0 1 0 1 1 0 Stefano -----Messaggio originale----- Da: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]Per conto di njhuang86 Inviato: Friday, June 12, 2009 4:45 PM A: r-help at r-project.org Oggetto: [R] Creating this vector, any suggetions? Suppose I have the first vector: c(1, 6, 8, 9) I will like to create a second vector of size 10 composed of 0 and 1's. The second vector will be composed of four 1's and...
2009 Jul 30
1
Loess question
Hi, suppose I have a vector of values in 'A'. Suppose I use: scatter.smooth(A) to add in a smooth curve. Is there a way to obtain the maximum value of the smoothed curve? Anyways, any help will be greatly appreciated! -- View this message in context: http://www.nabble.com/Loess-question-tp24738574p24738574.html Sent from the R help mailing list archive at Nabble.com.
2009 Jul 30
1
Plotting two overlapping curves
Hi. Sorry if this question might have already been asked... I'm trying to plot two curves on the same X-Y coordinate. The par(mfrow) command allows me to plot the two curves on the same window however on different coordinate systems. Is there a way to force the two curves into the same coordinate system? Anyways, thanks in advance! -- View this message in context:
2009 Sep 08
1
Plotting two qqnorm plots:
Hi all, Does anyone know how to plot overlapping qqnorm plots on the same window? Suppose I have data in the vector x and y: qqnorm(x) lines(qqnorm(y)) I though these two lines will do the job... However, lines doesn't seem to work. Anyways, thanks in advance! -- View this message in context: http://www.nabble.com/Plotting-two-qqnorm-plots%3A-tp25352893p25352893.html Sent from the R help
2009 Sep 01
1
Logistic Politomic Regression in R
...plot if slope differs from 0       (Gabor Grothendieck)   27. Re: RConsole processing crashes Rgui.exe (Duncan Murdoch)   28. Re: standard error associated with correlation coefficient       (Sunil Suchindran)   29. Re: Best R text editors? (Wensui Liu)   30. Re moving the numbers of the X/Y axis (njhuang86)   31. Re: Re moving the numbers of the X/Y axis (Jorge Ivan Velez)   32. Complexity parameter in rpart (Andrew Aldersley)   33. Re: Bootstrap inference for the sample median?       (Emmanuel Charpentier)   34. Re: about isoMDS method (Grzes)   35. Computer Modern Fonts in R graphic (Friedericksen...
2010 Oct 01
2
How to generate scatterplot - with a twist
Hi. I would like to make a scatterplot where all of the points are evenly spaced from each other - however, they are all the same size and occupy the entire graph. For example: x = rep(c(1:10), 10) y = rep(c(10:1), each = 10) plot(x, y, pch = 0) Gives me a scatter plot with 100 square points each evenly spaced between each other. But these points don't fill up the entire space and if I try