Re: [R] Issue with using geocode

2012-11-26 Thread Jeff Newmiller
a) Please post in plain text. b) Although you mention Excel, it does not seem to be relevant. (This is a good thing, but mentioning it is a red herring.) c) Your definition of X is not executable R code. If you have already imported data from elsewhere, you can use dput to make it easy for

Re: [R] compatibility of load() in R 2.15.2

2012-11-26 Thread David Winsemius
On Nov 25, 2012, at 10:50 PM, Jack Tanner wrote: I have some large-ish files that are the output of save() from R 2.15.1, which that version can load() just fine. After upgrading to 2.15.2, load() no longer works on these files. Is this a known issue? No longer works? -- David

Re: [R] bbmle Warning: optimization did not converge

2012-11-26 Thread arun4
Thank you Uwe Ligges-3 -- View this message in context: http://r.789695.n4.nabble.com/bbmle-Warning-optimization-did-not-converge-tp4650730p4650812.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

[R] R jags clear deviance

2012-11-26 Thread Guillaume2883
Hi all, I'd like to fit different models using a loop together with the jags package. to do this, I load the following packages runjags, R2jags and coda and use the function jags to fit my models. The problem is that the following a windowx with the following message appear between each model

[R] R strange behaviour when building huge concatenation

2012-11-26 Thread angeloimm
Hello I'm using some R code in order to use the model BG-NBD implementation I'm using Java and I call R by using RCaller. I must admit that i'm really really new to R so maybe I'm doing something wrong. I use the code on this URL: http://code.google.com/p/clv-master-thesis/

Re: [R] compatibility of load() in R 2.15.2

2012-11-26 Thread PIKAL Petr
Hi -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of David Winsemius Sent: Monday, November 26, 2012 9:11 AM To: Jack Tanner Cc: r-h...@stat.math.ethz.ch Subject: Re: [R] compatibility of load() in R 2.15.2 On Nov 25,

Re: [R] Help with predict function in glm

2012-11-26 Thread Rui Barradas
Hello, Why mail a question just to me? Post to the list and the odds of getting more answers (and better) are bigger. As for your question, the problem is in the call to glm, you don't need the prefix 'train$' in the formula, the argument 'data' solves that and when predicting R will look for

[R] zoo timeseries plot; minor tic mark level control

2012-11-26 Thread Alex van der Spek
I cannot figure out how to tune the minor tic marks on the date axis of a zoo plot. I read hundreds of CSV files from a zip archive transparently. The time/date strings I convert to POSIXct format, order them and then make a zoo object as there may be cases which have unequal time stamping. As

Re: [R] zoo timeseries plot; minor tic mark level control

2012-11-26 Thread Gabor Grothendieck
On Mon, Nov 26, 2012 at 6:36 AM, Alex van der Spek do...@xs4all.nl wrote: I cannot figure out how to tune the minor tic marks on the date axis of a zoo plot. I read hundreds of CSV files from a zip archive transparently. The time/date strings I convert to POSIXct format, order them and then

[R] Problem with glm, gaussian family with log-link

2012-11-26 Thread Florian Weiler
Dear all, I am using the book Generalized Linera Models and Extension by Hardin and Hilbe (second edition, 2007) at the moment. The authors suggest that instead of OLS models, the log link is generally used for response data that take only positive values on the continuous scale. Of course they

[R] Webinar signup: Advances in Gradient Boosting: the Power of Post-Processing. December 14, 10-11 a.m., PST

2012-11-26 Thread Lisa Solomon
Webinar signup: Advances in Gradient Boosting: the Power of Post-Processing December 14, 10-11 a.m., PST Webinar Registration: http://2.salford-systems.com/gradientboosting-and-post-processing/ Course Outline: *Gradient Boosting and Post-Processing: o What is missing from

Re: [R] Partial dependence plot in randomForest package (all flat responses)

2012-11-26 Thread Liaw, Andy
Not unless we have more information. Please read the Posting Guide to see how to make it easier for people to answer your question. Best, Andy -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Oritteropus Sent: Thursday, November

[R] puzzling RODBC error

2012-11-26 Thread ONKELINX, Thierry
Dear all, I'm trying to connect to an MSAccess database (ArcGIS personal geodatabase). I keep getting an error about the channel when using sqlQuery(). However, sqlTables() does not complain about the channel and lists all tables in the database. If I try sqlFetch(), then R crashes. I'm happy

Re: [R] RExcel, ROOo and LibreOffice inquiry

2012-11-26 Thread John Kane
John Kane Kingston ON Canada -Original Message- From: landronim...@gmail.com Sent: Sun, 25 Nov 2012 15:02:16 +0100 To: jrkrid...@inbox.com Subject: Re: [R] RExcel, ROOo and LibreOffice inquiry On Sun, Nov 25, 2012 at 2:38 PM, John Kane jrkrid...@inbox.com wrote: Can you supply

Re: [R] Plotting an adjusted survival curve

2012-11-26 Thread Terry Therneau
First a statistical issue: The survfit routine will produce predicted survival curves for any requested combination of the covariates in the original model. This is not the same thing as an adjusted survival curve. Confusion on this is prevalent, however. True adjustment requires a

Re: [R] printing difftime summary

2012-11-26 Thread Sam Steingold
this overcomes the summary generation, but not printing: --8---cut here---start-8--- summary.difftime - function (v, ...) { s - summary(as.numeric(v), ...) r - as.data.frame(sapply(s,difftime2string),stringsAsFactors=FALSE) names(r) - c(string)

Re: [R] puzzling RODBC error

2012-11-26 Thread Marc Schwartz
On Nov 26, 2012, at 7:37 AM, ONKELINX, Thierry thierry.onkel...@inbo.be wrote: Dear all, I'm trying to connect to an MSAccess database (ArcGIS personal geodatabase). I keep getting an error about the channel when using sqlQuery(). However, sqlTables() does not complain about the channel

[R] creation of an high frequency series

2012-11-26 Thread Paul Gilbert
(from R-help Digest, Vol 117, Issue 26) Date: Sun, 25 Nov 2012 07:49:05 -0800 (PST) From: billycorgcandi...@gmail.com To:r-help@r-project.org Subject: [R] creation of an high frequency series Message-ID:1353858545067-4650744.p...@n4.nabble.com Content-Type: text/plain; charset=us-ascii Hi R

[R] Connect R with SQLSERVER

2012-11-26 Thread R_Antony
Hi, Here im not able to connect with MS-SQLSERVER database with *.R-File. Previously i was able to do in R in different machine and configuration was R Ver-2.11.1 Package Installed : RODBC_1.3-2 And now where im doinig now there the same code im trying to execute but its not connecting.

Re: [R] Import/Export excel files to/from R, without changing the file type

2012-11-26 Thread Bart Joosen
You should read your error messages more carefully, especially: could not find function! take a look at loadworkbook and loadWorkbook. Bart -- View this message in context: http://r.789695.n4.nabble.com/Import-Export-excel-files-to-from-R-without-changing-the-file-type-tp4650717p4650823.html

[R] How to count the number of different elements in a column

2012-11-26 Thread Hard Core
Hello, Suppose that i have a dataframe a - read.dta(banca_impresa.dta) i have a column with 17900 obs like 1 2 3 1 6 7 8 3 4 4 and i want to know the number of the different values so in this case it would be 7 How can i do? Thank you -- View this message in context:

[R] Class Not found execption

2012-11-26 Thread sheenmaria
I am trying to call a r file named es.r which have lotes of R functions. These R functions are internally calling java functions by using .jnew() and .jcall(). I have added necessary jar's to the Classpath and I am able to run es.r from command prompt . But when I tried to call it

[R] Help R

2012-11-26 Thread alanarocha
Goodmorning, I'moneafazrtrbhoquhasa variablefactorcomtwoNivesCandH.Queoaatravésdlinear regressionrelationshipetrehaSaerifthe variablespthiedoseogmerparawanttheHtothatanddouCrespctinteRaficthat showsthe two curvesHandCLIRand Selecionar tudo Thank you Ana C. Rocha Rua

[R] merging two specific rows in a DF

2012-11-26 Thread karthicklakshman
Hello members, I have this data frame with 3 columns, C1 C2 TYPE 10 20 A 33 44 B 66 80 A 111 140 B 144 220 B 300 340 A 380 449 A 455 500 B 510 520 A 540 580 B Here, the rows 4 , 5 has type B and

[R] Help in splitting the records

2012-11-26 Thread arunkumar1111
Hi I have set of records seperated by a separator say $$$ i want to get the values in a dataframe. eq qwer$$12$$qwre ewrtr$7789$ewwe I want the output as\ V1 V2V3 qwer 12 qwre ewrtr 7789 ewwwe Please help me - Thanks in Advance Arun -- View this message in

Re: [R] some help

2012-11-26 Thread dattel_palme
Hey again! I finally, after some work done before, had time to apply the code. The sorting of the table did not work well or maybe something was misunderstood. I have a table with 973 rows and 1329 col (ascii/text file). I want to sort the table that all columns are one under each other so that

Re: [R] How to count the number of different elements in a column

2012-11-26 Thread Hard Core
this is wrong because with the command unique it counts the only values that are unique .. in my column, for instance, 1 and 4 are not unique so the formula doesn't work in my case -- View this message in context:

Re: [R] How to count the number of different elements in a column

2012-11-26 Thread chuck.01
length(unique(a)) Hard Core wrote Hello, Suppose that i have a dataframe a - read.dta(banca_impresa.dta) i have a column with 17900 obs like 1 2 3 1 6 7 8 3 4 4 and i want to know the number of the different values so in this case it would be 7 How can i do? Thank

Re: [R] Performing operations only on selected data

2012-11-26 Thread arun
HI Marcel, Sorry, that was a mistake. I guess this should be the one:  df$condition2-ifelse(df$condition1=1,runif(length(df$condition1),0,1),df$condition1) df$condition2 #[1] 0.5207776 0.5227388 0.5196520 0.6552820 2.000 2.000 2.000  #[8] 2.000 3.000 3.000 3.000

Re: [R] Help with predict function in glm

2012-11-26 Thread genome1976
That did it! Thanks so much as always. I emailed the question to you because I think you are an R expert based on all the suggestions, feedback and codes I have received from you in the past. Yes, I do look for answers in the open forum but when it comes to a question for which the

Re: [R] puzzling RODBC error

2012-11-26 Thread Bart Joosen
It seems that your sqlTables also give no results. So there must be something wrong with the ODBC connect. I didn't use odbcConnectAccess, but made an ODBC connection, and then used ODBCconnect to connect to our database. Maybe you can define a user DSN and try it this way? Bart -- View this

[R] error in plot(table(c('a','a')))

2012-11-26 Thread Ludo Pagie
Hi all, there appears to be something strange with the plotting of tables of 1 dimension; if I attempt to make a plot of a table of characters with only 1 value I get an error (Error in xy.coords(x, y, xlabel, ylabel, log) : 'x' and 'y' lengths differ). With more than one value I don't get

[R] cluster analysis error - mclust package

2012-11-26 Thread KitKat
I am following instructions online for cluster analysis using the mclust package, and keep getting errors. http://www.statmethods.net/advstats/cluster.html These are the instructions (there is no sample dataset unfortunately): # Model Based Clustering library(mclust) fit - Mclust(mydata)

Re: [R] some help

2012-11-26 Thread dattel_palme
Hey The code need some corrections and I would kindly ask for help. Say: I have a table with two columns: col1=LST and col2=NDVI i would like to sort all data by NDVI. in reality the NDVI ranges between 0 and 1 (although some values might be minus also). I want to sort by NDVI values and then

Re: [R] How to count the number of different elements in a column

2012-11-26 Thread chuck.01
My apologies. I still do not understand the difference; good luck. Hard Core wrote this is wrong because with the command unique it counts the only values that are unique .. in my column, for instance, 1 and 4 are not unique so the formula doesn't work in my case -- View this message

[R] wrong data interpretation in R

2012-11-26 Thread EcoFranc
Hi, maybe somebody would be kind enough to help a bloody and unprofessional beginner like me (and I hope I did not overlook the answer to my question on the website). I've imported a csv data frame into R, but I can't run a regression because R interprets 4 out of 5 variables as factors (rather

Re: [R] Help in splitting the records

2012-11-26 Thread Sarah Goslee
You state that you want $$$ as the separator, but your example has $$ and $ so I'm assuming an indeterminate number of consecutive $. x - c(qwer$$12$$qwre, ewrtr$7789$ewwe) x - strsplit(x, \\$+) x - do.call(rbind, x) x - data.frame(x, stringsAsFactors = FALSE) x$X2 - as.numeric(x$X2) I've also

Re: [R] How to count the number of different elements in a column

2012-11-26 Thread Sarah Goslee
x - c(1, 2, 3, 1, 6, 7, 8, 3, 4, 4) length(unique(x)) [1] 7 On Mon, Nov 26, 2012 at 5:20 AM, Hard Core gi...@hotmail.it wrote: Hello, Suppose that i have a dataframe a - read.dta(banca_impresa.dta) i have a column with 17900 obs like 1 2 3 1 6 7 8 3 4 4 and i want to know the

Re: [R] wrong data interpretation in R

2012-11-26 Thread Sarah Goslee
Most likely there's something amiss in your csv file: R won't convert numeric data to factors unless there are non-numeric characters included. First check your csv file for errors. If that doesn't solve your problem, please provide a reproducible example.

Re: [R] How to count the number of different elements in a column

2012-11-26 Thread Jose Iparraguirre
Hi, Imagine the column is named XX. Type: nrow(table(banca_impresa$XX)) and you'll get how many different categories there are in that column. (If you type table(banca_impresa$XX) you'll get the frequencies). José José Iparraguirre Chief Economist Age UK T 020 303 31482 E

Re: [R] printing difftime summary

2012-11-26 Thread David Winsemius
On Nov 26, 2012, at 7:14 AM, Sam Steingold wrote: this overcomes the summary generation, but not printing: --8---cut here---start-8--- summary.difftime - function (v, ...) { s - summary(as.numeric(v), ...) r -

Re: [R] Connect R with SQLSERVER

2012-11-26 Thread Marc Schwartz
On Nov 26, 2012, at 3:53 AM, R_Antony antony.akk...@ge.com wrote: Hi, Here im not able to connect with MS-SQLSERVER database with *.R-File. Previously i was able to do in R in different machine and configuration was R Ver-2.11.1 Package Installed : RODBC_1.3-2 And now where im doinig

Re: [R] How to count the number of different elements in a column

2012-11-26 Thread Rui Barradas
Hello, You're wrong, unique doesn't count unique returns a vector without repetitions. unique(a) # includes 1 and 4 [1] 1 2 3 6 7 8 4 length(unique(a)) [1] 7 Hope this helps, Rui Barradas Em 26-11-2012 14:55, Hard Core escreveu: this is wrong because with the command unique it counts the

Re: [R] wrong data interpretation in R

2012-11-26 Thread Don McKenzie
Robert -- it may be that some of your factor variables cannot be coerced to numeric because they have non-numeric elements. This is why we ask for a reproducible example when posting. I suspect just a few lines from the data frame would tell the story. On 26-Nov-12, at 7:59 AM, EcoFranc

Re: [R] Fine Tuning Country Map

2012-11-26 Thread Marcio Pupin Mello
Lorenzo, I'd suggest posting such questions to the R-sig-geo list, which seems more suitable. The book Applied Spatial Data Analysis with R written by Roger Bivand, Edzer Pebesma and Virgilio Gómez-Rubio has exactly what you want.

Re: [R] wrong data interpretation in R

2012-11-26 Thread jim holtman
Also when reading a CSV file, if you do not want characters columns converted to factors, use 'as.is = TRUE' as one of the parameters. If you have a column that is a factor, to convert it to numeric you have to do the following: as.numeric(as.character(factorColumn)) notice that you have to

Re: [R] wrong data interpretation in R

2012-11-26 Thread Richard M. Heiberger
EcoFranc, di you remember to use the argument header=TRUE ? If not, the variable name is interpreted as data and will flip you into factor rather than numeric. On Mon, Nov 26, 2012 at 12:15 PM, jim holtman jholt...@gmail.com wrote: Also when reading a CSV file, if you do not want characters

Re: [R] merging two specific rows in a DF

2012-11-26 Thread Rui Barradas
Hello, Try the following. x - read.table(text= C1 C2 TYPE 10 20 A 33 44 B 66 80 A 111 140 B 144 220 B 300 340 A 380 449 A 455 500 B 510 520 A 540 580 B , header = TRUE) x fun - function(x){ mn - which.min(x$C1) mx - which.max(x$C2) c(C1 = x$C1[mn], C2 = x$C2[mx], TYPE =

Re: [R] merging two specific rows in a DF

2012-11-26 Thread jim holtman
try this: x - read.table(text = C1 C2 TYPE + 10 20 A + 33 44 B + 66 80 A + 111 140 B + 144 220 B + 300 340 A + 380 449 A + 455 500 B + 510 520 A + 540 580 B, header = TRUE, as.is = TRUE) # mark

[R] Fwd: prediction problem

2012-11-26 Thread Catarina Maia
-- Forwarded message -- From: Catarina Maia catarinaramosm...@gmail.com Date: 2012/11/22 Subject: prediction problem To: r-help@r-project.org Hello, I am using the mda package and in particular the fda routine to classify/predict in terms of color to a set of 20 samples for

Re: [R] some help

2012-11-26 Thread jim holtman
try this: (provide sample data next time) # create some test data x - data.frame(LST = runif(1000), NDVI = runif(1000, 0, 1)) head(x,10) # show some data LST NDVI 1 0.86542839 0.95129647 2 0.88910058 0.75971649 3 0.44086718 0.86532140 4 0.99879370 0.05511501 5 0.02401490

Re: [R] Help in splitting the records

2012-11-26 Thread arun
Hi, You could do this: Lines-qwer$$12$$qwre ewrtr$7789$ewwe res-unlist(strsplit(Lines,split=\\$|\n))  as.data.frame(matrix(res[res!=],nrow=2,byrow=TRUE),stringsAsFactors=FALSE)      V1   V2   V3 #1  qwer   12 qwre #2 ewrtr 7789 ewwe A.K. - Original Message - From:

Re: [R] DF grouping

2012-11-26 Thread karthicklakshman
Hello Petr Savicky, hello all, I have a situation similar to the previous one, I need to group a data.frame in a specific way, col1 col2 score 2873 3192 319 4268 4451 183 5389 5534 145 6622 10622 4000 12631 17853 5222 20408 20615 207 21595 21838 243 23121 2313918 the out

Re: [R] Help in splitting the records

2012-11-26 Thread Mark Lamias
In the example below, I don't see any $$$ separators.  Are you sure this is supposed to be the separate or just a single dollar sign?  If this is the case, you don't specify what is to happen when multiple separators appear next to each other.  From your example, it appears that two separators

[R] cacheSweave problem

2012-11-26 Thread annihination
I noticed the following problem with cacheSweave. If I want to print the result of a list object, with cache=TRUE option, if I just use summary(x), the output would not appear in the tex file. If I use print(summary(x)) instead, the output would appear. With cache=FALSE option, however,

[R] cosine curve fit

2012-11-26 Thread dysonsphere
does anybody have a suggestion as to how to use R to fit some date to a cosine function and then have some output statistics that will evaluate the fit? -- View this message in context: http://r.789695.n4.nabble.com/cosine-curve-fit-tp4650866.html Sent from the R help mailing list archive at

Re: [R] wavelet Variance Error

2012-11-26 Thread AidenJohnson
The message is referring to the format of your input data. The package needs a matrix or vector format. I suggest using this: xm- as.matrix(x) return.modwt-modwt(xm, filter=la8, n.levels=5, boundary=periodic, fast=TRUE) -- View this message in context:

[R] ncvreg question

2012-11-26 Thread Jiayi Hou
To whom It May Concern, I am working on a dimensional reduction problem using Smoothly Clipped Asolute Deviation (SCAD) Penalty according to Variable Selection via Nonconcave Penalized Likelihood and its Oracle Properties, J.Fan and R. Li, JASA, Dec 2001. I found an R package named *ncvreg* which

Re: [R] How to count the number of different elements in a column

2012-11-26 Thread Hard Core
Yes, I'm sorry ... i was checking for another column so i made a mistake. Thank you people ;) -- View this message in context: http://r.789695.n4.nabble.com/How-to-count-the-number-of-different-elements-in-a-column-tp4650825p4650875.html Sent from the R help mailing list archive at

[R] Plot(x,y) help

2012-11-26 Thread YAddo
Dear All: I would any appreciate any help with this plot I am struggling with. I have 4 estimates (95% CIs) I want to plot. I want the CI lines to be horizontal on each plotted point. I was trying to tweak some old codes (was for a vertical CI lines) into horizontal but not much dice. Many

[R] reclassification function

2012-11-26 Thread Joele
Hi everyone, I have tried to produce a table with reclassification (continuous NRI, p value) using the reclassification() function in the PredictABEL package. My problem is that I can only get the results printed on the screen, rather than stored in an object (as when doing a regular

Re: [R] Help in splitting the records

2012-11-26 Thread Bert Gunter
Sarah: You may not agree, but the following avoids the IMHO ugly rbind() and separate conversion to numeric by using scan(): ## first, as before.. x - c(qwer$$12$$qwre, ewrtr$7789$ewwe) x - strsplit(x, \\$+) ## Then, instead ... x.convert -

[R] Savitzky-Golay filtering with missing data

2012-11-26 Thread Ryan Hope
I have a timeseries with some missing data points that I need smoothed using a Savitzky-Golay. Right now I am using the sgolayfilt function in the signal package. It fails if I have NA values in the timeseries. If I replace NA with NULL sgolayfilt does not fail but it drops the NULL values which

Re: [R] Plot(x,y) help

2012-11-26 Thread jim holtman
Try this code that uses segments to draw in the bars # put data into a nicer form y=c(1.73,1.30,2.30, 1.83,1.36,2.45,1.46,1.07,2.00,1.58,1.15,2.17) ym - matrix(y , ncol = 3 , byrow = TRUE , dimnames = list(NULL, c(Val, Lower, Upper)) ) ym - cbind(ym, x = 1:4) # add the x-coord

Re: [R] Plot(x,y) help

2012-11-26 Thread Rui Barradas
Hello, You had a typo in the lines() instruction, the parenthesis didn't close after c(y...). Anyway, I'm not sure I understand but to have horizontal lines, just reverse the roles of x and y. (And change pch = _ to pch = |). plot(y, x, type=n,axes=F, xlab=PR(95% CI),ylab= )

Re: [R] Help in splitting the records

2012-11-26 Thread David L Carlson
Another approach is to use gsub() followed by read.table(): x - c(qwer$$12$$qwre, ewrtr$7789$ewwe) x - gsub(\\$+, \\$, x) x - read.table(text=x, sep=$, stringsAsFactors=FALSE) x V1 V2 V3 1 qwer 12 qwre 2 ewrtr 7789 ewwe -- David L

Re: [R] remote connection to an Oracle database - using RODBC - RMySQL..?

2012-11-26 Thread Raffaello Vardavas
Thank you Marc, I will study the material you sent and follow up on this at R-SIG-DB - should I still have problems. I'm using a Mac OS X 10.6.8 Thanks. Raff. Subject: Re: [R] remote connection to an Oracle database - using RODBC - RMySQL..? From: marc_schwa...@me.com Date: Wed, 21

Re: [R] Help in splitting the records

2012-11-26 Thread arun
Hi, Just a modification:  x1-gsub([$], ,x) read.table(text=x1,sep=,header=FALSE,stringsAsFactors=FALSE)   #   V1   V2   V3 #1  qwer   12 qwre #2 ewrtr 7789 ewwe A.K. - Original Message - From: David L Carlson dcarl...@tamu.edu To: 'Bert Gunter' gunter.ber...@gene.com; 'Sarah Goslee'

Re: [R] remote connection to an Oracle database - using RODBC - RMySQL..?

2012-11-26 Thread Marc Schwartz
On Nov 26, 2012, at 1:47 PM, Raffaello Vardavas r_varda...@hotmail.com wrote: Thank you Marc, I will study the material you sent and follow up on this at R-SIG-DB - should I still have problems. I'm using a Mac OS X 10.6.8 Thanks. Raff. In that case, if you use RODBC, you will

Re: [R] aggregate() runs out of memory

2012-11-26 Thread Sam Steingold
Hi, * Steve Lianoglou znvyvatyvfg.ubarl...@tznvy.pbz [2012-11-19 13:30:03 -0800]: For instance, if you want the min and max of `delay` within each group defined by `share.id`, and let's assume `infl` is a data.frame, you can do something like so: R as.data.table(infl) R setkey(infl,

[R] Help on function please

2012-11-26 Thread Andras Farkas
Dear All,   I could use a bit of help here, this function is hard to figure out (for me at least) I have the following so far:   PKindex-data.frame(Subject=c(1),time=c(1,2,3,4,6,10,12),conc=c(32,28,25,22,18,14,11)) Dose-200 Tinf -0.5   defun- function(time, y, parms) {  dCpdt - -parms[kel] *

Re: [R] aggregate() runs out of memory

2012-11-26 Thread Steve Lianoglou
Hi Sam, On Mon, Nov 26, 2012 at 3:13 PM, Sam Steingold s...@gnu.org wrote: Hi, * Steve Lianoglou znvyvatyvfg.ubarl...@tznvy.pbz [2012-11-19 13:30:03 -0800]: For instance, if you want the min and max of `delay` within each group defined by `share.id`, and let's assume `infl` is a

Re: [R] printing difftime summary

2012-11-26 Thread R. Michael Weylandt
On Mon, Nov 26, 2012 at 4:46 PM, David Winsemius dwinsem...@comcast.net wrote: On Nov 26, 2012, at 7:14 AM, Sam Steingold wrote: this overcomes the summary generation, but not printing: --8---cut here---start-8--- summary.difftime - function (v, ...) {

Re: [R] Help R

2012-11-26 Thread R. Michael Weylandt
On Mon, Nov 26, 2012 at 10:38 AM, alanaro...@sapo.pt wrote: Goodmorning, I'moneafazrtrbhoquhasa variablefactorcomtwoNivesCandH.Queoaatravésdlinear regressionrelationshipetrehaSaerifthe variablespthiedoseogmerparawanttheHtothatanddouCrespctinteRaficthat showsthe two curvesHandCLIRand

Re: [R] error in plot(table(c('a','a')))

2012-11-26 Thread R. Michael Weylandt
On Mon, Nov 26, 2012 at 2:41 PM, Ludo Pagie l.pa...@nki.nl wrote: Hi all, there appears to be something strange with the plotting of tables of 1 dimension; if I attempt to make a plot of a table of characters with only 1 value I get an error (Error in xy.coords(x, y, xlabel, ylabel, log) :

Re: [R] aggregate() runs out of memory

2012-11-26 Thread Sam Steingold
hi Steve, * Steve Lianoglou znvyvatyvfg.ubarl...@tznvy.pbz [2012-11-26 16:08:59 -0500]: On Mon, Nov 26, 2012 at 3:13 PM, Sam Steingold s...@gnu.org wrote: * Steve Lianoglou znvyvatyvfg.ubarl...@tznvy.pbz [2012-11-19 13:30:03 -0800]: For instance, if you want the min and max of `delay`

Re: [R] printing difftime summary

2012-11-26 Thread Sam Steingold
* David Winsemius qjvafrz...@pbzpnfg.arg [2012-11-26 08:46:35 -0800]: On Nov 26, 2012, at 7:14 AM, Sam Steingold wrote: summary(infl), where infl$delay is a difftime vector, prints ... delay string:c(492.00 ms, 18.08 min, 1.77 hrs, 8.20 hrs, 8.13 hrs, 6.98 days) secs :c( 0.5,

Re: [R] aggregate() runs out of memory

2012-11-26 Thread Steve Lianoglou
Hi, On Mon, Nov 26, 2012 at 4:57 PM, Sam Steingold s...@gnu.org wrote: [snip] Could you please copy paste the output of `(head(infl, 20))` as well as an approximation of what the result is that you want. Don't know how dput got clipped in your reply from the quoted text I wrote, but I actually

Re: [R] aggregate() runs out of memory

2012-11-26 Thread Sam Steingold
Hi, * Steve Lianoglou znvyvatyvfg.ubarl...@tznvy.pbz [2012-11-26 17:32:21 -0500]: --8---cut here---start-8--- f - data.frame(id=rep(1:3,4),country=rep(6:8,4),delay=1:12) f id country delay 1 1 6 1 2 2 7 2 3 3 8

Re: [R] printing difftime summary

2012-11-26 Thread William Dunlap
It looks like summary.data.frame(d) calls format(d[[i]]) for i in seq_len(ncol(d)) and pastes the results together into a table object for printing. Hence, write a format.summary.difftime if you want objects of class summary.difftime (which I assume summary.difftime produces) to be formatted as

Re: [R] error in plot(table(c('a','a')))

2012-11-26 Thread Rui Barradas
Hello, Also gives an error in R 2.15.2 on Windows 7. I'd change when the dimnames of the table are not integers to not numeric as that's what the code for plot.table tests. And it seems to come from seq.int, since with table value of 2, seq.int produces a vector of length 2 but the table

Re: [R] printing difftime summary

2012-11-26 Thread Sam Steingold
Thanks a lot - almost there! --8---cut here---start-8--- format.summary.difftime - function(sd, ...) { t - matrix(sd$string) rownames(t) - rownames(sd) print(t) format(as.table(t)) } print.summary.difftime - function (sd, ...) { print(format(sd),

Re: [R] Adding a new variable to each element of a list

2012-11-26 Thread Stephen Politzer-Ahles
Thanks, Arun! This pretty much does what I was looking for. Looks like I should get more familiar with the apply functions, it seems like they can solve a lot of these problems! Best, Steve On Sun, Nov 25, 2012 at 8:09 PM, arun smartpink...@yahoo.com wrote: HI Steve, You could try this:

Re: [R] printing difftime summary

2012-11-26 Thread William Dunlap
why do I see NULLs?! because ... format.difftime does a reasonable job (except that it does not copy the input names to its output). Replace your call of the form format(difftimeObject) with structure(format(difftimeObject), names=names(difftimeObject)) to work around this. Bill

Re: [R] aggregate() runs out of memory

2012-11-26 Thread Steve Lianoglou
On Monday, November 26, 2012, Sam Steingold wrote: [snip] there is precisely one country for each id. i.e., unique(country) is the same as country[1]. thanks a lot for the suggestion! R result - f[, list(min=min(delay), max=max(delay), count=.N,country=country[1L]), by=share.id] And is

[R] Psych package: fa.diagram, how to re-arrange layout so numbers do not over-write each other

2012-11-26 Thread Brent Caldwell
Dear R help I have conducted a fa() analysis, and I want to use fa.diagram to assess the extent to which the 11 latent factors predict the 37 items in a psychological battery. However, the display on the screen has very large font size for the coefficients of the relationship between the 11

Re: [R] Psych package: fa.diagram, how to re-arrange layout so numbers do not over-write each other

2012-11-26 Thread Brent Caldwell
Dear Bill Wow! Thank you so much for your rapid reply - you are such a kind person, thank you! I'll try fa.rgraph - thanks Thanks Best wishes Brent -Original Message- From: William R Revelle [mailto:reve...@northwestern.edu] Sent: Tuesday, 27 November 2012 5:54 p.m. To: Brent Caldwell

Re: [R] Problem with glm, gaussian family with log-link

2012-11-26 Thread ilai
On Mon, Nov 26, 2012 at 5:33 AM, Florian Weiler fweile...@jhubc.it wrote: Dear all, I am using the book Generalized Linera Models and Extension by Hardin and Hilbe (second edition, 2007) at the moment. The authors suggest that instead of OLS models, the log link is generally used for

Re: [R] Factor function for coded numerical values

2012-11-26 Thread maths123
The question says that there is an experiement to investigate the effect on breathing rate when doing different types of exercise with wearing more clothes or less clothes (factor A, coded 1,2). The duration of exercise was 10min, 20min, 30min (factor B, coded 1,2,3). Could you give m anymore

Re: [R] creation of an high frequency series

2012-11-26 Thread billycorg
Thank you Paul, It works. Now I will study for repeating the same code for different days. Regards, Vincent -- View this message in context: http://r.789695.n4.nabble.com/creation-of-an-high-frequency-series-tp4650850p4650898.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] merging two specific rows in a DF

2012-11-26 Thread arun
HI, Just a modification of Rui's solution: x1-within(x,TYPE-as.character(TYPE)) group-cumsum(c(TRUE,x1$TYPE[-1]!=x1$TYPE[-length(x1$TYPE)]))  res-as.data.frame(do.call(rbind,lapply(split(x1,group),function(x) c(C1=min(x[,1]),C2=max(x[,2]),TYPE=x[,3][1]))),stringsAsFactors=FALSE)

Re: [R] R strange behaviour when building huge concatenation

2012-11-26 Thread angeloimm
Any idea on the reason why the instruction p1x-c(2, 1, 0, 0, 0, 7, 1, 0, 2, 0, 5, 0, 0, 0, 0, 0, 10, 1, 3, 0, 2, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 12, 0, 0, 1, 0, 0, 0, 0, 0, 0, 2, 1, 0, 1, 0, 4, 0, 1, 0, 0, 0, 2, 0, 0, 3, 0, 0, 1, 0, 1, 0, 0, 0, 3, 0, 0, 1,

[R] A problem subsetting a data frame

2012-11-26 Thread Aki Hoji
Hi all, I have this microarray large microarray data set (ALL) from which I would like to subset or extract a set of data based on a factor ($mol.biol).I looked up some example of subsetting in, picked up two commands and tried both but I got error messages as follows testset -

[R] Help with graphics in gamm4 library

2012-11-26 Thread MurphFL
My problem is relatively straight forward, but I cannot seem to find a way to make it work. I have a RCBD with repeated measurements over time. I have created a fit using the gamm4 package. My model is: fit4a - gamm4(Rate ~ s(Time,by=trt,bs=cr)+trt,data=qual.11.dat,

Re: [R] Plot(x,y) help

2012-11-26 Thread YAddo
Thanks Jim and Rui. -- View this message in context: http://r.789695.n4.nabble.com/Plot-x-y-help-tp4650874p4650906.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

Re: [R] Problem with cbind() and arguments

2012-11-26 Thread parlor9
Yeah, I meant 3 instead of 5. This was just an example, it's not what Im really doing. I am using a 'arules' package for data mining, and I have to pass and 'arg[]' element and use it as the new column name of a data.frame. It's a bit complicated, so I used this example, and I would like to use

Re: [R] Problem with cbind() and arguments

2012-11-26 Thread parlor9
In this case, instead of naming the column 'c', it names it 'args[1]' as a string, not a variable. -- View this message in context: http://r.789695.n4.nabble.com/Problem-with-cbind-and-arguments-tp4650808p4650913.html Sent from the R help mailing list archive at Nabble.com.

[R] glm convergence warning

2012-11-26 Thread Anne Schaefer
Hello, When I run the following glm model: modelresult=glm(CID~WS+SS+DV+DS, data=kimu, family=binomial) I get the following warning messages: 1: glm.fit: algorithm did not converge 2: glm.fit: fitted probabilities numerically 0 or 1 occurred What I am trying to do is model my response

[R] Class Not found execption

2012-11-26 Thread sheenmaria
I am trying to call a r file named es.r which have lotes of R functions. These R functions are internally calling java functions by using .jnew() and .jcall(). I have added necessary jar's to the Classpath and I am able to run es.r from command prompt . But when I tried to call it

Re: [R] Psych package: fa.diagram, how to re-arrange layout so numbers do not over-write each other

2012-11-26 Thread William R Revelle
Brent, No, cex doesn't work (as you have discovered). That is a bug. I will work on it. In the meantime, try Rgraphviz called from fa.rgaph or use the output from fa.graph which produces a dot file for processing with any graphic package (including graphviz) which handles the dot language.

  1   2   >