Re: [R] Equality of multiple vectors

2012-05-04 Thread Jan van der Laan
or identical(vec1, vec2) && identical(vec2, vec3) Jan Petr Savicky schreef: On Fri, May 04, 2012 at 12:53:12AM -0700, aaurouss wrote: Hello, I'm writing a piece of code where I need to compare multiple same length vectors. I've gone through the basic functions like

Re: [R] read.table() vs read.delim() any difference??

2012-05-04 Thread Jan van der Laan
delim just " etc. Jan Rameswara Sashi Kiran Challa schreef: Hi, I have a tab seperated file with 206 rows and 30 columns. I read in the file into R using read.table() function. I checked the dim() of the data frame created in R, it had only 103 rows (exactly half), 30 columns. Then I tried

Re: [R] Can't import this 4GB DATASET

2012-05-04 Thread Jan van der Laan
reak; line_sizes <- c(line_sizes, nchar(lines)) } # create a table of line sizes to check if they are all equal table(lines_sizes) HTH, Jan iliketurtles schreef: Dear Experienced R Practitioners, I have 4GB .txt data called "dataset.txt" and have attempted to use *ff, bigmemory

[R] * operator overloading & setOldClass

2012-05-03 Thread Jan Wijffels
fact that both objects are of class ff_vector. Can someone tell me why this is, point me to some documentation how to solve this and possibly indicate what needs to be done so that the above code gives similar behaviour as > 1:10 * 1:10 [1] 1 4 9 16 25 36 49 64 81 100 thanks in adva

Re: [R] Reading big files in chunks-ff package

2012-03-25 Thread Jan van der Laan
file directly in chunks, you could also have a look at the LaF package. Especially the process_blocks routine which does exactly that. The manual vignette (http://cran.r-project.org/web/packages/LaF/vignettes/LaF-manual.pdf) contains some examples how to do that. Jan Quoting Mav : Thank yo

Re: [R] Reading big files in chunks-ff package

2012-03-25 Thread Jan van der Laan
Your question is not completely clear. read.csv.ffdf automatically reads in the data in chunks. You don´t have to do anything for that. You can specify the size of the chunks using the next.rows option. Jan On 03/24/2012 09:29 PM, Mav wrote: Hello! A question about reading large CSV

Re: [R] Handling 8GB .txt file in R?

2012-03-25 Thread Jan van der Laan
con, n=5) # read the remainder using read.table.ffdf ffdf <- read.table.ffdf(file=con) # close connection close(con) HTH Jan On 03/25/2012 06:20 AM, iliketurtles wrote: Thanks to all the suggestions. To the first individual that replied, I can't do any stuff with unix or perl. All I know is R.

Re: [R] Singleton pattern

2012-03-16 Thread Jan T. Kim
the thing once and then passing it around as necessary, taking care that called functions don't change it, is perhaps good enough. Best regards, Jan On Fri, Mar 16, 2012 at 12:15:27PM -0400, Bryan Hanson wrote: > Since no one else has "bit", I'll take a stab. I'm an expe

[R] JSS support

2012-03-15 Thread Jan de Leeuw
=== Jan de Leeuw; Distinguished Professor and Chair, UCLA Department of Statistics; Editor: Journal of Multivariate Analysis, Journal of Statistical Software; US mail: 8125 Math Sciences Bldg, Box 951554, Los Angeles, CA 90095-1554 phone (310)-825-9550; fax (310)-206-5658; email: dele

Re: [R] check for data in a data.frame and return correspondent number

2012-03-14 Thread Jan van der Laan
ea-n", "as_adj_as fire-n", "as_adj_as carrot-n", "appearance sky-n", "area chicken-n", "area color-n") ) merge(MyVector, MyData[, c("V4", "redNew")] , by.x="V1", by.y="redNew", all.x=TRUE) Btw I

Re: [R] Reading in 9.6GB .DAT File - OK with 64-bit R?

2012-03-09 Thread Jan van der Laan
your file block by block and filtering it. Jan RHelpPlease schreef: Hi Barry, "You could do a similar thing in R by opening a text connection to your file and reading one line at a time, writing the modified or selected lines to a new file." Great! I'm aware of this exis

Re: [R] Novice Alert!: odfWeave help!

2012-03-08 Thread Jan van der Laan
lting odt-document. odfWeave("hello.odt", "hello_out.odt") You can now open "hello_out.odt" (or whatever you named it) and see the resulting output. HTH, Jan metatarsals schreef: Hello world, I'm pretty new to computer code: for example, I consider

Re: [R] Week number from a date

2012-02-22 Thread Jan van der Laan
2012 starts on 2nd januari; week 1 of 2008 starts on december 29th 2008). http://www.r-bloggers.com/iso-week/ gives a function for that type of week numbers (not tested by me). Jan Patrick Breheny schreef: To give a little more detail, you can convert your character strings into POSIX

[R] Triangular Test

2012-02-20 Thread kende jan
Hello, I would like to perform triangular test for clinical trial with R. can you help me please ? Jan [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

Re: [R] Problems reading tab-delim files using read.table and read.delim

2012-02-08 Thread Jan van der Laan
ot be correct. HTH Jan mails schreef: Hello, I used read.xlsx to read in Excel files but for large files it turned out to be not very efficient. For that reason I use a programme which writes each sheet in an Excel file into tab-delim txt files. After that I tried using read.tabl

[R] 2011 Journal of Statistical Software

2012-02-04 Thread Jan de Leeuw
The Journal of Statistical Software published eight volumes in 2011, five of them as special volumes. V38: Special Volume: Competing Risks and Multi-State Models V39: Regular Volume V40: Regular Volume V41: Special Volume: Statistical Software for State Space Methods V42: Special Volume: Politica

Re: [R] Not generating line chart

2012-01-19 Thread Jan van der Laan
the pdf(...) and dev.off() outside of the loop. I am not an ggplot2 expert, but you could also have a look at the facets option of qplot. As for your second question: have a look at levels(Orange1$ACTTRT) and ?factor Regards, Jan Sri krishna Devarayalu Balanagu schreef: Jan, Thank you

Re: [R] Not generating line chart

2012-01-19 Thread Jan van der Laan
= c("REFID", "ARM", "SUBARM", "ACTTRT", "TIME1", "ENDPOINT", "BASCHGA", "STATANAL", "X"), class = "data.frame", row.names = c(NA, -12L)) refid <- unique(Orange1$REFID) for (i in refid) { Orange2

Re: [R] Not generating line chart

2012-01-19 Thread Jan van der Laan
Devarayalu, This is FAQ 7.22: http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-do-lattice_002ftrellis-graphics-not-work_003f use print(qplot()) Regards, Jan Sri krishna Devarayalu Balanagu schreef: Hi All, Can you please help me, why this code in not generating line chart

[R] compare means

2012-01-12 Thread kende jan
Dear all,   I would compare two means between cases and controls taking into account that I have  matched 1 case to two controls. How i can do it with R. Thanks in advance  Jan [[alternative HTML version deleted]] __ R-help@r-project.org

[R] Web analytics / Customer Analytics book recommendation

2012-01-03 Thread Jan Hornych
Hi, I am curious if you know about any book that is dealing with the web analytics / customer analytics subject and is referencing R as the main statistical tool. I am particularly interested into using R in the real production environment and not only as the analytical tool. Thank you Jan

[R] simple ggplot2 question

2011-12-23 Thread Albert-Jan Roskam
rep(0, 13))) qplot(data=DF, x=place, y=value, geom="bar", stat="identity") +   coord_flip() +   geom_abline(intercept=35, slope=0, colour="red") +   facet_grid(location ~ ., scales="free_y&quo

[R] Journal of Statistical Software 2011

2011-12-20 Thread Jan de Leeuw
0.628 CSDA 0.226 -> 1.281 -> 1.089 JCGS 1.505 -> 1.258 -> 1.206 JSS 1.033 -> 2.320 -> 2.647 You may be interested our success in Computer Science http://www.sciencewatch.com/inter/jou/2011/11decJofStatSoft/ You can follow and befriend us at http://www.facebook.com/jst

[R] maptools/spatial analysis question

2011-12-18 Thread Albert-Jan Roskam
basemap/_images/etopo5.png > sessionInfo() R version 2.11.1 (2010-05-31) i686-pc-linux-gnu ...   Thank you in advance! Cheers!! Albert-Jan ~~ All right, but apart from the sanitation, the medicine, education, wine, public

[R] slight documentation error in "stats" package "arima"

2011-12-15 Thread Jan Theodore Galkowski
€“7. [2]http://www.r-project.org/doc/Rnews/Rnews_2002-2.pdf Anyone know who I should tell about this? Thanks! - Jan References 1. http://www.r-project.org/doc/Rnews/Rnews_2002-1.pdf 2. http://www.r-project.org/doc/Rnews/Rnews_2002-1.pdf -- Jan Theodore Galkowski Senior Systems Software

Re: [R] R - Linux_SSH

2011-12-14 Thread Jan van der Laan
27;ll have to look at the man pages for at and/or batch. You probably need something like atd running. I do not know if current linux distributions have that running by default. You'll get an email when the job is finished. HTH Jan R CMD BATCH [options] my_script.R [outfile] Chri

Re: [R] Generating input population for microsimulation

2011-12-14 Thread Jan van der Laan
Emma, That is because generate_unit expects a data.frame with one row and columns id and size: generate_unit(data.frame(id=1, size=10)) Jan Emma Thomas schreef: Dear Jan, Thanks for your reply. The first solution works well for my needs for now, but I have a question about the

Re: [R] Generating input population for microsimulation

2011-12-14 Thread Jan van der Laan
a.frame(id=1:n_units, size=unit_size) library(plyr) ddply(units, .(id), generate_unit) HTH, Jan Emma Thomas schreef: Hi all, I've been struggling with some code and was wondering if you all could help. I am trying to generate a theoretical population of P people who are housed within

[R] CART with rpart

2011-12-02 Thread kende jan
dear all, i want to keep in my data file the results of  terminal nodes (groups) after CART analysis for performing other statisticals analysis by this groups. can you help me please? thanks. jan. [[alternative HTML version deleted

Re: [R] Read TXT file with variable separation

2011-11-29 Thread Jan van der Laan
first 2 columns of your file (the first 2 characters of every line), the second field in the next five columns, etc. Regards, Jan Citeren Raphael Saldanha : Hi! I have to import some TXT files into R, but the separation between the columns are made with different blank spaces, but each

[R] Survival curves for case control and control

2011-11-21 Thread kende jan
Hi, I want to perform Survival curves for case and control subjects in the propensity score-matched cohort  that accounted for the clustering of matched pairs. How I can do it with R. Thanks for your help, Jan [[alternative HTML version deleted

Re: [R] hierachical code system

2011-11-17 Thread Albert-Jan Roskam
lt;- aggregate(s["value"], s["parent"], FUN=sum, na.rm=TRUE)     merged <- merge(df, agg, by.x="code", by.y="parent", all=TRUE, suffixes=c("", "_summed"))     isSum <- !is.na(merged$value_summed)    

Re: [R] RV: Reporting a conflict between ADMB and Rtools on Windows systems

2011-11-17 Thread Jan van der Laan
cmd /K "PATH c:\Rtools\bin;c:\Rtools\MinGW\bin;c:\Rtools\MinGW64\bin;C:\Program Files (x86)\MiKTeX 2.9\miktex\bin" (I haven't tried this so it might need some tinkering to get it to actually work) HTH Jan On 17-11-2011 9:54, Rubén Roa wrote: De: Rubén Roa Enviado el

[R] hierachical code system

2011-11-16 Thread Albert-Jan Roskam
.01.01  NA 3 STAT.01.01.01 15074.23366 4 STAT.01.01.02 4882.942034 5 STAT.01.01.03  1619.59628 6 STAT.01.01.04 1801.722877 7 STAT.01.01.05 1019.973666 8 STAT.01.01.06  NA 9  STAT.01.01.06.01 503.9239317 10 STAT.01.01.06.

Re: [R] Reading a specific column of a csv file in a loop

2011-11-15 Thread Jan van der Laan
a.frame(P1[, i],P2[, i]) } (The skip=1 is needed as laf_open_csv doesn't read headers) Jan On 11/08/2011 11:04 AM, Sergio René Araujo Enciso wrote: Dear all: I have two larges files with 2000 columns. For each file I am performing a loop to extract the "i"th element of eac

[R] JSS Special Volumes for 2011

2011-11-14 Thread Jan de Leeuw
://www.jstatsoft.org/v41 Putter, Guest Editor Volume 38: Competing Risks and Multi-State Models http://www.jstatsoft.org/v38 Additional regular volumes, of course, at http://www.jstatsoft.org. === Jan de Leeuw; Distinguished Professor and Chair, UCLA Department of Statistics; Editor: Journal of Multivariate

[R] [R-pkgs] LaF 0.3: fast access to large ASCII files

2011-11-14 Thread Jan van der Laan
The LaF package provides methods for fast access to large ASCII files. Currently the following file formats are supported: * comma separated format (csv) and other separated formats and * fixed width format. It is assumed that the files are too large to fit into memory, although the package ca

[R] overloading + operator for chars

2011-11-02 Thread Albert-Jan Roskam
t;, e2="character"), function(e1, e2) > paste(e1, e2, sep="") ) Error in setMethod("+", signature(e1 = "character", e2 = "character"),  :   the method for function "+" and signature e1="character", e2="character" is sea

Re: [R] Applying function to only numeric variable (plyr package?)

2011-10-12 Thread Jan van der Laan
ave been of help: library(plyr) pct.colwise <- colwise(pct) df[, cols] <- pct.colwise(df[,colwise]) HTH, Jan Quoting michael.laviole...@dhhs.state.nh.us: My data frame consists of character variables, factors, and proportions, something like c1 <- c("A", "B", "

Re: [R] Chi-Square test and survey results

2011-10-12 Thread Jan van der Laan
George, Perhaps the site of the RISQ project (Representativity indicators for Survey Quality) might be of use: http://www.risq-project.eu/ . They also provide R-code to calculate their indicators. HTH, Jan Quoting ghe...@mathnmaps.com: An organization has asked me to comment on the

Re: [R] Problem with .C

2011-10-06 Thread Jan van der Laan
library manually, which can sometimes be frustrating when windows locks the dll. 2. Inline performs typechecking and casts variables to the right type. You can now type test(1:10,10) without needing as.numeric or as.integer. Reducing the amount of r code and the probabiliry of screwing things

Re: [R] Problem with .C

2011-10-06 Thread Jan van der Laan
) library(inline) test <- cxxfunction(signature(x = "numeric" ) , ' Rcpp::NumericVector v(x); Rcpp::NumericVector result(v.length()); for (int i = 0; i < v.length(); ++i) { result[i] = v[i] + i; } return(result); ', plugin = "Rcpp&q

Re: [R] optimize R code: replace for loop

2011-10-05 Thread Albert-Jan Roskam
Hello,   I'd do: ave(testvec, FUN=cumsum)+1 But in R everything can be done in a trillion different ways. ;-) Cheers!! Albert-Jan ~~ All right, but apart from the sanitation, the medicine, education, wine, public

Re: [R] help with regexp

2011-10-05 Thread Albert-Jan Roskam
Hello!   library(gsubfn) test <- c('filename_1_def.pdf', 'filename_2_abc.pdf') gsubfn("(.+_)([a-z]+)(\\.pdf)", "\\2", test) Cheers!! Albert-Jan ~~ All right, but apart from the sanita

Re: [R] plot: how to fix the ratio of the plot box?

2011-10-02 Thread Hofert Jan Marius
ahh, perfect, thanks. Cheers, Marius On 2011-10-02, at 13:08 , Jim Lemon wrote: > On 10/02/2011 07:20 PM, Hofert Jan Marius wrote: >> Dear all, >> >> this should be trivial, but I couldn't figure out how to solve it... I would >> like to have a plot with fix

[R] plot: how to fix the ratio of the plot box?

2011-10-02 Thread Hofert Jan Marius
Dear all, this should be trivial, but I couldn't figure out how to solve it... I would like to have a plot with fixed aspect ratio of 1. Whenever I resize the Quartz window, the axes are extended so that the plot fills the whole window. However, if you have different extensions for the differen

[R] last observation carried forward +1

2011-09-30 Thread Jan Wijffels
be interested in seeing their vectorized solution. thanks, Jan -- groeten/kind regards, Jan Jan Wijffels Statistical Data Miner www.bnosac.be | +32 486 611708 [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https

Re: [R] Data import

2011-09-26 Thread Jan van der Laan
You can with the routines in the memisc library. You can open a file using spss.system.file and then import a subset using subset. Look in the help pages of spss.system.file for examples. HTH Jan On 09/25/2011 11:56 PM, sassorauk wrote: Is it possible to import only certain variables from

Re: [R] R help on write.csv

2011-09-21 Thread Jan van der Laan
Excel directly. See for example http://rwiki.sciviews.org/doku.php?id=tips:data-io:ms_windows . I have no experience in this. Regards, Jan PS I am sorry for my previous triple post. I had a little fight with my webmail client. On 09/22/2011 06:14 AM, Ashish Kumar wrote: IS there a way we

Re: [R] R help on write.csv

2011-09-21 Thread Jan van der Laan
file=con, sep=";", dec=",", row.names=FALSE, col.names=TRUE) write.table(data, file=con, sep=";", dec=",", row.names=FALSE, col.names=FALSE, append=TRUE) close(con) Using a file connection is probably also more efficient when doing a large number of

Re: [R] R help on write.csv

2011-09-21 Thread Jan van der Laan
file=con, sep=";", dec=",", row.names=FALSE, col.names=TRUE) write.table(data, file=con, sep=";", dec=",", row.names=FALSE, col.names=FALSE, append=TRUE) close(con) Using a file connection is probably also more efficient when doing a large number

Re: [R] R help on write.csv

2011-09-21 Thread Jan van der Laan
data, file=con, sep=";", dec=",", row.names=FALSE, col.names=TRUE) write.table(data, file=con, sep=";", dec=",", row.names=FALSE, col.names=FALSE, append=TRUE) close(con) Using a file connection is probably also more efficient when doing a large number

Re: [R] Possible or not possible: serif axis labels with plotmath [but everything else sans serif]?

2011-09-19 Thread Hofert Jan Marius
arius On 2011-09-19, at 14:38 , Eik Vettorazzi wrote: > Hi Jan Marius, > using the tikzDevice-package, nearly everything is possible (at least, > all what can be done in LaTeX). > > cheers > > Am 19.09.2011 11:58, schrieb Hofert Jan Marius: >> Dear expeRts, >> &

[R] Possible or not possible: serif axis labels with plotmath [but everything else sans serif]?

2011-09-19 Thread Hofert Jan Marius
Dear expeRts, I it possible to have serif labels in the following plot? x <- 1:10 y <- x plot(x, y, type="b", xlab=expression(x[1]), ylab=expression(x[2])) I know that one can use pdf(, family="serif"), but then also the axis tick marks are printed in serif font. Apart from the fact that it ma

Re: [R] odfWeave: Combining multiple output statements in a function

2011-09-16 Thread Jan van der Laan
(as far as I can tell). Could you perhaps just tell me how I should combine the output of multiple odf* calls inside a function? Thanks again. Jan Quoting Max Kuhn : formatting.odf, page 7. The results are in formattingOut.odt On Thu, Sep 15, 2011 at 2:44 PM, Jan van der Laan wrote: M

Re: [R] Where to put tryCatch or similar in a very big for loop

2011-09-16 Thread Jan van der Laan
t;) result[i] <- i }, silent=TRUE) } Regards, Jan Quoting "Bonnett, Laura" : Hi, The simulation occasionally generates either a rare event meaning that the Cox model is not appropriate or it generates a covariate with most responses being the same which means that t

Re: [R] odfWeave: Combining multiple output statements in a function

2011-09-15 Thread Jan van der Laan
Max, Thank you for your answer. I have had another look at the examples (I already had before mailing the list), but could find the example you mention. Could you perhaps tell me which example I should have a look at? Regards, Jan On 09/15/2011 04:47 PM, Max Kuhn wrote: There are

[R] odfWeave: Combining multiple output statements in a function

2011-09-15 Thread Jan van der Laan
s is the first paragraph")) print(odfCat("This is the second paragraph")) print(odfItemize(letters[1:5])) } In another document this seemed to work, but in my current document strange odf-output is generated. Regards, Jan __ R-h

[R] list of all methods winthin an S4 class

2011-09-06 Thread Albert-Jan Roskam
#x27;, 'some_method_1', 'some_method_2'] >>>   Thanks in advance! Cheers!! Albert-Jan ~~ All right, but apart from the sanitation, the medicine, education, wine, public order, irrigation, roads, a fre

Re: [R] Question about object permanence/marshalling

2011-08-25 Thread Albert-Jan Roskam
Hi Jim,   Thanks for your reply. It seems that save and load can only be used for datasets (as the title in ?load suggests). I'd be very glad if I'm mistaken though!  Cheers!! Albert-Jan ~~ All right, but apar

[R] Question about object permanence/marshalling

2011-08-25 Thread Albert-Jan Roskam
tf("Loading %s", xdr))     } print(objects()) lapply(c("doStuff", "instance"), marshal) rm(list=c("doStuff", "instance"))    xdrs <- Sys.glob(file.path(Sys.getenv()["TEMP"], "*.xdr")) lapply(xdrs, unmarshal) print(objects())  #

[R] How to colour specific edges in a dendrogram

2011-08-01 Thread Jan Teichmann
dendrogram list of labels to colour their edges I would like to colour the edges between the final leaf node and their parental node. Thank you very much for your help! Jan __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r

[R] time series question

2011-06-28 Thread Albert-Jan Roskam
doesn't work. Another option would be to use two loops for cols and rows, but I didn't get that to work either :-( Suggestions for clean code, anyone? Thank you in advance! Cheers!! Albert-Jan ~~ All right, but ap

Re: [R] Standards for delivery of GPL software in CRAN packages

2011-06-27 Thread Galkowski, Jan
d any question the package was correct, merely trying to understand how it worked. When I wasn't satisfied by the documentation in the package, I turned to the source. Again, I meant no offense to anyone. I thank you all for your responses and efforts, and am grateful. - Jan _

Re: [R] Standards for delivery of GPL software in CRAN packages

2011-06-27 Thread Galkowski, Jan
understand what this "eta" partameter was and how to interpret it. As mentioned, not the first package this has been an issue for. Thanks, - Jan - Jan, from Sierpinski, a Blackberry, 6072391834, Google Talk to: bayesianlogi...@gmail.com - Original Message

Re: [R] Standards for delivery of GPL software in CRAN packages

2011-06-27 Thread Galkowski, Jan
owling...@googlemail.com] On Behalf Of Barry Rowlingson Sent: Monday, June 27, 2011 10:18 AM To: Galkowski, Jan Cc: r-help@r-project.org Subject: Re: [R] Standards for delivery of GPL software in CRAN packages On Mon, Jun 27, 2011 at 1:24 PM, Galkowski, Jan wrote: > I wondered if there were sta

[R] Standards for delivery of GPL software in CRAN packages

2011-06-27 Thread Galkowski, Jan
forge? - Jan - Jan, from Sierpinski, a Blackberry, 6072391834, Google Talk to: bayesianlogi...@gmail.com __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-projec

Re: [R] Ranking submodels by AIC (more general question)

2011-06-23 Thread Jan van der Laan
Alexandra, Have a look at add1 and drop1. Regards, Jan On 06/23/2011 07:32 PM, Alexandra Thorn wrote: Here's a more general question following up on the specific question I asked earlier: Can anybody recommend an R command other than mle.aic() (from the wle package) that will give b

Re: [R] Documenting variables, dataframes and files?

2011-06-22 Thread Jan van der Laan
The memisc package also offers functionality for documenting data. Jan On 06/22/2011 04:57 PM, Robert Lundqvist wrote: Every now and then I realize that my attempts to document what all dataframes consist of are unsufficient. So far, I have been writing notes in an external file. Are there

Re: [R] omitting columns from a data frame

2011-06-21 Thread Albert-Jan Roskam
But isn't this version of which() typo-proof? > x <- iris[-which(c("Sepal.Length", "SSSepal.Width") %in% names(iris))] Btw, I prefer the following, ie. simply assigning to NULL. Much easier notation. > y <- iris > y$Sepal.Width <- y$S

Re: [R] is this a bug?

2011-06-18 Thread Albert-Jan Roskam
;d prefer it if R simply generated an error when one attempts to nest a data.frame within a data.frame. Thanks again! Cheers!! Albert-Jan ~~ All right, but apart from the sanitation, the medicine, education, wine, public orde

[R] is this a bug?

2011-06-17 Thread Albert-Jan Roskam
day "05""31" svn revlanguage "52157" "R" version.string "

Re: [R] Running a GMM Estimation on dynamic Panel Model using plm-Package

2011-06-12 Thread Jan Schulz
itions = 4.08048e-22 Just for the record: I had the same error with my data and finaly gave up and used stata. Kind regards and good luck! Jan __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the postin

[R] reshape::cast: invalid 'yinds' argument

2011-05-31 Thread Albert-Jan Roskam
didn't help. I'm using R2.10.1 and either WinXP or Win2000. Thanks in advance, Albert-Jan ~~ All right, but apart from the sanitation, the medicine, education, wine, public order, irrigation, roads, a fresh water sys

Re: [R] NaN, Inf to NA

2011-05-27 Thread Albert-Jan Roskam
r-project.org] On Behalf Of Marc Schwartz > Sent: Thursday, May 26, 2011 2:15 PM > To: Albert-Jan Roskam > Cc: R Mailing List > Subject: Re: [R] NaN, Inf to NA > > On May 26, 2011, at 3:18 PM, Albert-Jan Roskam wrote: > > > Hi, > > > > I want to recode

[R] NaN, Inf to NA

2011-05-26 Thread Albert-Jan Roskam
3 > Thanks! Cheers!! Albert-Jan ~~ All right, but apart from the sanitation, the medicine, education, wine, public order, irrigation, roads, a fresh water system, and public health, what have the Roman

Re: [R] Gui immediately closes when started from command-line

2011-05-19 Thread Albert-Jan Roskam
Thanks, we tried it, but it didn't solve the problem. Some more info (mostly strings of ) was shown in the Dos box, but that was all.  Cheers!! Albert-Jan ~~ All right, but apart from the sanitation, the med

[R] Gui immediately closes when started from command-line

2011-05-19 Thread Albert-Jan Roskam
combinations of switches, but none of them works.   TIA Cheers!! Albert-Jan ~~ All right, but apart from the sanitation, the medicine, education, wine, public order, irrigation, roads, a fresh water system, and public health

Re: [R] Unexpected behaviour as.data.frame

2011-05-16 Thread Jan van der Laan
dependency (multiple actually for R.utils). But thanks again for pointing it out. Jan On 05/16/2011 10:42 AM, Santosh Srinivas wrote: Hi Ivan, Take a look dataFrame in R.utils ... is that what you want? from the help file: Examples df<- dataFrame(colClasses=c(a="integer", b="

Re: [R] Unexpected behaviour as.data.frame

2011-05-15 Thread Jan van der Laan
est way to create a data.fame with given column types and dimensions? Regards, Jan On 05/15/2011 04:43 PM, Bert Gunter wrote: In your post, you're missing the final "s" on the stringsAsFactors argument in the d1 assignment. When I typed it correctly, it works as expected. -- Bert

[R] Unexpected behaviour as.data.frame

2011-05-15 Thread Jan van der Laan
ate an 'empty' data.frame with specified column types and dimensions. I need this data.frame to pass on to my c++ routines. Is there a more simple/elegant way of creating this data.frame? Regards, Jan PS: I am running R on 64 bit Ubuntu 11.04: sessionInfo() R version 2.12.1 (2010

Re: [R] Unexpected behaviour as.data.frame

2011-05-15 Thread Jan van der Laan
Forget I asked. There was a typo in my example (stringsAsFactor instead of stringAsFactors) which explained the difference. My apologies. My second question however still stands: How does on create a data.frame with given column types and given dimensions? Thanks. Regards, Jan Quoting

Re: [R] first occurrence of a value?

2011-05-04 Thread Albert-Jan Roskam
Hi Patrick, Dimitri, Thank you! Yes, 'match' was exactly what I was looking for. I like it as it doesn't require too many functions to be nested. Cheers!! Albert-Jan ~~ All right, but apart from the sanitatio

[R] first occurrence of a value?

2011-05-04 Thread Albert-Jan Roskam
eturn( as.numeric(gsubfn("^[^0-9]+", "", names(df)[1])) ) } df$year2 <- sapply(x, giveYear) Thanks in advance! Cheers!! Albert-Jan ~~ All right, but apart from the sanitation, the medicine, education,

Re: [R] Rodbc quesion: how to reliably determine the data type?

2011-05-03 Thread Albert-Jan Roskam
data type conversions are driving me nuts. StringsAsFactors=F should be the default, for instance. Cheers!! Albert-Jan ~~ All right, but apart from the sanitation, the medicine, education, wine, public order, irrigation, road

[R] Rodbc quesion: how to reliably determine the data type?

2011-05-03 Thread Albert-Jan Roskam
, those characters become NA. Cheers!! Albert-Jan ~~ All right, but apart from the sanitation, the medicine, education, wine, public order, irrigation, roads, a fresh water system, and public health, what have the Romans ever

Re: [R] blank space escape sequence in R?

2011-04-25 Thread Jan van der Laan
f there are any difficulties using, for example, utf8 encoding in source files (which you'll probably need). Jan On 04/25/2011 03:28 PM, Duncan Murdoch wrote: On 25/04/2011 9:13 AM, Mark Heckmann wrote: I use a function that inserts line breaks ("\n" as escape sequence) according to

Re: [R] blank space escape sequence in R?

2011-04-25 Thread Jan van der Laan
f there are any difficulties using, for example, utf8 encoding in source files (which you'll probably need). Jan On 04/25/2011 03:28 PM, Duncan Murdoch wrote: On 25/04/2011 9:13 AM, Mark Heckmann wrote: I use a function that inserts line breaks ("\n" as escape sequence) according to

[R] Automatic splitting/combining nested categorical variable in glm

2011-04-14 Thread Jan van der Laan
, e.g. West split into Provinces and the remaining parts not. Also: I am using logistig regression (glm). Thank you for your help. With regards, Jan __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

[R] How to reference a package in academical paper

2011-03-07 Thread Jan Hornych
Thank you Jan [[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 http://www.R-project.org/posting-guide.html and provide commented, min

[R] df.residual for rlm()

2011-03-01 Thread Jan
works fine for lm() objects, but fails for rlm() because df.residual() is NA. Can I get the degrees of freedom by calculating n = length(lm.result) - length(coefficients(lm.result)) Thanks for any help! Jan __ R-help@r-project.org mailing list

[R] Transitions probability comparison

2011-02-27 Thread kende jan
Hello, I am training to use the changeLOS package. Using data provided in this package (los.data), I want to compare transition probability P01 and P03 like the Kaplan-Meier Method.Can someone help me ? Thank you. Jan data(los.data) my.observ <- prepare.los.data(x=los.data) my.mo

[R] changeLOS package use

2011-02-24 Thread kende jan
? Thank you. Jan data(los.data) my.observ <- prepare.los.data(x=los.data) my.model <- msmodel(c("0","1","2","3"),cens.name="cens") my.trans <- trans(model=my.model,observ=my.observ) my.aj <- aj(my.trans, s=0, t=80) plot(my.aj,c("

[R] error with 'hash' library

2011-02-22 Thread Albert-Jan Roskam
led in 'loadNamespace' for 'hash' Error: package/namespace load failed for 'hash' Can anybody tell how to solve this? Thanks in advance!  Cheers!! Albert-Jan ~~ All right, but apart from the sanitatio

Re: [R] lm without intercept

2011-02-18 Thread Jan
suggests that intercepts should never be omitted. Is this true even if I know that the physical reality behind the numbers suggests an intercept of zero? Thanks, Jan __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r

Re: [R] lm without intercept

2011-02-18 Thread Jan
pt? Assuming that I don't know from the physical reality that the intercept should be zero, what can I say to support one model against the other? Thanks, Jan __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo

[R] lm without intercept

2011-02-18 Thread Jan
that just by forcing the intercept to become zero, a bad regression becomes an extremely good one? 3. Why doesn't lm suggest a value of zero (or near zero) by itself if the regression is so much better with it? Please excuse my ignorance. Jan Rheinländer __

Re: [R] RGtk2 on Debian Testing

2011-02-18 Thread Jan van der Laan
It has been a while back, but I believe I had to install libgtk2.0-dev (that was on Ubuntu) You could also try to install the r-cran-rgtk2 debian-package using dpkg, aptitude, or whatever you use as package manager. This makes rgtk available for all users. HTH, Jan Quoting Lorenzo

Re: [R] RGtk2 on Debian Testing

2011-02-18 Thread Jan van der Laan
It has been a while back, but I believe I had to install libgtk2.0-dev (that was on Ubuntu) You could also try to install the r-cran-rgtk2 debian-package using dpkg, aptitude, or whatever you use as package manager. This makes rgtk available for all users. HTH, Jan Quoting Lorenzo

Re: [R] monitor variable change

2011-02-16 Thread Jan van der Laan
ol like tail. Jan Quoting Alaios : I think we are both talking for watchpoints-breakpoints --- On Wed, 2/16/11, Rainer M Krug wrote: From: Rainer M Krug Subject: Re: [R] monitor variable change To: "Alaios" Cc: R-help@r-project.org Date: Wednesday, February 16, 2011,

<    1   2   3   4   5   >