Re: [R] Using C code in R

2011-03-23 Thread Steve Lianoglou
Hi, On Wed, Mar 23, 2011 at 8:12 PM, Jaimin Dave wrote: > Hi, > I am new to R and I want to know how to use C code which contains two > functions one called inside another.I know that how to use C code in R if it > has only one function but dont know how to do it in above case. There's no specia

Re: [R] extracting file names

2011-03-23 Thread David Wolfskill
On Thu, Mar 24, 2011 at 03:49:32PM +1300, Darcy Webber wrote: > Dear R users, > > I am trying to figure out a way to extract the original file name of a > .DAT (e.g., IC48.DAT) file imported into R using the file.choose() > function, i.e., > > dat <- read.table(file.choose(), header = FALSE) > >

[R] recommended reading for manual maximum likelihood of a system of equations

2011-03-23 Thread Alex Olssen
Hi everyone, I am looking for some recommended reading. I want to read up on the estimation systems of linear equations using maximum likelihood? I have a strongly applied bias, I want to be able to do such estimation myself. Reading with examples would be great. Something which also works throug

[R] extracting file names

2011-03-23 Thread Darcy Webber
Dear R users, I am trying to figure out a way to extract the original file name of a .DAT (e.g., IC48.DAT) file imported into R using the file.choose() function, i.e., dat <- read.table(file.choose(), header = FALSE) The reason I would like to do this is to use that file name to name an output f

[R] Using C code in R

2011-03-23 Thread Jaimin Dave
Hi, I am new to R and I want to know how to use C code which contains two functions one called inside another.I know that how to use C code in R if it has only one function but dont know how to do it in above case. I want to use the same in R .My C code is as follows. //#include void sayHello();

[R] p and wald values intra-groups geeglm: geepack

2011-03-23 Thread Marylin Bejarano
*H*i, I am trying to fit a GEE model with *geeglm* function. The model is the following: Modelo<-geeglm(sqrt ~Tra+ Mes, id=Lugar , data=datos, family=gaussian(identity), corstr="independence") *Tra( is a experimental treatment, 2 levels)*, *Mes* (is the month of take data, 4 levels) and *Lugar*

Re: [R] ) Error in eval(expr, envir, enclos) : object '' not found

2011-03-23 Thread mipplor
exactly, i dont know why the header are separated by invisible periods. and it only happen to the header. -- View this message in context: http://r.789695.n4.nabble.com/Error-in-eval-expr-envir-enclos-object-not-found-tp3399503p3400824.html Sent from the R help mailing list archive at Nabble

[R] removing data randomly based on previous observations

2011-03-23 Thread Bryan Danson
Hello, I have a dataset which contains multiple trap pulls over the course of a fishing season. Each trap was baited and then returned to the water to be pulled again. I am trying to remove that bait from the catch observed on the next pull (the bait is the same as the catch, lobster). The trap

Re: [R] Comparing non nested models with correlation coefficients (inspired from Lorch and Myers )

2011-03-23 Thread Thomas Lumley
On Thu, Mar 24, 2011 at 8:26 AM, Brian S Cade wrote: > As a follow-up to Greg's suggested graphical presentation, it seems like > the Vuong test is sometimes used to compare fits of non nested models. > There is a nice practical example of this with code in R, by Cosma Shalizi and coworkers, at h

Re: [R] Separators in strptime---needed?

2011-03-23 Thread John Kane
Thanks to David and William. I hate it when a typo is all it is but I am a lousy typist. --- On Wed, 3/23/11, David Wolfskill wrote: > From: David Wolfskill > Subject: Re: [R] Separators in strptime---needed? > To: "John Kane" > Cc: "R R-help" > Received: Wednesday, March 23, 2011, 6:35 PM

Re: [R] How identify args into R, sent from a command line.

2011-03-23 Thread Steve Lianoglou
On Wed, Mar 23, 2011 at 4:15 PM, Ortiz, John wrote: > Hi, > > For example, I have several variables in php, like > > var1 = 1, 2, 3, 5, 6 > var2 = 3, 1, 8 > var3 = 8, 10, 4, 0, 9, 1 > > I sent the arguments to R, with this line: > > '/usr/bin/R --vanilla --slave --args  '.$var1.' '.$var2.' '.$var3

Re: [R] how to add in interaction terms in gamm

2011-03-23 Thread Simon Wood
The usual method for producing interactions of smooths with factors in mgcv is using `by' variables (see ?gam.models for some documentation). For example if `gender' is a two level factor then ... s(time,by=gender) + gender would produce a smooth of time for each gender. If you want a differen

Re: [R] Separators in strptime---needed?

2011-03-23 Thread David Wolfskill
On Wed, Mar 23, 2011 at 03:22:52PM -0700, John Kane wrote: > For some reason I thought that I could read some text into dates without a > separator? Am I wrong? > > Examples > > Works, it appears > ccc <- c("2011-04-07", "1989-10-12") > x <- strptime(ccc, "%Y-%m-%d") > > Does not work > ddd

[R] Separators in strptime---needed?

2011-03-23 Thread John Kane
For some reason I thought that I could read some text into dates without a separator? Am I wrong? Examples Works, it appears ccc <- c("2011-04-07", "1989-10-12") x <- strptime(ccc, "%Y-%m-%d") Does not work ddd <- c("20110407", "19891012") y <- strptime(ccc, "%Y%m%d") Does this mean I would

Re: [R] stacked bar plot

2011-03-23 Thread John Kane
--- On Wed, 3/23/11, Greg Snow wrote: > From: Greg Snow > Subject: Re: [R] stacked bar plot > To: "Chandra Salgado Kent" , > "r-help@r-project.org" > Also look at the ggplot2 package, it may do the summing as > part of the plot call and probably does not need the reshape > step. If I'm r

Re: [R] Modifying a particular column in a tab-delimited file

2011-03-23 Thread jim holtman
You would still have to read every file in, extract the column, modify it, put it back in the file in the right place and then write the file out. With a text file that is just a stream of characters, you do not know where a row is unless you read in the entire file. You might want to consider us

Re: [R] mean of runoff for several years

2011-03-23 Thread Clint Bowman
Dominique, Let's call your dataframe, df. Then try: with(df, boxplot(runoff ~ month)) which will plot the daily runoff distribution by month. Clint -- Clint BowmanINTERNET: cl...@ecy.wa.gov Air Quality Modeler INTERNET: cl...@math.utah.edu Departme

Re: [R] mean of runoff for several years

2011-03-23 Thread Peter Alspach
Tena koe Dominique ?tapply ?aggregate For example, dayMn <- tapply(yourData$runoff, yourData[,c('year','month','day')], mean, na.rm=TRUE) yearMed <- tapply(dayMn$runoff, dayMn$year, median, na.rm=TRUE) with(yearMed, plot(year, runoff)) I have not tested the above and since I can never remember

Re: [R] Bar Chart

2011-03-23 Thread Philipp Pagel
> How do you do a bar chart of 2 vectors? > I have one vector which has 10 numbers, and another which has 10 names. > The numbers are the frequency of the corresponding name, but when I do a bar > chart it says that there is no height. Thanks. The first thing we'd need to know is HOW you tried to

[R] mean of runoff for several years

2011-03-23 Thread dominique
Hello everyone I have a dataframe with 4 colums (year, month, day, runoff) for 1993-2009. Now I like to calculate the average runoff for each day. Finally I like to plot the median runoff for all this years. I tried with some loops, but it didn't work. Do you have any Tips for my problem? Any help

Re: [R] Comparing non nested models with correlation coefficients (inspired from Lorch and Myers )

2011-03-23 Thread Brian S Cade
As a follow-up to Greg's suggested graphical presentation, it seems like the Vuong test is sometimes used to compare fits of non nested models. Brian Brian S. Cade, PhD U. S. Geological Survey Fort Collins Science Center 2150 Centre Ave., Bldg. C Fort Collins, CO 80526-8818 email: brian_c...

[R] How to create a nb object

2011-03-23 Thread Bill Hyman
Dear all, I am looking at the example in spdep for autocorrelation test as below. However, how can one create a nb object for your data? Suppose you have data COL.OLD. But how do you create COL.nb from there? Many thanks for your help! Bill ###

Re: [R] Bar Chart

2011-03-23 Thread Francisco Gochez
Hi, It's difficult to know what is going wrong from what you say below (please include some reproducible code in the future as indicated in the posting guide). If you want to produce a bar chart of the numbers with the corresponding names as labels for these numbers, you can do something like thi

Re: [R] Estimating correlation in multiple measures data

2011-03-23 Thread Peter Langfelder
On Wed, Mar 23, 2011 at 1:17 PM, Michal Figurski wrote: > Dear R-helpers, > > This may sound simple to you, but I'm a beginner in this, so please be > forgiving. > I have a following problem: two analytes were measured in patient's blood on > 4 occasions: ProteinA and ProteinB. How to correctly ev

[R] Estimating correlation in multiple measures data

2011-03-23 Thread Michal Figurski
Dear R-helpers, This may sound simple to you, but I'm a beginner in this, so please be forgiving. I have a following problem: two analytes were measured in patient's blood on 4 occasions: ProteinA and ProteinB. How to correctly evaluate correlation between ProteinA and ProteinB? I tried: x <

[R] How identify args into R, sent from a command line.

2011-03-23 Thread Ortiz, John
Hi, For example, I have several variables in php, like var1 = 1, 2, 3, 5, 6 var2 = 3, 1, 8 var3 = 8, 10, 4, 0, 9, 1 I sent the arguments to R, with this line: '/usr/bin/R --vanilla --slave --args '.$var1.' '.$var2.' '.$var3.' < script.r' In my "script.r" I can read the arguments whit this lin

Re: [R] Modifying a particular column in a tab-delimited file

2011-03-23 Thread David Winsemius
On Mar 23, 2011, at 3:44 PM, Sashi Challa wrote: Hi Jim, That is what I ended up doing. Each of my 1000 files has ~1 million rows, and 19 columns and it was taking 85 secs for every file to be just read into R. All I needed to do was replace one column with a particular vector values. So

Re: [R] Data frame and function that requires vector as input

2011-03-23 Thread David Winsemius
On Mar 22, 2011, at 3:16 PM, Gian Luca Negri wrote: Hi, I have a data.frame(zscores) that looks like this: gA gB g1 0.20.6 g2 0.3Na I hope it doesn't look likethat because it would mean you had gB as a character vector when I think you want that value to be NA. My

Re: [R] Function to crop p-values from multiple Anovas

2011-03-23 Thread Berend Hasselman
micfalb-r wrote: > > > > p.fun <- function(arg){ > two_way_anova <- aov(arg ~ age * treatment, data = example.df) > two_way_sum <- summary(two_way_anova) > p_values <- two_way_sum[[1]]$"Pr(>F)"[1:3] > return(p_values) > } > > Unfortunately my setup seems to be flawed as I'm not capable

Re: [R] Modifying a particular column in a tab-delimited file

2011-03-23 Thread Sashi Challa
Hi Jim, That is what I ended up doing. Each of my 1000 files has ~1 million rows, and 19 columns and it was taking 85 secs for every file to be just read into R. All I needed to do was replace one column with a particular vector values. So wanted to know if there was a way to do it without read

Re: [R] Merging graphs with common nodes

2011-03-23 Thread Gábor Csárdi
Hi Sandeep. On Wed, Mar 23, 2011 at 1:03 PM, ssamberkar wrote: [...] > > A -- B in G1 > > B -- C in G2 > > so in G3 I would expect > > A -- B > > B -- C > > > Instead I get B -- Z which baffles me. This is because the operations are based on the internal vertex ids and not on the vertex names. Y

Re: [R] Data frame and function that requires vector as input

2011-03-23 Thread Greg Snow
If a is a vector with missing values and b is the result of the function call that has just the non-missing computations on a, then you can do something like: > newdat <- rep(NA, length(a)) > newdat[ !is.na(a) ] <- b Sometimes the which and match functions can be useful as well. -- Gregory (Gr

Re: [R] Sample size of longitudinal and skewed data

2011-03-23 Thread Greg Snow
You can use simulation: 1. Simulate a dataset from what you believe the distribution and relationship to be. 2. Analyze the simulated data in the manner you plan 3. Determine if the results are significant Repeat the above many times keeping track of the sifnificances. The percent significant

Re: [R] stacked bar plot

2011-03-23 Thread Greg Snow
You can use the tapply function to sum within combinations, then pass the results to barplot (possibly doing a reshape first). Also look at the ggplot2 package, it may do the summing as part of the plot call and probably does not need the reshape step. -- Gregory (Greg) L. Snow Ph.D. Statistic

Re: [R] Comparing non nested models with correlation coefficients (inspired from Lorch and Myers )

2011-03-23 Thread Greg Snow
If you are interested in the fits, then I would just plot the fits. Plot the fitted/predicted values from the 1st model as the x-values and the fitted/predicted values from the second model as the y-values. It is best to plot on a square plotting region and use asp=1, probably also doing ablin

Re: [R] Bar Chart

2011-03-23 Thread David Winsemius
On Mar 23, 2011, at 12:26 PM, blutack wrote: How do you do a bar chart of 2 vectors? I have one vector which has 10 numbers, and another which has 10 names. The numbers are the frequency of the corresponding name, but when I do How did you "do" a barchart? Code please. a bar chart it sa

Re: [R] what's interesting to plot after predict.lm?

2011-03-23 Thread David Winsemius
On Mar 23, 2011, at 12:04 PM, agent dunham wrote: Dear all, I've fitted this model with train data lms <- lm(vd ~ log(v1) + fv2+ fv5+ fv7 ) and predicted over test data using plms <- predict.lm(lmsub, new=test,interval="predict", level=0.95,se.fit=TRUE) I've two questions: q1: what's the

Re: [R] Compare three or more values?

2011-03-23 Thread Beale, Holly (NIH/NHGRI) [F]
Erik: (head smack) Of course! Thank you. On 3/23/11 2:47 PM, "Erik Iverson" wrote: >Holly, > >try > > > length(unique(x)) == 1 > >where x is your vector of interest. But think about >how you want NA values to be treated, and also think about >R FAQ 7.31 if dealing with floating point numbers.

Re: [R] Compare three or more values?

2011-03-23 Thread Erik Iverson
Holly, try > length(unique(x)) == 1 where x is your vector of interest. But think about how you want NA values to be treated, and also think about R FAQ 7.31 if dealing with floating point numbers. --Erik Beale, Holly (NIH/NHGRI) [F] wrote: Is there a less cryptic way to compare three or mo

Re: [R] Modifying a particular column in a tab-delimited file

2011-03-23 Thread jim holtman
Read the whole file in, modify the column and then write the file back out. On Wed, Mar 23, 2011 at 12:03 PM, Sashi Challa wrote: > Hello R users, > > Good day!! > > I was wondering if there is a way in R to read in a particular column from a > tab-delimited file, edit it and write it back into

Re: [R] Compare three or more values?

2011-03-23 Thread Marc Schwartz
On Mar 23, 2011, at 11:01 AM, Beale, Holly (NIH/NHGRI) [F] wrote: > Is there a less cryptic way to compare three or more values? > > allTheSame<-c("red","red","red","red") > notAllTheSame<-c(132,132,132,999) > > all.identical <- function(vectorToTest){ >cIdentical=sum(vectorToTest %in% vecto

[R] predict.rpart help

2011-03-23 Thread Osei Poku
Hi Everyone, Is there a way to get predict.rpart() to return the nodes reached by the new examples in addition to the predicted probabilities it already returns? In other words, I would like to know the leaf node in the tree object that each new example data drops down to. Thanks in advance fo

[R] Corrupt trees

2011-03-23 Thread Osei Poku
Hi Everyone, I have been using the "tree" package for a while with no problems until now. When I run predict(tree, newdata), I get an error with the message "Corrupt tree" for about 50% of the trees that I generate with tree. For other trees, the predict function completes with no errors. I h

[R] how to add in interaction terms in gamm

2011-03-23 Thread straybird_tx
I want to use gamm to generate smoothed trend line for three groups identified by dummy variable genea and geneb. My question is how to add in an interaction term between the time and another dummy variable such as gender? fitm<-gamm(change_gfr~ genea+geneb+s(timea_n,bs="ps")+s(timeb_n,bs="ps")+s

[R] Function to crop p-values from multiple Anovas

2011-03-23 Thread micfalb-r
Starting with data from a microarray experiment and I would like to analyse the influence of two factors (age, treatment) on gene expression. Looking through the r-help archives and the web I tried the following: I put my data in a dataframe similar to this one: > example.df <- as.data.frame(mat

[R] predict.rpart help

2011-03-23 Thread Osei Poku
Hi Everyone, Is there a way to get predict.rpart() to return the nodes reached by the new examples in addition to the predicted probabilities it already returns? In other words, I would like to know the leaf node in the tree object that each new example data drops down to. Thanks in advance fo

[R] Corrupt trees

2011-03-23 Thread Osei Poku
Hi Everyone, I have been using the "tree" package for a while with no problems until now. When I run predict(tree, newdata), I get an error with the message "Corrupt tree" for about 50% of the trees that I generate with tree. For other trees, the predict function completes with no errors. I h

[R] Bar Chart

2011-03-23 Thread blutack
How do you do a bar chart of 2 vectors? I have one vector which has 10 numbers, and another which has 10 names. The numbers are the frequency of the corresponding name, but when I do a bar chart it says that there is no height. Thanks. -- View this message in context: http://r.789695.n4.nabble.c

[R] Merging graphs with common nodes

2011-03-23 Thread ssamberkar
Hello Everyone! This is my first post to the mailing list so please forgive me if I am a bit deflected from the general format of this mailing list posts. Since I need help in this matter urgently, I would cover up any of my mistakes in posting later. That said, I have a problem in merging 2 gra

[R] Adjusted Rand Index

2011-03-23 Thread Steven Wolf
I'm attempting to use the Adjusted Rand Index to compare different categorizations in my card-sorting experiment. However, as I am attempting to replicate a prior study, I am allowing them to put a single card in multiple piles. However, in the original paper, it looks like Rand expects the cards

[R] R(D)COM through network

2011-03-23 Thread Bart Joosen
Hi, I have written a script which read in a data file, process the data, and then makup a report with the aid of the R2wd package. This works pretty well on my machine, but instead of installing R and R(D)COM on every computer in our network, I was thinking about installing the programs on 1 unus

[R] Compare three or more values?

2011-03-23 Thread Beale, Holly (NIH/NHGRI) [F]
Is there a less cryptic way to compare three or more values? allTheSame<-c("red","red","red","red") notAllTheSame<-c(132,132,132,999) all.identical <- function(vectorToTest){ cIdentical=sum(vectorToTest %in% vectorToTest[1]) return(cIdentical==length(vectorToTest)) } all.identical(al

[R] what's interesting to plot after predict.lm?

2011-03-23 Thread agent dunham
Dear all, I've fitted this model with train data lms <- lm(vd ~ log(v1) + fv2+ fv5+ fv7 ) and predicted over test data using plms <- predict.lm(lmsub, new=test,interval="predict", level=0.95,se.fit=TRUE) I've two questions: q1: what's the difference between writing interval "predict" or "c

[R] using R variables in RMySQL query

2011-03-23 Thread algotr8der
I have the following function myGetstockdataMySQL <- function(startdate, enddate, ticker) { con <- dbConnect(MySQL(), user="blahblah", password="blahblah", dbname="blahblah", host="localhost") rs <- dbGetQuery(con, "SELECT price.close FROM price INNER JOIN stocks ON stocks.stock_id=price.stock_

[R] Passing tex parameter via texi2dvi

2011-03-23 Thread Dieter Menne
I am trying to pass a additional argument to texi2dvi, for example to use the aux-directory. Looks like this is not possible via options: options(texi2dvi='texi2dvi --tex-option="-aux-directory=auxdir"') texi2dvi(file = "GBPL3.tex", pdf = TRUE) #Error in system(paste(shQuote(texi2dvi), "--version

Re: [R] manova question

2011-03-23 Thread Ranjan Maitra
Dear John, Thanks very much! Truly a duh moment... But I am trying to now use this to test H_0: C\beta = 0. C is a 2x3 matrix, and \beta is 3 x 4. I have been trying to use the linearHypothesis() function in the car package. My reading of the help file is that my hypothesis.matrix is this C. The

Re: [R] R helps win competitions

2011-03-23 Thread Bert Gunter
Ravi/others: With all due respect, this seems off topic for this list. I believe there are machine learning lists for which such discussion might be better suited. -- Bert On Wed, Mar 23, 2011 at 9:55 AM, Ravi Varadhan wrote: > Ruben, > > Thanks for bringing attention to this very interesting a

Re: [R] R helps win competitions

2011-03-23 Thread Ravi Varadhan
Ruben, Thanks for bringing attention to this very interesting article. The Kaggle competition model is aimed at identifying a "single" best prediction machine. I am curious as to whether the Kaggle model described in the article can be extended to an ensemble "uber-learner", where one can comb

[R] Correlation

2011-03-23 Thread Val
Hi all, Assume I have a data set collected in a related family. dat <- read.table(textConnection(" Id Father Mother x y 1 0 0 15 26 2 0 0 18 14 3 1 2 12 25 4 0 2 15 30 5 1 0 19 28"), header=TRUE) xx=dat$x yy=dat$y I want to analyze the correlat

[R] R helps win competitions

2011-03-23 Thread Rubén Roa
DeaR ComRades, This is a quote from a News article in Science's 11-February issue, about competitions to model data: "For Chris Raimondi, a search-engine expert based in Baltimore, Maryland, and winner of the HIV-treatment competition, the Kaggle contest motivated him to hone his skills in a

[R] Modifying a particular column in a tab-delimited file

2011-03-23 Thread Sashi Challa
Hello R users, Good day!! I was wondering if there is a way in R to read in a particular column from a tab-delimited file, edit it and write it back into the file with all other columns intact. When I say edit I mean just replacing all the values in that column. I know to read a particular col

Re: [R] R CMD check: building indices error

2011-03-23 Thread Prof Brian Ripley
On Wed, 23 Mar 2011, Didier Leibovici wrote: Hi guys, I am updating a package because of data format in data folder. So I just change an extension of a file to .txt ... nothing more. I get this error on the R CMD check ** help *** installing help indices ** building package indices ... Error in

[R] various plotting options

2011-03-23 Thread Grossmann Patrick
Dear R-Project helpdesk member, I am currently working on some basic correspondence analysis using the R packages 'ca'. As I compute the CA by example <- ca(data), and plotting example via plot(example), I am trying to figure out, how to get a certain desired plot, so, however, my question

Re: [R] predict.lm How to introduce new data?

2011-03-23 Thread David Winsemius
On Mar 23, 2011, at 10:05 AM, agent dunham wrote: Dear all, I've fitted a lm using 61 data (training data), and I'left 10 as test data. Training data and test data are stored in an excell. training <- read.xls("C:/./training.xls") , the same for test. That is: v1 v2 ... v15 When I

Re: [R] ) Error in eval(expr, envir, enclos) : object '' not found

2011-03-23 Thread Jonathan P Daily
It looks like your column name has periods in it somewhere. Is your header separated by something other than commas? look at: names(data.sex) or test by "age" %in% names(data.sex) -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Roa

Re: [R] ) Error in eval(expr, envir, enclos) : object '' not found

2011-03-23 Thread David Winsemius
On Mar 23, 2011, at 9:31 AM, mipplor wrote: datafilename="E:/my documents/r/sex/bysex1.csv" data.sex=read.table(datafilename,header=T) data.sex y.sex.age.region.c.n 1 1980,F,A,N,-18.15,13.61 2 1980,F,A,N,-18.61,13.04 3 1980,F,A,N,-18.81,12.32 41990,F,A,N,-21.12,11.7 5 1990,F,

[R] ) Error in eval(expr, envir, enclos) : object '' not found

2011-03-23 Thread mipplor
> datafilename="E:/my documents/r/sex/bysex1.csv" > data.sex=read.table(datafilename,header=T) > data.sex y.sex.age.region.c.n 1 1980,F,A,N,-18.15,13.61 2 1980,F,A,N,-18.61,13.04 3 1980,F,A,N,-18.81,12.32 41990,F,A,N,-21.12,11.7 5 1990,F,A,N,-20.77,11.58 61990,F,A,N,-21.6,13.

[R] predict.lm How to introduce new data?

2011-03-23 Thread agent dunham
Dear all, I've fitted a lm using 61 data (training data), and I'left 10 as test data. Training data and test data are stored in an excell. training <- read.xls("C:/./training.xls") , the same for test. That is: v1 v2 ... v15 When I type str(training) and str(test), both sets have the sam

[R] Comparing non nested models with correlation coefficients (inspired from Lorch and Myers )

2011-03-23 Thread Boris New
Hi, I would like to compare two models in R with the same dependant variable but different predictors (two different types of frequency and reaction times as RT). An editor told me to have a look at Lorch and Myers 1990. Lorch and Myers use the following technique: 1) they perform regressions on

Re: [R] How to convert a single column into many rows

2011-03-23 Thread Mikhail Titov
I guess matrix(x, ncol=73, byrow=TRUE) should work Mikhail > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > On Behalf Of Zablone Owiti > Sent: Wednesday, March 23, 2011 6:14 AM > To: r-help@r-project.org > Subject: [R] How to convert a sing

Re: [R] adding vertical segments to an xyplot in lattice

2011-03-23 Thread Christopher W. Ryan
Peter-- That's it exactly! Thanks. --Chris Christopher W. Ryan, MD SUNY Upstate Medical University Clinical Campus at Binghamton 425 Robinson Street, Binghamton, NY 13904 cryanatbinghamtondotedu "Observation is a more powerful force than you could possibly reckon. The invisible, the overlook

Re: [R] < ABOUT Rdonlp2 package >

2011-03-23 Thread Ravi Varadhan
This is no longer on CRAN. Try one of the other constrained optimization packages: "Rsolnp" or "alabama" Ravi. --- Ravi Varadhan, Ph.D. Assistant Professor, Division of Geriatric Medicine and Gerontology School of Medicine Johns Hopkins Univers

[R] R CMD check: building indices error

2011-03-23 Thread Didier Leibovici
Hi guys, I am updating a package because of data format in data folder. So I just change an extension of a file to .txt ... nothing more. I get this error on the R CMD check ** help *** installing help indices ** building package indices ... Error in read.table(zfile, header = TRUE, as.is = FALSE

Re: [R] R gui problem for windows

2011-03-23 Thread Feng Li
Thank you for spending time to point me to the posting guide. I apology for the unclear statement for the R version. It is 32bit 2.12.2. I love computer programs because I can always "undo" what I did before. For example I did not intend to close the program but I hit the mouse by mistake. Then I

Re: [R] adding vertical segments to an xyplot in lattice

2011-03-23 Thread Peter Ehlers
On 2011-03-22 12:12, Christopher W Ryan wrote: I have a dataframe that looks like this: > str(chr) 'data.frame': 84 obs. of 7 variables: $ county: Factor w/ 3 levels "Broome","Nassau",..: 3 3 3 3 3 3 3 3 3 3 ... $ item : Factor w/ 28 levels "Access to healthy foods",..: 21 19 20 18 16

Re: [R] How to convert a single column into many rows

2011-03-23 Thread Kenn Konstabel
On Wed, Mar 23, 2011 at 11:13 AM, Zablone Owiti wrote: > Dear users, > > I wish to convert a column of data  containing  pentad (5day mean data) > from 1962 - 2000 into rows with each row having 73 values (ie. 73 pentads > per year). > > > >  1962  pent1  pent2  pent73 > > . > . > . >

[R] Rulefit with R and missing values

2011-03-23 Thread carine
Hi, I'm using R to treat a table (with a lot of missing values) with Rulefit. The matter is when I use the command rfmod. Actually, I don't know how to deal with the error message. I don't know were "true" or "false" is missing. Someone can help me? Thanks The following part is the script I use

[R] How to convert a single column into many rows

2011-03-23 Thread Zablone Owiti
Dear users, I wish to convert a column of data containing pentad (5day mean data) from 1962 - 2000 into rows with each row having 73 values (ie. 73 pentads per year). 1962 pent1 pent2 pent73 . . . . 2000 pent1 pent2 ..pent73 What commands should I use to ach

[R] Random Watts.Strogatz.game

2011-03-23 Thread kparamas
Hi, I have a climate data and I use it to draw a graph with N vertices. I find the density of my graph using, >DEN <- graph.density(g) I want to create a random small-world graph(Watts.Strogatz.game) using similar density. My N=6000, DEN comes to 0.000451 So, I am using the following approach. I

Re: [R] R gui problem for windows

2011-03-23 Thread Prof Brian Ripley
On Wed, 23 Mar 2011, Feng Li wrote: Dear R, I rare use the standard R-gui on Windows. Yesterday I tried the latest stable release on Windows 7 and XP and found one thing interesting. Assume You were asked in the posting guide (which clearly you have ignored as you sent HTML) to be accurate a

Re: [R] Problem with mclapply -- losing output/data

2011-03-23 Thread Rainer M Krug
On Wed, Mar 23, 2011 at 10:42 AM, Patrick Connolly wrote: > G'day Elizabeth, > > For what it's worth, this is what I'd do were I in a position > like yours: > > I would put a condition near the end of myfunc. that responded > when there was an indication that NULLs were to be returned into > your

Re: [R] Problem with mclapply -- losing output/data

2011-03-23 Thread Patrick Connolly
G'day Elizabeth, For what it's worth, this is what I'd do were I in a position like yours: I would put a condition near the end of myfunc. that responded when there was an indication that NULLs were to be returned into your main list. I'd make an additional list with those bits which would also

[R] R gui problem for windows

2011-03-23 Thread Feng Li
Dear R, I rare use the standard R-gui on Windows. Yesterday I tried the latest stable release on Windows 7 and XP and found one thing interesting. Assume currently I am running R code, say > example(plot) Then I click the "close window" button on the R main window. R asks me to save workspace im

Re: [R] confirmatory factor analysis program in R

2011-03-23 Thread rvohen
But i want to know that definite function about cfa!do you have?If you have,could you tell me ? -- View this message in context: http://r.789695.n4.nabble.com/confirmatory-factor-analysis-program-in-R-tp3386133p3398600.html Sent from the R help mailing list archive at Nabble.com. ___

[R] < ABOUT Rdonlp2 package >

2011-03-23 Thread Vo Ngoc Thien An
I can't load Rdonlp2 package. Please support me. Thanks Thien An Ho Chi Minh city - VIET NAM [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/lis

Re: [R] confirmatory factor analysis program in R

2011-03-23 Thread rvohen
thank you ! I will try it -- View this message in context: http://r.789695.n4.nabble.com/confirmatory-factor-analysis-program-in-R-tp3386133p3398594.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list http