Re: [R] "--" < 0

2024-06-25 Thread Adrian Dusa
Oh I see... It's not that "-7" gets coerced to numeric, but 0 gets coerced to "0". Of course... On Tue, Jun 25, 2024 at 11:02 AM Martin Maechler wrote: > >>>>> Adrian Dusa > >>>>> on Tue, 25 Jun 2024 10:56:07 +0300 writes: > &

[R] "--" < 0

2024-06-25 Thread Adrian Dusa
not expect that "--" < 0 is a TRUE statement. (and the same holds for any string prepended by a minus sign, e.g. "-a" < 0) I would be grateful for an explanation, I'm sure that something very obvious escapes me but it sure does seem counter intuitive to me. Best wis

Re: [R] Variable and value labels

2023-07-12 Thread Adrian Dușa
can, but it cannot possibly cover all applications out there, so an add-on package is a must. A good way to do both variable and value labels, as well as different types of missing values, is the package "declared". I hope this helps, Adrian On Wed, Jul 12, 2023 at 6:55 AM Anupam Ty

Re: [R] replacing unicode characters

2023-06-30 Thread Adrian Dusa
ore starting the child process, and everything looks good now. Thanks a lot, much obliged, Adrian On Fri, Jun 30, 2023 at 2:10 PM Ivan Krylov wrote: > On Fri, 30 Jun 2023 11:33:34 +0300 > Adrian Dușa wrote: > > > In a very simple test, I tried creating a text file from the El

Re: [R] replacing unicode characters

2023-06-30 Thread Adrian Dușa
rs less how R interprets these characters, but how they are passed through the child process that started R. I'd be grateful for any hint in this direction, if anyone has experience. Best wishes, Adrian On Thu, Jun 29, 2023 at 1:59 AM Iris Simmons wrote: > Hiya! > > > You can do t

[R] replacing unicode characters

2023-06-28 Thread Adrian Dușa
on? Something like: "fa\u00e7ile" Or perhaps a clever regexp, for any number of such occurrences in a string? Thanks a lot in advance, Adrian [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE

[R] [R-pkgs] new version of package declared

2022-09-29 Thread Adrian Dușa
ilt on CRAN, but they are also available and can be installed from R-universe package page: https://dusadrian.r-universe.dev/ui#package:declared As always, bug reporting and feature proposals are more than welcome. Adrian [[alternative HTML version deleted]]

[R] [R-pkgs] new version of package declared

2022-03-17 Thread Adrian Dușa
inspired from the base R packages and other established contributed ones, but adapted to objects of class "declared". In hoping this might be helpful, Adrian Dusa University of Bucharest Romanian Social Data Archive Soseaua Panduri nr. 90-92 050663 Bucharest sector 5 Romania https://adr

Re: [R] Creating NA equivalent

2021-12-26 Thread Adrian Dușa
s and season's greetings, Adrian On Tue, 21 Dec 2021 at 21:45, Avi Gross wrote: > I wonder if the package Adrian Dușa created might be helpful or point you > along the way. > > It was eventually named "declared" > > https://cran.r-project.org/web/packages/declar

Re: [R] .Rdata not loading

2021-12-24 Thread Adrian Dușa
n .Rdata file. Not sure how it handles corrupt .Rdata files, but should generally give an idea about what's inside. Hth, Adrian [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https:

[R] [R-pkgs] rpanel package update

2021-09-08 Thread Adrian Bowman
rp.notebook and rp.notebook.raise) are disabled. Adrian Bowman Prof. Adrian Bowman BSc (Hons) Dip.Math.Stat PhD FRSE Emeritus Professor of Statistics University of Glasgow E: adrian.bow...@glasgow.ac.uk<mailto:adrian.bow...@glasgow.ac.uk> W: www.stats.gla.ac.uk/~adria

Re: [R] Augmented Dickie-Fuller test (Nick Wray)

2021-08-27 Thread Adrian Trapletti
quals one is computed." Regress the data on a constant and a linear trend and check the residuals. Cheers, Adrian Adrian Trapletti Steinstrasse 9b, 8610 Uster, Switzerland P +41 44 994 56 30 | M +41 79 103 71 31 adr...@trapletti.org | www.trapletti.org On Fri, Aug 27, 2021 at 12:00

[R] [R-pkgs] CRAN has a new package: declared

2021-06-18 Thread Adrian Dușa
evision of the package and its vignette. Hope this will prove useful, I would be grateful for feedback and bug reports. -- Adrian Dusa University of Bucharest Romanian Social Data Archive Soseaua Panduri nr. 90-92 050663 Bucharest sector 5 Romania https://adriandusa.eu [[al

[R] Decompose df1 into another df2 based on values in df1

2021-05-26 Thread Adrian Johnson
Hello, I am trying to convert a df (given below as d1) into df2 (given below as res). I tried using loops for each row. I cannot get it right. Moreover the df is 25 x 500 in dimension and I cannot get it to work. Could anyone help me here please. Thanks. Adrian. d1 <- structure(list

Re: [R] calling r from java (Eduard Drenth)

2020-11-30 Thread Adrian Trapletti
touching the Java code. Cheers, Adrian *Adrian Trapletti* Steinstrasse 9b, 8610 Uster, Switzerland P +41 44 994 56 30 | M +41 79 103 71 31 adr...@trapletti.org | www.trapletti.org On Sun, Nov 29, 2020 at 9:12 AM Eduard Drenth wrote: > Because of efficiency? But almost all development I do

Re: [R] calling r from java (Eduard Drenth)

2020-11-28 Thread Adrian Trapletti
Hi Eduard, I recommend separating the R quant code from Java and deploy the R code as a REST service, e.g. using https://github.com/opencpu/opencpu Best regards Adrian Adrian Trapletti Steinstrasse 9b, 8610 Uster, Switzerland P +41 44 994 56 30 | M +41 79 103 71 31 adr...@trapletti.org

[R] R 4.0.0 with Intel MKL for Windows

2020-05-03 Thread Adrian Trapletti
For Windows users, some instructions how to use R 4.0.0 with Intel MKL: https://linkedin.com/pulse/r-400-intel-mkl-windows-adrian-trapletti Best Regards Adrian Adrian Trapletti Steinstrasse 9b, 8610 Uster, Switzerland P +41 44 994 56 30 | M +41 79 103 71 31 adr...@trapletti.org

Re: [R] [FORGED] Re: pair correlation function of 3D points

2020-04-29 Thread Adrian Baddeley
ovision of documentation and examples. It is simply not feasible or efficient to explain everything in every help file. The user has to make some effort to follow up relevant information. Finally, you cast doubt on whether the function pcf3est actually does calculate an estimate of the pair cor

[R] pheatmap - clustering of select columns

2019-03-08 Thread Adrian Johnson
11-20 and not clustering rows. Is it possible. Currently I use cluster_cols=TRUE, but this clusters all columns. Thanks for your help Adrian. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help

[R] faster execution of for loop in Fishers test

2019-02-11 Thread Adrian Johnson
column that are less than 0.001 (p < 0.001). Appreciate your help. Thank you. -Adrian Code: === result <- matrix(NA,nrow=nrow(toy1),ncol=nrow(toy2)) rownames(result) <- rownames(toy1) colnames(result) <- rownam

Re: [R] (no subject)

2019-02-11 Thread Adrian Johnson
Pardon me, I forgot to add subject line. -Adrian. On Sun, Feb 10, 2019 at 3:49 PM Adrian Johnson wrote: > > Dear group, > > I have two large matrices. > > Matrix one: is 24776 x 76 (example toy1 dput object given below) > > Matrix two: is 12913 x 76 (example toy2

[R] (no subject)

2019-02-10 Thread Adrian Johnson
Dear group, I have two large matrices. Matrix one: is 24776 x 76 (example toy1 dput object given below) Matrix two: is 12913 x 76 (example toy2 dput object given below) Column names of both matrices are identical. My aim is: a. Take each row of toy2 and transform vector into UP (>0) and DN (

Re: [R] data transformation

2019-01-20 Thread Adrian Johnson
I apologize, I forgot to mention another key operation. in my matrix -1 to <0 has a different meaning while values between >0 to 1 has a different set of meaning. So If I do logit transformation some of the positives becomes negative (values < 0.5 etc.). In such case, the resulting transformed ma

[R] data transformation

2019-01-20 Thread Adrian Johnson
transform the data something similar to logit, where I dont lose normality of the data and yet I can better expand the data ranges. Thanks Adrian __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r

Re: [R] problems in converting numeric to character

2018-06-07 Thread Adrian Dușa
Does this helps? > formatC(x, digits = 1, format = "f") [1] "1.0" "2.0" "2.0" "2.1" On Thu, Jun 7, 2018 at 10:08 PM 刘瑞阳 wrote: > Hi, > I am having trouble converting numeric to characters in the format I > desire. To be more specific, I have a number of numeric as follows: > > x<-c(1.0,2.0,2.0

[R] R project global options file

2018-03-16 Thread Adrian Friskin
version: found in R studio global options but users need to do this every session. Is there a file or setting found on the pc where this information is kept? If so, where is it found. Cheers, Adrian Adrian Friskin | Senior Technology Support Officer | Learning Environments - Labs Team

Re: [R] How to get CI from surfit object in survival

2017-08-26 Thread Adrian Johnson
gt; -- Bert > > > Bert Gunter > > "The trouble with having an open mind is that people keep coming along > and sticking things into it." > -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) > > > On Sat, Aug 26, 2017 at 5:18 PM, Adrian

Re: [R] How to get CI from surfit object in survival

2017-08-26 Thread Adrian Johnson
cannot find anywhere. Thanks Adrian > Nsurv <- > survfit(Surv(NOSM,NStat)~as.factor(expcat1),conf.type='none',type='kaplan-meier') > summary(Nsurv,time=c(12,24)) Call: survfit(formula = Surv(NOSM, NStat) ~ as.factor(expcat1), conf.type = "none&qu

[R] How to get CI from surfit object in survival

2017-08-26 Thread Adrian Johnson
Hi I am not sure hiw to get thr CI from summary function on the survfit object. I can get the percent survival for 2 years from survfit object but I dont get Confidence intervals Could anyone suggest a hint Thanks Adrian [[alternative HTML version deleted

[R] test for proportion or concordance

2017-08-03 Thread Adrian Johnson
Hello group, my question is deciding what test would be appropriate for following question. An experiment 'A' yielded 3200 observations of which 431 are significant. Similarly, using same method, another experiment 'B' on a different population yielded 2541 observations of which 260 are significa

Re: [R] Help

2017-06-20 Thread Adrian Dușa
Juvenile; sub-adult = Sub-adult", as.factor.result = TRUE) Should work, although untested (your example is not replicable). Hope this helps, Adrian On Tue, Jun 20, 2017 at 8:06 AM, Leonardo Malaguti < leonardomalagut...@gmail.com> wrote: > Dear expert friends, > I'm pretty

Re: [R] R-help Digest, Vol 170, Issue 29

2017-05-01 Thread Adrian Trapletti
Hendry (1993): Cointegration, Error Correction, and the Econometric Analysis of Non-Stationary Data, Oxford University Press, Oxford. S. E. Said and D. A. Dickey (1984): Testing for Unit Roots in Autoregressive-Moving Average Models of Unknown Order. Biometrika 71, 599–607. > > > > H

Re: [R] A strange arithmetic error in R (maybe a bug)

2017-02-18 Thread Adrian Dușa
There is no bug, of course, this is a common floating point arithmetic misunderstanding. > print(2.01, digits = 20) [1] 2.0097868 Please search for "What every scientist should know about floating-point arithmetic" and you'll hopefully understand what the "bug&

Re: [R] Beginner needs help with R

2017-02-06 Thread Adrian Dușa
Two methods, among others: seq1 <- paste("DQ", sprintf("%0*d", 6, seq(060054, 060060)), sep = "") or seq1 <- paste("DQ", formatC(seq(060054, 060060), dig = 5, flag = 0), sep = "") Hth, Adrian On Mon, Feb 6, 2017 at 3:50 AM, Nabila A

[R] tests for significance on conditional inference trees from party package

2016-12-13 Thread Adrian Johnson
Dear group, Please allow me to ask a naive question and pardon if it is qualified as stupid question. I am using party package to classify covariates and predict distribution of survival times for the classified variables. Typically I have a matrix of covariates (columns) including outcome data (o

[R] Clustering methods for data that has bimodal distribution

2016-12-04 Thread Adrian Johnson
have ties. 2. Although K-means is non-parametric, would a bimodal distributed data be okay as input to K-means. I appreciate any suggestion. Thanks Adrian. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman

[R] replace items in vector with character based on logical operator

2016-11-12 Thread Adrian Johnson
ondition DN first, gets over-written by UP and then by NC. I appreciate your help. Thanks Adrian In the example below (dput code given below). qt = quantile(kx) kx[kx <= qt[[2]]] <- 'DN' kx[kx >=qt [[4]]] <- 'UP' kx[kx < qt[[4]] | kx > qt[[2]]] <- 

[R] pheatmap - clustering on some columns only

2016-10-14 Thread Adrian Johnson
categories. Thanks in advance. Adrian __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented

Re: [R] barplot beside=TRUE - values differ on scales

2016-10-12 Thread Adrian Johnson
As Dr.Murdoch suggested, transformation of row 2 is important to make sense in graphical depiction. Thanks to all. On Wed, Oct 12, 2016 at 4:25 PM, Adrian Johnson wrote: > Hello Dr. Carlson, > thanks for the tip. It is exactly what I am looking for. > > I see the trick lies in >

Re: [R] barplot beside=TRUE - values differ on scales

2016-10-12 Thread Adrian Johnson
. Thanks a lot. Adrian On Wed, Oct 12, 2016 at 3:46 PM, David L Carlson wrote: > Are you looking for something like this? > > Assuming your data is d: > >> d[2, ] <- d[2, ]*500 >> oldp <- par(mar=c(4.1, 4.1, 4.1, 4.1)) >> barplot(d, ylim=c(-1000, 3000), bes

Re: [R] barplot beside=TRUE - values differ on scales

2016-10-12 Thread Adrian Johnson
Thanks Duncan. I am sorry I cannot scale second row (d[2,]). I was looking for a way to plot d[2,] values next to d[1,] with a right side axis=4 on right side. -2,-1,0,1,2 thanks Adrian On Wed, Oct 12, 2016 at 12:42 PM, Duncan Murdoch wrote: > On 12/10/2016 12:20 PM, Adrian Johnson wr

Re: [R] barplot beside=TRUE - values differ on scales

2016-10-12 Thread Adrian Johnson
relationship exist by plotting GN and CN next to each other. If I log values in GN, I am loosing the minor differences between cases in GN. hope I could convince/explain. thanks adrian On Wed, Oct 12, 2016 at 12:36 PM, Adams, Jean wrote: > Adrian, > > What story are you trying to tell? Or what

[R] barplot beside=TRUE - values differ on scales

2016-10-12 Thread Adrian Johnson
DC5 DC8 DC14 DC18 DC19 DC20 DC23 GN 112 579 131 2234 2892 528 582 CN 0 112102 GN values are range from 100 - 3000 while CN are always -2 or -1 or 0 or 1 or 2 Also I cannot log GN values and plot because a difference in 100 units also matters in my experiment. Any help woul

Re: [R] Loop to check for large dataset

2016-10-10 Thread Adrian Dușa
Granted,, there are better solutions than my "KISS" (keep it simple and stupid) example. Hopefully, Christoph will have learned from both. Best, Adrian On 10 Oct 2016 13:44, "PIKAL Petr" wrote: > Hi > > > > Given this example data, you can get same answer w

Re: [R] Loop to check for large dataset

2016-10-10 Thread Adrian Dușa
at are missing. > head(result) S P W [1,] 1 1 10 [2,] 1 1 11 [3,] 1 1 82 [4,] 1 1 100 [5,] 1 1 117 [6,] 1 1 148 # In this example, for S(tore) number 1 and P(roduct) number 1, you are missing W(eek) 10, 11, 82 and so on. In hoping you can adapt this code to your particu

Re: [R] Loop to check for large dataset

2016-10-08 Thread Adrian Dușa
-- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/ > posting-guide.html > and provide commented, minimal, self-contained, reproducible code. -- Adrian Dusa University of Bucharest Romanian Soc

Re: [R] separate commands by semicolon

2016-09-19 Thread Adrian Dușa
quot; bar <- \"don't ; use semicolons\"" [3] " foo <- '3;4'" " ls(" Excellent, thanks very much, Adrian On Mon, Sep 19, 2016 at 3:19 PM, Duncan Murdoch wrote: > On 19/09/2016 7:59 AM, Adrian Dușa wrote:

Re: [R] separate commands by semicolon

2016-09-19 Thread Adrian Dușa
"bar <- \"don't ; use semicolons\"" [3] "foo <- '3;4'" "ls(" even though the last command would cause an error using parse(text = x) Perhaps this is not that important (I am trying to simulate a normal

Re: [R] separate commands by semicolon

2016-09-17 Thread Adrian Dușa
: [1] "print(2)" "ls(" I hope this explains the situation, Adrian On Thu, Sep 15, 2016 at 11:02 PM, Adrian Dușa wrote: > On Thu, Sep 15, 2016 at 10:28 PM, William Dunlap > wrote: > >> The most reliable way to split such lines is with parse(text=x). >> Regu

Re: [R] separate commands by semicolon

2016-09-15 Thread Adrian Dușa
quot;3;4\"""bar <- \"don't ; use semicolons\"" That was simple enough, thanks very much, Adrian -- Adrian Dusa University of Bucharest Romanian Social Data Archive Soseaua Panduri nr.90 0506

[R] separate commands by semicolon

2016-09-15 Thread Adrian Dușa
aracter vector of length 2: foo <- '3;4' bar <- "don't ; use semicolons" It's probably a regexp magic, but I just can't find it. Any hint is highly appreciated, Adrian -- Adrian Dusa University of Bucharest Romanian Social Data Archive Soseaua Pandur

Re: [R] evaluating expressions as R console

2016-09-05 Thread Adrian Dușa
alternatives, I would be more than grateful for a hint. Best, Adrian On Mon, Sep 5, 2016 at 5:33 PM, Bert Gunter wrote: > I'm sharing this with r-help, as your detailed response might help > others help you. > > -- Bert > Bert Gunter > > "The trouble with having a

Re: [R] evaluating expressions as R console

2016-09-05 Thread Adrian Dușa
here...: http://www.tutorialspoint.com/r_terminal_online.php ... the result is exactly as in the R console. Maybe this is a different technology (direct websocket?), but if they are evaluating the text they're doing a very good job. Best, Adrian -- Adrian Dusa University of Bucharest Romanian Social D

[R] evaluating expressions as R console

2016-09-04 Thread Adrian Dușa
ossible, but inconvenient to save environments and load them back in the R CMD BATCH). Was also curious about knitr and pander, but again unable to replicate the results in the real R console. After many hours of searching, reading and testing, I would be grateful for any hint. Thank you in advan

[R] pheatmap breaks

2016-08-19 Thread Adrian Johnson
d 0 to -0.99 get white gradient to blue. there will be 7 breaks < - 1.96--- - 1- -.99 0 --0.99-1---1.96>1.96 how can I define the breaks. appreciate your help. Thanks in advance. Adrian __ R-help@r-project.org maili

Re: [R] remove rows based on row mean

2016-08-18 Thread Adrian Johnson
Wow. This is much cleaner and smarter than the for loop, cbind thanks a lot . On Thu, Aug 18, 2016 at 6:28 PM, Jim Lemon wrote: > Hi Adrian, > Try this: > > sm$rowmeans<-rowMeans(sm[,2:length(sm)]) > sm<-sm[order(sm$Gene,sm$rowmeans,decreasing=TRUE),] > sm[-which(duplic

[R] remove rows based on row mean

2016-08-18 Thread Adrian Johnson
Hi Group, I have a data matrix sm (dput code given below). I want to create a data matrix with rows with same variable that have higher mean. > sm Gene GSM529305 GSM529306 GSM529307 GSM529308 1A1BG 6.57 6.72 6.83 6.69 2A1CF 2.91 2.80 3.08 3.00

[R] RGL library loading issues

2016-08-05 Thread Adrian Johnson
X11quartz starts open.. and thats it. Nothing happens after that - meaning I don't get > prompt in R window. ctrl-c does not work, ctrl-d does not work. > library(rgl) ^C ^D Finally I had to kill -1 . what could be the issue? appreciate your help. Thanks Adrian X window systemm X q

[R] generate a vector of random numbers within confines of certain parameters

2016-08-02 Thread Adrian Johnson
Dear group, I am trying to generate a vector of random numbers for 20K observation. however, I want to generate numbers (with 6 decimal places) within the range of Std. Dev : 2-3 mean : 4-6 Is there a method to generate numbers with 6 decimal places under these parameters thank you. Adrian

Re: [R] Importing data from a text file with no separator

2016-06-08 Thread Adrian Dușa
See: ?read.fwf Example: > ff <- tempfile() > cat(file = ff, "10030614911608", "10030614911608", sep = "\n") > read.fwf(ff, widths = c(2,8,10), colClasses = "character") V1 V2 V3 1 10 03061490 000116 2 10 030

Re: [R] if else condition - help

2016-05-22 Thread Adrian Johnson
gt; A 0 0 0 0 > B 1 0 0 0 > C 0 -1 0 0 > D -1 1 -1 -1 > > On Sun, May 22, 2016 at 2:00 PM Adrian Johnson > wrote: >> >> Hi group: >> I am having difficulty with if else condition. I kindly request some help. >> >> I have a matrix k &

[R] if else condition - help

2016-05-22 Thread Adrian Johnson
), .Dimnames = list(c("A", "B", "C", "D"), c("C1", "C2", "C3", "C4"))) k1 <- t(apply(k, 1, function(x) ifelse(x > 1.5,1,-1))) > k1 C1 C2 C3 C4 A -1 -1 -1 -1 B 1 -1 -1 -1 C -1 -1 -1 -1 D -1 1 -1 -1

[R] Plotting a large time series

2016-04-23 Thread Adrian Mcmenamin
abouts. What have I got wrong? How can I get a line (preferably with the standard orientation)? Adrian [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinf

Re: [R] Bug in by() function which works for some FUN argument and does not work for others

2016-04-14 Thread Adrian Dușa
077 5.0769231 143.5307692 126.8461538 4.050 2.411 17.360 0.5384615 amgearcarb 1.000 4.3846154 2.9230769 See the difference between colMeans() and mean() in their respective help files. Hth, Adrian On Thu, Apr 14, 2016 at 11:14 PM, Akhilesh Si

Re: [R] formula argument evaluation

2016-04-14 Thread Adrian Dușa
Thanks Bill, it's very useful to know how parsing and evaluation works. It seems that quoting is the least complicated solution which is guaranteed to work. Best, Adrian On 13 Apr 2016 6:04 p.m., "William Dunlap" wrote: > %=>% would have precendence ('order of

Re: [R] formula argument evaluation

2016-04-13 Thread Adrian Dușa
ring anyways (which is parsed by other functions). On Tue, Apr 12, 2016 at 6:20 PM, Richard M. Heiberger wrote: > Would making it regular function %=>%, using "%" instead of quotes, > work for you? > > On Tue, Apr 12, 2016 at 11:09 AM, Adrian Dușa > wrote: > >

Re: [R] formula argument evaluation

2016-04-12 Thread Adrian Dușa
while "<=" means necessity. Quoting the expression is good enough, I was just curious if the quotes could be made redundant, somehow. Thank you both, Adrian -- Adrian Dusa University of Bucharest Romanian Social Data Archive Soseaua Panduri nr.90 050663 Buch

[R] formula argument evaluation

2016-04-12 Thread Adrian Dușa
and I was hoping the "=" would not get evaluated either. The "=>" sign is important for other purposes, not related to this example. Thank you in advance, Adrian -- Adrian Dusa University of Bucharest Romanian Social Data Archive Soseaua Panduri nr.90 050663 Bucharest sector 5

Re: [R] sorting of files using system

2016-04-09 Thread Adrian Dușa
I suspect it is a problem related to locales: R and the base Ubuntu might be using different locales, hence the source of the different sorting. Can't say if this is the problem in your case, but it might be. Adrian On Sat, Apr 9, 2016 at 12:18 AM, Maria Ninova wrote: > Hello, I came ac

Re: [R] Problem with <= (less than or equal): not giving the expected result

2016-04-05 Thread Adrian Dușa
vector)] <- FALSE return(check.vector) } See: ?all.equal Hth, Adrian On Tue, Apr 5, 2016 at 2:34 PM, Rainer Johannes wrote: > Dear All, > > I have the following problem: > > I have a function in which I check if the difference between values is > smaller or equal to a c

Re: [R] How to create an executable file from R GUI?

2016-02-22 Thread Adrian Dușa
Sun, Feb 21, 2016 at 11:37 AM, Adrian Dușa > wrote: > >> Oh, thanks Peter, good example for Mac, but indeed not working on Windows. >> For a completely cross-platform solution (that is, including Windows which >> is what Zahra wants), I believe shiny is the right tool. >

Re: [R] How to create an executable file from R GUI?

2016-02-21 Thread Adrian Dușa
hly customized, with drop-down menus and pop-up dialogs, including an output one which mimics the R console. To look at the interface, type: library(QCAGUI) runGUI() I hope it helps, Adrian On Sat, Feb 20, 2016 at 2:46 PM, peter dalgaard wrote: > It's quite platform dependent, but thi

Re: [R] How to create an executable file from R GUI?

2016-02-20 Thread Adrian Dușa
w.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > -- Adrian Dusa University of Bucharest Romanian Social Data Archive Soseaua Panduri nr.90 050663 Bucharest sector 5 Romania [[alternative HTML version deleted]]

Re: [R] How to create an executable file from R GUI?

2016-02-19 Thread Adrian Dușa
at kind of window does your function return? Adrian On Fri, Feb 19, 2016 at 4:35 PM, Zahra Samadi wrote: > Adriana, > My GUI file is a function returning a window. This function is named > buildGui(). How should I create this batch file using the piece of co

Re: [R] How to create an executable file from R GUI?

2016-02-18 Thread Adrian Dușa
ple matter of creating a .bat file, which for my user interface it only contains this: CLS TITLE QCA Qualitative Comparative Analysis C:/PROGRA~1/R/R-3.2.3/bin/R.exe --slave --no-restore -e "setwd('D:/');QCAGUI::runGUI()" The double click on the .bat file, and that's it

Re: [R] missing values in csv file

2016-02-17 Thread Adrian Dușa
te any numerical measures. Try to accept that NA is there for a reason, in R. I hope this helps, Adrian -- Adrian Dusa University of Bucharest Romanian Social Data Archive Soseaua Panduri nr.90 050663 Bucharest sector 5 Romania [[alternative HTML version deleted]] ___

[R] sorting matrix by sets rows

2016-02-06 Thread Adrian Johnson
where column 5 $ Cluster == 1 and then again decreasing by those rows with column == 2. How can I sort the column, by decreasing order, first by samples where clusters belong to 1 and then sort rows that belong to cluster 2. Thanks adrian Example data is given as dput. structure(list(Byers_EM

Re: [R] tcltk tkwidget(..."table")

2016-01-22 Thread Adrian Waddell
want to look into a book on Tk. "Effective TCL/TK programming" by Harrison and McLennan is a good one. Greetings, Adrian On Jan 21, 2016 10:36 PM, "Dalthorp, Daniel" wrote: > > Once you're up to speed on those issues... > > Any suggestions for getting up to

Re: [R] Split Strings

2016-01-17 Thread Adrian Dușa
rings[match(allstrings, x)]) [[1]] [1] "pc""m2""45""ssp3" "wheat" NA [[2]] [1] "pc""m2""45""ssp3" "wheat" NA [[3]] [1] NA NA NA "pc" NA "m2" [[4

[R] [R-pkgs] new package: venn

2016-01-11 Thread Adrian Dușa
; venn(7) Comments and suggestions are, as always, welcome. Best wishes, Adrian -- Adrian Dusa University of Bucharest Romanian Social Data Archive Soseaua Panduri nr.90 050663 Bucharest sector 5 Romania [[alternative HTML version deleted]] ___ R-

Re: [R] Bezier to line segments

2016-01-09 Thread Adrian Dușa
ement to r-packages. Best wishes, Adrian On Thu, Jan 7, 2016 at 6:54 PM, Greg Snow <538...@gmail.com> wrote: > You may also be interested in the xspline function (graphics package, > so you don't need to install or load anything extra) since you mention > general splines. These

Re: [R] Bezier to line segments

2016-01-06 Thread Adrian Dușa
I just found the package "bezier". Trying to find the needle, I missed the haystack... On Wed, Jan 6, 2016 at 9:56 AM, Adrian Dușa wrote: > Dear All, > > I am interested into transforming Bezier curves (or general splines) to a > series of line segments. > For simplici

[R] Bezier to line segments

2016-01-05 Thread Adrian Dușa
adapted to R). Thanks in advance for any hint, Adrian -- Adrian Dusa University of Bucharest Romanian Social Data Archive Soseaua Panduri nr.90 050663 Bucharest sector 5 Romania [[alternative HTML version deleted]] __ R-help@r-project.org mailing

Re: [R] choropleth packages (US)

2015-12-14 Thread Adrian Waddell
function(state) { which(grepl(state, s_map)) }) ## check if the mapping is good! col_pal <- col_numeric("Greens", domain=NULL, na.color = 'lightyellow') cols <- rep('lightyellow', length(s_data)) Map(function(indices, col) { cols[indices] <<- col }, mapping, col

Re: [R] regexp inside and outside brackets

2015-12-11 Thread Adrian Dușa
n: A{1} B then your solution helps to trap this error and break the function. It is of course a different problem than my initial email, but it just struck me that such an error should ideally be trapped. Many thanks for the useful insight, Adrian On Fri, Dec 11, 2015 at 5:29 PM, Marc Schwart

Re: [R] regexp inside and outside brackets

2015-12-11 Thread Adrian Dușa
Thanks very much, Marc and Jeff. Jeff's solutions seem to be simple one liners. I really need to learn these things, too powerful to ignore. Thank you very much, Adrian On Fri, Dec 11, 2015 at 5:05 PM, Jeff Newmiller wrote: > The gsub function is your friend. > > s <- "A

[R] regexp inside and outside brackets

2015-12-11 Thread Adrian Dușa
~B0 CO NN" and everything inside the brackets would be: "0 1 a2 12" I have a working solution involving strsplit(), but I wonder if there is a more direct way. Thanks in advance for any hint, Adrian -- Adrian Dusa University of Bucharest Romanian Social Data Archive Soseaua Panduri n

Re: [R] choropleth packages (US)

2015-12-10 Thread Adrian Waddell
dices] <<- col }, mapping, col_pal(USArrests$UrbanPop)) map(m, col=cols, fill=TRUE) Adrian On Mon, Dec 7, 2015 at 9:34 AM, Erich Neuwirth wrote: > ggplot2 also can do this with > fortify > geom_polygon > > Von meinem iPad gesendet > >> Am 06.12.2015 um 21:03 schrieb

Re: [R] fill the area outside a polygon

2015-12-03 Thread Adrian Dușa
Hi Greg, On Wed, Dec 2, 2015 at 10:28 PM, Greg Snow <538...@gmail.com> wrote: > > Adrian, > > Draw the polygon once without the border and the whole in it, then go > back and draw the border around the outer polygon without any fill. I thought about it too, but this on

Re: [R] fill the area outside a polygon

2015-12-03 Thread Adrian Dușa
On Wed, Dec 2, 2015 at 10:38 PM, Michael Sumner wrote: > > On Wed, 2 Dec 2015 at 23:10 Adrian Dușa wrote: > >> Dear All, >> >> I know how to fill a polygon, using a basic R graphics device: >> >> par(mai=c(0, 0, 0, 0)) >> plot(1:100, type="

Re: [R] fill the area outside a polygon

2015-12-02 Thread Adrian Dușa
ou are using), but under MacOS I only get the entire big polygon filled, including the hole in the middle. Thanks, Adrian -- Adrian Dusa University of Bucharest Romanian Social Data Archive Soseaua Panduri nr.90 050663 Bucharest sector 5 Romania [[alternative HTML version deleted]] __

[R] fill the area outside a polygon

2015-12-02 Thread Adrian Dușa
ere are various packages which draw maps (i.e. maptools), but I need this in base R graphics. In other words, is it possible to define a polygon with a hole inside, in base R? Thank you, Adrian -- Adrian Dusa University of Bucharest Romanian Social Data Archive Soseaua Panduri nr.9

Re: [R] detect computer drives

2015-11-27 Thread Adrian Dușa
On Fri, Nov 27, 2015 at 4:03 PM, Dirk Eddelbuettel wrote: > > On 27 November 2015 at 15:43, Adrian Duşa wrote: > | Is there a method to detect the computer's drives? > | That would include USB sticks, when they are recognised by the operating > | system. > > That is v

[R] detect computer drives

2015-11-27 Thread Adrian Dușa
Dear All, Is there a method to detect the computer's drives? That would include USB sticks, when they are recognised by the operating system. I believe to have read somewhere it's possible, but I am unable to find that message. Thank you for any hint, Adrian -- Adrian Dusa Uni

[R] open connection to system

2015-07-14 Thread Adrian Dușa
nd Any hint would be really appreciated, thanks in advance, Adrian -- Adrian Dusa University of Bucharest Romanian Social Data Archive Soseaua Panduri nr.90 050663 Bucharest sector 5 Romania [[alternative HTML version deleted]] __ R-help@r-proj

Re: [R] matrix/df help populate NA

2015-06-14 Thread Adrian Johnson
ames(x2)) >> >> new_x2 <- x2 >> >> for (i in missing) new_x2[[i]] <- NA >> >> new_x2 > Subject AD FH B C > 1 x1 4.3 -2.4 1.3 -2.3 NA NA > 2 x2 2.4 0.1 0.5 -1.4 NA NA > > > > > > Jim Holtman > Data Munger

[R] matrix/df help populate NA

2015-06-13 Thread Adrian Johnson
), .Names = c("Subject", "A", "B", "C", "D"), class = "data.frame", row.names = c(NA, -2L)) x2 = structure(list(Subject = c("x1", "x2"), A = c(4.3, 2.4), D = c(-2.4, 0.1), F = c(1.3, 0.5), H = c(-2.3

Re: [R] regex find anything which is not a number

2015-03-12 Thread Adrian Dușa
On Thu, Mar 12, 2015 at 9:52 PM, John McKown wrote: > [...] > One problem is that Adrian wanted, for some reason, to exclude numbers > such as "2." but accept "2.0" . That is, no unnecessary trailing > decimal point. as.numeric() will not fail on "2."

Re: [R] regex find anything which is not a number

2015-03-11 Thread Adrian Dușa
Perfect, perfect, perfect. Thanks very much, John. Adrian On Wed, Mar 11, 2015 at 10:00 PM, John McKown wrote: > See if the following will work for you: > > grep('^-?[0-9]+([.]?[0-9]+)?$',myvector,perl=TRUE,invert=TRUE) > >> myvector <- c("a3", "N.

[R] regex find anything which is not a number

2015-03-11 Thread Adrian Dușa
to detect anything which contains a "-" or a "." anywhere else except at the beginning of a number. Thanks very much in advance, Adrian -- Adrian Dusa University of Bucharest Romanian Social Data Archive Soseaua Panduri nr.90 050663 Bucharest sector 5 Romania

  1   2   3   >