Displaying 20 results from an estimated 4000 matches similar to: "Changing many csv files using apply?"
2017 Aug 24
5
functions from 'base' package are not accessible
Hi all!
The following code (executed in console)...
somevar <- data.frame(v1 = 1:5, somestring = 6:10, v3 = 11:15, v4 = 16:20);
somevar %>% gather(key = var, value = val, which(names(somevar) == "somestring"):length(somevar)) %>% head(2);
throws...
Error in which(names(somevar) == "somestring") :
could not find function "which"
if I change
2017 Aug 24
0
functions from 'base' package are not accessible
Try putting !!! (three exclamation symbols) in front of which(...)==....
The non-standard evaluation in the tidyverse can cause confusion.
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Thu, Aug 24, 2017 at 4:32 AM, Eugeny Melamud <
Eugeny.Melamud at lanit-tercom.com> wrote:
> Hi all!
>
> The following code (executed in console)...
> somevar <- data.frame(v1 = 1:5,
2002 Jul 28
2
timestamp on symlink
rsync does not sync the timestamp on symlink (Solaris 8).
It is probablly due to the limitation of Unix implementation
of symlink, but I would like to know why rsync/Unix does not
do this, and what we can do about it. Is the conclusion that
"rsync syncs everything except the timestamp on symlink"?
Why do I need timestamp on symlink? Supposed something stopped
working because something
2006 Apr 27
1
sigsev with postfix + dovecot SASL
hi,
I am just playing a bit with the dovecot SASL plugin for postfix and so far my
tests have been very successfull, can't wait to get the cyrus-sasl beast replaced.
However, I found a potential problem when doing some "illegal" stuff on the
postfix side:
-------CUT-------
cerberus:/var/log# telnet smtptest 25
Trying 192.168.99.99...
Connected to smtptest.bestsolution.at.
Escape
2008 Feb 13
8
comparing ajax.updater div in js
This is really bugging me no matter what I''m trying.
In javascript, I''m using the ajax.updater, and it (obviously) writes
back out to a div. I want to then compare what was echoed out into
this div (which came from the php file I listed in ajax.updater) with
a string.
test should equal "SomeString" because that is what is being echoed
out to
2004 Apr 21
2
Resizing a ListCtrl
Hi Guys,
I''m having serious troubles resizing a dialog with a ListCtrl. The ctrl
will not resize horizontally no matter what I''m doing. I''ve attached a
sample code below. Any help will be greatly appreciated, as I really
like wxRuby :)
I''ve also tried to copy from the example from listtest.rbw, but that
also doesn''t seem to work.
Another thing
2018 Sep 28
4
Simple bash question
I am calling a bash script and passing in somestring that includes a "$"
myscript "$plusmore"
I want to assign in the myscript the $1 arg to something like
MYTEXT="$1"
when I do that I dont get what I'm expecting. if I do
MYTEXT='$1'
I still dont get what I'm expecting.
On the first assignment of MYTEXT I do not want the "$" to be
2016 Feb 03
2
Python hashlib and ripemd160
Hi - I think the patent monster has struck again.
rmd = hashlib.new('ripemd160',binascii.unhexlify(someString)).hexdigest()
That fails - ValueError: unsupported hash type
From some googling, it appears that the supported hash types are from
OpenSSL and that means the OpenSSL in CentOS doesn't support ripemd160.
I've worked around other stuff missing from CentOS OpenSSL by
2008 Jul 06
3
Lots of huge matrices, for-loops, speed
Hello,
we have 80 text files with matrices. Each matrix represents a map (rows for
latitude and columns for longitude), the 80 maps represent steps in time. In
addition, we have a vector x of length 80. We would like to compute a
regression between matrices (response through time) and x and create maps
representing coefficients, r2 etc. Problem: the 80 matrices are of the size
4000 x 3500 and we
2009 Feb 19
2
read.table : how to condition on error while opening file?
Hi,
I'm using read.table in a loop, to read in multiple files. The problem
is that when a file is missing there is an error message and the loop is
broken; what I'd like to do is to test for the error and simply do
"next" instead of breaking the loop. Anybody knows how to do that?
Example:
filelist <- c("file1.txt", "file2.txt",
2003 Feb 12
2
Filelist caching
Hi,
I've noticed every time someone does an rsync-request on my ftp-site
(which also provides rsync as mirror method), rsyncd creates a filelist.
This is a quite IO and CPU intensive procedure, especially for things
mirrors like FreeBSD with lots of little files.
I was wondering... is there a way to cache that filelist? Our mirrors
are updated once, or twice a day, it could speed up
2010 Feb 19
3
Plotting multiple table automatically
Hi All,
I have a slight issue getting R to plot a series of tables automatically.
Essentially I have a series of tables that I wish to plot. They are named
on_2, on_3 etc. based on the file name when they were read in. I have
filelist <- list.files() to give me list of the table names. I wish to plot
each table, so I was thinking along some kind of for loop as below:
for (i in 1:Number_Files)
2009 Mar 23
2
Looping of read.table and assignment
Dear all,
I am trying to read in and assign data from 50 tables in an automated fashion. I have the following code, which I created with the help of textbooks and the internet, but it only seems to read in the final data file over and over again. For example, when I type:> table_1951 I get the same values in the table as when I type> table_2000 despite the values in the source tables
2009 Mar 27
2
Assignment to variables fails to loop
Dear all,
I think I'm nearly there in writing R code which will read in files with two variable parts to the file name and then assigning these file names to objects, which also have two variable parts. I have got the code running without encountering errors, however, I receive 50+ of the same warnings:
1: In assign(paste("Fekete_", index$year, index$month, sep = ""),
2024 Nov 06
1
Using multiple dat files
"It seems therefore that there is no other way than read in individually >
100 weather tables using read.tables., right? Using file.choose() doesn't
change the work."
Yes. With that many files, file.choose() does not make sense. However, I
still do not understand what is the problem with using lapply() on the
character vector of file names with read.table() as you did in your
2007 Dec 26
1
scope of plugns
After more than one hour of countless tries, I ask myself a simple question :
On what items are plugins supposed to execute ?
I''ve tried to create a filelist plugin which, for a page, displays all
file in the same directory (a rather old school view of website, where
each directory contains an entry point).
But, whatever I try, my plugin code is never invoked, and my page
content is never
2011 Apr 23
1
rake spec fails where rake spec:(models|controllers|views) pass
I''m still trying to work into Ruby 1.9.2 and am now experiencing
something that makes no sense to me. Using rspec 1.3.2 and rspec-rails
1.3.4 with rails 2.3.11 on ruby 1.9.2-p180, when I
$ rake spec:models
they all pass. When I
$ rake spec:controllers
they all pass. When I
$ rake spec:views
they all pass. But when I
$ rake spec
I get
<path to
2013 Feb 28
11
new question
Hi,
directory<- "/home/arunksa111/data.new"
#first function
filelist<-function(directory,number,list1){
setwd(directory)
filelist1<-dir(directory)
direct<-dir(directory,pattern = paste("MSMS_",number,"PepInfo.txt",sep=""), full.names = FALSE, recursive = TRUE)
list1<-lapply(direct, function(x) read.table(x,header=TRUE, sep =
2009 Dec 28
1
accessing members of a data.frame
I have the following code
fileList <-list.files(path = ".", pattern = "[^a-z].txt$", all.files =
FALSE, full.names = FALSE, recursive = FALSE, ignore.case = FALSE)
for (x in 1:length(fileList)){
fileLines <- data.frame(read.table(fileList[x]))
print(string)
}
the lines of the file all have the following format...
AB,20091224,156,156,154,154,55,1198
Can I access
2005 May 23
3
filelist caching optimization proposal
Hi,
As a gentoo-user i frequently run the emerge sync command, which in turn does
a rsync with the mainserver. The 'problem' is that the portage directory tree
contains about 19.000 directories and 96.000 files. So building the filelist
takes a pretty long time, because of the many disk accesses that are
neccesary. On the server side the disk-io problem is probably less worse
since