search for: myl

Displaying 14 results from an estimated 14 matches for "myl".

Did you mean: my
2005 Aug 23
2
merge list entries
dear expeRts, i would like to merge the data frame entries in a list. for example: > #input > myl <- list(q1=data.frame(id=c("Alice", "Bob"), grade=c(90, 49)), q2=data.frame(id=c("Alice", "Chuck"), grade=c(70, 93)), q3=data.frame(id=c("Bob", "Chuck"), grade=c(84, 40))) > #output > (mydf <- magic(...
2011 Jan 20
1
syntax for a list of components from a list
I'm attempting to generalise a function that reads individual list components, in this case they are matrices, and converts them into 3 dimensional array. I can input each matrix individually, but want to do it for about 1,000 of them ... This works array2 <- abind(list1[[1]],list1[[2]],list1[[3]],along=3) This doesn't array2 <- abind(list1[[1:3]],along=3) This doesn't either
2010 Jan 08
2
how to get perfect fit of lm if response is constant
...way to get the perfect fitted regression curve using lm and prevent this error propagation? I consider rounding all values of the lm-object afterwards to somewhat precision as a bad idea. Unfortunately there is no option in lm for calculation precision. > df<-data.frame(x=1:10,y=1) > myl<-lm(y~x,data=df) > myl Call: lm(formula = y ~ x, data = df) Coefficients: (Intercept) x 1.000e+00 9.463e-18 > summary(myl) Call: lm(formula = y ~ x, data = df) Residuals: Min 1Q Median 3Q Max -1.136e-16 -1...
2018 May 25
0
how to make the code more efficient using lapply
...les() each time through the loop which could be slow. In any case here's a possible way to do it. Warning: untested! f <- function(fn) { temp<-read_xlsx(fn,sheet=1,range=cell_cols(c(1,30,38:42))) temp<-temp[temp$Id %in% c("geneA","geneB","geneC"),] } myL <- lapply( X=list.files(), FUN=f ) temp.df.all<-do.call("rbind",myL) names(temp.df.all)<-gsub("^.*] ","",names(temp.df.all)) write_xlsx(temp.df.all, path="output.xlsx") HTH, Eric On Fri, May 25, 2018 at 9:24 AM, Stephen HonKit Wong <stephen66...
2018 May 25
2
how to make the code more efficient using lapply
Dear All, I have a following for-loop code which is basically intended to read in many excel files (each file has many columns and rows) in a directory and extract the some rows and columns out of each file and then combine them together into a dataframe. I use for loop which can do the work but quite slow. How to make it faster using lapply function ? Thanks in advance! temp.df<-c() #
2018 May 25
1
how to make the code more efficient using lapply
...range=cell_cols(c(1,30,38:42))) dfall <- rbind( dfall, temp[temp$Id %in% c("geneA","geneB","geneC") , ] ) } ## fix the colnames here ## write the output file here. In Eric's approach (which I have sometimes used), all of the input data frames are stored in myL. This has some benefit, but is strictly speaking not necessary (but would not be a concern unless the files are huge). In my alternative approach, the contents of each input file are discarded after they have been appended to the previous ones. The data frame (dfall) is enlarged at each iteration...
2014 May 20
1
[patch] Add support for editor function in edit.default
...with a file path as argument. edit.default currently calls the function with three arguments: name, file, and title. For example, running the following vimCmd <- 'vim -c "set ft=r"' vimEdit <- function(file_) system(paste(vimCmd, file_)) options(editor = vimEdit) myls <- edit(ls) gives "Error in editor(name, file, title) : unused arguments (file, title)". The attached patch changes edit.default to call the editor function with just the file path. There is at least one inconsistent behavior that this patch causes in its current form. It does not o...
2004 Aug 25
3
Beginners Question: Make nlm work
Hello, I'm new to this and am trying to teach myself some R by plotting biological data. The growth curve in question is supposed to be fitted to the Verhulst equation, which may be transcribed as follows: f(x)=a/(1+((a-0.008)/0.008)*exp(-(b*x))) - for a known population density (0.008) at t(0). I am trying to rework the example from "An Introduction to R" (p. 72) for my case and
2015 Mar 12
3
location of dovecot.rawlog-directory
How is it possible to have the dovecot.rawlog-directory outside the mail_location? A link to another directory is not because it is checked in rawlog.c S_ISDIR to directory.
2015 Mar 12
0
location of dovecot.rawlog-directory
...BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEVAwUBVQFzYnz1H7kL/d9rAQJM5gf/YKr5UP1Z1UlfjCzxgX0sYNUgo4Syd6wD 2lDrlxjkjtWaNgIOY5Kiv2NBJwU579rL+VMqwd1CpkUSmBGbJZGY/YNgDxLfsJkM +EgpmPbFB1+TeZjKygu5F1i9B51MECVRUvWWKI3BA/WQjFMGH7PiK+vSkuUzAi+g XhqvoaKx5doInX5nJibgeZv9W9kF2dLXPFYu79DI6go5laE4VFVSIaeiyVzo+Myl 6DHT1kRV7AHFhTe2wYc2YiIJcJUoiL9x8s5c5nCUKpzjdw5F95Mh5nMcyc1pu8Wz Gg9Po8tr2nNxpimlP/F7krJQKJFPltjZMOi7qJL03C0ILLTKqha35Q== =l/zF -----END PGP SIGNATURE-----
2009 Mar 11
1
Easy "Recall" to get ls(..., all.names=TRUE)?
Dear useRs, I have a utility function which is meant to be a clone of ls(), except with the option all.names=TRUE. Currently however, the function merely consists of a copy of the source code of ls(), except the default value of all.names is different. That approach has the drawback of future inconsistency if the code for ls() ever changes. No comment on whether that is likely or not; I would
2007 Apr 20
2
R in cron job: X problems
I'd like to use an R CMD BATCH script as part of a chron job that is set up to run every hour. The trouble is that the script creates a graphical output in a file via png(), and apparently this in turn works through X. When cron invokes the job, no X server is available -- I suppose that the DISPLAY variable is not set -- and so R exits with an error message in the output file. (If I run the
2010 May 20
6
writing function
Dear group, I am trying to write functions, but as a beginner, everything is not so obvious. Let's say I want the results in a list of elemts like this : tot1, tot2, etc Here is a function: toto <- function(x,y) { for(i in x:y){ paste(c("tot",i),collapse="")<-(i*2) } } If I type this : >toto(1,5) I get this message error: Error in paste(c("tot",
2018 Feb 16
9
Ubiquiti Model UAP-AC-PRO
Everyone, Have any of you installed ubiguiti wireless routers on your network? It looks like the setup requires the use of software; they have some packages that are ready made for Ubuntu and Debian, but not RedHat https://www.ubnt.com/download/unifi/unifi-ap-ac-pro Have any of you tried or succeeded in installation this on Centos 7.4? Greg Ennis