Re: [R] Faceting in ggplot with 3 series in each plot

2013-01-21 Thread Neil Collier
You will find all you need here: http://wiki.stdout.org/rcookbook/Graphs/ Cheers, Neil On Tue, Jan 22, 2013 at 6:27 AM, Janesh Devkota wrote: > I have created a graph with basic R plot with 2 rows and 3 columns. With > the basic plot feature of R I had to write several lines of code to come

Re: [R] Why using hist when setting the parameter probability=TRUE does not create probability plot?

2013-01-21 Thread hp wan
I am sorry for my careless. I forgot implementing the last code corresponding to setting y-axis. Thanks Mark Leeds and all guys. 2013/1/22 hp wan > Thanks. This time the x-axis works well but the y-axis is missing. > > 2013/1/22 Mark Leeds > >> Hi Hp: I decided to use axis because names.arg

Re: [R] Why using hist when setting the parameter probability=TRUE does not create probability plot?

2013-01-21 Thread hp wan
Thanks. This time the x-axis works well but the y-axis is missing. 2013/1/22 Mark Leeds > Hi Hp: I decided to use axis because names.arg wasn't working very well. > Below is > an improvement and I'm sure, given enough effort, it can be improved much > more. But > atleast below will get you start

Re: [R] Ellipse in PCA with parameters "a" and "b"defined.

2013-01-21 Thread Jim Lemon
On 01/22/2013 11:12 AM, mary wrote: Hi, I have to construct an ellipse interval region on a PCAbiplot, I have my parameters "a" and "b" and I would apply the formula: draw.ellipse(x, y, a = , b = ) I have done a PCA on my data so I have my scores and loading for the first and second component,

Re: [R] lmomco package - Random number generation using Wakeby distribution

2013-01-21 Thread David Winsemius
On Jan 21, 2013, at 6:39 PM, David Winsemius wrote: > > On Jan 21, 2013, at 6:15 PM, Katherine Gobin wrote: > >> Dear Sir, >> >> Thanks a lot for your eye-opener reply. I was just thinking of our usual >> commands like rnorm, runif etc. So I was wondering if there exists something >> like rw

Re: [R] lmomco package - Random number generation using Wakeby distribution

2013-01-21 Thread Katherine Gobin
Dear Sir, Thanks a lot for your eye-opener reply. I was just thinking of our usual commands like rnorm, runif etc. So I was wondering if there exists something like rwakeby etc.  And lastly, I have calculated the parameters using  > lmr                    = lmom.ub(amounts) > parameters_of_Wakeby

[R] Ellipse in PCA with parameters "a" and "b"defined.

2013-01-21 Thread mary
Hi, I have to construct an ellipse interval region on a PCAbiplot, I have my parameters "a" and "b" and I would apply the formula: draw.ellipse(x, y, a = , b = ) I have done a PCA on my data so I have my scores and loading for the first and second component, but my answer is what I have to choose

Re: [R] lmomco package - Random number generation using Wakeby distribution

2013-01-21 Thread David Winsemius
On Jan 21, 2013, at 6:15 PM, Katherine Gobin wrote: > Dear Sir, > > Thanks a lot for your eye-opener reply. I was just thinking of our usual > commands like rnorm, runif etc. So I was wondering if there exists something > like rwakeby etc. > > And lastly, I have calculated the parameters usi

Re: [R] Why using hist when setting the parameter probability=TRUE does not create probability plot?

2013-01-21 Thread Mark Leeds
Hi Hp: I decided to use axis because names.arg wasn't working very well. Below is an improvement and I'm sure, given enough effort, it can be improved much more. But atleast below will get you started. breaks=c(-1.55,-1.50,-1.45,-1.40,-1.35,-1.30,-1.25,-1.20,-1.15,-1.10,-1.05,-1.00,-0.95,-0.90,-0.

[R] how to give a lengend in symbols functions

2013-01-21 Thread Jie Tang
hi Rusers I am trying to use symbos in gtools package symbols(data1,data3,circle=data1/data3,inches=0.1,bg="lightgreen") Now I want to give a lengend to tell the reader the meaning or magnitude of these circle. How can I add these information in symbols plot just like legend in plot ? thank y

Re: [R] Why using hist when setting the parameter probability=TRUE does not create probability plot?

2013-01-21 Thread Mark Leeds
Hi: if you mean that you want the labels to be the strings "-1.55", "-1.50" etc then you can use the names.arg argument for that. You can create a vector of character strings binstrings = c("-1.55","-1.50", ) or just convert your data to strings using as.character. Then, in the call to barpl

Re: [R] Why using hist when setting the parameter probability=TRUE does not create probability plot?

2013-01-21 Thread hp wan
But the x-axis of barplot is still not what I want. The xlab is breaks, not -1.55,-1.50,,0.55. 2013/1/22 Mark Leeds > Hi Hp: I'm not sure what you want. Below looks slightly better but if you > want the x-axis > to have better labels, then there is a names.arg argument to barplot. see > ?bar

Re: [R] Why using hist when setting the parameter probability=TRUE does not create probability plot?

2013-01-21 Thread Mark Leeds
Hi Hp: I'm not sure what you want. Below looks slightly better but if you want the x-axis to have better labels, then there is a names.arg argument to barplot. see ?barplot. I don't know what each of the bins represents but if you want to include all of those zeros then I don't think there's any w

Re: [R] Why using hist when setting the parameter probability=TRUE does not create probability plot?

2013-01-21 Thread hp wan
Ok, that is no problem. 2013/1/22 Mark Leeds > let me look at but it's probably best to send to the whole list because > there are many > people on it way more knowledgable than myself. I'm ccing the list and > hope you > don't mind. my fault for replying privately initially. > > > > On Mon, Jan

Re: [R] Why using hist when setting the parameter probability=TRUE does not create probability plot?

2013-01-21 Thread Mark Leeds
let me look at but it's probably best to send to the whole list because there are many people on it way more knowledgable than myself. I'm ccing the list and hope you don't mind. my fault for replying privately initially. On Mon, Jan 21, 2013 at 7:36 PM, hp wan wrote: > Thanks for your reply! >

Re: [R] Percentiles with R for a big data.frame

2013-01-21 Thread Duncan Murdoch
On 13-01-21 6:41 PM, Simonas Kecorius wrote: Dear R users, I came up to a problem dealing with percentiles in R. From my previous questions: I do have a big data.frame, with lots of columns and rows. The following command enables me to calculate means for all data frame. dat1$newID<-rep(1:(n

[R] Percentiles with R for a big data.frame

2013-01-21 Thread Simonas Kecorius
Dear R users, I came up to a problem dealing with percentiles in R. >From my previous questions: I do have a big data.frame, with lots of columns and rows. The following command enables me to calculate means for all data frame. dat1$newID<-rep(1:(nrow(dat1)/12),each=12) #if nrow(dat1)/12 is inte

Re: [R] Why using hist when setting the parameter probability=TRUE does not create probability plot?

2013-01-21 Thread Duncan Murdoch
On 13-01-21 5:18 PM, hp wan wrote: Hi All, When carrying out hist(samples,breaks=50,probability=TRUE), the column values are considerably greater than 1, which seams very unreasonable. The plot is attached. I think the column value of the hist plot should correspond to x$counts/sum(x$counts)

[R] Why using hist when setting the parameter probability=TRUE does not create probability plot?

2013-01-21 Thread hp wan
Hi All, When carrying out hist(samples,breaks=50,probability=TRUE), the column values are considerably greater than 1, which seams very unreasonable. The plot is attached. I think the column value of the hist plot should correspond to x$counts/sum(x$counts) (x=hist(samples,breaks=50,probabilit

Re: [R] Regex for ^ (the caret symbol)?

2013-01-21 Thread Rui Barradas
Hello, Em 21-01-2013 20:52, Duncan Murdoch escreveu: On 13-01-21 3:20 PM, Jeff Newmiller wrote: Apparently Extended RegExp syntax eliminated the "^-is-an-ordinary-character-except-for-two-uses" meaning that I am familiar with from the Basic RegExp usage, since GNU grep with the -e option also r

[R] Faceting in ggplot with 3 series in each plot

2013-01-21 Thread Janesh Devkota
I have created a graph with basic R plot with 2 rows and 3 columns. With the basic plot feature of R I had to write several lines of code to come up with the graph https://www.dropbox.com/s/f7d6ei6krtcrtti/hello.png I was wondering whether we can plot multiple series in each plot using ggplot a

Re: [R] Very slow in processing the equation in the scatter plot ggplot

2013-01-21 Thread Janesh Devkota
Dear Ista, Thank you so much for the prompt reply. Yes, using the annotate instead of the geom_text definitely speed up my graph and look much better. Thanks. Best Regards, Janesh Devkota On Mon, Jan 21, 2013 at 3:46 PM, Ista Zahn wrote: > Hi, > > One problem is that you are printing the reg

Re: [R] Very slow in processing the equation in the scatter plot ggplot

2013-01-21 Thread Ista Zahn
Hi, One problem is that you are printing the regression equation multiple times. Compare: > system.time({ + p2 <- p1 + annotate(x = -0.1, y = 0.5, geom="text", label = lm_eqn(mydata), parse = TRUE) + print(p2) + }) user system elapsed 0.930 0.006 0.976 > system.time({ + p3 <- p1

[R] Very slow in processing the equation in the scatter plot ggplot

2013-01-21 Thread Janesh Devkota
Hello All, I have plotted a scatter plot in ggplot2 and added a regression line and a regression equation. But the processing is very very slow. One reason might be because I have so many data pairs. Is there any way to speed up this code ? I need to create a multiple layout as well. The code I h

Re: [R] Regex for ^ (the caret symbol)?

2013-01-21 Thread Duncan Murdoch
On 13-01-21 3:20 PM, Jeff Newmiller wrote: Apparently Extended RegExp syntax eliminated the "^-is-an-ordinary-character-except-for-two-uses" meaning that I am familiar with from the Basic RegExp usage, since GNU grep with the -e option also refuses to match the carat unless it is escaped. The

Re: [R] Regex for ^ (the caret symbol)?

2013-01-21 Thread Jeff Newmiller
Apparently Extended RegExp syntax eliminated the "^-is-an-ordinary-character-except-for-two-uses" meaning that I am familiar with from the Basic RegExp usage, since GNU grep with the -e option also refuses to match the carat unless it is escaped. The TRE library treats BRE as obsolete, so we on

Re: [R] lmomco package - Random number generation using Wakeby distribution

2013-01-21 Thread David Winsemius
On Jan 21, 2013, at 10:30 AM, Katherine Gobin wrote: > Dear R forum > >> From the given data, I have estimated the parameters of Wakeby distribution >> using lmomco package as > > library(lmomco) > > (amounts <- read.csv("input_S.csv")$amount) > > # __

Re: [R] missing values are not allowed in subscripted assignments of data frames

2013-01-21 Thread arun
Hi, I guess there should be missing values. set.seed(5) data1<-data.frame(commNo=sample(786:789,10,replace=TRUE),Col2=rnorm(10,10)) set.seed(5) data2<-data.frame(commNo=sample(c(786:789,NA),10,replace=TRUE),Col2=rnorm(10,10)) data1[data1$commNo==786, "commNo"]<-"Name of the Community" data2[data

Re: [R] missing values are not allowed in subscripted assignments of data frames

2013-01-21 Thread arun
Hi, If 'commNo` is factor. set.seed(5) data1<-data.frame(commNo=sample(786:789,10,replace=TRUE),Col2=rnorm(10,10)) set.seed(5) data2<-data.frame(commNo=sample(c(786:789,NA),10,replace=TRUE),Col2=rnorm(10,10)) data4<-within(data1,{commNo<-factor(commNo)}) data4[data4$commNo==786, "commNo"]<-"Name

Re: [R] Regex for ^ (the caret symbol)?

2013-01-21 Thread Duncan Murdoch
On 13-01-21 1:05 PM, Jeff Newmiller wrote: So what is the special behavior of the ^ symbol when not at the beginning of the string that occurs when it is not escaped? I think it retains its meaning as an assertion that it occurs at the beginning of the line, and so a pattern like "a^b" could

Re: [R] Regex for ^ (the caret symbol)?

2013-01-21 Thread David Winsemius
On Jan 21, 2013, at 10:05 AM, Jeff Newmiller wrote: So what is the special behavior of the ^ symbol when not at the beginning of the string that occurs when it is not escaped? Isn't there a distinction between what _is_ "special" and what should be "special". You are saying that "^" after

[R] lmomco package - Random number generation using Wakeby distribution

2013-01-21 Thread Katherine Gobin
Dear R forum >From the given data, I have estimated the parameters of Wakeby distribution >using lmomco package as library(lmomco) (amounts <- read.csv("input_S.csv")$amount) # ___ # Wakeby distribution - Parameter estimation N 

Re: [R] Access data from URL

2013-01-21 Thread Barry Rowlingson
On Mon, Jan 21, 2013 at 12:36 PM, R_Antony wrote: > Hi all, > > i need a small help that i want to access data from a url. > i tried with > read.table(URL,header=TRUE) - but getting errors. actually no idea that how > can be done. I am in new in this function as well as in R. > > Could anyone plea

Re: [R] Regex for ^ (the caret symbol)?

2013-01-21 Thread Jeff Newmiller
So what is the special behavior of the ^ symbol when not at the beginning of the string that occurs when it is not escaped? --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##

Re: [R] Regex for ^ (the caret symbol)?

2013-01-21 Thread Duncan Murdoch
On 13-01-21 11:48 AM, Jeff Newmiller wrote: I am not sure I understand what worked perfectly, since it is my understanding that ^ is only special at the beginning of the regex (to anchor the pattern at the beginning of the target string) or as the first character of a character set (to indicat

Re: [R] missing values are not allowed in subscripted assignments of data frames

2013-01-21 Thread David Winsemius
On Jan 21, 2013, at 7:35 AM, David Studer wrote: Hello everybody! I am trying to replace community numbers with community names (character). I am using the following code: data[data$commNo==786, "commNo"]<-"Name of the Community" data$commNo is probably a factor. As such the equality te

Re: [R] Regex for ^ (the caret symbol)?

2013-01-21 Thread Rich Shepard
On Mon, 21 Jan 2013, mtb...@gmail.com wrote: I am trying to search for string that includes the caret symbol, using the following code: grepl("latitude^2",temp) Many regex implementations require us to escape a metacharacter such as '^' by preceeding it with a backslash. This indicates the n

Re: [R] Regex for ^ (the caret symbol)?

2013-01-21 Thread Jeff Newmiller
I am not sure I understand what worked perfectly, since it is my understanding that ^ is only special at the beginning of the regex (to anchor the pattern at the beginning of the target string) or as the first character of a character set (to indicate exclusion of the listed characters). In any

Re: [R] how to bread while loop reading from connection with read.csv

2013-01-21 Thread Duncan Murdoch
On 13-01-21 10:56 AM, Collins, Stephen wrote: Hello, I'm trying to read a file rows at a time, so as to not read the entire file into memory. When reading the "connections" and "readLines" help, and "R help archive," it seems this should be possible with read.csv and a file connection, making

Re: [R] how to bread while loop reading from connection with read.csv

2013-01-21 Thread Berend Hasselman
On 21-01-2013, at 16:56, "Collins, Stephen" wrote: > Hello, > > I'm trying to read a file rows at a time, so as to not read the entire file > into memory. When reading the "connections" and "readLines" help, and "R > help archive," it seems this should be possible with read.csv and a file

Re: [R] compare and count data

2013-01-21 Thread David L Carlson
Another approach > critical<- c(1.61,75.89, 1.61, 75.89) > colSums(sweep(mydata, 2, critical, "<")) V1 V2 V3 V4 0 19 0 0 -- David L Carlson Associate Professor of Anthropology Texas A&M University College Station, TX 77843-4352 > -Original Mess

Re: [R] foreach takes foreever?

2013-01-21 Thread Steve Lianoglou
Hi, On Mon, Jan 21, 2013 at 10:59 AM, Andre Zege wrote: > I started to look at ways to improve times of certain very parallel tasks and > thought that foreach should be a valid candidate to do the job. > So, i opened foreach tutorial by Steve Weston and started timing examples > from it. First

Re: [R] foreach takes foreever?

2013-01-21 Thread R. Michael Weylandt
You're probably being killed by the overhead of parallelization which is, in this case, far more than actual computation time. I've not dug through foreach() in a while, but I think this winds up spawning many many subprocesses which isn't cheap in Windows. MW On Mon, Jan 21, 2013 at 3:59 PM, And

[R] Access data from URL

2013-01-21 Thread R_Antony
Hi all, i need a small help that i want to access data from a url. i tried with read.table(URL,header=TRUE) - but getting errors. actually no idea that how can be done. I am in new in this function as well as in R. Could anyone please help me out, how we can do it without installing any package

[R] how to bread while loop reading from connection with read.csv

2013-01-21 Thread Collins, Stephen
Hello, I'm trying to read a file rows at a time, so as to not read the entire file into memory.  When reading the "connections" and "readLines" help, and "R help archive," it seems this should be possible with read.csv and a file connection, making use of the "nrows" argument, and checking wher

[R] foreach takes foreever?

2013-01-21 Thread Andre Zege
I started to look at ways to improve times of certain very parallel tasks and thought that foreach should be a valid candidate to do the job. So, i opened foreach tutorial by Steve Weston and started timing examples from it. First example from tutorial is  >system.time(for(i in 1:10) sqrt(i

Re: [R] compare and count data

2013-01-21 Thread arun
Hi Roslina, No problem. If you take out the i from the code, 1-(res/1000) #   V1    V3    V2    V4 #1.000 1.000 0.981 1.000 Is it what you were looking for? Also, in addition, you could also try:   #if the total column number is even critical<-rep(c(1.61,75.89),ncol(mydata)/2) #if it is odd, cri

Re: [R] missing values are not allowed in subscripted assignments of data frames

2013-01-21 Thread S Ellison
> I am trying to replace community numbers with community > names (character). > I am using the following code: > > data[data$commNo==786, "commNo"]<-"Name of the Community" > > Unfortunately, I get the error message > missing values are not allowed in subscripted assignments of > data frame

Re: [R] Regex for ^ (the caret symbol)?

2013-01-21 Thread mtb954
Hi Tsjerk, many thanks...that worked perfectly! Mark Na On Mon, Jan 21, 2013 at 9:36 AM, Tsjerk Wassenaar wrote: > Oh, I'm jetlagged. ^ is a control character for 'start of string'. In the > context of a character set it means negation: [^a-z]. > > Ciao, > > Tsjerk > > > On Mon, Jan 21, 2013

Re: [R] Deformulation and R

2013-01-21 Thread S Ellison
Usually, foods have more ingredients than listed nutritional component values. Further, for many foods nutritional composition (particularly fat, protein, fibre, carbohydrate, calorie count) are cacluated from the ingredient list and caloprie count in particular is derived from the fat, protein

Re: [R] Regex for ^ (the caret symbol)?

2013-01-21 Thread Tsjerk Wassenaar
Oh, I'm jetlagged. ^ is a control character for 'start of string'. In the context of a character set it means negation: [^a-z]. Ciao, Tsjerk On Mon, Jan 21, 2013 at 4:33 PM, Tsjerk Wassenaar wrote: > Hi Mark Na, > > Try: > > grepl("latitude\\^2",temp) > > ^ is a control character for negation,

[R] missing values are not allowed in subscripted assignments of data frames

2013-01-21 Thread David Studer
Hello everybody! I am trying to replace community numbers with community names (character). I am using the following code: data[data$commNo==786, "commNo"]<-"Name of the Community" Unfortunately, I get the error message missing values are not allowed in subscripted assignments of data frames

Re: [R] Regex for ^ (the caret symbol)?

2013-01-21 Thread Tsjerk Wassenaar
Hi Mark Na, Try: grepl("latitude\\^2",temp) ^ is a control character for negation, so you have to escape it. Cheers, Tsjerk On Mon, Jan 21, 2013 at 4:26 PM, wrote: > Hello R-helpers, > > I am trying to search for string that includes the caret symbol, using the > following code: > > grepl(

[R] Regex for ^ (the caret symbol)?

2013-01-21 Thread mtb954
Hello R-helpers, I am trying to search for string that includes the caret symbol, using the following code: grepl("latitude^2",temp) And R doesn't like that. It gives me: > temp<-c("latitude^2","latitude and latitude^2","longitude^2","longitude and longitude^2") > temp [1] "latitude^2"

Re: [R] Ordered Probit/Logit with random coefficients

2013-01-21 Thread Ben Bolker
Andreas Karpf malix.univ-paris1.fr> writes: > > Hello, > > I searched everywhere but I didn't find what I want, that is why I as the > question here. Threads discussing this issue on this mailing list are > already quite old. Does anybody know of a function in R which allows to > estimate order

Re: [R] coxph with smooth survival

2013-01-21 Thread Terry Therneau
For your first question -- read the manual. ?survfit.coxph will reveal the "censor" argument, which controls the inclusion of points where the curve does not drop. For your second, "smooth" is in the eye of the beholder, literally. If the reason for a smooth curve is to plot it, you need to d

Re: [R] picture processing

2013-01-21 Thread PIKAL Petr
OK. I uploaded files to https://drive.google.com/?tab=wo&authuser=0#folders/0B-hUB8Dm7X_VYWhwWFNmVkl0cEE and I hope you are able to download it. Sorry for the inconvenience. Best regards Petr > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > projec

Re: [R] picture processing

2013-01-21 Thread PIKAL Petr
I am sorry, pictures did not went through. Using dput is not a way to go, the output file has over 3 MB. I try to find a suitable way where to put those pictures (they have about 100 kB) for you to be able to use the code. Petr > -Original Message- > From: r-help-boun...@r-project.org

Re: [R] How to read a file with two data sets in text format

2013-01-21 Thread jim holtman
Here is one way to read the data. Modified your sample for the line counts of actual data: x <- readLines(textConnection("40 Terry Cove-Model 300 .300110459327698 300.041656494141 .289277672767639 300.083343505859 .276237487792969 300.125 .258902788162231 300.166656494141 .236579895019531 300.20

Re: [R] R Tcl/Tk: How to put widgets in text widget?

2013-01-21 Thread Christoph Lange
That was it. Thanks! On Mon, Jan 21, 2013 at 11:21 AM, Milan Bouchet-Valat wrote: > Le lundi 21 janvier 2013 à 10:32 +0100, Christoph Lange a écrit : > > Dear all, > > > > please excuse the somewhat special question: > > > > >From within R I create a Tk windows with a list of checkboxes, which c

[R] Ordered Probit/Logit with random coefficients

2013-01-21 Thread Andreas Karpf
Hello, I searched everywhere but I didn't find what I want, that is why I as the question here. Threads discussing this issue on this mailing list are already quite old. Does anybody know of a function in R which allows to estimate ordered probit/logit model with random coefficients. The only mix

[R] picture processing

2013-01-21 Thread PIKAL Petr
Dear all I try to evaluate pictures and find positions, size and amount of dropouts (I enclose two pictures to play with and a code I used below). You can see that the first picture is smooth with only few dropouts in entire area. The second picture has many dropouts and even a scratch, with nu

[R] random draw from a RESTRICTED pareto distribution

2013-01-21 Thread Kairos2012
Dear R user, I am a newcomer and need help concerning 'draw a random number for a restricted area of a prareto distribution'. (1) For estimation of pareto distribution: >http://stats.stackexchange.com/questions/27426/how-do-i-fit-a-set-of-data-to-a-pareto-distribution-in-r< We calculate the pare

Re: [R] a confidence interval from an ANOVA model

2013-01-21 Thread Eik Vettorazzi
Hi Erin, how about this: dta<-read.table(textConnection("trt resp A 23 A 28 A 37 A 30 B 37 B 44 B 31 B 35 C 42 C 47 C 52 C 38"),header=T) summary(ano<-aov(resp~trt,dta)) ano0<-update(ano,.~.+0) confint(ano0) # and the corresponding means are coef(ano0) # or use the effects package library(effect

Re: [R] how to use "..."

2013-01-21 Thread Ivan Calandra
Since this topic was mine originally, I supposed I can give my opinion, for what it's worth! First, it is true that there is some help in the manuals. The problem with these manuals (or at least, my problem) is that there were much too complicated when I started to learn R. Then I got used to

Re: [R] R Tcl/Tk: How to put widgets in text widget?

2013-01-21 Thread Milan Bouchet-Valat
Le lundi 21 janvier 2013 à 10:32 +0100, Christoph Lange a écrit : > Dear all, > > please excuse the somewhat special question: > > >From within R I create a Tk windows with a list of checkboxes, which can > bekome too long for the screen. The obvious solution would be to put all > checkboxes into

Re: [R] dummy encoding in metafor

2013-01-21 Thread Viechtbauer Wolfgang (STAT)
As Michael already mentioned, the error: Error in qr.solve(wX, diag(k)) : singular matrix 'a' in solve indeed indicates that your design matrix is not of full rank (i.e., there are linear dependencies among your predictors). With this many factors in the same model, this is not surprising if k

[R] R Tcl/Tk: How to put widgets in text widget?

2013-01-21 Thread Christoph Lange
Dear all, please excuse the somewhat special question: >From within R I create a Tk windows with a list of checkboxes, which can bekome too long for the screen. The obvious solution would be to put all checkboxes into a frame and make that scrollable. Alas, there are (for whatever reason!) no scr

Re: [R] dummy encoding in metafor

2013-01-21 Thread Michael Dewey
At 14:48 20/01/2013, Alma Wilflinger wrote: Hi, thank you very much for your kind answer. >If you look a bit further down the manual page you will see >### using a model formula to specify the same model >rma(yi, vi, mods=~factor(alloc)+year+ablat, data=dat, method="REML", >btt=c(2,3)) >which

Re: [R] How to check if R.app is running?

2013-01-21 Thread Prof Brian Ripley
On 20/01/2013 22:03, Duncan Murdoch wrote: On 13-01-20 4:51 PM, Nick Matzke wrote: Hi, here's an obscure question someone can hopefully help with. I have some R code that uses stuff from parallel (now a part of the R core in 2.15 I believe), especially clusterApply. However, this seems to cause

Re: [R] How to read a file with two data sets in text format

2013-01-21 Thread Jeff Newmiller
You have to sync up the data before you can do a scatter plot. If the data are changing slowly relative to the sample rates then you can use approx to interpolate one data set at the timestamps of the second to generate a column you can add to the second data frame. -

Re: [R] How to read a file with two data sets in text format

2013-01-21 Thread Janesh Devkota
I was able to read the data using the following code: jd1 <- read.table('Practicedata.dat',header=T,sep="\t",nrow=6240) jd2 <- read.table('Practicedata.dat',header=T,sep="\t",skip=6241) colnames(jd1) <- c("Date","Mod") colnames(jd2) <- c("Date", "Obs") p <- ggplot(jd1,aes(x=Date,y=Mod))+geom_line(