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

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

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

2017-10-31 Thread Suzen, Mehmet
2017 at 15:09, Suzen, Mehmet <msu...@gmail.com> wrote: > On 31 October 2017 at 12:42, Martin Maechler <maech...@stat.math.ethz.ch> > 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

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,

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

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

2017-10-30 Thread Suzen, Mehmet
hler <maech...@stat.math.ethz.ch> wrote: >>>>>> Suzen, Mehmet <msu...@gmail.com> >>>>>> 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 git

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;)

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]

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] comparition of occurrence of multiple variables between two dataframes

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

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

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

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

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

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

Re: [R] R package for scorecard development

2017-06-29 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

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

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?

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

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

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

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,

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

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

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,

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,

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] 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

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 jiangyun...@y7mail.com wrote: Dear R-help, My name is Jenny Jiang and I am a Finance Honours research student from the

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 mole...@gmail.com wrote: I need to analyze multiple T1 contrast enhanced MRI studies from different patients. They are all in DICOM format. I see that

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 j.bayat...@gmail.com wrote: Dear all, I have to use Zelig package for doing logistic regression. How can I use Zelig package for

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 luca.cer...@gmail.com wrote: Dear all, I am writing a script

Re: [R] copula fitting

2014-06-10 Thread Suzen, Mehmet
yes you can. On 7 June 2014 16:04, mudit gupta muditf...@gmail.com 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 msu...@gmail.com wrote: yes you can. On 7 June 2014 16:04, mudit gupta muditf...@gmail.com wrote: Hi guys, can i fit a copula to two marginal distributions with different sample size? like one has 2340

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 han...@purdue.edu wrote: I try to use NSGAII function in the mco but I am kind of confusing about the numbers of input

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 han...@purdue.edu wrote: I am trying to minimize two functions with same

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 bbu...@nda.edu.ng

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 thanoon.youni...@gmail.com wrote: dear all members is there anyone explain to me the code below and how can i

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] uniform number

2014-05-05 Thread Suzen, Mehmet
WTF? Is that a R package from you? On 5 May 2014 09:27, Rolf Turner r.tur...@auckland.ac.nz 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.

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 ragi...@hotmail.com wrote: thanks for replying in the following paper http://www.cs.cornell.edu/home/kleinber/kdd03-inf.pdf page 6 third paragraph the author

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

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 thanoon.youni...@gmail.com wrote: thank you so much Suzen i want to use bayesian analysis in structural equation models with ordered categorical data and i

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 -

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 eliza_bo...@hotmail.com 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)

Re: [R] Sampling according to type

2014-03-05 Thread Suzen, Mehmet
If I understood correctly, you need weighted sampling. Try 'prob' argument from 'sample'. For your example: n - 10 ntype - rbinom(n, 1, 0.5) myProbs - rep(1/10, 10) # equally likely myProbs[ which(ntype == 0)] - 0.75/7 # Divide so the sum will be 1.0 myProbs[ which(ntype == 1)] - 0.25/3

Re: [R] Sampling according to type

2014-03-05 Thread Suzen, Mehmet
myProbs[ which(ntype == 0)] - 0.75/7 # Divide so the sum will be 1.0 myProbs[ which(ntype == 1)] - 0.25/3 Here of course you need to divide by number of 0s and 1s, 7 and 3 were was just an example. __ R-help@r-project.org mailing list

Re: [R] Shortest connected path in a matrix

2014-03-05 Thread Suzen, Mehmet
You may want to check bioconductor packages doing graph algorithms. Maybe this one: http://www.bioconductor.org/packages/release/bioc/manuals/RBGL/man/RBGL.pdf See for example ?dijkstra.sp On 5 March 2014 18:44, McCloskey, Bryan bmcclos...@usgs.gov wrote: Here is some example data (hopefully

Re: [R] Season's Greetings (and great news ... )!

2013-12-22 Thread Suzen, Mehmet
I wouldn't blame R for floating-point arithmetic and our personal feeling of what 'zero' should be. options(digits=20) pi [1] 3.141592653589793116 sqrt(pi)^2 [1] 3.1415926535897926719 (pi - sqrt(pi)^2) 1e-15 [1] TRUE There was a similar post before, for example see:

Re: [R] Functional Programming patterns

2013-11-20 Thread Suzen, Mehmet
Have you checked the r.lambda package of Brian Lee Yung Rowe ? http://cran.r-project.org/web/packages/lambda.r/index.html On 20 November 2013 10:02, mohan.radhakrish...@polarisft.com wrote: Hi, ' Not specific to 'R'. I search for patterns and found http://patternsinfp.wordpress.com/ which

Re: [R] Sending a matrix in an email

2013-11-18 Thread Suzen, Mehmet
On 18 November 2013 05:37, Ira Fuchs irafu...@gmail.com wrote: I have a matrix which has colnames and I would like to send this matrix using sendmailR. How can I convert this simple matrix My 1 cent; In case of large objects or full session, suitable for attachment; RData might be more

Re: [R] Fitting arbitrary curve to 1D data with error bars

2013-11-14 Thread Suzen, Mehmet
question has nothing to do with drawing error bars on a plot. What I want is to do a curve fit to a data with error bars. Best, e. On 14 Nov 2013, at 04:21, Suzen, Mehmet wrote: If you are after adding error bars in a scatter plot; one example is given below : #some example data

Re: [R] Fitting arbitrary curve to 1D data with error bars

2013-11-13 Thread Suzen, Mehmet
If you are after adding error bars in a scatter plot; one example is given below : #some example data set.seed(42) df - data.frame(x = rep(1:10,each=5), y = rnorm(50)) #calculate mean, min and max for each x-value library(plyr) df2 - ddply(df,.(x),function(df)

Re: [R] computation of hessian matrix

2013-11-01 Thread Suzen, Mehmet
On 1 November 2013 11:06, IZHAK shabsogh ishaqb...@yahoo.com wrote: below is a code to compute hessian matrix , which i need to generate 29 number of different matrices for example first You may consider using Numerical Derivatives package for that instead, see:

Re: [R] Revo R for Arima Implementation

2013-10-30 Thread Suzen, Mehmet
On 28 October 2013 14:26, Anindita Chattopadhyay anindit...@mu-sigma.com wrote: We need to understand how we can implement this in Revo R. Most of the people here contribute to community of R not Revo R. I think it is unfair of you to request from this list to solve your Revo R issue.

Re: [R] Incorporate Julia into R

2013-10-17 Thread Suzen, Mehmet
On 17 October 2013 15:38, Timo Schmid timo_sch...@hotmail.com wrote: I have some code in R with a lot of matrix multiplication and inverting. R can be very slow for larger matrices like 5000x5000. I have seen the new programming language Julia (www.julialang.org) which is quite fast in doing

Re: [R] RStudio with Revolution-R

2013-10-15 Thread Suzen, Mehmet
On 15 October 2013 01:27, Maxim Linchits mlinch...@gmail.com wrote: Hello, Is it possible to use Revolution-R's multithreading capability with RStudio as the IDE? Apparently, RevoR is available for Ubuntu, Wrong list! But for reference:

Re: [R] Image Classification in R

2013-10-14 Thread Suzen, Mehmet
Hello Lorenzo, Try to locate related R packages from here: http://cran.r-project.org/web/views/MedicalImaging.html On 14 October 2013 22:23, Lorenzo Isella lorenzo.ise...@gmail.com wrote: Dear All, For a project I am given a set of images. They represent either healthy or tumoral tissue, but

Re: [R] DEoptim inconsistent output

2013-09-30 Thread Suzen, Mehmet
On 29 September 2013 19:17, Aya Anas aa...@feps.edu.eg wrote: doesn't make sense at all. I got parameters that don't satisfy the constraint. In addition, when i substituted with the resulting parameters Maybe you have issues with your interpretation of the usage of the package and expected

Re: [R] Why does sin(pi) not return 0?

2013-09-26 Thread Suzen, Mehmet
On 26 September 2013 11:30, Rainer M Krug rai...@krugs.de wrote: Why doesn't return me 0? It isn't R question at all. You might want to read about representing real numbers in a computer using floating point http://en.wikipedia.org/wiki/Floating_point If you want more precision for some reason,

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

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 sebastian.hersber...@unibas.ch wrote: Hi all I have a short question relating to the

Re: [R] Optimization of a function using optim

2013-06-17 Thread Suzen, Mehmet
Dear Graham, On 16 June 2013 02:08, Graham McDannel graham.mcdan...@gmail.com 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

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 cgeno...@u-paris10.fr wrote: Hi the list, I include some C code in a R function using .C. The argument is a character. I find

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 ribonucle...@gmail.com wrote: Hi - I am having

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 dwinsem...@comcast.net wrote: On Feb 4, 2013, at 11:37 AM, Rich Shepard

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 sarah.gos...@gmail.com wrote: In R, lists are used for that. See ?list

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] 18

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 tmrs...@gmail.com 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

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 ruipbarra...@sapo.pt wrote: Hello, You need to be much more specific. What do you know about the distributions of X

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

2013-01-16 Thread Suzen, Mehmet
On 17 January 2013 07:03, Ibrahim Sobh im_s...@hotmail.com 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

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 cyrus.sha...@uni-tuebingen.de 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

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 rip...@stats.ox.ac.uk 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 that contributed

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 yao.h.1...@gmail.com 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:

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

2013-01-10 Thread Suzen, Mehmet
On 10 January 2013 15:04, jt...@mappi.helsinki.fi 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

Re: [R] R encrypt/decrypt

2013-01-09 Thread Suzen, Mehmet
On 9 January 2013 18:59, Ramiro Barrantes ram...@precisionbioassay.com 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

Re: [R] R encrypt/decrypt

2013-01-09 Thread Suzen, Mehmet
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.com] on behalf of Suzen, Mehmet [msu...@gmail.com] Sent: Wednesday

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 einatgra...@gmail.com 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

Re: [R] MT940 and MT942

2013-01-05 Thread Suzen, Mehmet
On 5 January 2013 10:04, peter dalgaard pda...@gmail.com 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:

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

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

2013-01-04 Thread Suzen, Mehmet
$double.xmin)) #[1] 6 A.K. - Original Message - From: Suzen, Mehmet msu...@gmail.com To: Hermann Norpois hnorp...@googlemail.com Cc: R help r-help@r-project.org Sent: Friday, January 4, 2013 12:27 AM Subject: Re: [R] count appearence of zero in a vector Hi Hermann, You may want

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

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

2013-01-04 Thread Suzen, Mehmet
On 4 January 2013 11:36, Royden Fernandes roydens...@gmail.com 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 jholt...@gmail.com 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

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

2013-01-04 Thread Suzen, Mehmet
On 4 January 2013 17:47, Bert Gunter gunter.ber...@gene.com wrote: Inline. On Fri, Jan 4, 2013 at 7:44 AM, Suzen, Mehmet msu...@gmail.com 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 think being

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

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:

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 smartpink...@yahoo.com 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)

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 smartpink...@yahoo.com 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

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 (n3). # Component Wise set.seed(14)

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 gregstuarthoo...@gmail.com 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

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 gregstuarthoo...@gmail.com 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

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 bbol...@gmail.com 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

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 s...@gnu.org wrote: I have the following code: --8---cut

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 maitra.mbox.igno...@inbox.com wrote: Any pointers on an efficient way of doing this? I considered using apply, but was

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

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 gregstuarthoo...@gmail.com wrote: Hi, I have been using Matlab to produce midi files for sonfication and algorithmic composition projects. I would like to transfer that

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

  1   2   >