Re: [R] (no subject)

2012-03-27 Thread James Muller
AJ: This is something to learn a lesson from. A question, starved of preparation, can't help anybody to help you. James On Mar 25, 2012 9:00 PM, Rolf Turner rolf.tur...@xtra.co.nz wrote: On 26/03/12 00:18, Anjana Thampi wrote: How do you decompose inequality in R, say by gender? This has

[R] help in replacing for llop

2012-03-27 Thread arunkumar1111
Hi I have records like like this X1 X2 State 34 72 state1 9 63 state1 49 31 state1 60 34 state1 80 73 state1 60 20 state2 59 87 state2 88 20 state2 71 66 state2 65 56 state2 59 16

[R] Plot of function seems to cut off near edge of domain

2012-03-27 Thread chad.mills
Hello helpful R folks, I am simply trying to graph a quarter circle centered at the origin in the first quadrant. When I set the xlim of the plot to the radius of the circle, the plot appears correct. However, I'd like to see a slight extension of the axes beyond the domain of the function

Re: [R] y needing more than 2 functions

2012-03-27 Thread Rolf Turner
Another approach: foo - function(t){ bm - ceiling(t/15) s - cut(t,breaks=15*(0:bm),labels=1:bm) s - as.numeric(levels(s)[s]) t^(s+1) } This idea can be generalised . cheers, Rolf Turner On 27/03/12 15:31, R. Michael Weylandt wrote:

Re: [R] y needing more than 2 functions

2012-03-27 Thread Petr Savicky
On Mon, Mar 26, 2012 at 07:48:07PM -0400, Aimee Jones wrote: Dear all, I'm aware if y has two separate functions (depending on the conditions of x) you can use the ifelse function to separate y into two separate functions depending on input. How do you do this if there a multiple different

Re: [R] circles()

2012-03-27 Thread Jim Lemon
On 2012-03-26 05:09, John D. Muccigrosso wrote: I cannot for the life of me figure this out: What's the parameter to fill in with color circles made with circles()? col changes the line color, but all I see in the help is a reference to additional graphic parameters, and no examples via google.

Re: [R] Export Created Variables to SPSS/.csv

2012-03-27 Thread Michael Bibo
Strassburger, Daniel Daniel_Strassburger at baylor.edu writes: I haven't been successful in converting my colleagues to the world of R yet they wish to share collected data so that they may analyze it in SPSS. I know how to write to an SPSS file and it opens fine, but my problem is that it

[R] How to test for the difference of means in population, please help

2012-03-27 Thread ali_protocol
Dear all, Novice in statistics. I have 2 experimental conditions. Each condition has ~400 points as its response. Each condition is done in 4 repereats (so I have 2 x 400 x 4 points). I want to compare the means of two conditions and test whether they are same or not. Which test should I use?

[R] Testing for difference of distribution of two population(newbie)

2012-03-27 Thread ali_protocol
Dear all, I am novice in statistics. I have two matrices (results from my experiments), each having ~400 point. I want to test whether the points come from a same distribution or not. Further, I have the results for each matrix (each experiment) in 4 replicates. What should I do? # Repeats of

Re: [R] Plot of function seems to cut off near edge of domain

2012-03-27 Thread Matthieu Dubois
Dear Chad, your problem is linked to (1) the function returning NaNs from x values greater than 50, and (2) the fact that the function is estimated on a predefined number of points. Calling plot for a function object is basically a wrapper for curve(). Your function g() is evaluated on the

Re: [R] row, col function but for a list (probably very easy question, cannot seem to find it though)

2012-03-27 Thread peter dalgaard
On Mar 26, 2012, at 17:33 , David Winsemius wrote: The usual approach to that problem is to use sapply: x - list() x - sapply(1:10, function(z) x[[z]] - 1:z ) Yikes! If that works, it is only by coincidence (The pre-assignment to x only serves the purpose of allowing the

Re: [R] normalization of multi-value string variable

2012-03-27 Thread Alekseiy Beloshitskiy
Thank you so much, Jessica, The specific of my case is that I have a very detailed variable 'Interests' which may have several thousands of possible values. Usually each customer has 3-10 different interests. For example: customer_id|...|interests 1001 |...| cycling, swimming, cooking

[R] SVM. How to use categorical attributes?

2012-03-27 Thread Alekseiy Beloshitskiy
Hi All, Here is the case. I want to build classification model (SVM). Some of variables for this model are categorical attributes which represent words (usually 3-10 words - query for search in google). For example: search_id | query_words|..| result

Re: [R] Completely Off Topic:Link to IOM report on use of -omics tests in clinical trials

2012-03-27 Thread Mike Marchywka
Thanks, I had totally missed this controversy but from quick read of summary the impact on open source analysis was unclear.Can you explain the punchline? I think many users of R have concluded the biggest problem in most analyses isfirst getting the data and then verfiying any results you

Re: [R] How to enable Arial font for postcript/pdf figure on Windows?

2012-03-27 Thread antagomir
Hi Agnes and Camille (and help-list), In Ubuntu 11.10 I needed to use su permissions to copy and gzip the *.afm files manually into /usr/lib/R/library/grDevices/afm/ to get the Arial embedding to work in R for postscript. Ie. after following the instructions by Agnes and Camille, I did sudo

[R] Data indexing issue...

2012-03-27 Thread HJ YAN
Dear R-help, My dataset (which is a data frame, called 'Calender' here) includes 365 rows representing 365 days for a year. One column ('Season')contains factor data representing seasons, e.g. spring, summer, autumn and winter. Another column (called 'Day') contains data representing wether the

Re: [R] Exporting a data.frame to excel using sqlSave - adds a character ' to values

2012-03-27 Thread Juliette Fabre
Hello Tal, I have the same problem with the ' added to all my cells when exported into Excel. I can drop them manually but only one by one (the Find Replace does not work) ... So finally the exported Excel file can actually not be used by scientists to draw graphs or whatever! Did you find a

[R] detecting time out on download.file command

2012-03-27 Thread Hugh Shanahan
Hi, I'm working with a legacy R script which makes use of the download.file command. We're having a problem that occasionally we get a time out from a particular FTP site but the function that does this doesn't pass that information back to the main function that calls it. I'm aware that it

[R] Discretization Package MDLP

2012-03-27 Thread Khaled_taalab
Dear All, I have a dataset of eight variables with 156 records which I wish to discretize using the MDLP algorithm. My issue is that I want to dictate the number of bins the algorithm splits the data into (around 5), rather than just allowing the algorithm to dictate this using the mdlp(data)

Re: [R] Data indexing issue...

2012-03-27 Thread Ivan Calandra
Hi HJ, Take a look at ?; this is probably what you're looking for. What you could also do is: Calender[Calender$Day=='Wd' Calender$Season==Winter, ] # notice the last comma This will subset directly without using which(); it might be helpful to you. HTH, Ivan -- Ivan CALANDRA Université

Re: [R] Data indexing issue...

2012-03-27 Thread jim holtman
Why not use 'split' and get all the groups at once: result - split(Calandra, list(Calandra$Day, Calandra$Season, drop = TRUE) On Tue, Mar 27, 2012 at 7:43 AM, Ivan Calandra ivan.calan...@u-bourgogne.fr wrote: Hi HJ, Take a look at ?; this is probably what you're looking for. What you could

Re: [R] Exporting a data.frame to excel using sqlSave - adds a character ' to values

2012-03-27 Thread jim holtman
I don't see any problem here; there is no data and no indication as to the actual problem you are having that is causing a Find Replace. I export to Excel all the time and don't have any problems. So provide some data and an indication of the problem. On Tue, Mar 27, 2012 at 4:37 AM, Juliette

[R] Standard error terms from gfcure

2012-03-27 Thread Bonnett, Laura
Dear R-help, I am using R 2.14.1 on Windows 7 with the 'gfcure' package (cure rate model). I have included the treatment variable in the cure part of the model as shown below: Ø ref_treat -

Re: [R] read.csv and field containing single quotes

2012-03-27 Thread Benilton Carvalho
Thanks Henrique... giving it a try now, but it'll take a good while, given the file size. Cheers, b On 27 March 2012 02:35, Henrique Dallazuanna www...@gmail.com wrote: Benilton, Try this: read.table(textConnection(gsub(',', ',', gsub('^\|\$', ', readLines('../teste.csv', sep = ',',

Re: [R] read.csv and field containing single quotes

2012-03-27 Thread Rainer M Krug
On 27/03/12 01:09, Benilton Carvalho wrote: I need to read in csv files, created by 3rd party, with fields containing single quotes (as shown below). header1,header2,header3,header4 field1r1,field2r1,field3r1,field4r1 field1r2,field2r2,field3r2PartA), field3r2PartB Very Long,field4r2

Re: [R] normalization of multi-value string variable

2012-03-27 Thread Alekseiy Beloshitskiy
Right, I was also thinking about it, but since I have few thousands of unique words I 'm not quite sure how it will work I just posted my question with more detailed description here: http://stats.stackexchange.com/questions/25355/multi-value-categorical-attributes-how-r Really interesting case

[R] RSqlite UPDATE command problem

2012-03-27 Thread Thomas Adams
All: I am using RSqlite and want to be able to update individual values in a record, such as with this simple example: library(RSQLite) drv-dbDriver(SQLite) con-dbConnect(drv,test.db) my.data-data.frame(countries=c(US,UK,Canada,Australia,NewZealand),vals=c(52,36,74,10,98))

Re: [R] normalization of multi-value string variable

2012-03-27 Thread Jessica Streicher
Hm.. so what you need is either - one new feature for each activity that has a binary value e.g.: cust_id , cycling, swimming, cooking 1001 , 1 , 0, 1 - one new feature that has a value corresponding to a certain combination of activities so if you had just the

[R] Supperscript, subscript and double lines in the main/sub title and using greek letters

2012-03-27 Thread HJ YAN
Dear R-help, I am trying to express myself as best as I can here. If you also use Latex to edit math reports or other languages with similar editing method, you'll see what I'm talking about. My sincere appologies if my question is not clear enough to some extend, as also I'm not able to provide

Re: [R] Data indexing issue...

2012-03-27 Thread HJ YAN
Hi Jim! Thank you so much for the very helpful hints!! I am learning 'split' now and it seems very useful.. HJ On Tue, Mar 27, 2012 at 12:58 PM, jim holtman jholt...@gmail.com wrote: Why not use 'split' and get all the groups at once: result - split(Calandra, list(Calandra$Day,

Re: [R] row, col function but for a list (probably very easy question, cannot seem to find it though)

2012-03-27 Thread MBoersma
Thanks guys for all the replies. It is an urban myth that using 'apply' functions will deliver better performance than 'for' loops. It may even worsen performance or create obstacles when it is improperly used with dataframes. Most of the benefits come from improving readability and

Re: [R] RSqlite UPDATE command problem

2012-03-27 Thread Benilton Carvalho
You probably want: sql-UPDATE testtable SET vals=21 WHERE countries='NewZealand' dbGetQuery(con, sql) instead... b On 27 March 2012 14:18, Thomas Adams thomas.ad...@noaa.gov wrote: All: I am using RSqlite and want to be able to update individual values in a record, such as with this

Re: [R] Supperscript, subscript and double lines in the main/subtitle and using greekletters

2012-03-27 Thread Gerrit Eichner
Hi, HJ, see ?plotmath Hth -- Gerrit - Dr. Gerrit Eichner Mathematical Institute, Room 212 gerrit.eich...@math.uni-giessen.de Justus-Liebig-University Giessen Tel: +49-(0)641-99-32104 Arndtstr.

Re: [R] RSqlite UPDATE command problem

2012-03-27 Thread Thomas Adams
Benilton, * * *Thank you — you are quite right!!* * * *Regards,* *Tom * On Tue, Mar 27, 2012 at 9:35 AM, Benilton Carvalho beniltoncarva...@gmail.com wrote: You probably want: sql-UPDATE testtable SET vals=21 WHERE countries='NewZealand' dbGetQuery(con, sql) instead... b On 27 March

Re: [R] copy the columns based on the code

2012-03-27 Thread Igor Sosa Mayor
:) yes! I agree! On Mon, Mar 26, 2012 at 10:51:17AM -0700, Bert Gunter wrote: Fortunes candidate?! -- Bert On Mon, Mar 26, 2012 at 10:24 AM, Sarah Goslee sarah.gos...@gmail.com wrote: The OP wrote The problem is that it gives the result that I want. Sarah's reply: That's a new sort

Re: [R] help in replacing for llop

2012-03-27 Thread R. Michael Weylandt
No idea what a mean median histogram is but you may wish to check out ?tapply or library(plyr), both of which are designed for this split-apply-combine paradigm. Michael On Tue, Mar 27, 2012 at 12:51 AM, arunkumar akpbond...@gmail.com wrote: Hi I have records like like this X1      X2  

[R] I can't open a .nc file with the cdfcont function of the clim.pact package

2012-03-27 Thread anne-laure
Hello, I am new at using R. I would like to use the following functions of the clim.pact package: ncdfcont and retrieve.nc I have installed the package clim.pact in Rstudio. I have downloaded the ncdf pack from unicar (including ncdump and ncgen). The ncdf file I'm working on is called

[R] two lmer questions - formula with related variables and output interpretation

2012-03-27 Thread Dragonwalker
Hello, I have been attempting to set up a lme and have looked at numerous posts including 'R's lmer cheat-sheet' as well as reading a number of papers and other resources including R help, but I am still a little confused on how to write my model (I thought I had it). I have asked a number of

[R] Zero inflated GAMM

2012-03-27 Thread Bert Harris
HI all, I am planning to get Zuur et al.'s new book when it comes out, but until then I was wondering if anyone could suggest examples of zero inflated or hurdle GAMMs. I have count data with many zeros, non-linear relationships, and site as a random effect. Thank you! Bert Harris, University of

Re: [R] Memory Utilization on R

2012-03-27 Thread Kurinji Pandiyan
Thank you for the modified script! I have now tried on different datasets and it works very well and is dramatically faster than my original script! I really appreciate the help. Kurinji On Fri, Mar 23, 2012 at 1:33 PM, R. Michael Weylandt michael.weyla...@gmail.com wrote: Taking a look at

Re: [R] Using MuMIn - error message

2012-03-27 Thread Dragonwalker
Hello Mike, I don't think I did, but I fixed the issue by loading each package before use. The second issue was solved by removing a variable that was used to create two other categorical variables. I think it must have been recognising this. Thanks for the help. -- View this message in

[R] matrix(unlist(strsplit())) 'missing value' issue

2012-03-27 Thread MaartenJacobs
*I'm still a R noob, just had a couple of lectures about it in our research master. There is a Deal or no deal experiment where I have to write some code for. Someone wrote a website to gather the data and write it in a .xlsx file. These are seperate files for seperate participants so first I

Re: [R] Exporting a data.frame to excel using sqlSave - adds a character ' to values

2012-03-27 Thread Juliette Fabre
Hello, I encountered a situation similar as the one described by Tal above : I use the RODBC library to export multiple dataframes into different sheets of an Excel file. My dataframes contain Character, Date and Numeric columns. library(RODBC) channel - odbcConnectExcel(xls.file = myXlsFile,

Re: [R] row, col function but for a list (probably very easy question, cannot seem to find it though)

2012-03-27 Thread David Winsemius
On Mar 27, 2012, at 3:37 AM, peter dalgaard wrote: On Mar 26, 2012, at 17:33 , David Winsemius wrote: The usual approach to that problem is to use sapply: x - list() x - sapply(1:10, function(z) x[[z]] - 1:z ) Yikes! If that works, it is only by coincidence (The pre-assignment to

[R] R extract parts

2012-03-27 Thread MSousa
Good Afternoon, I believe that my to the problem, the R has a more effective solution. in place the use the loop I have the following set of data, and needs to extract some sections. user poscommunications source v_destine 7 1 109 2222 7 2 100 22

[R] Constructing Distance matrix for hclust

2012-03-27 Thread Vinod Hegde
Hi, I have similarity value between string pairs in a mysql database. I need to construct the distance matrix which hclust can take and cluster the strings. Most of the examples I came across show how to construct the distance matrix using dist function. How can I code to construct distance

[R] lasso constraint

2012-03-27 Thread yx78
In the package lasso2, there is a Prostate Data. To find coefficients in the prostate cancer example we could impose L1 constraint on the parameters. code is: data(Prostate) p.mean - apply(Prostate, 5,mean) pros - sweep(Prostate, 5, p.mean, -) p.std - apply(pros, 5, var) pros -

Re: [R] Supperscript, subscript and double lines in the main/subtitle and using greekletters

2012-03-27 Thread David Winsemius
On Mar 27, 2012, at 9:39 AM, Gerrit Eichner wrote: Hi, HJ, see ?plotmath Hth -- Gerrit - Dr. Gerrit Eichner Mathematical Institute, Room 212 On Tue, 27 Mar 2012, HJ YAN wrote: Dear R-help, I am

Re: [R] How to test for the difference of means in population, please help

2012-03-27 Thread Greg Snow
You should use mixed effects modeling to analyze data of this sort. This is not a topic that has generally been covered by introductory classes, so you should consult with a professional statistician on your problem, or educate yourself well beyond the novice level (this takes more than just

Re: [R] Supperscript, subscript and double lines in the main/subtitle and using greekletters

2012-03-27 Thread mlell08
The title() function also has parameter 'line' where you can specify the margin line in which the text should be displayed. How many lines of margin should be around the figure region of the plot can be specified before plotting by par(mar=c(bottom,left,top,right)), in text lines. margin lines are

Re: [R] Memory Utilization on R

2012-03-27 Thread Alekseiy Beloshitskiy
Guys, let me add my 5 coins into your interesting discussion. I have ~10Gb txt file with train data for my model. It has about 150 millions rows for 12 variables. When I load it into memory (just run only one row!): train-read.table(file=/training.txt) while loading it takes ~28Gb of RAM (It

Re: [R] two lmer questions - formula with related variables and output interpretation

2012-03-27 Thread Dragonwalker
I realised that I removed the link to the question but forgot to remove the text regarding it. Sorry. I am not sure if I am supposed to link to other forums, but I can add the links as needed (as the format is clearer). I actually have one more question though in regards to which data to use. If

Re: [R] Memory Utilization on R

2012-03-27 Thread R. Michael Weylandt
Note that you can actually drop the line defining the big list x. I thought it would be needed, but it turns out to be unnecessary after cleaning up the second half: cutting off that allocation might save you even more time. Best, Michael On Tue, Mar 27, 2012 at 11:14 AM, Kurinji Pandiyan

Re: [R] copy the columns based on the code

2012-03-27 Thread MSousa
Hello, this code, works perfectly temp - merge(travel, city, by.x=Source, by.y=cod) result - merge(temp, city, by.x=Destine, by.y=cod) The problem was the construction of the data frame, had a parenthesis in city-rbind(city,data.frame(city=Lisbon,cod=3))), I tried to delete the post,

Re: [R] copy the columns based on the code

2012-03-27 Thread jim holtman
yet another way: city-data.frame(city=Barcelona,cod=1) city-rbind(city,data.frame(city=Madrid,cod=2)) city-rbind(city,data.frame(city=Lisbon,cod=3)) city-rbind(city,data.frame(city=Milan,cod=4)) city-rbind(city,data.frame(city=London,cod=5)) travel-data.frame(pos=1,Source=1,Destine=2)

Re: [R] Plot of function seems to cut off near edge of domain

2012-03-27 Thread Chad Mills
Ah, thanks. I am new to R and was unaware of the from/to parameters for the plot function. I thought xlim and ylim served that purpose. Thanks again! -Chad On Tue, Mar 27, 2012 at 3:31 AM, Matthieu Dubois matth...@gmail.com wrote: Dear Chad, your problem is linked to (1) the function

Re: [R] Memory Utilization on R

2012-03-27 Thread R. Michael Weylandt
It's really not suggested etiquette to thread-jack, but generally, the more you can tell to read.table (particularly the colClasses, nrows, as.is, and stringsAsFactors arguments) the faster it will be able to read things by skipping various necessary checks. Michael On Tue, Mar 27, 2012 at 12:07

[R] What error distribution should I use?

2012-03-27 Thread Lívia Dorneles Audino
I'm trying to make a glmm to identify the relationship between insect species richness with fragment size, isolation and time (different years). I already tried to analyse it using poisson distribution error, but I always face with the following warning: *glm.fit: fitted probabilities numerically

[R] ignore error getting next result

2012-03-27 Thread C Lin
Dear All, How do I ignore an error and still getting result of next iteration. I am trying to do wilcox.test on a loop, when the test fail, I would like to continue doing the next iteration and getting the p-value. I tried to do tryCatch or try but I cannot retrieve the p-value if the test is

Re: [R] lasso constraint

2012-03-27 Thread Weidong Gu
Hi, your code has errors: apply function only has 1 or 2 as margin. bound is used as turning parameter for summation of absolute coefficients. lasso runs on a grid of the turning parameter for varying strength of shrinkage. so each turning value may yield different sets of coefficients and

[R] read.octave fails with data from Octave 3.2.X

2012-03-27 Thread Helios de Rosario
Hi, I'm afraid that the function read.octave from package foreign has some problems with the ASCII data format exported by new versions of Octave (later than 3.2.X). It fails even for a simple case as: [Octave code:] octave:1 x=1; octave:2 save -ascii testdata.mat x [Now in R:] octavedata -

Re: [R] lasso constraint

2012-03-27 Thread Bert Gunter
Inline: On Tue, Mar 27, 2012 at 10:00 AM, Weidong Gu anopheles...@gmail.com wrote: Hi, your code has errors: apply function only has 1 or 2 as margin. FALSE. Please re-read the Help files. It works as expected with arbitrary higher dim arrays. -- Bert bound is used as turning parameter

Re: [R] Supperscript, subscript and double lines in the main/subtitle and using greekletters

2012-03-27 Thread HJ YAN
Sorry last message was not completed before sending Please below On Tue, Mar 27, 2012 at 5:36 PM, HJ YAN yhj...@googlemail.com wrote: Thank you very much Gerrit, for the nice hints! Just done some more googling and reaserches on this and trying to answering it myself... Below is

[R] Rgdal package - get information

2012-03-27 Thread julio cesar oliveira
Hi, I used GDALinfo(MOD13Q1.A2001049.h13v11.005.2007002215512.250m_16_days_EVI.tif) and got the results: rows10 columns 11 bands 1 origin.x150701.4 origin.y7744897 res.x 250 res.y 250 ysign -1 oblique.x 0 oblique.y 0

[R] installing R 2.14.2

2012-03-27 Thread Heba S
Hello,I am trying to install a newer version of R (R 2.14.2) from this linkhttp://cran.r-project.org/bin/macosx/ However I am getting an error that it can not be installed on my computer. My Mac is version 10.6.8. Can you please advise me what the problem. I need the newer version to install

Re: [R] ignore error getting next result

2012-03-27 Thread David Winsemius
On Mar 27, 2012, at 12:56 PM, C Lin wrote: Dear All, How do I ignore an error and still getting result of next iteration. I am trying to do wilcox.test on a loop, when the test fail, I would like to continue doing the next iteration and getting the p-value. I tried to do tryCatch or try

[R] Help on predict.lm

2012-03-27 Thread Nederjaard
Hello, I'm new here, but will try to be as specific and complete as possible. I'm trying to use “lm“ to first estimate parameter values from a set of calibration measurements, and then later to use those estimates to calculate another set of values with “predict.lm”. First I have a

Re: [R] lasso constraint

2012-03-27 Thread Steve Lianoglou
Hi, On Tue, Mar 27, 2012 at 10:35 AM, yx78 yangx...@gmail.com wrote: In the package lasso2, there is a Prostate Data. To find coefficients in the prostate cancer example we could impose L1 constraint on the parameters. code is: data(Prostate)  p.mean - apply(Prostate, 5,mean)  pros -

[R] readHTLMTable help

2012-03-27 Thread Lucas
Hello to everyone. I´m using this function to download some information from a website. This is the URL: http://164.77.222.61/climatologia/php/vientoMaximo8.php?IdEstacion=330007FechaIni=01-1-1980 If you go to that website you´ll find a table with meteorological information. One column is called

[R] Convert day of year back into a date format.

2012-03-27 Thread Sam Albers
Hello, I am having trouble figuring out how to convert a Day of Year integer back into a Date format. For example I have the following: date - c('2008-01-01','2008-01-02','2008-01-03','2008-01-04','2008-01-05','2008-01-06','2008-01-07',

Re: [R] ignore error getting next result

2012-03-27 Thread C Lin
As a matter of fact, I did read the FAQ. However, in the FAQ coef() is used to return the coefficients of lm() if it succeeded. I cannot find similar function for pvalue. CC: r-help@r-project.org From: dwinsem...@comcast.net To: bac...@hotmail.com Subject: Re: [R] ignore error getting

Re: [R] Help on predict.lm

2012-03-27 Thread Berend Hasselman
On 27-03-2012, at 19:24, Nederjaard wrote: Hello, I'm new here, but will try to be as specific and complete as possible. I'm trying to use “lm“ to first estimate parameter values from a set of calibration measurements, and then later to use those estimates to calculate another set of

Re: [R] ignore error getting next result

2012-03-27 Thread David Winsemius
On Mar 27, 2012, at 2:18 PM, C Lin wrote: As a matter of fact, I did read the FAQ. However, in the FAQ coef() is used to return the coefficients of lm() if it succeeded. I cannot find similar function for pvalue. So your question has nothing to do with the subject line? If you are trying

Re: [R] Convert day of year back into a date format.

2012-03-27 Thread Justin Haynes
There may very well be a better solution, but this works. format(strptime(dayofyear, format=%j), format=%m-%d) On Tue, Mar 27, 2012 at 11:12 AM, Sam Albers tonightstheni...@gmail.comwrote: Hello, I am having trouble figuring out how to convert a Day of Year integer back into a Date format.

Re: [R] installing R 2.14.2

2012-03-27 Thread Steve Lianoglou
Hi, On Tue, Mar 27, 2012 at 1:03 PM, Heba S abehsun...@hotmail.com wrote: Hello,I  am trying to install a newer version of R (R 2.14.2) from this linkhttp://cran.r-project.org/bin/macosx/ However I am getting an error that it can not be installed on my computer. My Mac is version 10.6.8.

Re: [R] ignore error getting next result

2012-03-27 Thread C Lin
I'm sorry. I do appreciate you are trying to help. However, what I am trying to do is not exactly the same as in FAQ. If I do the following: test2=list(numeric(0),c(10,20)); test1=list(c(1),c(1,2,3,4)); for (i in 1:2){ tryCatch(wilcox.test(test1[[i]],test2[[i]]),error = function(e) NULL); }

Re: [R] ignore error getting next result

2012-03-27 Thread David Winsemius
On Mar 27, 2012, at 2:36 PM, C Lin wrote: I'm sorry. I do appreciate you are trying to help. However, what I am trying to do is not exactly the same as in FAQ. If I do the following: test2=list(numeric(0),c(10,20)); test1=list(c(1),c(1,2,3,4)); for (i in 1:2){

Re: [R] Help on predict.lm

2012-03-27 Thread Peter Ehlers
R tries hard to keep you from committing scientific abuse. As stated, your problem seems to me akin to 1. Given that a man's age can be modelled as a function of the grayness of his hair, 2. predict a man's age from the temperature in Barcelona. Your calibration relates 'abs' and 'conc'.

Re: [R] SVM. How to use categorical attributes?

2012-03-27 Thread Steve Lianoglou
Hi, On Tue, Mar 27, 2012 at 6:05 AM, Alekseiy Beloshitskiy abeloshits...@velti.com wrote: Hi All, Here is the case. I want to build classification model (SVM). Some of variables for this model are categorical attributes which represent words   (usually 3-10 words - query for search in

Re: [R] Help on predict.lm

2012-03-27 Thread Bert Gunter
FORTUNE!!! -- Bert On Tue, Mar 27, 2012 at 11:44 AM, Peter Ehlers ehl...@ucalgary.ca wrote: R tries hard to keep you from committing scientific abuse. As stated, your problem seems to me akin to 1. Given that a man's age can be modelled as a function   of the grayness of his hair, 2.

Re: [R] ignore error getting next result

2012-03-27 Thread William Dunlap
test2=list(numeric(0),c(10,20)); test1=list(c(1),c(1,2,3,4)); for (i in 1:2){ tryCatch(wilcox.test(test1[[i]],test2[[i]]),error = function(e) NULL); } I cannot get the p-value of the test for i=2. You didn't store the results of wilcox.test anywhere. First make it work for data that

Re: [R] Help on predict.lm

2012-03-27 Thread Peter Ehlers
R tries hard to keep you from committing scientific abuse. As stated, your problem seems to me akin to 1. Given that a man's age can be modelled as a function of the grayness of his hair, 2. predict a man's age from the temperature in Barcelona. Your calibration relates 'abs' and 'conc'.

[R] ZAGA predictions in GAMLSS

2012-03-27 Thread seefledermaus
Hello, I am modelling positive continuous data (including zeros) using the ZAGA distribution in GAMLSS and want to use the model for predictions. My final model includes smoothers (pb()) for the mu and nu parameter. First, I blindly used the default options for predictions but noticed that I

Re: [R] read.octave fails with data from Octave 3.2.X

2012-03-27 Thread Helios de Rosario
I wrote in my previous message the following Octave code: [Octave code:] octave:1 x=1; octave:2 save -ascii testdata.mat x Forget the -ascii. It should be -text or nothing (-text is the default). By the way, read.octave() does not really fail (it does return a value), but the result is somewhat

Re: [R] Plotting patient drug timelines using ggplot2 (or some other means) -- Help!!!

2012-03-27 Thread Paul Miller
Hello Dr. Winsemius, Not sure how or if the use of NAs you describe applies to my case. I'll go back to this again when the ggplot2 book arrives. It may be that this will provide a helpful insight then. Thanks, Paul --- On Fri, 3/23/12, David Winsemius dwinsem...@comcast.net wrote: From:

Re: [R] Convert day of year back into a date format.

2012-03-27 Thread Prof Brian Ripley
On 27/03/2012 19:30, Justin Haynes wrote: There may very well be a better solution, but this works. format(strptime(dayofyear, format=%j), format=%m-%d) The answer depends on the year (think leap years), so I think you need strptime(paste(2008, dayofyear), format=%Y %j) Probably a better

[R] survplot function

2012-03-27 Thread Thorsten Raff
Dear R-helpers I am wondering if there is an option to the survplot function in the design package that allows for drawing Kaplan-Meier plots starting from 0 instead of 1, similar like fun = 'event' in the standard plotting function used on a survfit object. I apologize in advance for having

[R] How to change the color of tcltk widget background color

2012-03-27 Thread mrzung
hi, I'm a beginner of tcltk packages. I'm making some gui for some function and want to change the background color that is grey in default. anybody who knows the way that changes the color of it plz teach me how to do that. Forthemore is there a nice manual for tclck? Thanks. -- View this

Re: [R] What error distribution should I use?

2012-03-27 Thread Ben Bolker
Lívia Dorneles Audino livia.audino at gmail.com writes: I'm trying to make a glmm to identify the relationship between insect species richness with fragment size, isolation and time (different years). I already tried to analyse it using poisson distribution error, but I always face with the

Re: [R] Year of data collection for 'diamonds' dataset in ggplot2

2012-03-27 Thread Hadley Wickham
I believe it was 2008. Hadley On Mon, Mar 26, 2012 at 11:46 AM, Marina Doucerain marinadoucer...@gmail.com wrote: Hello, I'm wondering what was the year (or year range) of collection for the data included in the 'diamonds' dataset in ggplot2. This information would be very helpful in

Re: [R] calling java from R and using java time series double precision array

2012-03-27 Thread Hurr
I solved some of my problems, but the one that remains is that reading the two-dimensional arrays into R transposes the matrix. The arrays I want to read are unequal interval time multi series with the first column being the times which are converted in java from calendar CnYrMoDaHrMnScDCMQ or

Re: [R] What error distribution should I use?

2012-03-27 Thread Peter Ehlers
On 2012-03-27 15:11, Ben Bolker wrote: Lívia Dorneles Audinolivia.audinoat gmail.com writes: I'm trying to make a glmm to identify the relationship between insect species richness with fragment size, isolation and time (different years). I already tried to analyse it using poisson

Re: [R] Rgdal package - get information

2012-03-27 Thread Michael Sumner
There is a mailing list R-Sig-Geo which is more appropriate for questions about the rgdal and related packages. If by read the information GDType you mean to get that Int16 description you can get it by delving into the attributes of the GDALinfo return value, for example: f -

Re: [R] assigning vector or matrix sparsely (for use with mclapply)

2012-03-27 Thread ilai
It is (at least for me) really unclear what the problem is, or how it's related to mclapply. You say this works fine, except that what I want to get NA's in the return positions that were not recalculated. then, I can write newdata$y - ifelse ( is.na(olddata$y), mc.byselectrows( olddata,

[R] Is it possible to de-select with sqlQuery from the RODBC library?

2012-03-27 Thread Eric Fail
Dear R-list, I'm queering a M$ Access database with the sqlQuery function from the RODBC library. As I cannot make a working example with a database here is an illustrative example, library(RODBC) mdbConnect-odbcConnectAccess(S:/data/ ... /databse.mdb) data - sqlQuery(mdbConnect, select id,

Re: [R] assigning vector or matrix sparsely (for use with mclapply)

2012-03-27 Thread ivo welch
I wasn't thinking straight. old.data= 11:20 recalc.please= (old.data%%2==0) old.data[recalc.please] [1] 12 14 16 18 20 new.data[recalc.please]= old.data[recalc.please]^2 Error in new.data[recalc.please] = old.data[recalc.please]^2 : object 'new.data' not found # this is where I had given

[R] One last thing

2012-03-27 Thread Fretheim, Alexander H
Dear R, Thanks for helping me locate the source for the StructTS method from stats, but I've run in to a roadblock in reverse engineering it to locate a formula for its forecasting because it calls some compiled C code, a function called KalmanLike. I've looked through that R library that

Re: [R] Zero inflated GAMM

2012-03-27 Thread Neil Collier
Bert, Try posting on the R-sig-ME list for help with mixed models. Cheer, Neil On Wed, Mar 28, 2012 at 1:16 AM, Bert Harris aramidop...@gmail.com wrote: HI all, I am planning to get Zuur et al.'s new book when it comes out, but until then I was wondering if anyone could suggest examples

Re: [R] R extract parts

2012-03-27 Thread Rui Barradas
Hello, my idea is to get results like this: user, sector, source, destine, count, average 7 1 22 22 4 186.25 # (109+100+214+322) 7 2 161 97 1 68 7 2 97 97

Re: [R] What error distribution should I use?

2012-03-27 Thread chuck.01
Could you please post a small example of your data and code which gives you this error. Your assumed error distribution sounds reasonable. I am interested as to why you have zeros... you have sites with species richness ==0 ?? Lívia Dorneles Audino wrote I'm trying to make a glmm to

  1   2   >