Re: [R] Definition of lag is opposite in ts and xts objects!

2012-04-12 Thread Achim Zeileis
On Thu, 12 Apr 2012, jpm miao wrote: Example: Will ts objects be obsolete or modified? No, I don't think so. a[,1] 1983 Q1 2.747365190 1983 Q2 2.791594762 1983 Q3 -0.009953715 1983 Q4 -0.015059485 1984 Q1 -1.190061246 1984 Q2 -0.553031799 1984 Q3 0.686874720 1984 Q4

Re: [R] Could dynlm function work for xts objects?

2012-04-12 Thread Achim Zeileis
On Thu, 12 Apr 2012, jpm miao wrote: It seems to only works for zoo or ts objects? It was tested for zoo, ts, and plain numeric vectors. I tried to run it for xts objects, and error message occurs. I had a quick look if this can be avoided. But xts' merge() method is not fully compatible

[R] loess function take

2012-04-12 Thread arunkumar1111
Hi The function loess takes very long time if the dataset is very huge I have around 100 records and used only one independent variable. still it takes very long time Any suggestion to reduce the time - Thanks in Advance Arun -- View this message in context:

[R] [R-pkgs] Significant updates to medical imaging packages: TractoR and RNiftyReg

2012-04-12 Thread Jon Clayden
Dear all, There have been some recent major updates to the TractoR and RNiftyReg packages, which are available for medical image analysis applications. If you use R for these purposes, I hope you will find the updates useful. RNiftyReg is an image registration package, which provides a clean

Re: [R] xyplot lattice fine control of axes limits and thick marks (with log scale)

2012-04-12 Thread maxbre
ok this is these are the final results: by relation free vs sliced vs scale component function relation free http://r.789695.n4.nabble.com/file/n4551068/relation_free.png relation sliced http://r.789695.n4.nabble.com/file/n4551068/relation_sliced.png scale component function

Re: [R] row.names in dunes and dunes.env?

2012-04-12 Thread Petr PIKAL
Hi see inline Hello, I've got a small dataset on box turtle shell measurements that I would like to perform a detrended correspondence analysis on. I thought that it would be interesting to examine the morphometrics for each species in the area of overlap and in areas where neither

[R] Recode Variable

2012-04-12 Thread David Studer
Hello everybody, I know this is pretty basic stuff, but could anyone explain me how to recode a single value of a variable into a missing value? I used to do it like this: myData[myData$var1==5;var1]-NA # recode value 5 into NA But the column var1 already contains NAs, which

Re: [R] Encoding of Sweave file error message

2012-04-12 Thread Rainer Schuermann
I also had the same problem. Being on Linux, I prefer Walmes' command line method but I found that putting \usepackage[utf8x]{inputenc} as the first instruction in the master .Rnw file also does the trick. No need to change anything after that in the file, at least not for me! Rgds, Rainer On

Re: [R] Recode Variable

2012-04-12 Thread Tal Galili
Hi David, You bring up a good question. I am not sure what is the right way to solve it. But here is a simple solution I put together: x = c(1:10,5) y = x x[c(2,3)] - NA # reproducing the problem: y[x==5] na2F - function(x) { x2 - x x2[is.na(x)] - F x2 } na2F(x==5) # solved

Re: [R] Recode Variable

2012-04-12 Thread Milan Bouchet-Valat
Le jeudi 12 avril 2012 à 12:29 +0300, Tal Galili a écrit : Hi David, You bring up a good question. I am not sure what is the right way to solve it. But here is a simple solution I put together: x = c(1:10,5) y = x x[c(2,3)] - NA # reproducing the problem: y[x==5] na2F -

Re: [R] Recode Variable

2012-04-12 Thread Milan Bouchet-Valat
Le jeudi 12 avril 2012 à 11:08 +0200, David Studer a écrit : Hello everybody, I know this is pretty basic stuff, but could anyone explain me how to recode a single value of a variable into a missing value? I used to do it like this: myData[myData$var1==5;var1]-NA # recode

Re: [R] Schedule R script using cron

2012-04-12 Thread Uwe Ligges
On 12.04.2012 03:51, winie wrote: I am trying to schedule my R script using cron, but it is not working. It seems R can not find packages in cron. Anyone can help me? Thanks. The following is my bash script # source my porfile . /home/winie/.profile # script.R will load packages R CMD BATCH

Re: [R] loess function take

2012-04-12 Thread Uwe Ligges
On 12.04.2012 05:49, arunkumar wrote: Hi The function loess takes very long time if the dataset is very huge I have around 100 records and used only one independent variable. still it takes very long time Any suggestion to reduce the time Use another method that is computationally

[R] r software resource persons India (hyd)

2012-04-12 Thread Sridhar Gutam
Looking for r-software resource persons for the Sensitization and Capacity Building Workshop on Free Software and Knowledge Initiatives in Agricultural Research for Development to be held in the month of July 2012 at Hyderabad. https://sites.google.com/site/fskiard/

Re: [R] Recode Variable

2012-04-12 Thread Rainer Schuermann
1. Some data structured the way you are using would have been helpful. I used Tal Galil's play data and set up a dataframe with the variable names you are using: structure(list(var1 = c(1, NA, NA, 4, 5, 6, 7, 8, 9, 10, 5), var2 = c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 5)), .Names = c(var1, var2),

[R] Seeking help with LOGIT model

2012-04-12 Thread Christofer Bogaso
Dear all, I am fitting a LOGIT model on this Data... Data - structure(c(1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 47, 58, 82, 100, 222, 164, 161, 70, 219, 81, 209, 182, 185, 104, 126, 192, 95, 245,

[R] Reading SPSS: underlying numerical codes

2012-04-12 Thread Marion Wenty
Dear people, I have got a question concerning the underlying numerical codes when reading an SPSS file into R. I used the package foreign and when I look at a variable I get the verbal codes. I would like to know how it is possible to get the underlying numerical codes as output, which are the

Re: [R] Schedule R script using cron

2012-04-12 Thread Martin Maechler
winie winieb...@gmail.com on Wed, 11 Apr 2012 18:51:28 -0700 writes: I am trying to schedule my R script using cron, but it is not working. It seems R can not find packages in cron. Anyone can help me? Thanks. The following is my bash script # source my porfile

Re: [R] Seeking help with LOGIT model

2012-04-12 Thread ken knoblauch
Christofer Bogaso bogaso.christofer at gmail.com writes: Dear all, I am fitting a LOGIT model on this Data... snip --- glm(Data[,1] ~ Data[,-1], binomial(link = logit)) Call: glm(formula = Data[, 1] ~ Data[, -1], family = binomial(link = logit)) Coefficients: (Intercept)

Re: [R] strsplit help

2012-04-12 Thread alison waller
Thanks - I checked through and it looks as if all of the geneids are formatted similarily so I don't know which one would be causing an error. Interestingly, your sapply method works on the same data. So I'm happy although still confused, because the strsplit method worked the other day with a

[R] How insert data to a column in existing csv file?

2012-04-12 Thread Yellow
I was working with some excel files with a lot of data. And by hand it is impossible to handle them. So they are now converted to .csv. With headers above the columns, like: Data1, Data2, Data3 But now I needed to calculate the log2 value of Data1 and place the result under Data2. I can't

Re: [R] How insert data to a column in existing csv file?

2012-04-12 Thread ramonovelar
Hi, You can use write.table with Append = TRUE to keep on writing in the same csv file, but I don't know how to write in an specific cell of your csv file. http://stat.ethz.ch/R-manual/R-devel/library/utils/html/write.table.html write.table (data, file = example.csv, sep = ;, col.names = NA,

[R] General question on the message with non zero exit status

2012-04-12 Thread Chel Hee Lee
I have a general question how to understand the message with non-zero exit status when new package is installed. Based on my experience, this message implies a package dependence. Am I correct to understand this message? Are there anyone who can provide some reference or explain details about the

Re: [R] Recode Variable

2012-04-12 Thread S Ellison
myData[myData$var1==5;var1]-NA # recode value 5 into NA try myData[!is.na(myData$var1) myData$var1==5;var1]-NA or, more simply, myData$var1[myData$var1==5]-NA *** This email and any attachments are confidential. Any

[R] Help in creating a matrix

2012-04-12 Thread arunkumar1111
Hi I have dataset with n variables, say n =3 x y z the formula should be form = x+y+z+x*x +x*y+x*z +y*y + y*z+z*z my code has to for loop Is there any way to reduce two loops for (i in 1:n) { for (j in i:n) { dat= cbind(dat,dat[,i]*dat[,j]) } }

[R] Support for R in highlight.js

2012-04-12 Thread Ivan Sagalaev
Hello, I'm the maintainer of a syntax highlighting tool highlight.js[1]. Recently the Kaggle project has announced they wanted to sponsor the development of the R highlighting definition for it[2]. I wanted to drop a line about it here since I suspect this list has much more R programmers on

Re: [R] Saving multiple plots using tiff function

2012-04-12 Thread John S
Dear R users, I still did not receive an answer to my question and went through the archive with no luck. So what does tiff(filename =Rplot%03d.tif) mean ? Why the following code does produce two files? tiff(filename =Rplot%03d.tif,width=24,height=20,units=cm,res=300, pointsize=10,

Re: [R] Seeking help with LOGIT model

2012-04-12 Thread Christofer Bogaso
Thanks Ken for your reply. No doubt your english is quite tough!! I understand something is not normal with the 5th explanatory variable (se:2872.17069!) However could not understand what you mean by You seem to be getting complete separation on X5 ? Can you please be more elaborate? Thanks, On

Re: [R] Reading SPSS: underlying numerical codes

2012-04-12 Thread Ista Zahn
Hi Marion, Did you look at the help file? Did you try use.value.labels = FALSE? Best, Ista On Thu, Apr 12, 2012 at 6:28 AM, Marion Wenty marion.we...@gmail.com wrote: Dear people, I have got a question concerning the underlying numerical codes when reading an SPSS file into R. I used the

[R] How to calculate the McFadden R-square for LOGIT model?

2012-04-12 Thread Christofer Bogaso
Dear all, can somebody please help me how to calculate McFadden R-square for a LOGIT model? Corresponding definition can be found here: http://publib.boulder.ibm.com/infocenter/spssstat/v20r0m0/index.jsp?topic=%2Fcom.ibm.spss.statistics.help%2Falg_plum_statistics_rsq_mcfadden.htm Here is my

Re: [R] Saving multiple plots using tiff function

2012-04-12 Thread Berend Hasselman
On 12-04-2012, at 13:07, John S wrote: Dear R users, I still did not receive an answer to my question and went through the archive with no luck. So what does tiff(filename =Rplot%03d.tif) mean ? Just read the documentation for tiff: ?tiff Why the following code does produce two

Re: [R] Seeking help with LOGIT model

2012-04-12 Thread Ken Knoblauch
You should look up the Hauck-Donne phenomenon, which shows that with binomial GLMs, the standard error can grow faster than the effect size. Complete separation results, for example, when one predictor (or a combination of several predictors) perfectly predicts the response. Something like this

Re: [R] deferred call

2012-04-12 Thread Whit Armstrong
Bert and Gabor, Thanks for clarifying. Much appreciated. One more question. Do either of you know the location of the code that does the lookup of the default arguments? I would like to be able to capture the implicit dependency of the function on the default arguments. Hence, I would write

Re: [R] Saving multiple plots using tiff function

2012-04-12 Thread John S
Thanks Berend for your answer! I read the documentation but I don’t understand filename =Rplot%03d.tif ? Do you mind sending me what you tried? On Thu, Apr 12, 2012 at 7:34 AM, Berend Hasselman b...@xs4all.nl wrote: On 12-04-2012, at 13:07, John S wrote: Dear R users, I still did

Re: [R] Saving multiple plots using tiff function

2012-04-12 Thread S Ellison
So what does tiff(filename =Rplot%03d.tif) mean ? Just read the documentation for tiff: ?tiff A look at ?sprintf might also be useful if you're unfamiliar with the C format specification. %03d is the format spec for a 3-digit decimal number with leading zeroes.

Re: [R] Saving multiple plots using tiff function

2012-04-12 Thread Uwe Ligges
On 12.04.2012 13:49, John S wrote: Thanks Berend for your answer! I read the documentation but I don’t understand filename =Rplot%03d.tif ? Do you mind sending me what you tried? This is a bug in R. I'll take a look. Best, Uwe Ligges On Thu, Apr 12, 2012 at 7:34 AM, Berend

Re: [R] Reading SPSS: underlying numerical codes

2012-04-12 Thread Marion Wenty
Hi Ista, thank you for your reply! Yes, I looked at the help sheet but didn't use this command because I would still like the categorial variables to be converted into factors and have the value labels from SPSS imported into R as levels. With the use.value.labels = FALSE? command I do get

Re: [R] General question on the message with non zero exit status

2012-04-12 Thread Uwe Ligges
On 12.04.2012 12:05, Chel Hee Lee wrote: I have a general question how to understand the message with non-zero exit status when new package is installed. Based on my experience, this message implies a package dependence. Am I correct to understand this message? Are there anyone who can provide

[R] Using dcast with multiple functions to aggregate

2012-04-12 Thread Jokel Meyer
Dear R communitiy, I am trying to use multiple functions for aggregation within a function call for dcast. However this seems to result in an error. Also I have not managed to make dcast() work with fun.aggregate=sd. Please find attached some example code using the ChickWeight data. Many thanks

Re: [R] How to calculate the McFadden R-square for LOGIT model?

2012-04-12 Thread Christofer Bogaso
Please ignore this mail. I got a solution by using 'pscl' package! On Thu, Apr 12, 2012 at 4:56 PM, Christofer Bogaso bogaso.christo...@gmail.com wrote: Dear all, can somebody please help me how to calculate McFadden R-square for a LOGIT model? Corresponding definition can be found here:

Re: [R] How to calculate the McFadden R-square for LOGIT model?

2012-04-12 Thread Ben Bolker
Christofer Bogaso bogaso.christofer at gmail.com writes: Dear all, can somebody please help me how to calculate McFadden R-square for a LOGIT model? [snip] library(sos) findFn(McFadden) brings you to: http://finzi.psych.upenn.edu/R/library/pscl/html/pR2.html i.e. install the sos

Re: [R] How insert data to a column in existing csv file?

2012-04-12 Thread David Winsemius
On Apr 12, 2012, at 5:18 AM, Yellow wrote: I was working with some excel files with a lot of data. And by hand it is impossible to handle them. So they are now converted to .csv. With headers above the columns, like: Data1, Data2, Data3 But now I needed to calculate the log2 value of Data1

[R] Centering (e.g. on prcomp)

2012-04-12 Thread Jessica Streicher
Hi! I'm doing a PCA on some testdata (only 2 features) currently to see what happens. I read a lot of times one should center ones data, so i left the option on. But now i am scratching my head on how to correctly transform new data to be comparable to the data used in the pca. pca$x are the

[R] R error message

2012-04-12 Thread Harriet Lucy Stubbs
Hi, I'm trying to do an exploratory factor analysis for a uni assignment but I keep getting this error message coming up [1] One of your variables is a constant. Constants are disallowed as part of a scale. when I turn the data into a matrix and look at the stats. I've been told that

Re: [R] Help in creating a matrix

2012-04-12 Thread S Ellison
I have dataset with n variables, say n =3 x y z the formula should be form = x+y+z+x*x +x*y+x*z +y*y + y*z+z*z my code has to for loop Is there any way to reduce two loops for (i in 1:n) { for (j in i:n) { dat= cbind(dat,dat[,i]*dat[,j]) } } Yes; use outer But

[R] Multivariate multilevel mixed effects model: interaction

2012-04-12 Thread Eiko Fried
Hello. I am running a multivariate multilevel mixed effects model, and am trying to understand what the interaction term tells me. A very simplified version of the model looks like this: model - lmer (phq ~ -1 + as.factor(index_phq) * Neuro + ( -1 + as.factor(index_phq)|UserID), data=data) The

[R] pyramid.plot in plotrix, axis labelling

2012-04-12 Thread Gavin Rudge
Hi, I've been looking at ways to make pyramid plots in R. I like the pyramid.plot method in plotrix as it seems the simplest to use and building them in ggplot looks a bit more code intensive than I'd like, being as I'm new to R. This package does pretty much what I need it to do, however I

Re: [R] Encoding of Sweave file error message

2012-04-12 Thread Duncan Murdoch
On 12-04-12 12:13 AM, Duncan Mackay wrote: At 12:03 12/04/2012, you wrote: I had the same problem! So, as I'm a linux user, I prefer use linux terminal. On terminal I type this to compile R CMD Sweave --encoding=utf-8 myfile.Rnw and the compilation is successful. Try to set the encoding

Re: [R] Centering (e.g. on prcomp)

2012-04-12 Thread Jessica Streicher
Ah.. forget it, something must have gone wrong while i was testing (probably messed up some apply()). Seems you can just subtract the returned means - i hope at least. Am 12.04.2012 um 14:30 schrieb Jessica Streicher: Hi! I'm doing a PCA on some testdata (only 2 features) currently to see

Re: [R] Encoding of Sweave file error message

2012-04-12 Thread Duncan Mackay
Hi Duncan Thank you for the tips I tried \usepackage[latin1]{inputenc} but it still bailed up. tried showNonASCII on the file with the ° typed as Alt-248 (used to doing as DOS value) becomes Alt-176 in ASCII % 1° line resulted in 483: % 1b0 line The showNonASCII is a nifty function

Re: [R] Michaelson-Morley Speed of Light Data

2012-04-12 Thread Michael Friendly
The same data, with the proper citations to Michelson(1882) and Stigler(1977) are contained in the HistData package as data(Michelson) See library(HistData) example(Michelson) On 4/11/2012 7:42 AM, Duncan Murdoch wrote: On 12-04-11 12:43 AM, Křištof Želechovski wrote: URL:

Re: [R] Encoding of Sweave file error message

2012-04-12 Thread Duncan Mackay
Hi Rainer Thanks for an alternative. For the record I tried your latex solution on my Windows 7 \usepackage[utf8x]{inputenc} but it failed on the Alt-248 Regards Duncan At 19:13 12/04/2012, you wrote: I also had the same problem. Being on Linux, I prefer Walmes' command line method but

Re: [R] Saving multiple plots using tiff function

2012-04-12 Thread Uwe Ligges
On 12.04.2012 13:53, Uwe Ligges wrote: On 12.04.2012 13:49, John S wrote: Thanks Berend for your answer! I read the documentation but I don’t understand filename =Rplot%03d.tif ? Do you mind sending me what you tried? This is a bug in R. I'll take a look. I think I have a fix, will

Re: [R] Survreg output - interpretation

2012-04-12 Thread Terry Therneau
--- begin included message --- Hello R users, I am analizing survival data (mostly uncensored) and want to extract the most out of it. Since I have more than one factor, I?ve read that the survival regression can help to test the interactions between factors, and then decide how to do the

[R] selective labels display on histogram

2012-04-12 Thread carol white
Hello, Is it possible to selectively display labels on a histogram? Thanks Carol [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] number of warnings

2012-04-12 Thread helin_susam
Any help ? -- View this message in context: http://r.789695.n4.nabble.com/number-of-warnings-tp4550325p4551760.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

[R] Problem with lmer and fixef

2012-04-12 Thread swertie
Hello, I am trying to do contrasts after applying a binomial mixed effect model with the function lmer. I have to extract the fix effect values, but as I write fixef(model), I get this error message: Error in UseMethod(fixef) : no method for 'fixef' with objects of class mer Has anybody some

[R] Curve fitting, probably splines

2012-04-12 Thread Michael Haenlein
Dear all, This is probably more related to statistics than to [R] but I hope someone can give me an idea how to solve it nevertheless: Assume I have a variable y that is a function of x: y=f(x). I know the average value of y for different intervals of x. For example, I know that in the

Re: [R] number of warnings

2012-04-12 Thread Petr PIKAL
Hi Any help ? Call 999 Regards Petr -- View this message in context: http://r.789695.n4.nabble.com/number-of- warnings-tp4550325p4551760.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

Re: [R] selective labels display on histogram

2012-04-12 Thread Petr PIKAL
Hi Hello, Is it possible to selectively display labels on a histogram? What labels? Like that? x-rnorm(1) hist(x) hist(x, axes=F, xlab=bla, ylab=ble, main=bleble) axis(1, at=c(-4, -1, 1, 4)) Regards Petr Thanks Carol [[alternative HTML version deleted]]

Re: [R] R error message

2012-04-12 Thread mlell08
Hi, The code I have used is summary(prefdata) prefdata[prefdata5]=NA summary(prefdata) prefdata2=as.matrix(prefdata[3:22]) stats=paf(prefdata2) [1] One of your variables is a constant. Constants are disallowed as part of could you provide some data / sample data you used for prefdata and

Re: [R] Problem with lmer and fixef

2012-04-12 Thread Ben Bolker
swertie v_coudrain at voila.fr writes: I am trying to do contrasts after applying a binomial mixed effect model with the function lmer. I have to extract the fix effect values, but as I write fixef(model), I get this error message: Error in UseMethod(fixef) : no method for 'fixef' with

Re: [R] Support for R in highlight.js

2012-04-12 Thread Yihui Xie
There are numerous JS libraries for syntax highlighting. I have never tried highlight.js yet, but I wrote something for SyntaxHighlighter which might be easily translated to highlight.js: http://yihui.name/en/2010/09/syntaxhighlighter-brush-for-the-r-language/ Regards, Yihui -- Yihui Xie

Re: [R] number of warnings

2012-04-12 Thread Uwe Ligges
This is the R-help mailig list, not Nabble, hence quote the original message! Anyway, the answer is: See ?options and its argument nwarnings. Uwe ligges On 12.04.2012 14:49, helin_susam wrote: Any help ? -- View this message in context:

Re: [R] Remove superscripts from HTML objects

2012-04-12 Thread mlell08
Hi, h - htmlpCatsupa/sup/ppDog/p/html sub(sup.*sup,,h) see http://en.wikibooks.org/wiki/R_Programming/Text_Processing for more information. Regards! __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

Re: [R] selective labels display on histogram

2012-04-12 Thread carol white
No, data labels on the histogram bars. labels = T in hist displays all data labels. thanks From: Petr PIKAL petr.pi...@precheza.cz Cc: r-h...@stat.math.ethz.ch r-h...@stat.math.ethz.ch Sent: Thursday, April 12, 2012 4:03 PM Subject: Re: [R] selective labels

[R] correlation matrix between data from different files

2012-04-12 Thread jeff6868
Dear users, I'm quite a new french R-user, and I have a problem about doing a correlation matrix. I have temperature data for each weather station of my study area and for each year (for example, a data file for the weather station N°1 for the year 2009, a data file for the N°2 for the year

Re: [R] How insert data to a column in existing csv file?

2012-04-12 Thread Nordlund, Dan (DSHS/RDA)
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Yellow Sent: Thursday, April 12, 2012 2:18 AM To: r-help@r-project.org Subject: [R] How insert data to a column in existing csv file? I was working with some excel files with

Re: [R] How insert data to a column in existing csv file?

2012-04-12 Thread jim holtman
I would suggest using the XLConnect package so that you can read/write the Excel files directly. You can read in the files to a dataframe, make your transformations and then write the result back out to the Excel file. On Thu, Apr 12, 2012 at 11:29 AM, Nordlund, Dan (DSHS/RDA)

Re: [R] selective labels display on histogram

2012-04-12 Thread Petr PIKAL
Hi No, data labels on the histogram bars. labels = T in hist displays all data labels. You could find it probably quicker in documentation. Plotting command usually creates (invisibly) the object which can be saved and changed. h-hist(x) h is list which you can use or modify for

[R] scatter3d: problem with spheres-color

2012-04-12 Thread René Mayer
Dear List, I don't get scatter3d to color the sheres according to the '|' argument. library(car) scatter3d(prestige ~ income + education|type, data=Prestige) The spheres on my screen are all colored the same and they are not conditional on Prestige$type. On the other hand: Fit3d and Ellipse3d

Re: [R] convex nonnegative basis vectors in nullspace of matrix

2012-04-12 Thread capy_bara
Hi the solution with linear programming works very well! Even if I take more 'realistic' matrices with dimensions of about 25x60, the calculation of the basis goes well (if I increase the number of iterations to 1000). Meanwhile I also found an algorithm for an exact calculation of the extreme

Re: [R] pyramid.plot in plotrix, axis labelling

2012-04-12 Thread Richard M. Heiberger
Gavin, Thank you for this example. I would use the as.pyramidLikert function in the HH package. The resulting plot is a standard lattice plot, so any fine tuning uses that standard lattice features. Rich ## install.packages(HH) ## if necessary library(HH) mydata - cbind(mpop,fpop)[10:1,]

Re: [R] selective labels display on histogram

2012-04-12 Thread Richard M. Heiberger
Is this what you mean? x - rnorm(12) histogram(x) histogram(x, scales=list(x=list(at=c(-1, 1), labels=c(minus one, one On Thu, Apr 12, 2012 at 9:28 AM, carol white wht_...@yahoo.com wrote: Hello, Is it possible to selectively display labels on a histogram? Thanks Carol

Re: [R] scatter3d: problem with spheres-color

2012-04-12 Thread Steve_Friedman
I do something similar my script is structured as follows: perhaps it will help library(car) library(rgl) library(mgcv) scatter3d(MADep2009 ~ MADwet2009 + MedAD2009 | as.factor(VegClass), data = SFCN, sphere.size=1.5, surface=FALSE, parallel=FALSE, elliposiod=TRUE, surface.col=c(green, red,

Re: [R] strsplit help

2012-04-12 Thread Jean V Adams
Alison, You've got two geneids with two periods (instead of just one period). gene.list - strsplit(as.character(Rumino_Reps_agreeWalign$geneid),\\.) Rumino_Reps_agreeWalign[sapply(gene.list, length)!=2, ] geneid count_Conser count_NonCons count_ConsSubst count_NCSubst 7

Re: [R] Reading SPSS: underlying numerical codes

2012-04-12 Thread Ista Zahn
Hi Marion, I don't have access to SPSS, so it would be hard for me to figure this out for you. I would think that string variables would be imported as strings or factors even when use.value.labels is true, but can't verify that. Good luck, Ista On Thu, Apr 12, 2012 at 7:59 AM, Marion Wenty

[R] writing spdiags function for R

2012-04-12 Thread Moreno I. Coco
Dear R-list, I am in the process of translating a long function written in Matlab into R (mainly because I am a big of fan of R, and folks will not have to pay to use it :). In the translation of this function I got stack because they use spdiags, which, as far as I can tell it is not available

Re: [R] Using dcast with multiple functions to aggregate

2012-04-12 Thread Ista Zahn
Hi Jokel, On Thu, Apr 12, 2012 at 7:57 AM, Jokel Meyer jokel.me...@googlemail.com wrote: Dear R communitiy, I am trying to use multiple functions for aggregation within a function call for dcast. However this seems to result in an error. Also I have not managed to make dcast() work with

Re: [R] scatter3d: problem with spheres-color

2012-04-12 Thread John Fox
Dear René, I've confirmed that the spheres aren't coloured correctly on my Ubuntu system (the first colour is used for all of the spheres), and I know that this works right on Windows, as you mentioned. I'm curious to try it on my Mac, but don't have that handy at the moment. I also looked at

Re: [R] How insert data to a column in existing csv file?

2012-04-12 Thread Yellow
Hi everyone, I read your messages and I tried some things out. The Data2 is filled with NA. So what I did was: NameFile.csv$Data2[is.na(NameFile.csv$Data2)] = log2Values And now it worked. :) Seems like I needed to replace it, and not only write it. Thanks. -- View this message in

[R] Applying a function to categorized data?

2012-04-12 Thread Robert Latest
Hi all, I'm just getting started in R. My problem is the following: I have a data frame (v1) with lots of production data measurements. Each row contains a single measurement ('ARI_MIT') with a timestamp. I want to lump the data by months with their mean and standard deviation. I have already

Re: [R] Help in creating a matrix

2012-04-12 Thread arunkumar1111
The formula is created sepearately and data is created for the formula and then use the modelling lm - Thanks in Advance Arun -- View this message in context: http://r.789695.n4.nabble.com/Help-in-creating-a-matrix-tp4551532p4551967.html Sent from the R help mailing list archive at

[R] Pointwise Mutual Information

2012-04-12 Thread pl.r...@gmail.com
Hi, I want to calculate pointwise mutual information between label 2-gram, and words in my corpus 1-gram. Any suggestions as to how to go about it? l =label w = word C = reference collection I want to calculate following: p(w,l| C) p(w| C) p(l | C) -- View this message in context:

[R] How to automate creation of plots (create series of plots)

2012-04-12 Thread Magdalena A. Tkacz
Hi All. I have problem with generating series of plots. In detail: I have file of data which I insert into dataframe: data-read.table(file.txt, header=TRUE, sep= ) Data in this file are prepared in such a way, that the header of each column has a value of one of examined parameter - something

Re: [R] Problem with lmer and fixef

2012-04-12 Thread swertie
Thank you very much. I started R again and loaded less libraries and it worked! I didn't know about this problem, the next time, I'll check for this before looking a whole afternoon for alternative methods ;). -- View this message in context:

Re: [R] number of warnings

2012-04-12 Thread helin_susam
This is my wrong, I am so sorry for this. I just wanted to ask something which I did not know. Thanks for answer. Regards Helin. -- View this message in context: http://r.789695.n4.nabble.com/number-of-warnings-tp4550325p4552240.html Sent from the R help mailing list archive at Nabble.com.

[R] Organizations where IT has approved the use of R software

2012-04-12 Thread lynnland
Hi Gang, I realize this post is not directly related to programing issues with R, however, it appears this may be the best place to ask my question. I am putting forward a request that R be considered approved software in my organization. Never an easy task, this is made much more difficult

[R] Help with vectorization

2012-04-12 Thread Filoche
Hi every one. I have a exponential function (3 fitting parameters) that I would like to use to produce data (6 series) without having to use a loop. Here wl = seq(300,500,1) k1 = c(1.2e-6, 4.9e-6, 9.6e-6, 2.7e-10, 6.7e-8, 7.44e-6) k2 = c(726, 352, 128, 5232, 1538, 128) k3 = c(-176, -224, -257,

Re: [R] quadratic model with plateau

2012-04-12 Thread help ly
Thanks to all for your help! That works! Orange On Sat, Apr 7, 2012 at 7:25 PM, Gabor Grothendieck ggrothendi...@gmail.comwrote: Yes, I had fixed that on my end but didn't notice I had copied the old version. I think its obvious enough that anyone will fix it themselves. Regards. On

Re: [R] number of warnings

2012-04-12 Thread helin_susam
Sorry, I did not understand. What does it mean call 999 ? -- View this message in context: http://r.789695.n4.nabble.com/number-of-warnings-tp4550325p4551999.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org

Re: [R] Survreg output - interpretation

2012-04-12 Thread mariaeugeniau
Dear Terry  here is the survreg line from which I understand that gender is significant survreg(formula = Surv(dias, status) ~ trat * sexo * rep, dist = weibull)                    Value      Std. Error       z        p sexom            -0.2187  

[R] Extended beta-binomial model in R

2012-04-12 Thread Henrik Hermansson
Dear all, I have been searching far and wide for a solution to the problem of negative intracluster correlation in the case of a binomial response variable (also known as under-dispersion). Prentice (1986) (http://www.jstor.org/stable/2289219) developed an extension of the beta-binomial model

[R] Simple Problem: Plotting mathematical functions

2012-04-12 Thread Aye
Hey there, I want to plot 5 parabola functions, which happen to be f(x) = 0.25x² + 6,47x -32.6 g(x)=0.99x² -6x -195 j(x)= 0.77x² +14x -495 k(x)=0.001x² + 65x -785 l(x) = 0.9x² -2x -636 in the same graph. Sadly I even do not really understand how to plot just one

Re: [R] Applying a function to categorized data?

2012-04-12 Thread steven mosher
Welcome to R and the list. Others may suggest books ( Nutshell was my first ) but first there are some things that will help you both in programming and getting help on the list. You should post executable code in your question. So, build a toy example of the data.frame you have and show

Re: [R] Simple Problem: Plotting mathematical functions

2012-04-12 Thread Yellow
Hi, At the moment I am studying R at school. But I found this site very useful to explain the plot functions to me: http://www.harding.edu/fmccown/r/ Maybe that can help you too? -- View this message in context:

Re: [R] number of warnings

2012-04-12 Thread R. Michael Weylandt
Just a joke -- since you post through Nabble instead of being a list subscriber, the vast majority of us didn't see your original post and instead only saw your cry for help Michael On Thu, Apr 12, 2012 at 10:08 AM, helin_susam helin.su...@gmail.com wrote: Sorry, I did not understand. What does

Re: [R] Organizations where IT has approved the use of R software

2012-04-12 Thread R. Michael Weylandt
Slightly on topic, just yesterday, the CFPB announced they'll be using R in their work: http://blog.revolutionanalytics.com/applications/ Depending on the scale of your organization, it may not be the open-source nature that's quite the problem of the IT Gang but rather the support (or lack

Re: [R] Help with vectorization

2012-04-12 Thread R. Michael Weylandt
Perhaps ?outer -- well, not outer directly, but a multivariate outer -- I keep this one around for personal use: `mouter` - function(..., FUN = *){ dotArgs - list(...) FUN - match.fun(FUN) if(length(dotArgs) == 1L) return(unlist(dotArgs)) if (length(dotArgs) == 2L)

Re: [R] Multivariate Multilevel Model: is R the right software for this problem

2012-04-12 Thread Eiko Fried
Very interesting book! However, it doesn't cover multivariate models (I have 9 moderately correlated, categorical dependent variables). Again, I'm trying to find out whether 5 time-varying variables (dichotomous; five different life events yes/no; subjects can have several life events at the same

  1   2   >