[R] Question on reading nodes info from all random forests generated trees

2011-09-12 Thread k
Hi All, I have a quick question on random forests. Simply, I am not sure how to read the values of independent variables related to the highest value of a response variable from all trees generated from random forests. It is easy to do this in a single regression tree. But I am not clear how to

Re: [R] how to write a loop to repetitive jobs

2018-04-16 Thread K. Elo
Hi! An alternative with 'assign': for ( i in 71:75) {   setwd(paste("C:/Awork/geneAssociation/removed8samples/neuhausen", i, sep=""))   temp.df<-read.csv("seg.pr3.csv", head=T)   temp.df$id<-paste0("sn",i,sep="")   assign(paste0("seg",i,sep=""),temp.df) } rm(temp.df,i)    # Clean up HTH, Kimmo

Re: [R] Hacked

2018-04-17 Thread K. Elo
Hi! Not just an gmail issue. After my last reply I have gotten tons of spams from "Samantha Smith". Keep hitting my "rank as spam"-button in the hope that my MUA could learn :) Best, Kimmo ti, 2018-04-17 kello 19:34 +, Ding, Yuan Chun kirjoitti: > No, I do not use gmail, still got dirty spam

Re: [R] help with json data from the web into data frame in R

2018-05-12 Thread K. Elo
Hi! Seems to be an encoding problem. This worked for me (have not full- checked the output, though): fromJSON(encodeString(zWebObj)) HTH, Kimmo 2018-05-08 12:49 -0700, David Winsemius wrote: > > > > On May 8, 2018, at 10:08 AM, Evans, Richard K. (GRC-H000) > k.ev...@

Re: [R] Split a data.frame

2018-05-19 Thread K. Elo
Hi! How about this: --- snip -- for (i in 1:(length(split_str)-1)) { assign(paste("DF",i,sep=""),DF[ c((which(DF$name==split_str[i])+1):(which(DF$name==split_str[i+1])-1)), ]) } --- snip --- 'assign' creates for each subset a new data.frame DFn, where n ist a count (1,2,...). But note: i

Re: [R] help matching rows of a data frame

2017-09-18 Thread K. Elo
Hi! 2017-09-18 07:13 -0500, Therneau, Terry M., Ph.D. wrote: > This question likely has a 1 line answer, I'm just not seeing > it.  (2, 3, or 10 lines is  > fine too.) > > For a vector I can do group  <- match(x, unqiue(x)) to get a vector > that labels each  > element of x. Actually, you get a v

[R] Scale y-labels based on a value with 'lattice'

2016-05-26 Thread K. Elo
Dear R-helpers! I have a data frame storing data for word co-occurrences, average distances and co-occurence frequency: Group.1Group.2 x Freq 1 deutschland achtziger 2.001 2 deutschlandalt 1.254 3 deutschland anfang -2.001 4 deutschlandansehen 1.00

Re: [R] Scale y-labels based on a value with 'lattice'

2016-05-29 Thread K. Elo
Hi! Many thanks to Duncan and Jim for their quick replies. 27.05.2016, 01:08, Jim Lemon wrote: Hi Kimmo, par(mar=c(5,7,4,2)) dotchart(kedf$x) mtext(kedf$Group.2,side=2,at=1:6,line=0.5, las=2,cex=log(abs(kedf$Freq))+1) Jim This 'dotchart' solution worked fine and I got what I wanted :) Howev

Re: [R] TwitteR - Number of tweets from multiple locations

2016-06-01 Thread K. Elo
Hi Juho! 01.06.2016, 14:40, Juho Kiuru wrote: Hi all, I am new to R and TwitteR and would love to get some advice from you. I managed to get list of tweets containing word 'innovation' tweeted in Helsinki with following script: searchTwitter('innovation', n=1, geocode='60.1920,24.9458,30mi

Re: [R] Y in Kohonen xyf function

2016-06-16 Thread K. Elo
Hi! Some sample data could help us to help you... But have you read '?xyf' in order to ensure that your 'Y' is what 'xyf' expects it to be? What kind of error messages do you get? Regards, Kimmo 16.06.2016, 15:13, ch.elahe via R-help wrote: Is there any answer? Hi all, I have a df and I

Re: [R] Y in Kohonen xyf function

2016-06-17 Thread K. Elo
4 3 3 2 1 4 1 2 3 .. and I want to cluster my data based on speed, to see the coming costumer's protocols fall into which speed group and I think I need to bring this speed column in Y element of xyf On Thursday, June 16, 2016 2:29 PM, K. Elo wrote: Hi! Some sample data could help us t

Re: [R] Y in Kohonen xyf function

2016-06-22 Thread K. Elo
Hi again! 21.06.2016, 21:33, chalabi.el...@yahoo.de wrote: Hi Kimmo, Thanks for your reply. I think now my problem is that I don't understand what does factor(df.classes[training]) do? Sorry, my mistake, should habe been 'df$speed'. Please try the following: --- snip --- set.seed(7) training

Re: [R] Y in Kohonen xyf function

2016-06-22 Thread K. Elo
Hi! 22.06.2016, 22:00, chalabi.el...@yahoo.de wrote: Dear Kimmo, I already used df$speed[training] in df.xyf but I get this error: Error in xyf(Xtraining,factor(df$speed[training]),grid=somgrid(5, : NA/NaN/Inf in foreign function call (arg 1) Please check for zeros (0) and NAs in df$spee

Re: [R] Hierarchical Clustering in R

2016-08-24 Thread K. Elo
clustering purpose. *data=read.table("my_distance_matrix", header=FALSE)[-1]* *attach(data)* *head(data)* *d=as.dist(data);* *hc.complete=hclust(d,method="complete")* *cutree(hc.complete, k=6)* *groups<- cutree(hc.complete, k=6)* *x<-cbind(groups)* *x* *x1<- subset

[R] R Commander qcc

2015-05-17 Thread Greg K
I am completely new to R and am trying to utilize its capabilities as an alternative to Minitab. I don't have any development ability at all, but the R Commander GUI is able to give me the functionality I need with the exception of control charts. I have installed the qcc package but when I load

Re: [R] reading as date

2015-06-10 Thread K. Elo
Hi! 10.06.2015, 13:20, khatri wrote: My date column is in following format : "%m/%d H:M:S" There is not mention of year in the data.So how can I read this using strptime function. I have tried strptime(dates,"%m/%d H:M:S") but this is returning NA. Thanks How about: strptime(dates,"%m/%d %H:%

Re: [R] boot strapping poisson getting warnings and negative values

2014-12-07 Thread Aravindhan, K
ot;,"perc","poisson")) Error in boot.ci(db.fix.boot, index = 1, type = c("bca", "perc", "poisson")) : object 'db.fix.boot' not found -- -Original Message- From: Aravi

[R] i need help for var.test()

2015-01-08 Thread sait k
Dear Sir or Madam, i want to use the var.test() (f.test()) for n samples. But in R the var.test() can only used for variances of two samples. In the intruductions stands: Performs an F test to compare the variances of two samples from normal populations. I need a variance test for n samples. It

[R] Requesting function for A/B testing

2015-03-06 Thread Namratha K
language. talk soon Thanking you Regards Namratha K [[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

[R] Are there any implemented function for A/B testing?

2015-03-10 Thread Namratha K
Is there any method or built-in function for implementing a/b testing using R language Are there any function developed to implement a/b testing in R language? [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUB

Re: [R] Saving objects in RData file in different name

2018-07-28 Thread K. Elo
Hi! Maybe not the most elegant solution, but a workaround is to have a function: > save2<-function(y, ...) { save(y,...)} > save2(x1,x2,file="test.RData") The point is to include the variables to be "renamed" as parameters (in my example: y). The function will use the parameter variable names wh

Re: [R] Importing JSON Files

2018-11-05 Thread K. Elo
Hi! Have you tried to use 'fromJSON' with the parameter 'simplifyDataFrame' set to TRUE? See: https://cran.r-project.org/web/packages/jsonlite/vignettes/json-aaquickstart.html -> Section "Data Frames" explains how this affects the data frame structure. IMHO this should solve your problem... Be

Re: [R] data frame transformation

2019-01-06 Thread K. Elo
Hi! Maybe this would do the trick: --- snip --- library(reshape2) # Use 'reshape2' library(dplyr)# Use 'dplyr' datatransfer<-data %>% mutate(letter2=letter) %>% dcast(id+letter~letter2, value.var="weight") --- snip --- Or did I misunderstood something? Best, Kimmo 2019-01-06, 13:16

Re: [R] Mailinglist

2019-01-06 Thread K. Elo
Hi! Not having a data chunk prevents me from testing abit, but maybe you should take a look on: ?table ?xtabs to start with. But as already suggested by other users, a small data set would be of great help :) HTH, Kimmo su, 2019-01-06 kello 13:49 -0500, Rachel Thompson kirjoitti: > Hi Rich, >

Re: [R] color question

2019-02-27 Thread K. Elo
Hi! 2019-02-27 22:51 -0500, Aimin Yan wrote: > I have a question about assigning color based on the value of a > matrix > > The following is my matrix. > > d > lateRT earlyRT NAD ciLAD > lateRT 1.0 0.00 0.006224017 0.001260241 > earlyRT 0.

Re: [R] Printing vectrix

2019-03-25 Thread K. Elo
Hi! 2019-03-25 kello 09:30 +0800, Steven Yen wrote: > The second command is ugly. How can I print the 25 numbers into 2 > rows > of ten plus a helf row of 5? Thanks. Something like this? x<-1:25; for (i in seq(1,length(x),10)) print(x[i:ifelse((i+9)>length(x),length(x),i+9)]) HTH, Kimmo _

[R] Need help on boot strapping

2014-08-08 Thread Aravindhan, K
Dear Team, I am getting this error while running the boot-strapping functions. == mod.db.hub<-glm(TOTAL~1+IPD,family="poisson",data=db) fit<-fitted(mod.db.hub) e<-residuals(mod.db.hub) X<-model.matrix(mod.db.hub) boot.huber.fixed<-function(data,indi

[R] boot strapping poisson getting warnings and negative values

2014-08-08 Thread K Aravindhan
Dear Team, I am getting this error while running the boot-strapping functions. == mod.db.hub<-glm(TOTAL~1+IPD,family="poisson",data=db) fit<-fitted(mod.db.hub) e<-residuals(mod.db.hub) X<-model.matrix(mod.db.hub) boot.huber.fixed<-function(data,indi

[R] how to compure R-squared in glm

2014-11-14 Thread Aravindhan, K
Team, Can some one help me in computing the R-squared value in glm. Thanks Aravindhan [[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:/

Re: [R] boot strapping poisson getting warnings and negative values

2014-11-14 Thread Aravindhan, K
Team, Has anyone looked at this question from me ? it will help me immensely if someone can provide an answer to this. Thanks Aravindhan -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of K Aravindhan Sent: Friday, August 08, 2014

Re: [R] how to compure R-squared in glm

2014-11-15 Thread Aravindhan, K
Hi David, I am using generalized linear models (glm command with family="poisson"). Thanks Aravindhan -Original Message- From: David Winsemius [mailto:dwinsem...@comcast.net] Sent: Saturday, November 15, 2014 1:16 PM To: Aravindhan, K Cc: R-help@r-project.org Subject: Re:

Re: [R] Choosing columns by number

2015-08-25 Thread K. Elo
Hi! 25.08.2015, 18:17, Sam Albers wrote: Hi all, This is a process question. How do folks efficiently identify column numbers in a dataframe without manually counting them. For example, if I want to choose columns from the iris dataframe I know of two options. I can do this: str(iris)'data.

[R] JSONlite import problem

2015-10-23 Thread K. Elo
Hi! I have collected 500.000+ tweets with a Python script using 'tweepy', which stored the data in JSON format. I would like to use R for data analysis, but have encountered problems when trying to import the data file with 'jsonlite'. Here what I have tried: > data.df<-fromJSON("example.js

Re: [R] JSONlite import problem

2015-10-23 Thread K. Elo
Hi! You can download the example file with this link: https://www.dropbox.com/s/tlf1gkym6d83log/example.json?dl=0 BTW, I have used a JSON validator and the problem seems to related to wrong/missing EOF. --- snip --- Error: Parse error on line 1: ...:"1436705823768"} {"created_at":"Sun J -

Re: [R] JSONlite import problem

2015-10-25 Thread K. Elo
Hi, thanks to Duncan and Jeroen to quick replies. I was actually my thinking error :) I suppoed 'fromJSON' to cope with a multi-line file or a list, but this seems not to be the case. So I first read the file with 'readLines' into a list and processed all items with 'fromJSON' within a for-lo

[R] Maybe OT: Forking in R scripts?

2016-10-12 Thread K. Elo
Dear all, I am currently working a research project on social media interaction. As a part of this project, mostly for teaching purposes, I should develop a R-based approach for real-time visualisation of streamed data (from Twitter). My idea is simple (and working :) ): A Python-script stre

Re: [R] JSON to Dataframe

2016-10-18 Thread K. Elo
Hi! 18.10.2016, 14:38, Abhinaba Roy wrote: Hi R helpers, I have json inputs from an app which I want to convert to dataframes. Below are the two inputs. Can someone help me in converting these to dataframes [...] IMHO, the best way is to use the package 'jsonlite', see: * https://cran.r-pro

Re: [R] R studio Problem

2016-12-14 Thread K. Elo
Hi! Maybe this helps: http://r.789695.n4.nabble.com/Error-in-normalizePath-path-with-McAfee-td2532324.html Best, Kimmo 15.12.2016, 08:18, Amelia Marsh via R-help wrote: Hi I had installed R studio Desktop 1.0.44. However whenever I wanted to write any command, before I could complete, I was

[R] Optimum number of PC and observations in Elasticnet R package

2017-03-18 Thread Sreejit K
Respected Sirs/Madam, Good Morning As part of a project I'm using elasticnet package in R for sparse pca. I would be great help for me if you can advice me on how to select Optimum number of principal components and number of observation in elasticnet package (k, para ) in R. -- *T

[R] matrix multiplication question

2008-07-17 Thread Murali K
Hello, I am a newcomer to R and therefore apologize for posting such a basic question. I am trying to multiply 2 matrices t(X1)%*%X1, where t(X1) is: 1 2 3 4 5 8 12 13 20 24 26 27 31 33 34 36 37 40 41 42 45 46 47 48 49 ones 1 1 1 1 1 1 1 1 1 11 1 1 1

[R] graphing regression coefficients and standard errors

2008-07-25 Thread Murali K
Hello, I am interested in plotting my regression analysis results(regression coefficients and standard errors obtained through OLS and Tobit models) in the form of graphs.What is the best way to accomplish this? Thanks. Murali Kuchibhotla [[alternative HTML version deleted]] ___

[R] How to print out console output

2008-08-27 Thread K. Elo
Dear R-helpers, I am desperately looking for a solution for how to print out the console output to a standard printer. For example, I would like to print out the summary.lm() output, the output of different ftable-functions etc. I use R on a linux machine. The only ways so far have been to c

Re: [R] How to print out console output

2008-08-27 Thread K. Elo
] 0.2730090246 0.4462614490 0.2382041477 0.9826505063 0.1556554718 0.3746872961 [7] 0.6108254879 0.6617410595 0.6694177436 0.4650380281 0.0414420397 0.2307212995 [13] 0.5338913775 0.9186298891 0.0006410333 0.8046684864 0.6205502201 0.5352788521 [19] 0.4255279053 0.7711444888 On Wed, Aug 27, 2008 at 7:44

Re: [R] How to print out console output

2008-08-29 Thread K. Elo
Hi, as mentioned in my previous posting, I run R on a linux machine. So a possible function for printing (in linux) could look like this: copy2lpr<-function(..., PRINTER="lpr") { LPR<-pipe(PRINTER,"w") capture.output(..., file=LPR) close(LPR) } This seems to work... An allows the user to c

[R] Help

2010-02-10 Thread K Jain
We get an error while using the following function.Please advise. newton.method(FUN = function(b) 10/b+sum(a)-10*sum((x^b)*a)/sum(x^b), init = 5,tol = 0.001) Error in deriv.default(as.expression(body(FUN)), nms, function.arg = TRUE) : Function 'sum' is not in the derivatives table -

Re: [R] Deleting colmuns with 0's and also writing multple csv files

2010-02-18 Thread K. Elo
Dear Anna, 19.02.2010 08:17, Anna Carter wrote: > (1) If the dataset contains some variables having all the entries = 0 > and while analysing I want to delete those pericular columns, how do > acheive this. i.e. Let's suppose 'df' is your data frame, then: subset(df, select=which(colSums(df)!=0)

Re: [R] Deleting colmuns with 0's and also writing multple csv files

2010-02-19 Thread K. Elo
Hi! Right, my solution did not take into accound paired negative values summing up to zero. This should work in all cases: df[, which(colSums(df!=0)!=0)] Kind regards, Kimmo __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r

Re: [R] how to make R plot under Linux

2010-02-22 Thread K. Elo
Hi! 22.02.2010 17:45, xin wei wrote: > > thank you for reply. I just type: hist(x) from SSH terminal, expecting a > histogram to pop up like what i got under windows.instead I got the > following error msg: > > Error in X11(d$display, d$width, d$height, d$pointsize, d$gamma, > d$colortype,

Re: [R] how to make R plot under Linux

2010-02-22 Thread K. Elo
Hi! 22.02.2010 19:53, xin wei wrote: > > hi, Kevin and K.Elo: > thank you for the suggestion. Can you be more specific on these? (like how > exactly get into x-switch or man ssh). I am totally ignorant about linux and > SSH:( Memory limitation forces me to switch from windows to Linux > c

Re: [R] barplot (stacked)

2010-03-24 Thread K. Elo
Hi Jens! 23.03.2010 17:18, koj wrote: The problem is: I want to group the data. I want to have ten groups. The first two bars should be [1,1] and [2,1] together in one bar and in the second bar of the first obervation should be [1,2] and [2,2] (stacked with beside =TRUE). Therefore the first obs

Re: [R] barplot (stacked)

2010-03-24 Thread K. Elo
Hi Jens! 24.03.2010 14:48, koj wrote > > Hi Kimmo, thank you for your answer, but this is not the thing I am searching > for. Unfortunately, I have not described the problem very good. But just in > this moment I have a good idea: I use add=TRUE and paint two plots. And so I > am sure that I can

[R] Text dependent on a variable in a R function

2010-05-01 Thread R K
Hello, I was wondering if someone could tell me how I can make text dependent on a variable in a R function I have created. The function will create plots, thus I would like each plot to have a unique title based on the inputted variable as well as a unique file name when saved using the sa

[R] Modula Generators

2009-12-08 Thread Sam K
Hi all, Is there function on R for calculating Modula generators? For example for primes above 100, e.g 157, i want to know which number generates the group under multiplication mod 157. i.e i want to find an element whose order is 156. The problem I occur is that modular arithmetic becomes in

Re: [R] where does the null come from?

2009-05-13 Thread K. Elo
Hi! Wacek Kusnierczyk wrote: > m = matrix(1:4, 2) > > apply(m, 1, cat, '\n') > # 1 2 > # 3 4 > # NULL > > why the null? Could it be the return value of 'cat'. See ?cat, where: ---snip --- Value None (invisible NULL). ---snip --- Kind regrads, Kimmo __

[R] RWeka write.arff: set @relation

2009-06-05 Thread Nikki K
Dear all, I am using the RWeka package to append several arff files. Although it works the resulting arff files always have "@relation R_data_frame", and I have to change this manually to my desired relation name. Can the package accomplish this for me instead? Thank you, Wil Koetsier _

Re: [R] how to quit this mailing list

2009-03-27 Thread K. Elo
Hi, > https://stat.ethz.ch/mailman/listinfo/r-help and there You'll find the section: "To unsubscribe from R-help, get a password reminder, or change your subscription options enter your subscription email address:" Hope this helps, Kimmo __ R-help@r

Re: [R] A beginner's question

2009-03-27 Thread K. Elo
Hi, minben wrote: > I am a new R-language user. I have set up a data frame "mydata",one of > the colume of which is "skill". Now I want to select the observations > whose "skill" value is equal to 1,by what command can I get it? Try this: mydata1<-mydatasubset(mydata, skill==1) Maybe You should

Re: [R] Deleting rows that contain certain characters...or deleting ANOVA factors

2009-04-22 Thread K. Elo
Hi, Crosby, Jacy R wrote: > > i.e. I'd like to have aov(Phen1~L1) use only Pat1-Pat4,and Pat 10. > Similarly, aov(Phen1~L2) should use Pat1, 6, and 10. > Etc. > > Is this something I can do in the aov function, or do I need to modify my > dataset before running aov? In either case, I

[R] iteration limit error in gamm and notExp2

2009-04-23 Thread isidora k
hi, I am trying to run a mixed effect gam using gamm (mgcv) and I get the following error: "Error in lme.formula(y ~ X - 1, random = rand, data = strip.offset(mf), : nlminb problem, convergence error code = 1 message = iteration limit reached without convergence (9)" I've read all about 'notExp

Re: [R] How to read the summary

2009-04-28 Thread K. Elo
Hi! mathallan wrote: > How can I from the summary function, decide which glm (fit1, fit2 or fit3) > fits to data best? I don't know what to look after, so I would please > explain the important output. Start with the AIC value (Akaike Information Criterion). The model having the lowest AIC is the

Re: [R] Beginer data.frame

2010-01-12 Thread K. Elo
Hi! Jean-Baptiste Combes wrote: > Hello, > > I use R 2.10, and I am new in R (I used to use SAS and lately Stata), I am > using XP. > > I have a data which has a data.frame format called x.df (read from a csv > file). I want to take from this data observations for which the variable > "Code" sta

Re: [R] Barplots in R

2010-01-15 Thread K. Elo
Hi! Let's suppose the values for the x axis are stored in 'values'. barplot(values, col=c(rep("Red",3),rep(1,length(values)-8),rep("Blue",5))) HTH, Kimmo vikrant kirjoitti: > Suppose I need to draw a Grouped bar plot with 100 values on the X axis. Now > my question is If I need to highlight sup

Re: [R] column selection for aggregate()

2010-01-18 Thread b k
it is very long since I have many variables. Basically I > want to select all numerical variables (10 to 24), and all categorical > variables except MEASUREM, SEL_FACET and SEL_MEAS without having to > write each of them. I would also like to avoid writing the names, the > indexes wo

Re: [R] column selection for aggregate()

2010-01-18 Thread b k
On Mon, Jan 18, 2010 at 10:17 AM, Ivan Calandra < ivan.calan...@uni-hamburg.de> wrote: > Thanks for your answer, but it doesn't work... > > Here is what I get: > > ssfamean <- aggregate(ssfa[[10:24]],ssfa[c("SPECSHOR", "BONE", "TO_POS", > "FACETTE", "SHEARFAC", "ENA_BA")],mean) > Error in .subset2

Re: [R] column selection for aggregate()

2010-01-18 Thread b k
On Mon, Jan 18, 2010 at 10:33 AM, Ivan Calandra < ivan.calan...@uni-hamburg.de> wrote: > I didn't understand from the help what really does the function rowMeans > but it looks like it doesn't take into account the categorical variables (I > want to calculate the means when the values of all categ

[R] Factor contingency tables

2010-01-21 Thread b k
Hello, I know there must be a simple soluton to this problem but it eludes me currently. My data is partitioned into two subsets, each subset has a common column factor but with varying levels: levels(fdf_ghc$AgeDemo) [1] "26TO35" "36TO45" "46TO55" "56TO65" "66TO75" "76TO85" levels(fdf_ghcnull$A

Re: [R] cbind, row names

2010-01-29 Thread K. Elo
Hi! 29.01.2010 12:49, soeren.vo...@eawag.ch wrote: > Hello, > > I read the help as well as the examples, but I can not figure out why > the following code does not produce the *given* row names, "x" and "y": > > x <- 1:20 > y <- 21:40 > rbind( > x=cbind(N=length(x), M=mean(x), SD=sd(x)), > y

[R] Random number quality

2010-02-05 Thread b k
number quality for both the native built-in PRNG and any alternatives including the random package. Thanks, Ben K. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

Re: [R] what would break a citation network? [Error in as.igraph.vs(graph, vids) : Invalid vertex names]

2019-05-04 Thread K. Elo
Hi Drake, 2019-05-04, 17:34 -0700, Drake Gossi wrote: > Hello everyone, > > I'm trying to learn how to put together a citation network, and, in > doing so, I'm playing around with a data set of my own making. I'm > going back and forth between two .csv files. One has two columns and > is simply l

Re: [R] Required help

2019-05-05 Thread K. Elo
Hi Rajesh, 2019-05-05 10:23 +0530, Rajesh Ahir_GJ wrote: > Hello R users, > > I am getting an error while running following code. > > library(ggplot2) > ggplot(hourly_data1,aes(hour, power))+ > geom_boxplot(aes(fill=monthname),outlier.shape=NA) + > facet_wrap(~monthname) > ggplot(hourly_data1,ae

[R] as.complex()

2024-03-25 Thread Thomas K
Needing a < , > comparison for imaginary numbers __ 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-guide.html and provide c

Re: [R] Strange behaviour of R?

2020-01-17 Thread K. Elo
Hi, cannot reproduce, either, on my Linuxmint 19.3 + R 3.6.2. Here the outputs: --- snip --- > test(mean, 1:10) [1] 5.5 > test(NULL, 1:10) NULL Error in FUN(args) : could not find function "FUN" > test(mean, list(x=1:10, na.rm=TRUE)) [1] NA Warning message: In mean.default(args) : argument is n

Re: [R] How to extract or sort values from one column

2020-01-31 Thread K. Elo
Hi! Let's assume your data is stored in a data frame called 'df'. So this code should do the job: df$Value[ (df$Value>=0.2 & df$Values<=0.4) | df$Value>=0.7 ] Best, Kimmo pe, 2020-01-31 kello 09:21 -0500, pooja sinha kirjoitti: > Hi All, > > I have a .csv file with four columns (Chrom, Start

Re: [R] How to extract or sort values from one column

2020-01-31 Thread K. Elo
Hi! Oh, sorry, one "s" too much in my code. Here the correct one: df$Value[ (df$Value>=0.2 & df$Value<=0.4) | df$Value>=0.7 ] Best, Kimmo pe, 2020-01-31 kello 17:12 +0200, K. Elo kirjoitti: > Hi! > > Let's assume your data is stored in a data frame call

Re: [R] How to extract or sort values from one column

2020-01-31 Thread K. Elo
nha kirjoitti: > Thanks for providing the code but I also needed the output sheet in > .csv format with all the four columns corresponding to the value > (Chrom, > Start_pos, End_pos & Value ranging from what I specified earlier). > > Puja > > On Fri, Jan 31, 2020 at 10:23

Re: [R] TWITTER API environment variables

2020-04-07 Thread K. Elo
Hi! Have you already read this: https://cran.r-project.org/web/packages/rtweet/vignettes/auth.html I think they explain rather well how to use Twitter tokens with rtweet... HTH, Kimmo ke, 2020-04-08 kello 17:19 +1200, Patrick Connolly kirjoitti: > I'm using the rtweet package which makes use o

Re: [R] TWITTER API environment variables

2020-04-08 Thread K. Elo
llo Kimmo, > > Yes. I did that and it worked fine -- as far as it goes. But it > didn't cover what to do when using the same twitter account on a > computer with a different user name -- which is what my question was > about. > > > On Wed, 08-Apr-2020 at 08:55AM

Re: [R] How to combine two rows in a data table into a third new row, such that the values in the row are added together in the new row?

2020-05-06 Thread K. Elo
Hi! With 'dplyr': dt_count %>% mutate(STATUS=ifelse(STATUS %in% c("Resolved","Closed"),"Resolved/Closed",STATUS)) %>% group_by(STATUS) %>% summarise(n=sum(N)) Output: 1 Assigned 135 2 Cancelled 20 3 In Progress56 4 Pending75 5 Resolved/Closed 1180 HTH, Ki

[R] Error message in meta-analysis package Metafor-weights =""

2020-06-16 Thread K Amoatwi
Dear All, I am using the example from one of the tutorial about "Metafor" package and "escalc" function, to learn how this package can be applied to do meta-analysi; the code and the data is directly from the tutorials but "weights=freq" option in the escalc function is given me error message This

Re: [R] Error message in meta-analysis package Metafor-weights =""

2020-06-16 Thread K Amoatwi
ychiatry and > > Neuropsychology | Maastricht University | P.O. Box 616 (VIJV1) | 6200 MD > > Maastricht, The Netherlands | +31 (43) 388-4170 | http://www.wvbauer.com > > > >-Original Message- > >From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of

Re: [R] Error message in meta-analysis package Metafor-weights =""

2020-06-22 Thread K Amoatwi
t; benefits. > > Best, > Wolfgang > > -- > Wolfgang Viechtbauer, Ph.D., Statistician | Department of Psychiatry and > > Neuropsychology | Maastricht University | P.O. Box 616 (VIJV1) | 6200 MD > > Maastricht, The Netherlands | +31 (43) 388-4170 | http://www.wvbauer.com &

Re: [R] Error message in meta-analysis package Metafor-weights =""

2020-06-23 Thread K Amoatwi
te: > Dear Kobby, > > Please post the output of sessionInfo() and class(result.md). > > Best, > Wolfgang > > >-Original Message- > >From: K Amoatwi [mailto:amoatwi...@gmail.com] > >Sent: Monday, 22 June, 2020 22:30 > >To: Viechtbauer, Wolfgang

Re: [R] Error message in meta-analysis package Metafor-weights =""

2020-06-23 Thread K Amoatwi
ave loaded the 'meta' package after 'metafor' and then forest() will > try to use the corresponding function from the meta package and not > metafor. With: > > metafor::forest(result.md) > > it should work. > > Best, > Wolfgang > > >-Origin

Re: [R] Error message in meta-analysis package Metafor-weights =""

2020-06-23 Thread K Amoatwi
e. If you had loaded them in the other order > it would have masked the other one. > > In fact it masked seven functions in total in this case as the message > told you. > > Michael > > On 23/06/2020 16:29, K Amoatwi wrote: > > Dear Wolfgang, > > Yes! The "m

[R] Optical Mark Recognition

2013-01-14 Thread K Simmons
Hey all, Has anyone ever altered an R package for image analysis to do optical mark recognition? I'm trying to find a way to semi-automate data entry of several thousand paper health surveys that are predominantly composed of check boxes. All the boxes are uniform size and shape, so it seems as

[R] Setting global variables inside R reference class ?

2013-01-26 Thread Praveen K
Hello, I'm a newbie to R, I have a quesiton. I'm a bit confused on global variable assignments. I have the following situation. I have 2 global variables current_idx and previous_idx. *These 2 global variables have to be set by a method in a reference class*. Essentially, using <<- assignment

Re: [R] Relative Risk in logistic regression

2013-02-01 Thread Ivan-K
Dear colleagues, I have 2 points: One opinion and one question. 1) In one paper in a peer-reviewed journal, I read about the idea of using a logit regression as a surrogate for the log-binomial, just adding the numerator to the denominator ... It’s tempting to immediately get the RR instead of OR

Re: [R] glm poisson and quasipoisson

2013-02-01 Thread Ivan-K
I am sure, that this is not a pure Poisson! Huge overdispersion! You get inflated confidence intervals! (although, the point estimates of the regression coefficients stay the same) Try to look for the causes of overdispersion! It may be geteroscedastisity? What is the nature of the response, is it

[R] (core) designation on Task View

2012-09-25 Thread k schoenfelder
Hello, Does the (core) designation in the CRAN Task View indicate packages that provide basic/recommended functionality in that domain? I don't see it documented anywhere on the site. Thanks for your help. __ R-help@r-project.org mailing list https://

[R] specifying arguments in functions and calling functions, within functions

2012-09-26 Thread K. Brand
Esteemed R UseRs, Regarding specifying arguments in functions and calling functions within functions: ## beginning ## ## some data ex <- rnorm(10) ex[5] <- NA ## example function Scale <- function(x, method=c("mean", "median")) { scl <- method scl(x) } ## both return NA Scale(ex, method=m

Re: [R] specifying arguments in functions and calling functions, within functions

2012-09-27 Thread K. Brand
cale(ex, fivenum) > [1] 0.134 0.5190959 0.7050648 0.8304476 0.9370754 >> Scale(ex, hist) > > -- > David L Carlson > Associate Professor of Anthropology > Texas A&M University > College Station, TX 77843-4352 > >> ---

Re: [R] How to test if there is a subvector in a longer vector

2012-09-27 Thread K. Elo
Hi! 28.09.2012 08:41, Atte Tenkanen wrote: Sorry. I should have mentioned that the order of the components is important. So c(1,4,6) is accepted as a subvector of c(2,1,1,4,6,3), but not of c(2,1,1,6,4,3). How to test this? How about this: --- code --- g1<- c(2,1,1,4,6,3) g2<- c(2,1,1,6,4

Re: [R] Simple Question

2012-09-27 Thread K. Elo
Hi! 28.09.2012 09:13, Bhupendrasinh Thakre wrote: Statement I tried : b <- unclass(Sys.time()) b = 1348812597 c_b <- rnorm(1,2,1) Do you mean this: --- code --- > df<-data.frame("x"=0,"y"=0) > colnames(df) [1] "x" "y" > colnames(df)[2]<-paste("b",unclass(Sys.time()),sep="_") > colnames(df)

Re: [R] Legend Truncated Using filled.contour

2012-10-03 Thread K Simmons
Data attached - didn't realize I could do that last night. Here's the data inport piece of my code, change the pathname to your computer. asym<-read.csv('/Users/kirstensimmons/Desktop/Asym04.csv') asym #put the data into a data matrix asym_matrix<-data.matrix(asym) On Thu, Oct 4, 2012 at 6:35

[R] Where Can I Find the Function letterTrevor?

2012-10-26 Thread K Simmons
Hi All, I'm trying to create two side-by-side contour plots with one legend by modifying the code found here: http://wiki.cbr.washington.edu/qerm/sites/qerm/images/b/bb/Example_4-panel_v1a.R I've been able to set up the other two functions called in the code, but I can't find reference to print.l

[R] model selection for nested factorial design

2014-05-14 Thread K C
Stats beginner here. I have a dataset composed of observations taken from 16 separate experimental panels, each nested into one of 4 conditions (Treatment A Level 1, Treatment A Level 2, Treatment B Level 1, Treatment B Level 2; see photo: http://imgur.com/ZbzFPNq). There are 100 observations of t

Re: [R] remove duplicated row according to NA condition

2014-05-28 Thread K. Elo
Hi! How about trying this: data[ data$col1!=data$col2 & !is.na(data$col3), ] col1 col2 col3 2a1 ST001 3b2 ST002 HTH, Kimmo 28.05.2014 15:35, jeff6868 wrote: > Hi everybody, > > I have a little problem in my R-code which seems be easy to solve, but I > wasn't able to find t

Re: [R] [R-pkgs] Rook: software and specification for R web applications and servers

2014-06-26 Thread Peter K
Rook apps can be run using the httpd built into R (great feature!), and can be deployed using rApache server. For those who prefer to deploy the apps under FastRWeb, below is the code to do so: -- in your web.R/myrookapp.R file, we ran the Rook app instance (stored in variable app): run <- f

Re: [R] recursive function

2010-06-14 Thread K. Elo
Hi! Do you mean something like this (df is your original data frame): --- cut here --- df1<-df df1[[1]]<-paste("R",df[[1]],sep="_") colnames(df1)<-c("SERIES","YEAR","value") df1$value[ df1$YEAR==2009 ]<-5 for (i in c(2009:2007)) { df1$value[ df1$YEAR==(i-1) ]<-( df1$value[ df1$YEAR==i ]-df$DELTA

[R] Could not find createData function

2010-07-06 Thread shabnam k
Hi, I am using "*Maanova* package" to do anova. I have created *datafile* with probeID as the first column, which is a tab limited text file and also created *designfile*. I have created *readma object* which is named as abf1. >From that readma object, i have to create data object by using *crea

  1   2   3   >