Re: [R] A question about corAR1 and grouping

2016-01-08 Thread Jeff Newmiller
I don't understand your question, but lacking a reproducible example you may not get the attention of those who might be more likely to. -- Sent from my phone. Please excuse my brevity. On January 6, 2016 10:55:08 AM PST, Saptarshi Guha wrote: >Hello, > >I was under

[R] NAs introduced by coercion

2016-01-08 Thread Manish MAHESHWARI
Hi, In glmnet, while using a matrix as an input, I get an error of NA's introduced by coercion. However in the input there is no NA value. cvfit = cv.glmnet( x = mat1, y = train$response,family="multinomial", type.multinomial = "grouped", parallel = TRUE) Error in lognet(x, is.sparse, ix, jx,

Re: [R] (no subject)

2016-01-08 Thread Ulrik Stervbo
Please keep the list in CC. Maybe something like dat.vline <- data.frame( variable = c("runmean_10yr_Nino_3_Index_17th_century", "runmean_10yr_Nino_3_Index_17th_century", "runmean_10yr_Nino_3_Index_18th_century", "runmean_10yr_Nino_3_Index_17th_century"), xval = c(55, 65, 72, 82)) and

[R] r output as html or pdf without rstudio

2016-01-08 Thread Ragia .
dear group, is there a way to write my outputs to any kind of files ( the output contains text and graph) using R only without installing rstudio and using rmd  files. thanks in advance Ragia __ R-help@r-project.org

Re: [R] Fwd: exact trend test (enumerate all possible contingency tables with fixed row and column margins)

2016-01-08 Thread li li
As a follow up, I found out the proc freq in SAS can perform the exact permutation trend test. Hanna 2016-01-08 9:30 GMT-05:00 li li : > Thanks Bert. > > > 2016-01-07 13:39 GMT-05:00 Bert Gunter : > >> Sorry -- neglected to reply to the list. --

Re: [R] r output as html or pdf without rstudio

2016-01-08 Thread Greg Snow
Yes, you can use the knitr package directly (that is what Rstudio uses, but it is its own package). On Fri, Jan 8, 2016 at 1:16 PM, Ragia . wrote: > dear group, > is there a way to write my outputs to any kind of files ( the output contains > text and graph) using R only

[R] rgl.snapshot only captures a small portion what's visible in the RGL device window on CentOS 7

2016-01-08 Thread Wittner, Ben, Ph.D.
Hello, As an example, I ran the following code: library("rgl") example(plot3d) rgl.snapshot("test.png") The

Re: [R] Solve an equation including integral

2016-01-08 Thread Berend Hasselman
> On 8 Jan 2016, at 17:47, Ravi Varadhan wrote: > > There was a mistake in the previously sent function. I had hard coded the > values of parameters `nu' and `exi'. > > Use this one: > > myroot <- function(t, nu, exi, alpha){ > fun <- function(t, exi, nu) >

[R] Combining dataframes with different row numbers and plotting with ggplot2

2016-01-08 Thread maryam moazam
Dear Sir / Madam, I have just come to the amazing R software, so please be patient if my question is basic for you. I have 2 text file (say 1.txt and 2.txt), each file containing 2 columns and different row numbers, like below case size case1 120 case2 120 case3 121 case4 121 case5 121 case6 122

Re: [R] rgl.snapshot only captures a small portion what's visible in the RGL device window on CentOS 7

2016-01-08 Thread Duncan Murdoch
On 08/01/2016 4:13 PM, Wittner, Ben, Ph.D. wrote: Hello, As an example, I ran the following code: library("rgl") example(plot3d) rgl.snapshot("test.png") The full plot is visible in the window titled RGL device 1 [Focus], but only a small portion of the upper left part of the plot is visible

[R] permTREND function in package "perm"

2016-01-08 Thread li li
Hi all, I am trying to figure out how to use the function permTREND correctly in package "perm". There does not seem to be any examples given for this function. In the help file, it says the following: ## Default S3 method: permTREND(x, y, alternative = c("two.sided", "less", "greater"), exact

Re: [R] NAs introduced by coercion

2016-01-08 Thread PIKAL Petr
Hi The values in mat1 are not NA. OK. However they shall be numbers. Are they numbers? What is result of str(mat1) Cheers Petr > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Manish > MAHESHWARI > Sent: Friday, January 08, 2016 9:36 AM > To:

Re: [R] NAs introduced by coercion

2016-01-08 Thread Jim Lemon
Hi Manish, Most likely there are one or more negative numbers in mat1. Jim On Fri, Jan 8, 2016 at 7:35 PM, Manish MAHESHWARI wrote: > Hi, > > In glmnet, while using a matrix as an input, I get an error of NA's > introduced by coercion. However in the input there is no NA

Re: [R] permTREND function in package "perm"

2016-01-08 Thread Bert Gunter
?UseMethod ## for S3 method help. In addition, please read An Introduction to R (ships with R) or other online tutorial to learn about S3 methods. You should not expect this forum to provide you information that you should learn about yourself. As for your other queries, someone who is familiar

[R] plot 2D matrix of RGB values

2016-01-08 Thread Martin Batholdy via R-help
Hi, I have a 2 dimensional matrix with RGB values and would like to plot it as a two dimensional surface. I am aware of functions like image() that plot a matrix of values as a grid of coloured rectangles. But I can not directly feed in the specific color value for each of these rectangles,

Re: [R] Fwd: exact trend test (enumerate all possible contingency tables with fixed row and column margins)

2016-01-08 Thread li li
Thanks Bert. 2016-01-07 13:39 GMT-05:00 Bert Gunter : > Sorry -- neglected to reply to the list. -- Bert > > > > -- Forwarded message -- > From: Bert Gunter > Date: Thu, Jan 7, 2016 at 10:38 AM > Subject: Re: [R] exact trend test

Re: [R] Solve an equation including integral

2016-01-08 Thread Ravi Varadhan
There was a mistake in the previously sent function. I had hard coded the values of parameters `nu' and `exi'. Use this one: myroot <- function(t, nu, exi, alpha){ fun <- function(t, exi, nu) (nu+t^2)^(-(nu+1)/2)*exp(((nu+1)*exi*t)/((nu+t^2)^0.5)) res <- alpha - integrate(fun, -Inf, t,

Re: [R] plot 2D matrix of RGB values

2016-01-08 Thread Michael Sumner
There is ?rasterImage which can take a matrix of hex values, or a 3D array of individual colour dimension values in RGB. It's pretty low-level, used to add to an existing plot. The ancient ?image function leverages this facility if you use "useRaster = TRUE". The "raster" package (no relation),

[R] (no subject)

2016-01-08 Thread Matthias Worni
Thank you for the help. It worked out fine. However trying to add additional aesthetics I came to another point, where I couldnt figure out a way to solve it. Perhaps you run into similar problems since your familiar with the ggplot package. The code is the following:

[R] Scripting Problem--Linear Regression Using Logit of the Response Variable

2016-01-08 Thread John, Larry
Dear fellow citizens of the R-verse, I'm a non-quant analyst trying to do some statistical analyses on a large data set unimaginatively named "data." sympathy trust fear greed sharer_prob [1] 3 20 00.669593 [2] 2 12 30.669593 [3] 2 22

Re: [R] mlogit.optim

2016-01-08 Thread MCGUIRE, Rhydwyn
Hi Alaa, I haven't personally used the mlogit.optim fuction. Have you tried searching github or stack exchange for the string "mlogit.optim" . I find they can be very useful for finding examples of a function being used in practice. Cheers Rhydwyn Rhydwyn McGuire Senior Biostatistician |

Re: [R] Solve an equation including integral

2016-01-08 Thread Ravi Varadhan
I think this is what you want: myroot <- function(t, nu, exi, alpha){ fun <- function(t, exi, nu) (nu+t^2)^(-(nu+1)/2)*exp(((nu+1)*exi*t)/((nu+t^2)^0.5)) res <- alpha - integrate(fun, -Inf, t, nu=2, exi=0.5)$value return(res) } uniroot(myroot, c(-2, 2), nu=2, exi=0.5, alpha=.05) Hope

Re: [R] (no subject)

2016-01-08 Thread Ulrik Stervbo
Hi Matthias, Your dat.vline should include the 'variable' as you facet on this. HTH On Fri, 8 Jan 2016 at 17:49 Matthias Worni wrote: > Thank you for the help. It worked out fine. However trying to add > additional aesthetics I came to another point, where I couldnt

[R] [Q] It it possible to create the data frame only non-zero data column?

2016-01-08 Thread Hiroyuki Sato
Hello all. I re-post this question by e-mail. (I posted via google-group. But It's not posted yet.) I'm newbie GNU R. I would like to compare two datas. How to select columns which has non-zero datas?. It it possible to create the data frame only VAL3(non-zero data) column with command?

Re: [R] Scripting Problem--Linear Regression Using Logit of the Response Variable

2016-01-08 Thread Sarah Goslee
>From a basic R syntax perspective, you're missing several commas, and you don't specify your data. You also have a substantial problem with parenthesis matching, with 3 ( and 4 ) adjust is an argument to logit(), and I'm assuming na.action is an argument to lm(). >> EvacLM <-

Re: [R] [Q] It it possible to create the data frame only non-zero data column?

2016-01-08 Thread Ulrik Stervbo
Could you use rowsum and select rows larger then 0? Something like: result[rowsum(as.matrix(result) > 0, ] On Fri, 8 Jan 2016 at 18:00 Hiroyuki Sato wrote: > Hello all. > > I re-post this question by e-mail. > (I posted via google-group. But It's not posted yet.) > > I'm