[R] Discrepancy in imputed data results across different operating systems

2025-02-20 Thread Bullinger, Johannes
rating system. I am seeking insights or suggestions on why these discrepancies occur and how to ensure consistent imputation results across different operating systems. Any guidance or advice would be greatly appreciated. Best, Johannes ______ Johannes Bu

Re: [R] [R-sig-Debian] 3.6 on debian stretch

2019-08-01 Thread Johannes Ranke
your PATH. Kind regards, Johannes Am Mittwoch, 31. Juli 2019, 21:41:14 CEST schrieb Larry Martell: > I need to run 3.6 on debian stretch - I followed the instructions here: > > https://cran.r-project.org/bin/linux/debian/ > > and I was able to install it. But 2 packages I nee

[R] Help converting file to XTS

2019-02-05 Thread Johannes Møllerhagen
current coding is: dat<-read_csv("TEL5minint.csv") xts(dat,order.by=as.POSIXct(dat),"%d/%m/%Y %H:%M") And the error is: Error in as.POSIXct.default(dat) : do not know how to convert 'dat' to class “POSIXct” Any help is appr

[R] [R-pkgs] New package: leabRa

2017-10-10 Thread Johannes Titz via R-packages
shows how to construct networks: https://cran.r-project.org/web/packages/leabRa/vignettes/leabRa.html Feedback welcome: https://github.com/johannes-titz/leabRa/ Best, Johannes ___ R-packages mailing list r-packa...@r-project.org https://stat.ethz.ch

[R] coxph: no convergence with completely tied data with 'exact'-method

2016-06-02 Thread Johannes Hengelbrock
erge in SAS but not in R. Thanks, Johannes -- ______ Johannes Hengelbrock Universitätsklinikum Hamburg-Eppendorf Institut f. Medizinische Biometrie und Epidemiologie Martinistr. 52, 20246 Hamburg Tel. 040-7410-53517 / Fax: 040-7410-

Re: [R] Problem with <= (less than or equal): not giving the expected result

2016-04-05 Thread Rainer Johannes
what the experiment died of. ~ Sir Ronald Aylmer Fisher The plural of anecdote is not data. ~ Roger Brinner The combination of some data and an aching desire for an answer does not ensure that a reasonable answer can be extracted from a given body of data. ~ John Tukey 2016-04-05 14:46

Re: [R] Problem with <= (less than or equal): not giving the expected result

2016-04-05 Thread Rainer Johannes
urn(check.vector) } See: ?all.equal Hth, Adrian On Tue, Apr 5, 2016 at 2:34 PM, Rainer Johannes mailto:johannes.rai...@eurac.edu>> wrote: Dear All, I have the following problem: I have a function in which I check if the difference between values is smaller or equal to a certain thresh

[R] Problem with <= (less than or equal): not giving the expected result

2016-04-05 Thread Rainer Johannes
Dear All, I have the following problem: I have a function in which I check if the difference between values is smaller or equal to a certain threshold. I however realized that I might get there some unexpected results: > abs(1 - 0.95) >= 0.05 [1] TRUE ## So that’s fine, but: > abs(1 - 0.95) <=

[R] Random forest regression: feedback on general approach and possible issues

2015-12-04 Thread Johannes Klene
e, is this a problem and if so, is there anything I can do about it? - The few papers I have seen so far on using this technique in a similar situation do not include any 'standard' covariates such as age and gender, should I? Any and all feedback is greatly appreciated!! Kind regards, Joha

Re: [R] Extracing Unique Rows based on 2 Column

2015-11-29 Thread Johannes Huesing
0 29 5 2 1 2.0 31 5 5 2 2.0 34 5 7 3 1.0 Is that what you were aiming at? Note that I had to find the solution myself, which I did, thanks to the documentation I got by ?unique, which pointed me to duplicated(). -- Johannes Hüsing http://derwisch.wikid

Re: [R] no results

2015-11-10 Thread Johannes Huesing
us [1] "" $major [1] "3" $minor [1] "0.2" $year [1] "2013" $month [1] "09" $day [1] "25" $`svn rev` [1] "63987" $language [1] "R" $version.string [1] "R version 3

[R] regex sub with specified number of characters

2015-10-06 Thread Johannes Radinger
e my vector: a <- c(3593857,384723,4395843,3398374) with sub("^3","",a) I also remove the leading from the second element which is only 6 digits long. So how to restrict that using sub? The final result should be a <- c(593857,384723,4395843,398374) Any suggestions? Best regards

Re: [R] Rayleigh Distribution

2015-10-02 Thread Johannes Huesing
Jomy Jose [Fri, Oct 02, 2015 at 05:45:58PM CEST]: Thank you,how to add correct reference line to this Rayleigh Q-Q plot. ?abline -- Johannes Hüsing http://derwisch.wikidot.com Threema-ID: VHVJYH3H __ R-help@r-project.org mailing

Re: [R] Randomness tests

2015-09-23 Thread Johannes Huesing
ative hypothesis of "non-randomness" is of infinite dimension and thus not testable. It depends on which deviations from randomness you are interested in. You may also want to look into scan statistics but I presume that difference.sign.test() will be sensitive in a similar direction

Re: [R] Estimating Endogenous Selection Model

2015-09-19 Thread Johannes Muck
Dear Arne, thank you very much! Best, Johannes -Ursprüngliche Nachricht- Von: Arne Henningsen [mailto:arne.henning...@gmail.com] Gesendet: Samstag, 19. September 2015 07:07 An: Johannes Muck Cc: r-help@r-project.org Betreff: Re: [R] Estimating Endogenous Selection Model Dear

[R] Estimating Endogenous Selection Model

2015-09-18 Thread Johannes Muck
individuals that invest are observed. Yet in my case, both actions are observed but the decision which action to choose is endogenous. Or does this package also support self-selection models? Thank you very much in advance. Best, Johannes __ R-help@r

[R] Package dismo: Extracting sensitivity and specificity from gbm.step() object

2015-08-24 Thread Johannes Radinger
ject (i.e without re-calculating the model). This would be valuable information to calculate e.g. a kappa value or TSS value from a gbm.step - model-object. Thanks for your answers, Best, Johannes [[alternative HTML version deleted]] __

Re: [R] Inquiry: R library for bioinformatics development process

2015-07-28 Thread Johannes Huesing
Faris Zaidi Bin Mohd Nor [Wed, Jul 29, 2015 at 05:38:59AM CEST]: Hi, I would like to know about the R library. Is there any library for bioinformatic development software purpose? Have you looked at the Bioconductor project? -- Johannes Hüsing There is something fascinating

Re: [R] problem understanding grid coordinate systems

2015-07-15 Thread Johannes Huesing
Paul Murrell [Wed, Jul 15, 2015 at 11:12:33PM CEST]: ... downViewport("plot_01.panel.1.1.vp") ... This works like a charm. Thank you! Upon reading more of the documentation, I found that current.vpTree() shows all names of active viewports. -- Johannes Hüsing

[R] problem understanding grid coordinate systems

2015-07-13 Thread Johannes Huesing
rdinate system do I have to address instead? -- Johannes Hüsing __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guid

[R] problem understanding grid coordinate systems

2015-07-08 Thread Johannes Huesing
3.0.2 (2013-09-25) nickname Frisbee Sailing I had expected something around 9.5 in native coordinates. Which coordinate system do I have to address instead? -- Johannes Hüsing __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see h

[R] problem understanding grid coordinate systems

2015-07-06 Thread Johannes Huesing
svn rev63987 language R version.string R version 3.0.2 (2013-09-25) nickname Frisbee Sailing I had expected something around 9.5 in native coordinates. Which coordinate system do I have to address instead? -- Johan

Re: [R] Counting consecutive events in R

2015-05-14 Thread Johannes Huesing
4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L)), .Names = c("Type", "Time_Point_Start", "Time_Point_End", "Value", "Score", "Type_Desc", "Pat_id"), class = "data.frame", row.name

Re: [R] Optimization to fit data to custom density distribution

2015-03-23 Thread Johannes Radinger
On Sat, Mar 21, 2015 at 3:41 PM, Prof Brian Ripley wrote: > On 21/03/2015 14:27, Johannes Radinger wrote: > >> Thanks for the fast response. The fitdistr() function works well for the >> predefined density functions. However, what is the recommended approach >> to optimiz

Re: [R] Optimization to fit data to custom density distribution

2015-03-21 Thread Johannes Radinger
fitdistr one can only choose among the 15 distributions. Probably this needs an approach using optim()? However I am so far unfamiliar with these packages. So any suggestion ist welcome. :) /Johannes On Sat, Mar 21, 2015 at 2:16 PM, Prof Brian Ripley wrote: > One way using the standard R distribut

[R] Optimization to fit data to custom density distribution

2015-03-21 Thread Johannes Radinger
. Any suggestions? /Johannes [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting

[R] Two wireframe plots (lattice) aside (grid.arrange) without outer box

2014-12-02 Thread Johannes Radinger
o, shade = TRUE, aspect = c(61/87, 0.4), light.source = c(10,0,10)) grid.arrange(p1,p1,nrow=1) Does anybody have any suggestions? /johannes [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- T

Re: [R] Checking if a matrix exists/is defined

2014-10-18 Thread Johannes Huesing
ouble vector to logical using as.logical(). Looking up ?as.logical I fail, however, to see which rules it uses to convert double to logical. Possibly 0 -> FALSE and everything else -> TRUE. -- Johannes Hüsing There is something fascinating about science.

[R] R coredumps when calling functions from rms package

2014-10-06 Thread Johannes Huesing
ate results to a file after each run, and start the script as a cron job every five minutes, and compile all the results to one big array after sufficiently enough successful iterations.) -- Johannes Hüsing There is something fascinating about science. One gets

[R] Match beginning and end of string (grepl)

2014-09-02 Thread Johannes Radinger
e any clear description and examples of regular expressions and how to use them? I find the manual ?grepl very difficult to read. Thanks, Johannes [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/ma

[R] Restricted fitting of two-component mixture distribution in R possible?

2014-07-15 Thread Johannes Moser
in R is used for estimation. gamlss.control, glim.control and MX.control seem not to support this kind of option -- or I couldn't find out how... Is there a way to restrict the degree of freedom parameter estimates to be larger than, say, 3? Many thanks in advance

[R] Set file path in Biomod2

2014-07-15 Thread Johannes Radinger
ory. So is Biomod2 output always linked to the working directory or can the output path also set manually, without changing the working directory? Probably I am just missing a single option Thanks, /Johannes [[alternative HTML version deleted]] __

Re: [R] Cutting hierarchical cluster tree at specific height fails

2014-07-14 Thread Johannes Radinger
, I'd be nice if somebody knows a more programatic approach or another package that allows cutting "centroid"-trees. /Johannes On Fri, Jul 11, 2014 at 4:19 PM, David L Carlson wrote: > The easiest workaround is the one you included in your original posting. > Specify k= an

Re: [R] Cutting hierarchical cluster tree at specific height fails

2014-07-11 Thread Johannes Radinger
quot;dynamicTreeCut", but this also relies on cutree and consequently raises an error when used for cutting "centroid" trees. Does anyone know a work around and can provide a minimum working example? /Johannes On Wed, Jul 9, 2014 at 4:58 PM, David L Carlson wrote: > To c

[R] Cutting hierarchical cluster tree at specific height fails

2014-07-09 Thread Johannes Radinger
0,25)) df <- data.frame(x,y) plot(df) hc <- hclust(dist(df,method = "euclidean"), method="centroid") plot(hc) df$memb <- cutree(hc, h = 60) # this does not work df$memb <- cutree(hc, k = 3) # this works! plot(df$x,df$y,col=df$memb) Thank you for your h

[R] Fitting a Mixture of Noncentral Student t Distributions to a one-dimensional sample

2014-04-30 Thread Johannes Moser
is morning. A small example for a setup that works sort of reliably would be fantastic! Thanks a lot in advance!! Johannes __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-

[R] dataframe calculations based on certain values of a column

2014-03-26 Thread Johannes Radinger
dataframe is not as simple and not that well ordered as in the example here. So for example there is always a value c for each group but all the "c"s are clumped in the last rows of the dataframe or scatterd in a random mannar. Is there a simple way to still calculate such

[R] psych package - Cronbach`s Alpha - warning message

2014-02-14 Thread Johannes Moser
Dear R-help, I try to estimate alpha for a factor that loads onto two items, using the psych-package (newest version). The data is from the boston housing data set. The problem I face can be reproduced by the following approximation of the correlation matrix: library("psych") tt <- cbind(c(1,0

Re: [R] Solving a normal distribution pnorm for q

2013-12-12 Thread Johannes Radinger
ion(x)pnorm(q=x,sd=sd1)*r+pnorm(q=x,sd=sd2)*(1-r)-X,c(-1e6,1e6)) > > > Cheers > > Am 12.12.2013 15:58, schrieb Johannes Radinger: > > Thanks for the fast response. Of course I totally overlooked qnorm as I > had > > a more complex task in my head. > > > > I

Re: [R] Solving a normal distribution pnorm for q

2013-12-12 Thread Johannes Radinger
gt; Feladó: r-help-boun...@r-project.org [r-help-boun...@r-project.org] ; > meghatalmazó: Johannes Radinger [johannesradin...@gmail.com] > Küldve: 2013. december 12. 14:56 > To: R help > Tárgy: [R] Solving a normal distribution pnorm for q > > Hi, > > > > I found follwowin

[R] Solving a normal distribution pnorm for q

2013-12-12 Thread Johannes Radinger
of pnorm but want to know its q. How can that be achieved in R? Any suggestions? /Johannes [[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 h

Re: [R] Overlay boxplot and scatter.smooth line

2013-11-19 Thread Johannes Radinger
n Tue, Nov 19, 2013 at 4:43 AM, Johannes Radinger < > johannesradin...@gmail.com> wrote: > >> Hi, >> >> I'd like to plot a boxplot and use a scatter.smooth line plot as an >> overlay >> for this plot. >> This works except for the problem that

[R] Overlay boxplot and scatter.smooth line

2013-11-19 Thread Johannes Radinger
Hi, I'd like to plot a boxplot and use a scatter.smooth line plot as an overlay for this plot. This works except for the problem that the x-axis ticks for both plots are differently spaced: The boxplot ticks are closer and the space between the outer most boxplots and the plot region (box) is larg

Re: [R] indicating significant differences in boxplots

2013-10-28 Thread Johannes Radinger
ut what if one wants to plot two boxplots (e.g. with each only two groups which are significantly different) and add such stars to each of the boxplots. I usually use par(mfrow(1,2)) to plot all boxplots in a row. How can I also add segments and stars on top of each plot? /johann

[R] Latin Hypercube Sample and transformation to uniformly distributed integers or classes

2013-10-08 Thread Johannes Radinger
2:8 (this is discussed already somewhere else here on the list in another context, and the function sample() is suggested). How can this be applied here and how can a column of the lhs-output be transformed in e.g integers 1:10 or the three colors as mentioned abo

[R] Error when using median as aggregation function in dcast

2013-06-26 Thread Johannes Radinger
solve the problem and get a median? /Johannes [[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.

[R] Margins in dcast (reshape2)

2013-06-26 Thread Johannes Radinger
is the correct command to get the outermost margins only in reshape2? /johannes [[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://

[R] Tolearance Interval calculation for each point in a data set?

2013-06-24 Thread Johannes Graumann
Hello, I am looking for tolerance interval related methodologies and found the package "tolerance" which will e.g. nicely calculate the 95%/95% tolerance limits of a given regression. What I am looking for, however is not only the the tolerance limits this calculation defines, but I would like

[R] Construct plot combination using grid without plotting and retrieving an object?

2013-05-24 Thread Johannes Graumann
Hi, I'm currently combining multiple plots using something along the lines of the following pseudo-code: library(grid) grid.newpage() tmpLayout <- grid.layout( nrow=4, ncol=2) pushViewport(viewport(layout = tmpLayout)) and than proceeding with filling the viewports ... works fine, but f

Re: [R] Fwd: NaN-result from fuzzy_inference (package "sets") with certain input

2013-05-10 Thread Johannes Radinger
t <- function(df){ gset_defuzzify(fuzzy_inference(system, list(depth = df["depth"], velocity = df["velocity"])),"centroid") } apply(test_df,1,fuzzy_result) /Johannes On Thu, May 9, 2013 at 12:35 AM, David Meyer wrote: > It's because you restricted the un

[R] NaN-result from fuzzy_inference (package "sets") with certain input

2013-05-08 Thread Johannes Radinger
velocity=round(runif(20,0,1.5),2),suitability=NA) # do inference on test_df fuzzy_result <- function(df){ gset_defuzzify(fuzzy_inference(system, list(depth = df["depth"], velocity = df["velocity"])),"centroid") } apply(test_df,1,fuzzy_result) Does anyone know w

Re: [R] Fuzzy rules definition (package "sets") from data.frame

2013-05-08 Thread Johannes Radinger
",paste(df[,"rule"],collapse=","),")",sep=""))) which turns the dataframe into the rules definition object similar to: rules <- set( fuzzy_rule(depth %is% low && velocity %is% medium, suitability %is% low), fuzzy_rule(depth %is% medium

[R] Fuzzy rules definition (package "sets") from data.frame

2013-05-08 Thread Johannes Radinger
? As a single rule (fuzzy_rule) is not a pure text string I don't know how to do that resp. to combine all rules/rows into a set(). Any suggestions? Best regards, Johannes [[alternative HTML version deleted]] __ R-help@r-project.org mai

[R] grep help (character ommission)

2013-05-01 Thread Johannes Graumann
Hello, Banging my head against a wall here ... can anyone light the way to a pattern modification that would make the following TRUE? identical( grep( "^Intensity\\s[^HL]", c("Intensity","Intensity L", "Intensity H", "Intensity Rep1")), as.integer(c(1,4))) Thank you for your time.

Re: [R] string split at xth position

2013-03-13 Thread Johannes Radinger
Thank you Jorge! thats working perfectly... /johannes On Wed, Mar 13, 2013 at 9:45 AM, Jorge I Velez wrote: > Dear Johannes, > > May not be the best way, but this looks like what you described: > >> x <- c("a1b1","a2b2","a1b2") >>

[R] string split at xth position

2013-03-13 Thread Johannes Radinger
with b+number. Unfortunately there is no separator I could use to directly split the vectors.. Any idea how to handle such cases? /Johannes __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting g

[R] Colour branches/labels of dendrogram according to a grouping variable

2013-03-07 Thread Johannes Radinger
.Image.gif (ectodermal, endodermal, mesodermal). /johannes __ 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, minimal, self

[R] remove rows in data frame by average

2013-02-21 Thread Johannes Brand
ng all the rows and without using a "for loop"? At the end my data frame should look like this: Subject | Block | Feature1 | Feature2 1 | 1 | ... | ... 1 | 2 | ... | ... 1 | 3 | ... | ... ...| ...| ... | ... Thank you a lot for your help. Best, Johannes [[alternative

Re: [R] Peak detector help!?

2013-02-07 Thread Johannes Graumann
Johannes Graumann wrote: > Grrr ... new trial with code here: http://pastebin.com/RjHNNG9J > Maybe the amount of inline-code prevented posting? > > Hello, > > I am writing a simple peak detector and it works quite well ... however > there's one special case below

[R] Peak detector help!?

2013-02-06 Thread Johannes Graumann
Grrr ... new trial with code here: http://pastebin.com/RjHNNG9J Maybe the amount of inline-code prevented posting? Hello, I am writing a simple peak detector and it works quite well ... however there's one special case below, that I can't get my head wrapped around ... the problem is in the "De

Re: [R] R CMD check: Error in get("ptime", pos = "CheckExEnv") ...

2013-01-29 Thread Johannes Graumann
Prof Brian Ripley wrote: > On 30/01/2013 06:02, Johannes Graumann wrote: >> Hi, >> >> Does anyboody have insight into what this error terminating "R CMD check" >> on an in-house package may imply? > > You have re-defined cat(), so I guess you re-define

[R] R CMD check: Error in get("ptime", pos = "CheckExEnv") ...

2013-01-29 Thread Johannes Graumann
Hi, Does anyboody have insight into what this error terminating "R CMD check" on an in-house package may imply? > ### > cat("Time elapsed: ", proc.time() - get("ptime", pos = 'CheckExEnv'),"\n") Error in get("ptime", pos = "CheckExEnv") : unused argument(s) (pos = "CheckExEnv") Calls: cat ->

[R] parse/eval and character encoded expressions: How to deal with non-encoding strings?

2013-01-27 Thread Johannes Graumann
Hi, I am intending to save a path-describing character object in a slot of a class I'm working on. In order to have the option to use "system.file" etc in such string-saved path definitions, I wrote this ExpressionEvaluator <- function(x){ x <- tryCatch( expr=base::parse(text=x), erro

[R] Which df to extract from ANCOVA model

2013-01-18 Thread Johannes Radinger
interest (e.g. CoVar1) are given as e.g. (ANCOVA Fx,y = 2.72, P-value = 0.01). But which degrees of freedom (df) are usually reported together with an F-value (x and y?)? Which df do I need to extract from the model resp the model summary? best regards, Johannes

[R] split & rbind (cast) dataframe

2013-01-11 Thread Johannes Radinger
me how it could look like df2 <- data.frame(A.col2 = c(1,2), A.col3 = c(1,2), B.col2 = c(3,4), B.col3 = c(3,4)) I think I already did a similar procedure sometime ago with the cast() command from reshape-package but I cant remember correctly... ...maybe someone can point

Re: [R] Merging list of dataframes with reshape merge_all

2013-01-11 Thread Johannes Radinger
Hi Rui, thank you so far for your answer... ...as i found these other problems also myself, I decided to go for a looping apporach with the base merge command and always add a new dataframe to the old one (growing dataframe). /johannes On Fri, Jan 11, 2013 at 1:26 PM, Rui Barradas wrote

[R] Merging list of dataframes with reshape merge_all

2013-01-11 Thread Johannes Radinger
in the "newer" package reshape2 as this is considered to be a reboot of the reshape package? /johannes __ 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, minimal, self-contained, reproducible code.

Re: [R] Calculate geographic/euclidian distance between consecutive XY-pairs

2012-12-18 Thread Johannes Radinger
Hi Ray, thank you very much. That one-line approach is what I was looking for. A very simple but very efficient way without loading any other packages. /j On Tue, Dec 18, 2012 at 11:17 AM, Ray Brownrigg wrote: > On 18/12/2012 10:56 p.m., Johannes Radinger wrote: >> >> Hi,

[R] Calculate geographic/euclidian distance between consecutive XY-pairs

2012-12-18 Thread Johannes Radinger
Hi, I have a dataframe containing 3 columns: data.frame(X=c(100,102,104,102,103),Y=c(12,14,14,13,16),Time=c(1,2,3,4,5)) where X and Y are coordinates and "Time" refers to an index of a timestep. Now I would like to get the distance between the consecutive timesteps. This should actually provide

Re: [R] Renaming column names according to another dataframe

2012-12-11 Thread Johannes Radinger
ectors very easy. best, /Johannes On Tue, Dec 11, 2012 at 1:06 PM, arun wrote: > HI, > > You can also try this: > df <- data.frame(A=(1:10),B=(1:10),C=(1:10)) > df_names <- data.frame(code=c("A","B","D","E","C"),name=c("Col

[R] Renaming column names according to another dataframe

2012-12-11 Thread Johannes Radinger
Hi, I've got a dataframe having a code as column name. Addtionally I have another dataframe with a two columns (and lots of rows), the first containing the code and the second some Text (real name). Now I'd like to use the information (pairs of code and name) of the second dataframe to rename all

[R] Class definition and "contains": No definition was found for superclass

2012-12-09 Thread Johannes Graumann
Hi, What goes wrong when the following error shows up: > Error in reconcilePropertiesAndPrototype(name, slots, prototype, > superClasses, : > No definition was found for superclass “sequencesuperclass” in the > specification of class “sequences” Has this something to do with recursive class

Re: [R] ggplot2: "varwidth"-equivalent for geom_boxplot?

2012-11-18 Thread Johannes Graumann
your input. Sincerely, Joh On Thursday, March 11, 2010 10:07:17 PM UTC+3, hadley wickham wrote: > > No this currently isn't possible - it would require changes to > stat_boxplot to work. > > Hadley > > On Wed, Mar 10, 2010 at 9:12 AM, Johannes Graumann > > wrote:

Re: [R] ggplot2:

2012-11-18 Thread Johannes
for your input. Sincerely, Joh hadley wickham gmail.com> writes: > > No this currently isn't possible - it would require changes to > stat_boxplot to work. > > Hadley > > On Wed, Mar 10, 2010 at 9:12 AM, Johannes Graumann > web.de> wrote: > > Apologies

[R] devtools - document() weiredness

2012-11-14 Thread Johannes Graumann
Hello, Please try this: > library(devtools) > create("mdaa") > setwd("mdaa") > dev_mode() d> install() Produces ...* DONE (mdaa) Reloading installed mdaa But when I then try to build documentation d> document() devtools/roxygen just hangs with a "?" like so: Updating mdaa documentation Loading

[R] How to document Reference Classes using Roxygen? Will Roxygen3 work for those?

2012-11-12 Thread Johannes Graumann
Hi, Please see the subject line ;) Goolge only let me to people asking the same question, but no answers ... Am I out of luck with trying to in-line document Reference Classes? Thank you for your input. Sincerely, Joh __ R-help@r-project.org mailing

Re: [R] Dabbling with R5 setRefClass - Inheritance problems

2012-11-08 Thread Johannes Graumann
Ouch - and to think how much time I wasted on this ... Thanks! Joh Jose Iparraguirre wrote: > Hi Johannes, > > Just a typo. > > You've written > > ... > contains="rcfpdsuperclass") > > When, in fact, you've defined the object rcfdpsupercla

[R] Dabbling with R5 setRefClass - Inheritance problems

2012-11-08 Thread Johannes Graumann
Hello, I wrote a class like so: > rcfdpsuperclass <- setRefClass( > Class="rcfdpsuperclass", > fields = list( >RcfpdVersion = "character"), > methods = list( >initialize = function(){ > 'Populates fields with defaults and lock as appropriate' > initFields( >RcfpdVersi

Re: [R] R5: Lock a class field from within a method?

2012-10-25 Thread Johannes Graumann
David Winsemius wrote: > > On Oct 24, 2012, at 2:14 AM, Johannes Graumann wrote: > >> Hello, >> >> testclass <- setRefClass( >> "testclass", >> fields = list(testfield = "logical"), >> methods = list(validate=function(){t

[R] R5: Lock a class field from within a method?

2012-10-24 Thread Johannes Graumann
Hello, testclass <- setRefClass( "testclass", fields = list(testfield = "logical"), methods = list(validate=function(){testfield<<-TRUE})) > test <- testclass$new() > test$testfield logical(0) > test$validate() > test$testfield [1] TRUE Works just fine for me. I would love to be able to d

Re: [R] Crosstable-like analysis (ks test) of dataframe

2012-09-28 Thread Johannes Radinger
Thank you Rui! that works as I want it... :) /Johannes On Fri, Sep 28, 2012 at 12:30 PM, Rui Barradas wrote: > Hello, > > Try the following. > > > f <- function(x, y, ..., > alternative = c("two.sided", "less", "greater"), exact

[R] Crosstable-like analysis (ks test) of dataframe

2012-09-28 Thread Johannes Radinger
case is: ks <- ks.test(df$X,df$Z) where the p value is: ks[2] How can I create an automatized way of this pairwise analysis? Any suggestions? I guess that is a quite common analysis (probably with other tests). cheers, Johannes __ R-help@r-project.

Re: [R] Colsplit, removing parts of a string

2012-09-27 Thread Johannes Radinger
Thank you, this works perfectly... best regards, Johannes On Thu, Sep 27, 2012 at 1:43 PM, Ista Zahn wrote: > Hi Johannes, > > On Thu, Sep 27, 2012 at 7:25 AM, Johannes Radinger > wrote: >> Hi, >> >> I am using colsplit (package = reshape) to split all strings &

[R] Colsplit, removing parts of a string

2012-09-27 Thread Johannes Radinger
"str","name"))) This is nearly what I want but I want to remove the words "str" and "name" from the values, because the columns are already named with that words. Is there a way to remove them using colsplit? Or any other simple way? /johannes __

[R] Integration between R and Microsoft SQL Server?

2012-09-11 Thread johannes rara
Oracle has its own R integration called Oracle R Enterprise: http://www.oracle.com/technetwork/database/options/advanced-analytics/r-enterprise/index.html Is there a same kind of integration available for Microsoft SQL Server? If there is not, does MS have any plans to integrate R and SQL Server

Re: [R] What makes R different from other programming languages?

2012-08-20 Thread johannes rara
plot2 > (including the famous facebook world map) and statistical modelling > (both base and in contributed packages) > > What are your developers interested in and we can be more specific? > > Michael > > On Mon, Aug 20, 2012 at 1:02 PM, johannes rara wrote: >>

[R] What makes R different from other programming languages?

2012-08-20 Thread johannes rara
My intention is to give a presentation about R programming language for software developers. I would like to ask, what are the things that make R different from other programming languages? What are the specific cases where Java/C#/Python developer might say "Wow, that was neat!"? What are the thin

[R] reshape -> reshape 2: function cast changed?

2012-07-25 Thread Johannes Radinger
ne row (one measurement) with e.g. the max value. Of course during the procedure I can also use cast/melt to drop columns that are not relevant for further processing. /Johannes __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listi

Re: [R] Installing packages "xslx" on Ubuntu (32bit) [On R 2.14.1]

2012-07-25 Thread Johannes Radinger
Hi > Hmm, there is no such package: did you mean xlsx? of course xlsx :), I upgraded to 2.15.1 and installed openjdk-6-jdk and run R CMD javareconf. Then I was successful in installing package "xlsx". Thank you! /Johannes > > However, your R is old and quite a f

[R] Installing packages "xslx" on Ubuntu (32bit)

2012-07-25 Thread Johannes Radinger
d base packages: [1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] tcltk_2.14.1 tools_2.14.1 > Any suggestions? /Johannes __ R-help@r-project.org mailing list https://stat.ethz.

[R] R-implementation of Local Outlier Probabilities (LoOP)?

2012-07-15 Thread Johannes Graumann
Dear all, Is anyone aware of an R implementation of LoOF (H.-P. Kriegel, P. Kröger, E. Schubert, A. Zimek; LoOP: Local Outlier Probabilities; In Proceedings of the 18th ACM Conference on Information and Knowledge Management (CIKM), Hong Kong, China: 1649–1652, 2009.)? I found http://cran.r- pro

[R] Need to append vector to all levels of nested list WITHOUT a loop

2012-06-18 Thread Johannes Reichl
ly keeps me away from resolving the true issues. Regards, Johannes Dr. Johannes Reichl Project Manager Energy Institute at the Johannes Kepler University Linz Altenberger Straße 69 A-4040 Linz Tel.: +43-732-2468-5652 Fax: +4

[R] Complex summary of counts of rank positions over multiple dataframes

2012-06-14 Thread Johannes Radinger
rank3b <- c(0,0,4,5,4,0,0) rank4b <- c(0,0,3,2,0,0,2) result_b <- data.frame(uniquevars,rank1b,rank2b,rank3b,rank4b) Is there any common procedure to get counts of ranks for multiple dataframes? Has anyone done similar thing

Re: [R] Sort 1-column dataframe with rownames

2012-06-08 Thread Johannes Radinger
Hi Achim, thank you for your good explanation and the solution to my question... cheers, /j Original-Nachricht > Datum: Fri, 8 Jun 2012 09:30:42 +0200 (CEST) > Von: Achim Zeileis > An: Johannes Radinger > CC: R-help@r-project.org > Betreff: Re: [R] Sort 1-c

[R] Sort 1-column dataframe with rownames

2012-06-08 Thread Johannes Radinger
producable example: x <- c(1,3,51,2,34,44,12,33,2,8) df <- data.frame(x) rownames(df) <- c("A","B","C","D","E","F","G","H","I","J") df.sort <- df[order(df[,"x"]),] /Johannes

[R] Redefine multiple columns (using grep) as factor variables

2012-06-01 Thread Johannes Radinger
g a single column as factor but that is not working with multiple columns I get from grep()... what I tried so far: df[, grep("^crast", colnames(df))] <- as.factor(df[, grep("^crast", colnames(df))]) any suggestions? cheers, /Johannes -- Jetzt inform

Re: [R] Remove columns from dataframe based on their statistics

2012-05-31 Thread Johannes Radinger
exept for column with name "B". I have to think about this /Johannes Original-Nachricht > Datum: Thu, 31 May 2012 09:20:27 -0500 > Von: J Toll > An: Johannes Radinger > CC: R-help@r-project.org > Betreff: Re: [R] Remove columns from dataframe based on their

[R] Remove columns from dataframe based on their statistics

2012-05-31 Thread Johannes Radinger
42,100) D <- runif(100) df <- data.frame(A,B,C,D) # if want to conditionally remove column B and C as they show no variations /Johannes -- Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a __ R-help@r-project.org mai

Re: [R] Transform counts into presence/absence

2012-05-31 Thread Johannes Radinger
Original-Nachricht > Datum: Thu, 31 May 2012 11:16:32 + > Von: "ONKELINX, Thierry" > An: Johannes Radinger , "R-help@r-project.org" > > Betreff: RE: [R] Transform counts into presence/absence > Just use the logical operators.

[R] Transform counts into presence/absence

2012-05-31 Thread Johannes Radinger
; 0 THEN 1 etc.? /johannes -- Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a __ 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/post

  1   2   3   4   5   6   >