Re: [R] how to split row elements [1] and [2] of a string variable A via srtsplit and sapply

2015-09-11 Thread Aldi
Thank you Jim and Bert for your suggestions. Following is the final version used: ### Original tiny test data from Aldi Kraja, 9.11.2015. ### Purpose: split A into element 1 and 2, not interested on 3d element of A. Assign element one and two to vectors C and D of the same data.frame. ### Do

[R] how to split row elements [1] and [2] of a string variable A via srtsplit and sapply

2015-09-10 Thread aldi
d correctly, but D is missing because the variables AA does not have it. Any suggestions? Thank you in advance, Aldi A B 1:29439275 0.46773514 5:85928892 0.81283052 10:128341232 0.09332543 1:106024283:ID 0.36307805 3:62707519 0.42657952 2:80464120 0.89125094 x1<-read.table(file=&

Re: [R] merge: right set overwrite left set

2015-07-13 Thread aldi
plyr, they produced warnings for function name conflicts with base and stats: Attaching package: �dplyr� The following objects are masked from �package:stats�: filter, lag The following objects are masked from �package:base�: intersect, setdiff, setequal, union Great solutions! Thank

Re: [R] merge: right set overwrite left set

2015-07-13 Thread aldi
l work among the two sets of data, without creating .x and .y when the variables are in common in two sets. With best wishes, Aldi > ## find indv columns in x.HHu.map that don't exist in y.HHo.map > x.HHu.map <- x.HHu.map[ + c("HHid", + "position", +

[R] merge: right set overwrite left set

2015-07-12 Thread aldi
sition and indv1 and indv2 are from y.HHo Any suggestions are appreciated. Thank you in advance, Aldi x.HHu<- data.frame( HHid = c( 'HH1', 'HH2', 'HH3', 'HH4', 'HH5', 'HH10') , indv1 = c( 2, 0,

Re: [R] Setting up an R server.

2014-01-22 Thread aldi
what you are planning to do :-) . Best, Aldi On 1/20/2014 10:53 AM, R. Michael Weylandt wrote: Perhaps http://www.rstudio.com/ide/docs/server/getting_started Michael On Mon, Jan 20, 2014 at 9:12 AM, John Sorkin wrote: Can someone provide suggestions about how to best set up an R server? I

[R] A function that can modify an object? Or at least shows principles how to modify an object?

2013-05-16 Thread Aldi
second position for (b); and NO change for (a). (see After) Thank you in advance, Aldi Before: === > UUU[2] $U2 $U1$scores (e) [1] -1.946707 -57.970488 $U2$cov (d) bbb1378 bbb1379 bbb1378 1.10362564 -0.01222695 bbb1379 -0.01222695 26.88805020 $U2$n (c)

[R] A function that can modify an object? Or at least shows principles how to modify an object?

2013-05-16 Thread Aldi
the second position for (b); and NO change for (a). (see After) Thank you in advance, Aldi Before: === > UUU[2] $U2 $U1$scores (e) [1] -1.946707 -57.970488 $U2$cov (d) bbb1378 bbb1379 bbb1378 1.10362564 -0.01222695 bbb1379 -0.01222695 26.88805020 $U2$n (c)

Re: [R] how to deal with continous and Non continuous mixed variables in factor analysis?

2013-05-11 Thread Aldi Kraja
Hi, The continues variables can be handled easy via factanal function. ?factanal Binary or ordinal variables can be handled via ltm package, which implements item response theory. ?ltm Hope this helps. Aldi On 5/11/2013 8:06 PM, Klot Lee wrote: hi, when I am doing factor analysis, there is

Re: [R] A problem of splitting the right screen in 3 or more independent vertical boxes:

2013-05-11 Thread Aldi Kraja
(1,1,1,2,3,4,5),2,3,byrow=T)) ## six splits, of those first 3 belong to picture 1 layout(matrix(c(1,1,2,3,4,5,6,7),2,4,byrow=T)) ## 8 splits of those first 2 belong to picture 1 and so on. Dennis Murphey provided also another beautiful solution via ggplot2. See following. Thank you, Aldi On 5

Re: [R] A problem of splitting the right screen in 3 or more independent vertical boxes:

2013-05-03 Thread Aldi Kraja
(400,mean=0,sd=6) par(mfrow=c(1,2)) hist(x, main="Left screen OK") boxplot(wheat1,wheat2,tomatos3,tomatos4,cucumbers5,cucumbers6) title ("Right screen: boxplot with plants") Thanks, Aldi On 5/3/2013 4:46 PM, Aldi Kraja wrote: Hi, Based on par function, I can split the screen

[R] A problem of splitting the right screen in 3 or more independent vertical boxes:

2013-05-03 Thread Aldi Kraja
t;Right screen: boxplot with plants") Thank you in advance for any suggestions, Aldi -- __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-g

Re: [R] Windows 7 R (32/64bit) running under cygwin: package not found

2012-10-16 Thread Aldi Kraja
packages: (although I was expecting library() itself to know about the additional packages library('rgenoud',lib.loc='C:/Users/aldi/Documents/R/win-library/2.15') This solved the problem. Now R works again in cygwin. :-) Thanks, Aldi On 10/16/2012 1:19 PM, Bert Gunter wrote:

Re: [R] Windows 7 R (32/64bit) running under cygwin: package not found

2012-10-16 Thread Aldi Kraja
Here follows also the Sys.getenv(): R Windwos 32bit Rgui run: == R_HOME "D:/RHome" R_LIBS_USER "C:\\Users\\aldi\\Documents/R/win-library/2.15" R_USER "C:\\Users\\aldi\\Documents" R cygwin run: === > Sys.getenv() "/usr

Re: [R] Windows 7 R (32/64bit) running under cygwin: package not found

2012-10-16 Thread Aldi Kraja
would guess that you installed rgenoud as user, not as > administrator. That would put the > file inside > c:/Users/YourName/AppData/Local/VirtualStore/Program Files/R > instead of where you think it is. I can imagine that could easily > cause confusion. > > Rich > >

Re: [R] Windows 7 R (32/64bit) running under cygwin: package not found

2012-10-16 Thread Aldi Kraja
by cygwin? You are right I need to test further. Thought someone would have had this experience and a solution from previous work. Aldi On 10/16/2012 11:51 AM, Duncan Murdoch wrote: On 16/10/2012 12:41 PM, Aldi Kraja wrote: Hi, Using R 2.15.1 on Windows 7. Have installed both versions 32

[R] Windows 7 R (32/64bit) running under cygwin: package not found

2012-10-16 Thread Aldi Kraja
ch is already installed in my laptop's R? Thank you in advance, Aldi __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commen

Re: [R] Error: ReadItem: unknown type 98, perhaps written by later version of R

2012-08-23 Thread Aldi Kraja
dles parallel jobs of the same user in regard to the R invocation and space used for temporary calculations. Do these parallel batch R jobs see each other in the same space or are they for sure in independent temporary subdirs? Thanks, Aldi On 8/22/2012 3:47 PM, Aldi Kraja wrote: Hi, Here is

Re: [R] Error: ReadItem: unknown type 98, perhaps written by later version of R

2012-08-22 Thread Aldi Kraja
r. I am not sure what is the "type 98 error" meaning in R? Anybody knows where the R error types are described? TIA, Aldi On 8/21/2012 10:09 AM, Aldi Kraja wrote: Hi, I am running a large number of jobs (thousands) in parallel (linux OS 64bit), R version 2.14.1 (2011-12-22), Platform:

[R] Error: ReadItem: unknown type 98, perhaps written by later version of R

2012-08-21 Thread Aldi Kraja
by later version of R Execution halted even in the one I just mentioned if I execute by hand goes well. Do you know what could be the cause of bsub submission to fail? Any remedy? Thank you in advance, Aldi -- __ R-help@r-project.org ma

[R] lm with a single X and step with several Xi-s, beta coef. quite different:

2012-08-07 Thread Aldi Kraja
01983 ** x11 -0.23537 0.05704 -4.126 3.75e-05 *** x12 0.25992 0.06260 4.152 3.35e-05 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 1.02 on 4244 degrees of freedom Multiple R-squared: 0.01353, Adjusted R-squared: 0.01074 F-statistic: 4.851 on 12 and

[R] applying a function in list of indexed elements of a vector:

2012-03-10 Thread aldi
is for the sum: Y2 19 19 31 24 5 15 12 I thought lapply function may perform this, but does not work: Y2<-lapply(Y1[iy],sum) Any suggestion? TIA, Aldi -- __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

Re: [R] barplot with errorbars

2011-02-17 Thread Aldi Kraja
ations and code how to build bars with se. [62]Marc Schwartz. R Help Desk: An introduction to using R's base graphics. /R News/, 3(2):2-6, October 2003. [ bib | http <http://CRAN.R-project.org/doc/Rnews/> | .pdf <http://CRAN.R-project.org/doc/Rnews/Rnews_2003-2.pdf> ] HTH,

Re: [R] 300 dpi and eps:

2010-12-15 Thread Aldi Kraja
o? What is the best advice how to produce in R graphs that can be acceptable for publications? There are many good examples in R News for papers that explain best different aspects of plotting, but I would suggest someone competent in this area write a great paper to explain technicalities of "ho

Re: [R] 300 dpi and eps:

2010-12-15 Thread Aldi Kraja
CMYK and 8 bit. How one works in R? Or one saves the graph from postscript function as eps or tiff and you tell to the editor of the journal do whatever you want because I am done; I provided you already a vector graph that has infinite pixels?:-) Thank you advance, Aldi On 12/15/2010 3:52

[R] 300 dpi and eps:

2010-12-14 Thread Aldi Kraja
that it is a 72dpi graph. If I start with a 72dpi graph AI cannot improve this to 300 dpi. Q: HOW CAN A GRAPH IN R DIRECTLY SAVED AS 300dpi? What options do I need to add to the postscript function to have a 1 page graph that has these 5 plots and is a 300 dpi graph? Thank you in advance, Aldi

[R] 300 dpi and eps:

2010-12-14 Thread Aldi Kraja
that it is a 72dpi graph. If I start with a 72dpi graph AI cannot improve this to 300 dpi. Q: HOW CAN A GRAPH IN R DIRECTLY SAVED AS 300dpi? What options do I need to add to the postscript function to have a 1 page graph that has these 5 plots and is a 300 dpi graph? Thank you in advance, Aldi

Re: [R] real numeric variable transforms into factor:

2009-04-17 Thread Aldi Kraja
Thank you Marc for your detailed and helpful info. Aldi Marc Schwartz wrote: On Apr 17, 2009, at 2:52 PM, Aldi Kraja wrote: Hi Test made in: R in windows Vista OS, R version 2.8.1 From FAQ: http://cran.r-project.org/doc/FAQ/R-FAQ.html#How-do-I-convert-factors-to-numeric_003f "I

[R] real numeric variable transforms into factor:

2009-04-17 Thread Aldi Kraja
racter(x$x1)) [1] 1.1 2.1 3.2 NA 4.5 5.1 6.3 NA Warning message: NAs introduced by coercion Thanks, Aldi [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE d

[R] "with" and "by" and NA:

2009-03-25 Thread Aldi Kraja
0.2345 2 NA 1 1. 1 . the above transforms into [1] 1.4137000 NA 0.615 Question: is there a way I can protect this calculations from the NA values in the ph1 (some kind of: na.rm=T)? TIA, Aldi -- __ R-help@r-project.or

[R] Overlay plot: boxplot and stripchart

2009-03-13 Thread Aldi Kraja
lot(x$earned ~ x$movie) stripchart(x$earned ~ x$movie, vertical=T,data=x, method="jitter", pch=19) Any suggestions are greatly appreciated, otherwise I have to go to points function. Thanks, Aldi -- __ R-help@r-project.org mai

Re: [R] par and a substitute for mtext to write one time a title per page

2009-03-03 Thread Aldi Kraja
uot;,3,line=3) plot(x,y) Is there a function that can print a title in every one new page outside of the space designated for graphs, instead of me finding the first graph that starts the page and there using mtext as shown above? Thanks, Aldi Aldi Kraja wrote: RE: par and a substitute for mtex

[R] par and a substitute for mtext to write one time a title per page

2009-03-03 Thread Aldi Kraja
e another way to write a title one time per page in these multiple graphs, so I can save the graphs space per page? Thank you in advance, Aldi -- __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

[R] 16 digits and beyond? R64-bit a solution?

2009-02-06 Thread Aldi Kraja
If I am running R in a server 64-bit, can that improve the chances that beyond 16th digits to still have precision? Thanks, Aldi -- __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting gui

Re: [R] Where to download BRugs

2008-05-22 Thread aldi
Hi, I just installed it from http://cran.wustl.edu/bin/windows/contrib/2.7/BRugs_0.4-1.zip Change 2.7 to 2.6 and you get the older version. HTH, Aldi > > Thanks Aldi, do you know anywhere we could download previous package of > BRugs? Do you have a copy which you could send to me

Re: [R] mixed model results from SAS and R

2008-05-22 Thread Aldi Kraja
9 7.782863 -0.08424262 10 7.782863 -0.08424262 ... Thank you in advance for any insights, Aldi [EMAIL PROTECTED] wrote: > Hi, > > I was wondering if there is a way to figure out why in SAS random beta > coefficients are 0 vs. in R the beta-s are non zero. > The variables of the da

Re: [R] Where to download BRugs

2008-05-22 Thread Aldi Kraja
The BRugs package is maintained by Uwe Ligges. So it is possible he forgot to place it in the new version of R/ repositories. Aldi Charles Annis, P.E. wrote: Could you mean RBugs? Charles Annis, P.E. [EMAIL PROTECTED] phone: 561-352-9699 eFax: 614-455-3265 http

[R] mixed model resuts from SAS and R

2008-05-22 Thread aldi
appreciated, Thanks, Aldi 1. mixed model in SAS: == ods output SolutionR = out1.randomnidltest2; proc mixed data = a1 ; class sub ; model nidl = time / solution ; random int time / sub = sub solution; run; ods output close; 2. mixed model in R: a1