[R] Broken links (???) in R-FAQ

2015-06-24 Thread Chel Hee Lee
Bioconductor, * Bioconductor software packages <http://www.bioconductor.org/packages/bioc/> Under the section 7.39 How do I create a plot with two y-axes?, * http://rwiki.sciviews.org/doku.php?id=tips:graphics-base:2yaxes I appreciate your helps! Chel Hee Lee _

[R] Broken links (???) in rw-FAQ

2015-06-24 Thread Chel Hee Lee
http://windowsvistablog.com/blogs/windowsvista/archive/2007/01/23/security-features-vs-convenience.aspx I appreciate your help! Chel Hee Lee __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do re

Re: [R] Broken links (???) in R-FAQ

2015-06-25 Thread Chel Hee Lee
Thank you so much, Jim. Yes, I also see that the wiki (rwiki.sciviews.org) is not found. Chel Hee Lee On 15-06-25 04:54 AM, Jim Lemon wrote: Hi Chel Hee, The last link (for FAQ 7.39) is dead and the domain (rwiki.sciviews.org) is not there either. Jim On Thu, Jun 25, 2015 at 3:45 AM, Chel

Re: [R] Broken links (???) in rw-FAQ

2015-06-25 Thread Chel Hee Lee
Thank you so much, David! I also confirmed that the link moved is not found. Chel Hee Lee On 15-06-24 04:15 PM, David Winsemius wrote: On Jun 24, 2015, at 10:52 AM, Chel Hee Lee wrote: Could you also kindly check the following links in the rw-FAQ manual at <http://cran.r-project.org/

[R] Translation of R Manuals

2015-07-05 Thread Chel Hee Lee
this project. Please contact me if you voluntarily participate in or offer your help with this project of translating R manuals. Comments and corrections is of course most welcome. Chel Hee Lee __ R-help@r-project.org mailing list -- To UNSUBSCRIBE

Re: [R] Getting the most recent dates in a new column from dates in four columns using the dplyr package (mutate verb)

2014-12-03 Thread Chel Hee Lee
class [1] "rowwise_df" "tbl_df" "tbl""data.frame" $row.names [1] 1 2 3 4 5 6 7 > attributes(new2) $names [1] "id" "mrjdate" "cocdate" "inhdate" "haldate" "oiddate" $row.names [1] 1 2 3

Re: [R] combining unequal dataframes based on a common grouping factor

2014-12-03 Thread Chel Hee Lee
1.65 2 1 3.3 1.65 3 1 3.3 1.65 4 2 10.0 5.00 5 2 10.0 5.00 6 3 30.0 15.00 7 4 40.0 20.00 > Is this what you are looking for? I hope this helps. Chel Hee Lee On 12/03/2014 03:14 PM, Brock Huntsman wrote: I apologize if this is

Re: [R] coerce data to numeric

2014-12-03 Thread Chel Hee Lee
tX = rbind(tX, as.data.frame(cbind(GId =0,Grp = 0, S = fm, T = fm))) Of course you have to do little more works with this change in order to get final bar plots. I hope this helps. Chel Hee Lee On 12/03/2014 12:29 PM, Charles R Parker wrote: I am trying to create groups of barplot

Re: [R] R installation

2014-12-03 Thread Chel Hee Lee
This question seems to be the problem specific to Ubuntu. What if you post the message to ?? I hope you get answers from that mailing list. Chel Hee Lee On 12/02/2014 11:10 AM, VG wrote: Hi everyone, I was having trouble with R i installed some time ago on my local ubuntu machine. So i

Re: [R] FW: R Statistics

2014-12-03 Thread Chel Hee Lee
0,19.0,24.0),right=FALSE) > levels(achtergrond$spits) <- c("between","morning","between","evening","between") > table(achtergrond$spits) between morning evening 1636 579 142 > You can also use function 'findInterval()

Re: [R] Rename multiple files in a directory and write renamed files back to directory

2014-12-04 Thread Chel Hee Lee
example_02.dat" "new_example_03.dat" [4] "new_example_04.dat" "new_example_05.dat" "new_example_06.dat" > > file.rename(from=file_names, to=new_names) [1] TRUE TRUE TRUE TRUE TRUE TRUE > list.files(pattern="*.dat") [1] "new_ex

Re: [R] Rename multiple files in a directory and write renamed files back to directory

2014-12-04 Thread Chel Hee Lee
I see that a function 'format()' is used in your code. > format(c(1,5,32,100), width=3, flag="0") [1] " 1" " 5" " 32" "100" > formatC(c(1,5,32,100), width=3, flag="0") [1] "001" "005" "032&quo

Re: [R] Put 2 ablines in an "empty plot"

2014-12-05 Thread Chel Hee Lee
.5) > abline(a=0, b=-0.5) Is this what you are looking for? I hope this helps. Chel Hee Lee On 12/05/2014 02:30 AM, Adrien Bonvin wrote: Bonjour Hi everybody, Firs of all, sorry for my terrible English, I would like to know if it’s possible to create an “empty plot” in which i could ad

Re: [R] Rename multiple files in a directory and write renamed files back to directory

2014-12-05 Thread Chel Hee Lee
x27; as shown in the below: > sprintf("%05d", seq(from=200, to=1200, by=500)) [1] "00200" "00700" "01200" I like to read the documentation by typing > help(formatC) > help(sprintf) You may find answers what you wish to get. Documentation has been my

Re: [R] need help with withRestarts ?

2014-12-06 Thread Chel Hee Lee
if x < 0.3. x= 0.4246928 Anyway, move to next! [1] 0.2535644 Error is printed if x < 0.3. x= 0.5071288 Anyway, move to next! [1] "error" Error is printed if x < 0.3. x= 0.1941202 Anyway, move to next! (continue) I hope this helps, and thank you so much, Martin Morgan, for your go

Re: [R] Scatter plot for repeated measures

2014-12-06 Thread Chel Hee Lee
It seems that you would like to make a spaghetti plot (in a longitudinal data analysis). You can use the function 'interaction.plot()'. > with(my.df, interaction.plot(TIME, ID, X)) I hope this helps. Chel Hee Lee On 12/06/2014 02:24 AM, arun wrote: Not sure whether it is

Re: [R] Condensing data.frame

2014-12-07 Thread Chel Hee Lee
6.970592 4 6.970592 CID_10.31 CID_10 Acidobacteria1.988448 5 1.988448 CID_10.32 CID_10 Actinobacteria1.644548 6 1.644548 CID_10.33 CID_10 Others 1.582823 7 5.546493 > I hope this helps. Chel Hee Lee On 12/07/2014 08:21 AM, Morway, Eric wrote: Usin

Re: [R] combinations between two vectors

2014-12-18 Thread Chel Hee Lee
"5001,20001" "10001,20001" "15001,20001" [11] "1,25001" "5001,25001" "10001,25001" "15001,25001" "20001,25001" > x.idx2 <- upper.tri(x, diag=TRUE) > x[x.idx2] [1] "1,1" "1,

Re: [R] Make 2nd col of 2-col df into header row of same df then adjust col1 data display

2014-12-18 Thread Chel Hee Lee
NANA NA RK.Records_CL V.Other 1005317NA NA 1007183NA NA 1008833NA NA 1012281NA NA 1015285 1 NA 1015315 NA NA 1015322NA NA > Chel H

Re: [R] Add encoded special characters (greek characters) as text to plot

2014-12-18 Thread Chel Hee Lee
t in R. Is this what you are looking for? I hope this helps. I would also appreciate it if you would provide reproducible examples next time. Chel Hee Lee On 12/18/2014 11:48 AM, Jeff Newmiller wrote: Read the posting guide. Th

Re: [R] Make 2nd col of 2-col df into header row of same df then adjust col1 data display

2014-12-18 Thread Chel Hee Lee
iol.Type' where 'factor()' is used. I hope this helps. Chel Hee Lee On 12/18/2014 08:57 PM, Crombie, Burnette N wrote: Chel, your solution is fantastic on the dataset I submitted in my question but it is not working when I import my real dataset into R. Do I need to vectorize

Re: [R] pairing columns based on a value

2014-12-18 Thread Chel Hee Lee
dx], collapse=" ") + unlist(strsplit(comb, " ")) + }) > names(tmp) <- d0$ID > tmp $MCZ4325 [1] "C23.2" "T43.2" $GDR2343 [1] "M20.64" "Y32.1" "M20.64" "T44.2" $BZD2643 [1] "B83.2" "T43.2" "B83.2&q

Re: [R] How to make Pivot table with two variables in R?

2014-12-19 Thread Chel Hee Lee
0 Out x8 0 0 0 0 0 B 0 2015-04-07 x1 0 x2 0 x3 0 x4 0 x5 0 x6 A x7 0 x8 0 > Is this what you are looking for? I hope this helps. Chel Hee Lee On 12/19/2014 10:45 PM, Kristi Glover wrote: Hi R User, Would you suggest me

Re: [R] How to make Pivot table with two variables in R?

2014-12-20 Thread Chel Hee Lee
You are welcome, I am glad that I was able to help. Chel Hee Lee, PhD Biostatistician and Manager Clinical Research Support Unit College of Medicine University of Saskatchewan On 12/20/2014 03:53 AM, Kristi Glover wrote: Thank you Prof. Lee for your code. I am sorry that I noticed that I sent

Re: [R] 6 regions around a point

2014-12-21 Thread Chel Hee Lee
1, labels=paste("S", 1:6, sep="_")) > points(x=2, y=4, cex=3) > Please see the output. Is this what you are looking for? I hope this helps. Chel Hee Lee On 12/21/2014 01:25 PM, eliza botto wrote: Dear UseRs, A point was plotted by the following command plot(2,4,y

Re: [R] number of individuals where X=0 during all periods (longitudinal data)

2014-12-22 Thread Chel Hee Lee
; length(x[unlist(x)]) [1] 1 > Is this what you are looking for? I hope this helps. Chel Hee Lee On 12/22/2014 7:45 AM, najuzz wrote: #Hi guys, #I would like to count the number of individuals that receive X=0 troughout their observational period. #example dataset: ID<-c(1,1,1

[R] Change of locale

2015-01-11 Thread Chel Hee Lee
#x27; and 'LC_MESSAGES' in order to change messages in a given locale? However, it is questionable. Please see the following example (messages in Japanese): > Sys.setenv(LANGUAGE="ja_JP.utf8") > a エラー: オブジェクト 'a' がありません

Re: [R] Change of locale

2015-01-12 Thread Chel Hee Lee
Thank you so much. Your explanation is very clear and helpful to understand. Thank you, again. Chel Hee Lee On 1/12/2015 5:56 AM, Prof Brian Ripley wrote: You don't want to change the locale, rather the message language. That is not a locale, and e.g. LANGUAGE=en is the correct

Re: [R] Extracting elements out of list in list in list

2015-01-16 Thread Chel Hee Lee
This approach may not be fancy as what you are looking for. > xl <- unlist(x) > xl[grep("A", names(xl))] f1.x1.A f1.x2.A f2.x3.A f2.x4.A 11 12 13 14 > I hope this helps. Chel Hee Lee On 01/16/2015 04:40 AM, Rainer M Krug wrote: Hi Consider the fo

Re: [R] Evaluating a formula

2015-01-16 Thread Chel Hee Lee
222.247934 226.107438 230.00 > Is this what you are looking for? I hope this helps. Chel Hee Lee On 01/16/2015 02:16 AM, philippe massicotte wrote: Hi all. How we evaluate a formula in R? Ex.: params <- list(a = 2, b = 3) x <- seq(1,10, length.out = 100) func1 <- as.formu

Re: [R] Evaluated expression in lattice key

2015-01-19 Thread Chel Hee Lee
ine(lm(y~x), col="red") panel.text(1, -1, bquote(R^2 == .(summary(lm(y~x))$r.squared))) }, grid = TRUE ) Is this what you are looking for? I hope this helps. Chel Hee Lee On 01/17/2015 07:08 AM, Naresh Gurbuxani wrote: In a conditional xyplot, I would like to add some numeri

Re: [R] add a list name into the list content in a new output

2015-01-19 Thread Chel Hee Lee
3.15 > Is this what you are looking for? I hope this helps. Chel Hee Lee On 01/19/2015 02:14 PM, Shuhua Zhan wrote: Dear All, I'd like to add a list name into the list contents to make a new output. The list is a list of data.frame derived from summary command in Rqtl. I want to add th

Re: [R] Extracting elements out of list in list in list

2015-01-19 Thread Chel Hee Lee
32 33 34 > extr.1(x=x, name="A") f1.x1.A f1.x2.A f2.x3.A f2.x4.A 11 12 13 14 > extr.1(x=x, name="a") named numeric(0) > extr.1(x=x, name="Aha") f1.x1.Aha f1.x2.Aha f2.x3.Aha f2.x4.Aha 2122232

Re: [R] add a list name into the list content in a new output

2015-01-20 Thread Chel Hee Lee
6.75 6 heart_wt c12.loc49 12 51.2 28.2062.2 3.65 > Is this what you are looking for? I hope this helps. Chel Hee Lee On 1/20/2015 9:23 AM, Shuhua Zhan wrote: Hi Chel, Thank you very much for your help! I'm sorry I did not post my wanted output correctly. I only want the colnames o

Re: [R] subscript out of bounds

2015-01-20 Thread Chel Hee Lee
is helps. I would appreciate if you DO READ the posting guide. Chel Hee Lee On 1/20/2015 9:30 AM, Ragia Ibrahim wrote: Hello, kindly , how to catch this Error Error in A[[i]] : subscript out of bounds and check that the list is empty is.null( A[[i]] ) do no twork thanks in advance R.I

Re: [R] Counting Words

2015-01-22 Thread Chel Hee Lee
> x <- c("hola mundo mundo"); > table(unlist(strsplit(x, " "))) hola mundo 1 2 > Is this what you are looking for? I hope this helps. Chel Hee Lee On 1/22/2015 8:25 AM, bgnumis bgnum wrote: Hi all, I want to cout the different words in a text. You

Re: [R] sum of grouped elements of vector

2015-01-23 Thread Chel Hee Lee
7+8) > new1 [1] 3 3 15 15 > > grp.id <- c(1,1, 2, 3,3,3, 4,4) > tapply(X=a, INDEX=grp.id, FUN=sum) 1 2 3 4 3 3 15 15 > aggregate(x=a, by=list(grp.id), FUN=sum) Group.1 x 1 1 3 2 2 3 3 3 15 4 4 15 > xtabs(formula=a~grp.id) grp.id 1 2 3 4

Re: [R] get latest dates for different people in a dataset

2015-01-23 Thread Chel Hee Lee
> do.call(rbind, lapply(split(data, data$Name), function(x) x[order(x$CheckInDate),][nrow(x),])) Name CheckInDate Temp John John 2014-04-01 99.0 Mary Mary 2014-03-01 98.1 Sam Sam 2014-04-01 97.5 > Is this what you are looking for? I hope this helps. Chel Hee Lee On 01/23/2015

Re: [R] adding an additional column for preserving uniqueness

2015-01-28 Thread Chel Hee Lee
1 > I hope this helps. Chel Hee Lee On 01/28/2015 07:38 PM, William Dunlap wrote: with(dat1, ave(integer(length(Date)), Date, FUN=seq_along)) [1] 1 1 2 1 1 2 1 2 1 2 1 Bill Dunlap TIBCO Software wdunlap tibco.com On Wed, Jan 28, 2015 at 4:54 PM, Morway, Eric wrote: The two datase

Re: [R] Paste every two columns together

2015-01-28 Thread Chel Hee Lee
(c,lapply(tapply(ID1, gl(7,2), c), paste, collapse="")) 1234567 "AA" "TG" "CT" "GC" "GT" "CG" "TA" > Is this what you are looking for? I hope this helps. Chel Hee Lee On 01/28/2015 05:5

Re: [R] Paste every two columns together

2015-01-28 Thread Chel Hee Lee
Hi Bert! yes, you are VERY correct!!! Why am I making this simple thing so complicated??? ;) Thank you so much for your nice lesson! Chel Hee Lee On 01/28/2015 09:59 PM, Bert Gunter wrote: eek! Chel Hee,anything that complicated should engender fear and trembling. Much simpler and more

Re: [R] Passing a Data Frame Name as a Variable in a Function

2015-01-29 Thread Chel Hee Lee
2 2 b 3 3 c 4 4 d 5 5 e > eval(parse(text=DFName))[,1] [1] 1 2 3 4 5 > length(eval(parse(text=DFName))[,1]) [1] 5 > Is this what you are looking for? I hope this helps. Chel Hee Lee On 1/29/2015 12:34 AM, Jeff Newmiller wrote: This approach is fraught with dangers. I reco

Re: [R] problem with conditional column sums

2015-01-29 Thread Chel Hee Lee
Or, you can also do the same job using 'colSums()' as shown in the below: > colSums(status=="I") 2010 2011 2012 344 > I hope this helps. Chel Hee Lee On 1/28/2015 7:31 PM, JSHuang wrote: Hi, I think you need quotation around I like the following: st

Re: [R] lost in plotmath expressions

2015-01-30 Thread Chel Hee Lee
Why don't try this? > nams<-c("P2O5 ['%']", "D50 [mu*m]") > pdf("test.pdf") > for(i in 1:2) + plot(1,1,xlab=parse(text=(bquote(.(nams[i]) > dev.off() Is this what you are looking for? I hope this helps. On 1/30/2015 7:54 AM, PIKAL Petr wrote: Thanks So the key is to put expression(s) dir

Re: [R] Repeat elements of character vector

2015-01-30 Thread Chel Hee Lee
> paste(rep(v1, each=3), 1:3, sep="_") [1] "a_1" "a_2" "a_3" "b_1" "b_2" "b_3" "c_1" "c_2" "c_3" > Is this what you are looking for? I hope this helps. Chel Hee Lee On 1/30/2015 7:34 AM,

Re: [R] R problem

2015-01-31 Thread Chel Hee Lee
rmat(ex, format="%A") [1] "Thursday" "Friday" > weekdays(ex) [1] "Thursday" "Friday" > Is this what you are looking for? I hope this helps. Chel Hee Lee On 1/31/2015 3:06 AM, Camilla Timo wrote: Hi there, I have a problem, i have a datase

Re: [R] pch size in a legend

2015-01-31 Thread Chel Hee Lee
"Rgui" "little" "win.binary" path.sep r_arch ";""x64" > Chel Hee Lee On 1/30/2015 9:55 PM, Jim Lemon wrote: Hi Ahmed, Hmmm, this seems to work for me (R-3.1.2, Linux) legend(0,2100, legend=c("2009","

Re: [R] quetion about matrix compute

2015-01-31 Thread Chel Hee Lee
00010 I hope this helps. Chel Hee Lee On 1/30/2015 11:52 AM, JS Huang wrote: Hi, Here is my implementation. Hope this helps. b [1] 1 2 3 4 5 c [1] 1 2 1 3 5 4 sapply(b,function(x)ifelse(x==c,1,0)) [,1] [,2] [,3] [,4] [,5] [1,]10000 [2,]

Re: [R] Rotate array by 90°

2015-02-05 Thread Chel Hee Lee
> lapply(1:2, function(x) t(A[rev(1:3),,x])) [[1]] [,1] [,2] [,3] [1,] "g" "d" "a" [2,] "h" "e" "b" [3,] "i" "f" "c" [[2]] [,1] [,2] [,3] [1,] "p" "m" "j&qu

Re: [R] How to solve this complex equation

2015-02-11 Thread Chel Hee Lee
lutions). I hope this helps. Chel Hee Lee On 2/10/2015 2:29 AM, Rolf Turner wrote: On 10/02/15 14:04, Ssuhanchen wrote: Hi! I want to use R to calculate the variable x which is in a complex equation in below: 2 Σ[exp(-x/2)*(x^k)/(2^k*k!)]=0.05 k=0 how to solve this equation to get

Re: [R] How to solve this complex equation

2015-02-11 Thread Chel Hee Lee
A~ha~!! Thank you, Prof. Peter Dalgaard, so much for your wonderful lesson!!! Learning new things everyday from this R-help mailing list! Chel Hee Lee On 2/11/2015 10:37 AM, peter dalgaard wrote: On 11 Feb 2015, at 17:11 , Chel Hee Lee wrote: The functional form given in the post

Re: [R] Equivalent to matlab ".*" operator in R

2014-11-19 Thread Chel Hee Lee
Another (simpler) way that I can think is that > y * matrix(rep(z,3), ncol=ncol(y), byrow=TRUE) [,1] [,2] [1,]00 [2,]6 -3 [3,] 12 -6 I hope this helps. Chel Hee Lee On 14-11-19 08:43 AM, Ruima E. wrote: > Thank you Chel Hee. > > Isn't there a sim

Re: [R] Equivalent to matlab ".*" operator in R

2014-11-19 Thread Chel Hee Lee
> y = matrix(cbind(c(0, 0.5, 1),c(0, 0.5, 1)),ncol=2) > z = matrix(c(12, -6),ncol=2) > t(apply(y, 1, function(x) x*z)) [,1] [,2] [1,]00 [2,]6 -3 [3,] 12 -6 I hope this helps. Chel Hee Lee On 14-11-19 08:22 AM, Ruima E. wrote: > Hi, > > I have this: >

Re: [R] How do I extract single entries from a factor?

2014-11-22 Thread Chel Hee Lee
> xx <- as.factor(c("AL", "AK", "CA", "FL")) > xx [1] AL AK CA FL Levels: AK AL CA FL > as.character(xx) [1] "AL" "AK" "CA" "FL" I hope this helps. Chel Hee Lee On 14-11-22 01:12 AM, Aditya Singh wrote:

[R] strange answer when using 'aggregate()' with a formula

2016-01-20 Thread Chel Hee Lee
x))) grp y 1 2 0 2 3 0 What a surprise! Is this a bug? I would appreciate if you share the results after testing the codes. Thank you so much for your helps in advance! Chel Hee Lee __ R-help@r-project.org mailing list -- To UNSUBSCRI

Re: [R] strange answer when using 'aggregate()' with a formula

2016-01-21 Thread Chel Hee Lee
I appreciate your kind guidance! I did not read the manual carefully (it's my fault). Thank you so much, Prof. John Fox! Chel Hee Lee On 01/21/2016 12:52 AM, Fox, John wrote: Dear Chel Hee Lee, With the formula method, the default na.action is na.omit; thus, aggregate(y~grp, dat

[R] Drawing a simplex

2012-08-25 Thread Chel Hee Lee
I will very appreciate if anyone can provide some materials to draw a simplex plot of a Dirichlet distribution in R as shown in the page at http://en.wikipedia.org/wiki/File:Dirichlet_distributions.png . __ R-help@r-project.org mailing list https://stat.

Re: [R] Drawing a simplex

2012-08-27 Thread Chel Hee Lee
Thank you, David. I found some good stuffs for which I have been looking. On Sun, 2012-08-26 at 09:01 -0700, David Winsemius wrote: > On Aug 25, 2012, at 9:00 PM, Chel Hee Lee wrote: > > > I will very appreciate if anyone can provide some materials to draw a > > simplex p

[R] Computing 'exp(1e3)*0' correctly....

2012-09-01 Thread CHEL HEE LEE
I have some trouble to deal the value of 'NaN'. For example, > exp(1e3) [1] Inf > exp(1e3)*0 [1] NaN The correct answer should be 0 rather than NaN. I will very appreciate if anyone can share some technique to get a correct answer. __ R-help@r-proje

Re: [R] Computing 'exp(1e3)*0' correctly....

2012-09-02 Thread CHEL HEE LEE
#. Live Go... > >Live: OO#.. Dead: OO#.. Playing > > Research Engineer (Solar/BatteriesO.O#. #.O#. with > > /Software/Embedded Controllers) .OO#. .OO#. rocks...1k > > ------------

[R] General question on the message with "non zero exit status"

2012-04-12 Thread Chel Hee Lee
I have a general question how to understand the message with "non-zero exit status" when new package is installed. Based on my experience, this message implies a package dependence. Am I correct to understand this message? Are there anyone who can provide some reference or explain details about the

Re: [R] General question on the message with non zero exit status

2012-04-18 Thread Chel Hee Lee
Oh... I see!!! I very appreciate for your clear explanation! Thank you, Uwe Ligges. -- View this message in context: http://r.789695.n4.nabble.com/General-question-on-the-message-with-non-zero-exit-status-tp4551438p4568839.html Sent from the R help mailing list archive at Nabble.com. _