similar to: scan or source a text file into a list

Displaying 20 results from an estimated 600 matches similar to: "scan or source a text file into a list"

2002 Apr 06
1
read.table and trouble
Hi all, I'm porting a library I wrote in S-plus over to R. All but one of the functions work fine. The only one that doesn't is really giving me a headache. I'm admitting defeat. Can anybody help? Object example3 has been read in using read.table. The statement works fine in S-Plus. When I run the same statement in R the column Prefix, which is read in using the as.character
2011 Apr 19
2
Markov transition matrices , missing transitions for certain years
Hi all, I am working for nest box occupancy data for birds and would like to construct a Markov transition matrix, to derive transition probabilities for ALL years of the study (not separate sets of transition probabilities for each time step). The actual dataset I'm working with is 125 boxes over 14 years that can be occupied by 7 different species, though I have provided a slimmed down
2009 Mar 27
1
ROCR package finding maximum accuracy and optimal cutoff point
If we use the ROCR package to find the accuracy of a classifier pred <- prediction(svm.pred, testset[,2]) perf.acc <- performance(pred,"acc") Do we?find the maximum accuracy?as follows?(is there a simplier way?): > max(perf.acc at x.values[[1]]) Then to find the cutoff point that maximizes the accuracy?do we do the following?(is there a simpler way): > cutoff.list <-
2012 Feb 20
10
[PATCH] hvm: Correct RTC time offset update error due to tm->tm_year
Hi In rtc_set_time, mktime is called to calculate seconds since 1970/01/01, input parameters of mktime are required to be in normal date format. Such as: year=1980, mon=12, day=31, hour=23, min=59, sec=59. However, the current input parameter of mktime is tm->tm_year, and it is the number of years since 1900. (For example, if current time is 2012/12/31, and tm->tm_year is 112). This is
2016 Aug 26
2
[PATCH] v2v: Use unitless methods for methods which don't change the internal state.
Methods in OCaml which don't take any parameters don't require the dummy unit arg, ie writing: method foo = ... is fine. The reason you might need the unit arg is if you need to create a closure from the method without calling it, for example if you need to use the method in a callback. In lablgtk2 the convention is to use unitless methods if either: the method shouldn't be used
2007 Apr 30
3
Read every second line from ASCII file
Dear all, I have an ASCII file where records are separated by a blank. I would like to read those data; however, only the data in rows 1, 3, 5, 7, ... are important; the other lines (2,4,6,8,....) contain no useful information for me. So far I used awk/gawk to do it: gawk '{if ((FNR % 2) != 0) {print $0}}' infile.txt > outfile.txt What is the recommended way to accomplish this in R?
2011 Aug 03
1
Need help with xyplot
Consider I have the following data: AgeRange AgeOfPerson PersonNo FriendsAtYear0 FriendsAtYear1 FriendsAtYear2 FriendsAtYear3 FriendsAtYear4 FriendsAtYear5 10 - 12 11 1 0 1 2 2 3 3 10 - 12 12 2 0 1 2 2 3 3 15 - 18 13 3 1 2 3 4 6 7 15 - 18 14 4 1 3 4 5 7 7 30 - 40 33 5 3 5 5 6 8 9 30 - 40 36 6 4 4 4 4 4 4 I want to plot the number of friends against number of years, as to show how friendships
2009 Nov 05
3
performing operations on a dataframe
Hey all, I feel like the solution to this problem should be relatively simple, but for some reason I can't find answers or come up with my own solution. Given the dataframe: (SpA and SpB not important, want to look at distribution of cooccurance for each year) Year SpA SpB Coocc 2000 0 2000 2 2000 1 2001 8 2001 2 2001 0 2001 0 2002 1 2002 2 How can I apply different functions to
2009 Aug 04
0
Efficient coding
I have a piece of code as the one at the bottom, unfortunately since it involves time series from a db it's not easy to give to mailing list a working script. It becomes very slow after few hundred iterations over variable sp (must process several thousands). The Rprof() indicates that the problem is the use of gc(). Can someone indicate what I have to take care of not to call gc() so often?
2011 Jul 07
1
Select element out of several ncdf variables
Hi there I'm working with ncdf data. I have different dataset for 4 runs, 4 seasons and 3 timeslices (48 datasets in total). The datasets have the following dimensions: 96 longitudes, 48 latitudes and 30 time steps. To read all of them in, I wrote the following loop: runs <- c("03","04","05","06") years <- c(1851,1961,2061) seasons <-
2009 Nov 10
3
NetCDF output in R
Dear CSAG R users, I will be glad if someone can point out what I am doing wrong or not doing at all in this. I am trying to write out netcdf file in R. I have 26 time step but only the first time step is written. For example: >library(ncdf) >path <- '/home/work/' >forecast <- open.ncdf(paste(path,'cam.1980.2005.nc',sep="")) > fore <-
2009 Nov 10
3
NetCDF output in R
Dear CSAG R users, I will be glad if someone can point out what I am doing wrong or not doing at all in this. I am trying to write out netcdf file in R. I have 26 time step but only the first time step is written. For example: >library(ncdf) >path <- '/home/work/' >forecast <- open.ncdf(paste(path,'cam.1980.2005.nc',sep="")) > fore <-
2003 Apr 05
1
asterisk And OPen h323
hi , im trying to install asterisk-oh323 but no matter what linux i use , i allway receibe and error 1 . right now i'm using linux redhat 7.3 and the las version of pwlib and openh323 i really need some help with this , the error i receibe is with cpp0 , with the file size . regards , victor medrano
2013 Jan 22
3
density of hist(freq = FALSE) inversely affected by data magnitude
Hi, I have a couple of observations, a question or two, and perhaps a suggestion related to the plotting of density on the y-axis within the hist() function when freq=FALSE. I was using the function and trying to develop an intuitive understanding of what the density is telling me. After reading through this fairly helpful post:
2003 Nov 13
1
Installing packages
Running under Redhat 7.3 Linux I have installed R Version 1.8.0 (2003-10-08) from a binary download using the rpm manager. Using packageStatus(), I am attempted to upgrade several packages. This is unsuccessful with the following error messages: * Installing *source* package 'MASS' ... ** libs gcc -I/usr/lib/R/include -I/usr/local/include -D__NO_MATH_INLINES -mieee-fp -fPIC -O2
2011 Jul 29
2
xendomains and xl toolstack question
Hello all I''ve just installed xen 4.1.1 on my server and was tryoing to tweak xendomains script to work with new xl schema but I canĀ“t get it to save domains. It does start them with some changes I made to it but when I issue service xendomains stop I just get [ OK ] but domains stay running. Has xendomains script been ported to work with 4.1.1 or is there another alternative to it.
2012 Dec 06
2
awk awk
a little out of my comfort zone and have practically gotten what I want but awk seems determined to send a message via std error which is problematic and annoying. Basically trying to get a list of virtual host names from nginx config files like this: $ awk -F" " '/./ { if ( match ( "^server_name$", $2 ) ) print $1 }' /opt/nginx/sites/*.conf \ | grep -v server_name |
2006 Jul 11
1
Building Search_Xapian under FreeBSD
Hi all. I can't buil perl bindings for Xapian under FreeBSD for version 0.9.6 Here is something about system and error messages: uname -a: FreeBSD xxx 4.11-RELEASE FreeBSD 4.11-RELEASE xapian-config --cxxflags: -I/usr/local/include xapian-config --libs: -L/usr/local/lib -lxapian xapian-config --version: xapian 0.9.6 # perl Makefile.PL Checking if your kit is complete... Looks good Writing
2006 Oct 27
2
Question: xyplot panel configurations for Trellis package
Hi, I am new to R community and I have a question on panel configurations in the Trellis package. Particularly, I have the following code: require(lattice) plotTable <- NULL Date <- seq(as.Date("2006-11-01"), as.Date("2009-12-01"), by = 1) nYear <- length(unique(format(Date,"%Y"))) plotTable$Date <- as.Date(paste(unique(format(Date, "%Y-%m")),
2011 Jul 11
1
Named numeric vectors with the same value but different names return different results when used as thresholds for calculating true positives
Dear List, I have encountered an odd problem that I cannot understand. It stems from the calculation of true and false positives based on two input vectors x and y based on different thresholds of x, extracted using the quantile function. I am in certain cases getting different values of true positives for the same threshold value when the threshold was found under different quantiles (e.g. the