Re: [R] run r script in r-fiddle

2017-10-30 Thread Suzen, Mehmet
Hi Frank, You could upload your R source file to a public URL, for example to github and read via RCurl, as source do not support https as far as I know. Here is a working example. library('RCurl') tmatrix <- getURL("https://raw.githubusercontent.com/msuzen/isingLenzMC/master/R/isingUtils.R";) e

Re: [R] run r script in r-fiddle

2017-10-30 Thread Suzen, Mehmet
5:51, Martin Maechler wrote: >>>>>> Suzen, Mehmet >>>>>> on Mon, 30 Oct 2017 11:16:30 +0100 writes: > > > Hi Frank, You could upload your R source file to a public > > URL, for example to github and read via RCurl, as source >

Re: [R] run r script in r-fiddle

2017-10-30 Thread Suzen, Mehmet
Note that, looks like r-fiddle runs R 3.1.2. __ 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 comme

Re: [R] run r script in r-fiddle

2017-10-31 Thread Suzen, Mehmet
On 31 October 2017 at 12:42, Martin Maechler wrote: > Notably as I think it's been provided by a company that no > longer exists under that name, and even if that'd be wrong, R-Fiddle > does not seem free software (apart from the R parts, I hope !). For the record, r-fiddle is maintained by data

Re: [R] run r script in r-fiddle

2017-10-31 Thread Suzen, Mehmet
, you can embed the following into a web page: https://cdn.datacamp.com/datacamp-light-latest.min.js"</a>;> Currently, it supports R 3.4.0. See the code base, which is open source, here https://github.com/datacamp/datacamp-light Hope it helps. Best, Mehmet On 31 October 2017 a

Re: [R] Comparing figures?

2018-05-07 Thread Suzen, Mehmet
I suggest perceptual diff. You could write a wrapper around it. http://pdiff.sourceforge.net On Mon, 7 May 2018 16:49 Ramiro Barrantes, wrote: > Hello, > > I am working on tests to compare figures. I have been using ImageMagick, > which creates a figure signature, and I can compare a "test" fi

Re: [R] Time complexity of functions in R

2018-05-23 Thread Suzen, Mehmet
Hello Neha, You can try to measure those instructions time-complexiy by yourself. First, generate a benchmark dataset with increasing object size, i.e., set A. Have a look at how to use 'system.time' https://stat.ethz.ch/R-manual/R-devel/library/base/html/system.time.html Best, Mehmet On 24 May

Re: [R] (Somewhat?) Off topic: Containerization software

2017-06-01 Thread Suzen, Mehmet
This is a nice summary addressing the same with R: https://arxiv.org/pdf/1410.0846.pdf On 30 May 2017 at 17:43, Bert Gunter wrote: > Folks: > > This is **off topic**, but I thought it might be informative to this > community. Consequently: please **no on list public comments or > discussion**. Fe

Re: [R] Latin Hypercube Sampling when parameters are defined according to specific probability distributions

2017-06-01 Thread Suzen, Mehmet
No it is an R programming questions. Nelly specifically asked you: "how can I use your code to apply my model to each of the 50 rows of the data frame “tabLHS”?" __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/

Re: [R] Nash equilibrium and other game theory tools implemented in networks using igraph or similar

2017-06-27 Thread Suzen, Mehmet
Why don't you implement and uplad the package to CRAN? On 27 Jun 2017 17:45, "Chris Buddenhagen" wrote: Does anyone know of some code, and examples that implement game theory/Nash equilibrium hypothesis testing using existing packages like igraph/statnet or similar? Perhaps along the lines of t

Re: [R] Nash equilibrium and other game theory tools implemented in networks using igraph or similar

2017-06-28 Thread Suzen, Mehmet
Hello Chris, I was implying you are capable enough to implement it, while you have already identify a research paper. If there is no package out there, uploading to CRAN would help future user too. I am more than happy to help if you want to implement from scratch. Best, Mehmet On 27 June 2017 a

Re: [R] R package for scorecard development

2017-06-28 Thread Suzen, Mehmet
I suggest you to have a look at this R document: https://cran.r-project.org/doc/contrib/Sharma-CreditScoring.pdf On 28 June 2017 at 13:26, Nikhil Abhyankar wrote: > Hello all, > > Is there any R package that can develop a scorecard model for a binary > target variable? > > More details: > I want

Re: [R] How export data set (available in the package) from R?

2017-07-30 Thread Suzen, Mehmet
I also suggest you Hadley's optimized package for interoperating xls files with R: https://github.com/tidyverse/readxl https://cran.r-project.org/web/packages/readxl/index.html __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https:/

Re: [R] Nested cross validation with lapply

2017-08-08 Thread Suzen, Mehmet
Hi Jesús, Do you have a code you tried without lapply? Why don't you post that here too? There are a couple of packages supporting nested CV; TANDEM, blkbox you may want to check their code. Also, `cvTools` package may help you to write one. On 7 August 2017 at 15:21, Jesús Para Fernández wrot

Re: [R] Directional Forecast

2017-08-11 Thread Suzen, Mehmet
I suggest, you read: Forecasting: principles and practice from Hyndman-Athana­sopou­los https://www.otexts.org/fpp __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the postin

Re: [R] Block comment?

2017-09-02 Thread Suzen, Mehmet
AFAIK block comment is not possible it needs to be implemented in R interpreter and defined in the parser.'If' solution is not elegant. On 2 September 2017 at 14:09, Uwe Ligges wrote: > > > On 02.09.2017 11:40, Christian wrote: >> >> I consider it quite worth while to introduce into R syntax a ne

Re: [R] comparition of occurrence of multiple variables between two dataframes

2017-09-12 Thread Suzen, Mehmet
Do you have a simplified example with a code? It is not clear to me what do you mean by tree but if you refer to tree data structure, maybe you could change the data structure to tree (https://cran.r-project.org/web/packages/data.tree/vignettes/data.tree.html) and try to write comparison of two tre

Re: [R] comparition of occurrence of multiple variables between two dataframes

2017-09-12 Thread Suzen, Mehmet
; > CV51 > > CV52 > > IN11 > > IN12 > > IN13 > > 4728 > > 0 > > 0 > > 0 > > 1 > > 0 > > 0 > > 0 > > 3 > > 0 > > 0 > > 0 > > 0 > > 0 > > 0 > > 0 > > 0 > > 0 > >

Re: [R] (no subject)

2017-09-13 Thread Suzen, Mehmet
Hello David, As error message says you have a version dependency not satisfied. "error: Need GSL version >= 1.12". If you are using Ubuntu for example you could do; sudo apt-get install libgsl2 Or you can compile by yourself, I am sure there are people in LRZ can help you on this:) Best, Mehmet

Re: [R] Regarding Principal Component Analysis result Interpretation

2017-09-15 Thread Suzen, Mehmet
Usually, PCA is used for a large number of features. FactoMineR [1] package provides a couple of examples, check for temperature example. But you may want to consult to basic PCA material as well, I suggest a book from Chris Bishop [2]. [1] https://cran.r-project.org/web/packages/FactoMineR/vigne

Re: [R] Multinomial Fitting Distrbution

2015-04-22 Thread Suzen, Mehmet
mixtools package has mixture of Gaussian fitting, maybe that might help? __ 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-g

Re: [R] Random Forest in Caret

2015-04-22 Thread Suzen, Mehmet
Can you post your memory profile and codes? __ 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 comment

Re: [R] lm() funtion

2015-04-24 Thread Suzen, Mehmet
try lm.ridge from MASS package. __ 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, minimal,

Re: [R] glmnet: converting coefficients back to original scale

2015-04-03 Thread Suzen, Mehmet
This is interesting, can you post your lm.ridge solution as well? I suspect in glmnet, you need to use model.matrix with intercept, that could be the reason. -m __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/m

Re: [R] any way to write sas7bdat with R

2015-04-14 Thread Suzen, Mehmet
I didn't try this but there is an experimental package from Dr. Shotwell. http://cran.r-project.org/web/packages/sas7bdat/index.html if it can read, maybe you can modify to write as well? __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, s

Re: [R] Cost-effectiveness Analysis in R

2015-04-14 Thread Suzen, Mehmet
Do you have specific example that you have tried to implement in R? Can you post your codes too? There are high quality package BCEA and BayesTree, that could be helpful; http://cran.r-project.org/web/packages/BCEA/index.html http://cran.r-project.org/web/packages/BayesTree/index.html ___

Re: [R] Cost-effectiveness Analysis using R

2015-04-14 Thread Suzen, Mehmet
Yes. __ 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, minimal, self-contained, reproducib

Re: [R] weighted network centrality measures by network size

2014-08-07 Thread Suzen, Mehmet
Hi Jenny, Have you tried igraph before? See, http://igraph.org/r/doc/ There are couple of centrality measures there. Best, -m On 6 August 2014 02:50, Jenny Jiang wrote: > Dear R-help, > > My name is Jenny Jiang and I am a Finance Honours research > student from the University of New South W

Re: [R] Social Network Simulation

2016-04-18 Thread Suzen, Mehmet
Dear Professor Haenlein, Have you solved this issue yet? I found this eally interesting problem I was wondering if it is possible to wrapper "objective function" around igraph's 'sample_pa' and 'sample_smallworld'. If you have an example data set, I can have a look at this. Viele Gruesse aus London

Re: [R] Summation sign

2013-08-27 Thread Suzen, Mehmet
Hello Sebastian, I think you may need to use tensorA package. You can define different indices and use Einstein or Reimann summation convention. Grüße, Mehmet On 23 August 2013 15:14, Sebastian Hersberger wrote: > Hi all > > I have a short question relating to the usage of the summation sign in

Re: [R] Validating data type

2013-09-01 Thread Suzen, Mehmet
R is weakly typed language. I have asked similar question previously: http://r.789695.n4.nabble.com/count-appearence-of-zero-in-a-vector-td4654591.html It is advised to me to use S4 classes, if you want to enforce type checking automatically. Excellent reference on this is by the ACM award holde

Re: [R] R and Matlab

2012-12-25 Thread Suzen, Mehmet
Simplest way is the call a system command, using R CMD. See :http://stackoverflow.com/questions/6695105/call-r-scripts-in-matlab But there are more complicated solutions are proposed: http://www.mathworks.co.uk/matlabcentral/fileexchange/5051 This is uses R-(D)-COM In my opinion most robust int

Re: [R] R graphs from database

2012-12-26 Thread Suzen, Mehmet
Hi David, I suggest you to have a look at packages that can extract data from sql or nosql databases and graphics. CRAN task views would help: http://cran.r-project.org/web/views/Graphics.html The point is there are lots of alternatives. If you would like to use web-based visualisation d3 is bec

Re: [R] Is there a package to output midi files for sonification of data

2012-12-26 Thread Suzen, Mehmet
Hi Greg, you can try tuneR : http://cran.r-project.org/web/packages/tuneR/ Best, -m On 26 December 2012 22:04, Greg Hooper wrote: > Hi, I have been using Matlab to produce midi files for sonfication and > algorithmic composition projects. I would like to transfer that work into R > (in which I

Re: [R] Is there a package to output midi files for sonification of data

2012-12-27 Thread Suzen, Mehmet
On 27 December 2012 08:46, Greg Hooper wrote: > thanks Ben - hmm I think I will use a midi/csv utility > http://www.fourmilab.ch/webtools/midicsv/ and see how that goes. Another Hi Greg, Yes you are right, It is for wav analysis but as Ben suggests. Conversion should not be difficult. Also I thin

Re: [R] Is there a package to output midi files for sonification of data

2012-12-27 Thread Suzen, Mehmet
On 27 December 2012 08:46, Greg Hooper wrote: > thanks Ben - hmm I think I will use a midi/csv utility > http://www.fourmilab.ch/webtools/midicsv/ and see how that goes. Another Hi Greg, Yes you are right, It is for wav analysis but as Ben suggests. Conversion should not be difficult. Also I thin

Re: [R] Is there a package to output midi files for sonification of data

2012-12-27 Thread Suzen, Mehmet
On 27 December 2012 21:23, Ben Bolker wrote: > On 12-12-27 03:04 PM, Greg Hooper wrote: > it more closely into R I would take the C code and figure out how I > could integrate it into an R package as compiled code with a thin R > wrapper around it. Since the code "license" is "public domain", you

Re: [R] vectorization & modifying globals in functions

2012-12-27 Thread Suzen, Mehmet
You can use environments. Have a look at this this discussion. http://stackoverflow.com/questions/7439110/what-is-the-difference-between-parent-frame-and-parent-env-in-r-how-do-they On 27 December 2012 21:38, Sam Steingold wrote: > I have the following code: > > --8<---cut here--

Re: [R] efficiently multiply different matrices in 3-d array with different vectors?

2012-12-27 Thread Suzen, Mehmet
I think what you are doing is a tensor algebra. You may want to try tensorA: http://cran.r-project.org/web/packages/tensorA/index.html On 28 December 2012 06:33, Ranjan Maitra wrote: > Any pointers on an efficient way of doing this? I considered using > apply, but was not successful. please pos

Re: [R] efficiently multiply different matrices in 3-d array with different vectors?

2012-12-29 Thread Suzen, Mehmet
What I had in mind was a tensor multiplication. I think, using tensor arithmetic for multidimensional arrays looks more compacts and efficient (~ 2-3 times). I am guessing that performance will be much more pronounced for n-D arrays (n>3). # Component Wise set.seed(14) Z<-array(sample(1:100,8

Re: [R] efficiently multiply different matrices in 3-d array with different vectors?

2012-12-30 Thread Suzen, Mehmet
On 29 December 2012 20:35, arun wrote: >> Is it possible to obtain the same result as X without converting X to R? What do you mean by the same result? There is a relationship between X and R. If you express this relationship algebraically, you can get X directly using Y and Z tensors, vice versa

Re: [R] efficiently multiply different matrices in 3-d array with different vectors?

2012-12-31 Thread Suzen, Mehmet
On 30 December 2012 20:21, arun wrote: > HI, > I was not aware of the algebraic relationship. > Tx for the explanation. For the record; the simple example I have shown can be reproduced with Einstein's summation rule as well. While A and x tensors have covariant (lower) indices *only*. So using %

Re: [R] suggestions about import SAS results to R.

2013-01-02 Thread Suzen, Mehmet
> On Jan 2, 2013, at 12:37 PM, Yuan, Rebecca wrote: >> I am wondering if there is an efficient way to read SAS data directly in R, >> or what would be a better connection between SAS and R if I need to use R to >> deal with data achieved from SAS? >> You may try foreign and SASxport packages: ht

Re: [R] count appearence of zero in a vector

2013-01-03 Thread Suzen, Mehmet
Hi Hermann, You may want to use ?which, to store the index as well (might be handy in debugging or some other purposes if zeros has some special meaning) : test <- c(1, 1, 1 , 1 , 1, 1, 2, 1, 1, 1, 0, 2, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 2, 1, 1, 1, 1, 1, 1) length(which(test==0)) But be careful

[R] MT940 and MT942

2013-01-03 Thread Suzen, Mehmet
Hello List, Are there any R package that can process MT940/942? Thanks mem __ 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 comme

Re: [R] Working with Matrix

2013-01-04 Thread Suzen, Mehmet
Hello Rui/Jorge, This is shorter, and probably needs less memory for large matrices as you create an other copy by defining nas: matrixOp <- function(m1, m2, op=`+`) { rows <- min(nrow(m1), nrow(m2)) cols <- ncol(m1) op(m1[1:rows, 1:cols], m2[1:rows, 1:cols]) } Best, mem On 4 January 2013 1

Re: [R] count appearence of zero in a vector

2013-01-04 Thread Suzen, Mehmet
t)<1)) > #[1] 6 > length(which(abs(test) < .Machine$double.xmin)) > #[1] 6 > A.K. > > > > > - Original Message - > From: "Suzen, Mehmet" > To: Hermann Norpois > Cc: R help > Sent: Friday, January 4, 2013 12:27 AM > Subject: Re: [R] c

Re: [R] non-consing count

2013-01-04 Thread Suzen, Mehmet
My 2 cents: AFAIK both which and length are from C compiled code: http://cran.r-project.org/doc/manuals/r-release/R-ints.html#g_t_002eInternal-vs-_002ePrimitive so they must be quite efficient ie .Primitive and .Internal. Probably combination of this with a pattern in C would be more memory effi

Re: [R] Integrating Java, C++ and R

2013-01-04 Thread Suzen, Mehmet
On 4 January 2013 11:36, Royden Fernandes wrote: > Hi, > > I am able to integrate C++ and R through RInside library. However when I Questions regarding RInside should go to the rcpp-devel mailing list. http://lists.r-forge.r-project.org/mailman/listinfo/rcpp-devel ___

Re: [R] non-consing count

2013-01-04 Thread Suzen, Mehmet
On 4 January 2013 16:53, jim holtman wrote: > Is performance a concern? How often are you going to do it and what > other parts of your script also take longer? Why are you concerned > about allocating/discarding two vectors? I think Sam's question was about additional memory introduced by whi

Re: [R] count appearence of zero in a vector

2013-01-04 Thread Suzen, Mehmet
On 4 January 2013 17:47, Bert Gunter wrote: > Inline. > > On Fri, Jan 4, 2013 at 7:44 AM, Suzen, Mehmet wrote: >> >> I am always reserved about types and not sure how R auto casting works >> internally. >> In a large code using many different packages, I thin

Re: [R] MT940 and MT942

2013-01-05 Thread Suzen, Mehmet
On 5 January 2013 10:04, peter dalgaard wrote: >> So it looks like some assembly is required, but puzzle pieces are available. Concerning MT940 spec, I don't know who is regulating this. There is no RFC or similar. The closest thing I found was from DB: https://deutschebank.nl/nl/docs/MT94042_EN.

Re: [R] Manhattan Plot

2013-01-08 Thread Suzen, Mehmet
Hello Einat, Have you tried ggbio package's plotGrandLinear from bioconductor? Best, -m On 8 January 2013 20:03, Einat Granot wrote: > Hello, > I am trying to create a simple Manhattan plot for a small list of 200 SNPs > spread out in the genome in different genes. > I have tried different fun

Re: [R] R encrypt/decrypt

2013-01-09 Thread Suzen, Mehmet
On 9 January 2013 18:59, Ramiro Barrantes wrote: > I am working on a web system (php) that uses R in the backend, and we need > some basic fast encryption/decryption for the underlying mysql database that > can be used by both R AND php. It does not need to be top-of-the-line, but > just provi

Re: [R] R encrypt/decrypt

2013-01-09 Thread Suzen, Mehmet
pt/decrypt mechanism that also has a > counterpart on php or has suggestions about the situation. Sorry for the > confusion in my question. > > Thank you, > Ramiro > > > > > > From: mehmet.su...@gmail.com [mehmet.su...@gmail.co

Re: [R] how to count "A", "C", "T", "G" in each row in a big data.frame?

2013-01-10 Thread Suzen, Mehmet
On 10 January 2013 01:04, Yao He wrote: > In fact I want to calculate the gene frequency of each SNP. Why don't you use bioconductor for your analysis instead of trying to develop by your own? For example: http://www.bioconductor.org/help/course-materials/2008/MGED08/BiostringsMGED2008.pdf For

Re: [R] Find the functional relationship between two variables in R?

2013-01-10 Thread Suzen, Mehmet
On 10 January 2013 15:04, wrote: > Hi, > I have two variables x and y and the functional relationship between x and y > is like: y=x^2+log(x). My question is that is it possible to apply some > method to reconstruct the functional form based on the training data that is > generated from it? I und

Re: [R] ginv / LAPACK-SVD causes R to segfault on a large matrix.

2013-01-14 Thread Suzen, Mehmet
On 14 January 2013 15:08, Cyrus Shaoul wrote: > La.svd Dear Cyrus, Have you tried running La.svd ; LAPACK only version (without R) via C/C++ or Fortran code? After all it can be a LAPACK issue and R-team has no control on that. Best, -m __ R-help@r-p

Re: [R] readJPEG function cannot open jpeg files

2013-01-14 Thread Suzen, Mehmet
Similar issue with URLs: > yesWeCan <- > "http://upload.wikimedia.org/wikipedia/commons/9/9d/Barack_Obama.jpg"; > url(yesWeCan) description "http://upload.wikimedia.org/wikipedia/commons/9/9d/Barack_Obama.jpg";

Re: [R] readJPEG function cannot open jpeg files

2013-01-14 Thread Suzen, Mehmet
On 14 January 2013 18:56, Prof Brian Ripley wrote: > On 14/01/2013 16:26, Suzen, Mehmet wrote: >> >> Similar issue with URLs: > > > Not a similar issue at all: a URL is not a file. That most functions in R > itself open connections including URLs does not mean tha

Re: [R] How to change R file in stats?

2013-01-16 Thread Suzen, Mehmet
On 17 January 2013 07:03, Ibrahim Sobh wrote: > > Dear > I have changed some code in R file inside the stats package (dendrogram.R). > Now I wan to test and run the stats package with the new updated code, what > should I do in detail? For testing the simplest thing you can do is to ?source th

Re: [R] Recommendation for website to format R code

2013-01-25 Thread Suzen, Mehmet
Probably formatR/knitr is more robust but this one has an option for S http://hilite.me/ -m On 25 January 2013 02:37, C W wrote: > I ran across this page for C, Java, etc. No R. > > http://pastebin.com/ > It looks similar and more than what I was looking for, just saying. > > Mike > > > On Wed,

Re: [R] joint probability distribution

2013-01-25 Thread Suzen, Mehmet
Not sure what is your exact requirement but you can compute marginals and conditional probabilities using 'prob' package of Prof. Kerns. On 25 January 2013 22:15, Rui Barradas wrote: > Hello, > > You need to be much more specific. What do you know about the distributions > of X and Y? And about t

Re: [R] Pass vector as multiple parameters (as in python f(*x))

2013-01-26 Thread Suzen, Mehmet
This an alternating way of doing it using a list if you know the argument names in the function definition i.e. ?formals and ?alist, But would change the default values of the function. Probably not you wanted. > f <- function(x,y,z) x+y+z > args<-alist(x=5,y=6,z=7) > formals(f) <- args > f() [1]

Re: [R] Can I define a object array in R?

2013-01-29 Thread Suzen, Mehmet
Hello Sarah, You may want to use a package instead of trying to implement those data structures. For example: http://www.bioconductor.org/packages/release/bioc/html/graph.html Best, -m On 29 January 2013 11:22, Sarah Goslee wrote: > In R, lists are used for that. See ?list or any intro to R for

Re: [R] Modifying Package Data

2013-02-06 Thread Suzen, Mehmet
You can use system.file to fine the package root, then data file path relative to this. For example system.file(package = "stats") # The root of package 'stats' See ?system.file On 6 February 2013 22:02, David Winsemius wrote: > > On Feb 4, 2013, at 11:37 AM, Rich Shepard wrote: > >> The bio.in

Re: [R] rpy2 (Python <--> R)

2013-02-10 Thread Suzen, Mehmet
Wrong list. You may want to ask here: http://rpy.sourceforge.net/maillist.html But looking at your output it looks like you need to install readline library sources or be sure that it is in the CFLAGS's -I On 10 February 2013 06:06, James Jong wrote: > Hi - I am having trouble installing rpy2. I

Re: [R] How to use character in C code?

2013-05-10 Thread Suzen, Mehmet
You may want to use C++ instead using Rcpp which string handling would be easier: http://gallery.rcpp.org/articles/strings_with_rcpp/ On 10 May 2013 15:51, cgenolin wrote: > Hi the list, > I include some C code in a R function using .C. The argument is a character. > I find how to acces to the c

Re: [R] Optimization of a function using optim

2013-06-17 Thread Suzen, Mehmet
Dear Graham, On 16 June 2013 02:08, Graham McDannel wrote: > I am attempting to optimize a function I have developed using optim. > > I am getting the below error message: > > Error in n < 1: 'n' is missing > I suspect a function requires an argument named n, and you didn't pass one. Either in

Re: [R] ROC with more than one predictor

2012-10-24 Thread Suzen, Mehmet
On Tue, Oct 23, 2012 at 11:52 PM, Luigi wrote: > > Any tip on how to proceed? You may want to do check rocplus package. Its vignette is pretty good. http://cran.r-project.org/web/packages/rocplus/vignettes/rocplus.pdf In your case, I think pairwise comparison would be one approach Best, Mehmet

Re: [R] operating website through R

2014-04-11 Thread Suzen, Mehmet
You just need to pass the parameters on Giovanni_cgi.pl with action=ASCII+Output On 11 April 2014 17:19, eliza botto wrote: > Dear Users of R, > I wanted to operate certain slots of this website > (http://disc2.nascom.nasa.gov/Giovanni/tovas/TRMM_V7.3B42_daily.2.shtml) > through R. I wanted to

Re: [R] operating website through R

2014-04-12 Thread Suzen, Mehmet
This looks not so elegant, while normally data provider must have a nice accessing API, anyway, for example you can do this: > myAdd <- > 'http://disc2.nascom.nasa.gov/daac-bin/Giovanni/tovas/Giovanni_cgi.pl?west=60&north=50&east=70&south=-50¶ms=0|3B42_V7&plot_type=Area+Plot&byr=2014&bmo=01&bdy=

Re: [R] inverse normal distribution function

2014-04-19 Thread Suzen, Mehmet
You may want to read about generalized linear modelling and link functions for forming appropriate categorical variable/link function. See documentations in R: ?glm, ?family and ?inverse.gaussian. Also look at the original paper of Nelder, John; Wedderburn, Robert , it is available freely with th

Re: [R] inverse normal distribution function

2014-04-19 Thread Suzen, Mehmet
Not sure how would you do that but there is a package SEM on CRAN for structural equation models. On 20 April 2014 01:10, thanoon younis wrote: > thank you so much Suzen > i want to use bayesian analysis in structural equation models with ordered > categorical data and i want to use inverse norma

Re: [R] uniform number

2014-05-05 Thread Suzen, Mehmet
WTF? Is that a R package from you? On 5 May 2014 09:27, Rolf Turner wrote: > On 05/05/14 17:05, Ragia Ibrahim wrote: >> >> >> Dear group, >> How to generate uniform probability choosing p to be 2% and 5%, in >> separate trials for 100 times. > > > No idea WTF you are talking about. Can you f

Re: [R] uniform number

2014-05-05 Thread Suzen, Mehmet
That paper you cite is about Social networks. You may want to use igraph or sna packages On 5 May 2014 10:54, Ragia Ibrahim wrote: > thanks for replying > > in the following paper > http://www.cs.cornell.edu/home/kleinber/kdd03-inf.pdf > page 6 third paragraph > > > the author writes: > "assi

Re: [R] problem in r-code

2014-05-09 Thread Suzen, Mehmet
Wrong list. This is an R list not Bugs. You may want to consult Bugs materials: http://www2.mrc-bsu.cam.ac.uk/bugs/weblinks/webresource.shtml On 8 May 2014 11:36, thanoon younis wrote: > dear all members > > is there anyone explain to me the code below and how can i transfer this > code to winbug

Re: [R] How can I make this nested loop faster?

2014-05-09 Thread Suzen, Mehmet
Your code is not re-producable. Can you provide a working example using a standard dataset from R? But, you could first try to use compiler package, see ?enableJIT. Another option would be to use doMC/foreach packages if you can run your assignment in the nested loop in parallel, see %dopar%. On

Re: [R] Calculating transition probabilties

2014-05-13 Thread Suzen, Mehmet
This looks like this is your homework about Markov chains. not an R question actually. But have a look at the markovchain package from CRAN: http://cran.r-project.org/web/packages/markovchain/vignettes/an_introduction_to_markovchain_package.pdf On 13 May 2014 16:49, Baba Bukar wrote: > Dear all,

Re: [R] How to Optimize two functions together in R

2014-05-18 Thread Suzen, Mehmet
This deals with the multi-objective optimisation. Try MCO and emoa packages. http://stats.stackexchange.com/questions/77580/optimization-of-multiple-objective-functions-with-constraints On 15 May 2014 17:47, Mingxuan Han wrote: > I am trying to minimize two functions with same set of parameter(

Re: [R] How to Optimize two functions together in R

2014-05-19 Thread Suzen, Mehmet
Use defaul values initially, to see if you got reasonable results. See here for the details of nsga2 http://dx.doi.org/10.1109/4235.996017 On 19 May 2014 16:42, Mingxuan Han wrote: > I try to use NSGAII function in the mco but I am kind of confusing about the > numbers of input and output dimensi

Re: [R] copula fitting

2014-06-10 Thread Suzen, Mehmet
yes you can. On 7 June 2014 16:04, mudit gupta wrote: > Hi guys, > > can i fit a copula to two marginal distributions with different sample > size? > like one has 2340 observations and other has 1912. > > thanks > Mudit > > [[alternative HTML version deleted]] > > __

Re: [R] copula fitting

2014-06-10 Thread Suzen, Mehmet
Have you checked out 'copula' package? On 11 June 2014 00:36, Suzen, Mehmet wrote: > yes you can. > > On 7 June 2014 16:04, mudit gupta wrote: >> Hi guys, >> >> can i fit a copula to two marginal distributions with different sample >> size? >>

Re: [R] Logistic Regression

2014-06-14 Thread Suzen, Mehmet
You might want to read this vignette: http://cran.r-project.org/web/packages/HSAUR/vignettes/Ch_logistic_regression_glm.pdf On 14 June 2014 19:53, javad bayat wrote: > Dear all, I have to use "Zelig" package for doing logistic regression. > How can I use Zelig package for logistic regression? > >

Re: [R] Defining default method for S3, S4 and R5 classes

2014-06-14 Thread Suzen, Mehmet
There is a nice tutorial on this: http://adv-r.had.co.nz/OO-essentials.html For an in depth guide, have a look at the book from John Chambers, Software for data analysis programming with R. On 13 June 2014 12:20, Luca Cerone wrote: > Dear all, > > I am writing a script implementing a pipeline to

Re: [R] Using R to analyze multiple MRI studies

2014-07-05 Thread Suzen, Mehmet
Did you inspect the CRAN view for Medical imaging? http://cran.r-project.org/web/views/MedicalImaging.html On 3 July 2014 17:09, moleps islon wrote: > I need to analyze multiple T1 contrast enhanced MRI studies from different > patients. They are all in DICOM format. I see that there are differen

Re: [R] A general question: Is language S a component part of R?

2012-11-06 Thread Suzen, Mehmet
On Tue, Nov 6, 2012 at 2:34 AM, Hadley Wickham wrote: > On Monday, November 5, 2012, Rolf Turner wrote: > >> On 06/11/12 09:40, Iurie Malai wrote: >> >>> So, R (as a language) can be viewed as an extended S language (S + some >>> improvements)? And the R environment includes this (extended) langua

Re: [R] how to view source code of a function inside a package?

2012-11-15 Thread Suzen, Mehmet
It might be a C code wrapped around. -m On Thu, Nov 15, 2012 at 8:21 PM, C W wrote: > Dear list, > I am trying to look at the function inside a package. I know that > methods() would do the trick, but what if the function is hidden? I have a > problem displaying the hidden function. > > Say, fo

Re: [R] Installing R on Ubuntu

2012-11-15 Thread Suzen, Mehmet
Try Prof. Wilkinson's recent blog entry: http://darrenjw.wordpress.com/2012/11/10/keeping-r-up-to-date-on-ubuntu-linux/ On Thu, Nov 15, 2012 at 5:14 PM, Karel van Duijvenboden wrote: > Hello R-help team, > > I seek your help (for what is most likely a very simple problem). I'm new > to Ubuntu a

Re: [R] Function for extracting Lambda Sets

2012-11-16 Thread Suzen, Mehmet
Hi Nick, Have you tried this: http://www.bioconductor.org/packages/release/bioc/html/RBGL.html There is a function there called 'lambdaSets' Best, Mehmet On Thu, Nov 15, 2012 at 10:45 AM, Nick Duncan wrote: > Dear All, > > I would like to extract Lambda Sets from a binary matrix that > represe

Re: [R] simple question on loop

2012-11-16 Thread Suzen, Mehmet
Use mapply instead On Fri, Nov 16, 2012 at 5:01 PM, billycorg wrote: > Hi R Users. > > I have a simple question on a loop. > > The following loop works fine: > > r_t=list() > for(i in 1:500) > { > r_t[[i]]=h_t_half[[i]]%*%matrix(*z_t_m*[i,]) > } > > But indeed I need also that *z_t_m* varies. Let

Re: [R] Download a file from url

2012-11-19 Thread Suzen, Mehmet
you can use RCurl for web connections from Duncan Lang, see its paper: http://www.omegahat.org/RCurl/RCurlJSS.pdf getURL there will solve your problem. On Sun, Nov 18, 2012 at 2:07 AM, veepsirtt wrote: > Hi R, > I installed wget and tried to download the file from this > http://nseindia.com/cont

Re: [R] about MCMC

2012-11-20 Thread Suzen, Mehmet
Hello Tania, You may want to read MCMCpack's paper; http://www.jstatsoft.org/v42/i09/paper and one of the best book in the field: http://www.amazon.com/Markov-Practice-Chapman-Interdisciplinary-Statistics/dp/0412055511 Also look on CRAN view on Bayesian Inference Best, -m On Tue, Nov 20, 201

Re: [R] Create BATCH file

2012-11-21 Thread Suzen, Mehmet
Try this: http://stat.ethz.ch/R-manual/R-patched/library/utils/html/BATCH.html On Wed, Nov 21, 2012 at 11:58 AM, R_Antony wrote: > Hi, > > I have a ".R" file written many functions into that. My requirement what is, > i need to create a batch file for this. > No idea, how to create it. Tried it

Re: [R] function call from another r file

2012-11-24 Thread Suzen, Mehmet
If you want to handle a generic case, best thing is to create an R package. It is much easier to manage that using source(), if you have lots of different functionality and data files. Also look at ?system.file. On Sat, Nov 24, 2012 at 7:49 AM, Jeff Newmiller wrote: > It is straightforward to loa

Re: [R] Concordant und Discordant Paars of Logistic Regression

2012-11-28 Thread Suzen, Mehmet
Hello Marcus, Concerning measures of association, have a look at here http://stackoverflow.com/questions/2557863/measures-of-association-in-r-kendalls-tau-b-and-tau-c But why do you need logistic regression? Best, -m PS: I think official language is Englisch in diese list. On Tue, Nov 27, 201

Re: [R] code optimisation problem

2012-11-28 Thread Suzen, Mehmet
or write the compute intense part in C and interface it to R. On Wed, Nov 28, 2012 at 5:45 AM, William Dunlap wrote: > Or try the filter() function (with convolutional filter rep(1/3,3)). > > Bill Dunlap > Spotfire, TIBCO Software > wdunlap tibco.com > > >> -Original Message- >> From: r-h

Re: [R] best HDF5 package: h5r or rhdf5?

2012-11-28 Thread Suzen, Mehmet
In my experience, I think h5r is more robust while it is directly wrapped around the C library and contains more functionality. On Tue, Nov 27, 2012 at 4:51 PM, Johann Hibschman wrote: > What is the current best package for manipulating HDF5 data files? > > I tried "hdf5" a long time ago, but I r

Re: [R] Solving a multinomial gompertz partial differential equation in r

2012-12-03 Thread Suzen, Mehmet
Hi Brandon, You can try ReacTran package: cran.r-project.org/web/packages/ReacTran/vignettes/PDE.pdf Best, -m On 3 December 2012 06:49, Brandon Breitling wrote: > I haven't used r in quite a while but would like to get back into it. I > have a problem that I would like to solve with r. I have

Re: [R] Resampling Help Needed

2012-12-04 Thread Suzen, Mehmet
You can use, 'sample' function for sampling and may consider using partition clustering for selecting your regions, see Cluster task view: http://cran.r-project.org/web/views/Cluster.html On 4 December 2012 00:53, KoopaTrooper wrote: > I am using package ks() to build 3D representations of bird

  1   2   >