Re: [R] matrix of random variables from a matrix of means and matrix of sd

2013-05-25 Thread M M
Nice one - didn't think of the array at all as my brain was fixated on lists... Thanks, Murali Date: Fri, 24 May 2013 21:54:22 +0100 From: ruipbarra...@sapo.pt To: fean...@hotmail.com CC: r-help@r-project.org Subject: Re: [R] matrix of random variables from a matrix of means and matrix of

[R] Generating random numbers satisfying specific regression equation

2013-05-25 Thread Tobias Kisch
Hello everybody Sorry if such a question has already been posted somewhere, but I wasn’t able to find an answer yet. I’m trying to generate random numbers for illustration purposes. The random numbers should satisfy a multiple regression equation, for example: z = 0.3 + 0.05 * x + 1.5 * y

Re: [R] Generating random numbers satisfying specific regression equation

2013-05-25 Thread John Sorkin
(1) you need to examine the rnorm function, enter ?rnorm() (2) when you review the documentation produced by entering the command above, you will see that the rnorm function needs three parameter, the number of values to generate, the mean of the numbers to be generated, and the SD (standard

Re: [R] Continuous columns of matrix

2013-05-25 Thread eliza botto
Thanks william, I got it now... Elisa From: wdun...@tibco.com To: eliza_bo...@hotmail.com; ruipbarra...@sapo.pt CC: r-help@r-project.org Subject: RE: [R] Continuous columns of matrix Date: Sat, 25 May 2013 02:33:40 + What you call continuous I call cyclic (with period NROW(x) in this

[R] How to plot two functions a(t) b(t) along with x y axes respectively in r ?

2013-05-25 Thread Tanumoy Pal
  Sir,                 I, Tanumoy Pal, a student of M.Sc. Statistics ,am a beginner in R language. I want to write a program on SPRT in R. For this i want to draw the OC curve. You know that for drawing of OC curve we have to draw L(πh ) vs. πh . I want to know that is there any

Re: [R] How to plot two functions a(t) b(t) along with x y axes respectively in r ?

2013-05-25 Thread Bert Gunter
Homework? -- We don't do homework here. Also, read An Introduction to R (ships with R) or other online R tutorial before further posting. Also, learn how to search in R (or use Google or other search engine). See also the sos package. -- Bert On Sat, May 25, 2013 at 7:52 AM, Tanumoy Pal

Re: [R] Create and read symbolic links in Windows

2013-05-25 Thread Uwe Ligges
On 24.05.2013 04:03, Santosh wrote: Dear R experts, This time I am unable create symbolic links to files as I had done last time. I could not replicate what I had successfully tried last time (rerun the same code without any modifications) . I get the following error message.. [1] FALSE

Re: [R] How to plot two functions a(t) b(t) along with x y axes respectively in r ?

2013-05-25 Thread John Kane
It would be nice if you told us what an OC curve is. If it is a Operations Curve or something like it have a look at the pROC package. It may do what you want. If that's not it, please actually tell us the names of the curves not just the initials. John Kane Kingston ON Canada

Re: [R] Create and read symbolic links in Windows

2013-05-25 Thread Uwe Ligges
On 25.05.2013 19:58, Uwe Ligges wrote: On 24.05.2013 04:03, Santosh wrote: Dear R experts, This time I am unable create symbolic links to files as I had done last time. I could not replicate what I had successfully tried last time (rerun the same code without any modifications) . I get

Re: [R] Distance calculation

2013-05-25 Thread arun
Hi, Try this: mat1: 1st matrix mat2: 2nd matrix fun1- function(x){     big- x0.8*max(x)     n- length(big)     startRunOfBigs- which(c(big[1],!big[-n] big[-1]))     endRunOfBigs- which(c(big[-n] !big[-1], big[n]))     index- vapply(seq_along(startRunOfBigs),function(i)

Re: [R] Lattice, ggplot, and pointsize

2013-05-25 Thread Milan Bouchet-Valat
Le mardi 21 mai 2013 à 21:39 +0100, Prof Brian Ripley a écrit : On 21/05/2013 21:24, Bert Gunter wrote: At the risk of misunderstanding... (inline) On Tue, May 21, 2013 at 12:17 PM, Milan Bouchet-Valat nalimi...@club.fr wrote: Le mardi 21 mai 2013 à 08:17 -0700, Jeff Newmiller a écrit

Re: [R] Create and read symbolic links in Windows

2013-05-25 Thread peter dalgaard
On May 25, 2013, at 19:59 , Uwe Ligges wrote: On 25.05.2013 19:58, Uwe Ligges wrote: On 24.05.2013 04:03, Santosh wrote: Dear R experts, This time I am unable create symbolic links to files as I had done last time. I could not replicate what I had successfully tried last time

[R] What does this say? Error in rep((Intercept), nrow(a0)) : invalid 'times' argument

2013-05-25 Thread C W
Dear list, I am using glmnet. I have no idea what this error is telling me. Here's my code, bob - matrix(rnorm(100*180), nrow=180) yyy - rnorm(180) fit1 - cv.glmnet(bob, yyy, family=mgaussian) Error in rep((Intercept), nrow(a0)) : invalid 'times' argument In fact, I peeked inside cv.glmnet()

Re: [R] Create and read symbolic links in Windows

2013-05-25 Thread Uwe Ligges
On 25.05.2013 21:18, peter dalgaard wrote: On May 25, 2013, at 19:59 , Uwe Ligges wrote: On 25.05.2013 19:58, Uwe Ligges wrote: On 24.05.2013 04:03, Santosh wrote: Dear R experts, This time I am unable create symbolic links to files as I had done last time. I could not replicate what

Re: [R] retaining comments within functions defined in Rprofile.site

2013-05-25 Thread Benjamin Tyner
Thank you Duncan; that is a most helpful explanation and suggestion. On 05/25/2013 09:26 AM, Duncan Murdoch wrote: Those files are read in a hard-wired way quite early in the startup process, and there's no way to enable keep.source on them. However, there's nothing to stop those files from

[R] Mapping GWR Results in R

2013-05-25 Thread Patrick Likongwe
Dear Team, Help me out here. I have managed to run a Geographically Weighted Regression in R with all results coming up. The problem now comes in mapping the parameter estimates and the t values that are significant in the model. My data is like this: Stn Area X Y Easting Northing Distance Depth

[R] spatially analyzing multiple data layers

2013-05-25 Thread Amy Henry
Hi, I started using R about 3 months ago so please excuse my ignorance. I have two datasets. The first consists of 247 fixed position mosquito traps that were serviced weekly for 23 weeks. The second is dengue incidence data indexed to home address for the same time period. I would like to see if

[R] When creating a data frame with data.frame() transforms integers into factors

2013-05-25 Thread António Camacho
Hello I am novice to R and i was learning how to do a scatter plot with R using an example from a website. My setup is iMac with Mac OS X 10.8.3, with R 3.0.1, default install, without additional packages loaded I created a .csv file in vim with the following content userID,user,posts

[R] Mapping GWR Results in R

2013-05-25 Thread Patrick Likongwe
Dear Team, Help me out here. I have managed to run a Geographically Weighted Regression in R with all results coming up. The problem now comes in mapping the parameter estimates and the t values that are significant in the model. My data is like this: Stn Area X Y Easting Northing Distance Depth

Re: [R] spatially analyzing multiple data layers

2013-05-25 Thread Barry Rowlingson
On Sat, May 25, 2013 at 7:09 PM, Amy Henry amybethhe...@gmail.com wrote: Hi, I started using R about 3 months ago so please excuse my ignorance. I have two datasets. The first consists of 247 fixed position mosquito traps that were serviced weekly for 23 weeks. The second is dengue incidence

Re: [R] When creating a data frame with data.frame() transforms integers into factors

2013-05-25 Thread Thomas Stewart
Antonio- What exactly do you want as output? You stated you wanted a scatter plot, but which variable do you want on the X axis and which variable do you want on the Y axis? -tgs On Sat, May 25, 2013 at 3:36 PM, António Camacho toin...@gmail.com wrote: Hello I am novice to R and i was

Re: [R] When creating a data frame with data.frame() transforms integers into factors

2013-05-25 Thread Bert Gunter
Huh? z - sample(1:10,30,rep=TRUE) tbl - table(z) tbl z 1 2 3 4 5 6 7 8 9 10 4 3 2 6 3 3 2 2 2 3 data.frame(z) z 1 5 2 2 3 4 4 1 5 6 6 4 7 10 8 4 9 3 10 8 11 10 12 4 13 3 14 9 15 2 16 2 17 6 18 1 19 4 20 7 21 9 22 10 23 7 24 5 25 5 26 6 27

Re: [R] QA

2013-05-25 Thread arun
Hi, I hope this works for you. fun1- function(x){     big- x0.8*max(x)     n- length(big)     startRunOfBigs- which(c(big[1],!big[-n] big[-1]))     endRunOfBigs- which(c(big[-n] !big[-1], big[n]))     index- vapply(seq_along(startRunOfBigs),function(i)

Re: [R] What does this say? Error in rep((Intercept), nrow(a0)) : invalid 'times' argument

2013-05-25 Thread Thomas Stewart
Mike- You can use the traceback function to see where the error is: bob - matrix(rnorm(100*180), nrow=180) yyy - rnorm(180) fit1 - cv.glmnet(bob, yyy, family=mgaussian) Error in rep((Intercept), nrow(a0)) : invalid 'times' argument traceback() 6: predict.multnet(object, newx, s, type,

Re: [R] QA

2013-05-25 Thread eliza botto
Thanks Arun, i could never have done this on my own the recent reply will make it easier 4 me to understand.. thanks onceagain.. enjoy your weekend :D Elisa Date: Sat, 25 May 2013 18:35:27 -0700 From: smartpink...@yahoo.com Subject: Re: QA To: eliza_bo...@hotmail.com CC: r-help@r-project.org

Re: [R] QA

2013-05-25 Thread arun
I thought you want to compare between the rows of two columns even if their corresponding values fall in the same row. fun3- function(mat){     indmat-combn(seq_len(ncol(mat)),2)     lst1- lapply(seq_len(ncol(indmat)),function(i) {mat[,indmat[,i]]})      

Re: [R] What does this say? Error in rep((Intercept), nrow(a0)) : invalid 'times' argument

2013-05-25 Thread C W
Thomas, thanks for the cool trick. I always thought browser() was the only thing existed, apparently not. Mike On Sat, May 25, 2013 at 9:09 PM, Thomas Stewart tgs.public.m...@gmail.com wrote: Mike- You can use the traceback function to see where the error is: bob - matrix(rnorm(100*180),

[R] curiosity: next-gen x86 processors and FP32?

2013-05-25 Thread ivo welch
dear R experts: although my question may be better asked on the HPC R mailing list, it is really about something that average R users who don't plan to write clever HPC-optimized code would care about: is there a quantum performance leap on the horizon with CPUs? like most R average non-HPC