Displaying 14 results from an estimated 14 matches for "myls".
Did you mean:
mls
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 <-
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
Hello.
Consider the response-variable of data.frame df is constant, so analytically
perfect fit of a linear model is expected. Fitting a regression line using
lm result in residuals, slope and std.errors not exactly zero, which is
acceptable in some way, but errorneous. But if you use summary.lm it shows
inacceptable error propagation in the calculation of the t value and the
corresponding
2018 May 25
0
how to make the code more efficient using lapply
Hi Stephen,
I am not sure that the "for loop" is the source of slowness.
You seem to be doing a lot of unnecessary work each time through the loop.
e.g. no need to check if it's the last file, just move that section outside
of the loop.
It will be executed when the loop finishes. As it is you are calling
list.files() each time
through the loop which could be slow.
In any case
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
Eric's approach seems reasonable to me, and I agree that it's probably not the use of a "for" loop that makes the original version slow. As Eric mentioned, there are lots of unnecessary things happening in the loop.
For example, list.files() was called twice inside the loop, which is unnecessary, and will definitely slow the loop down (though probably not by much). Call it
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 ob...
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 SIGNED MESSAGE-----
Hash: SHA1
On Thu, 12 Mar 2015, Hardy Flor wrote:
> 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.
Patch rawlog.c and recompile. :)
- --
Steffen Kaiser
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
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