similar to: extracting columns

Displaying 20 results from an estimated 200 matches similar to: "extracting columns"

2008 Jul 14
2
long data frame selection error
Hello, I am trying to select the following headers from a data frame but when I try and run the command it executes halfway through and give me an error at V188 and V359. Temp <- data.frame(V4, V5, V6, V7, V8, V9, V10, V11, V12, V13, V14, V15, V16, V17, V18, V19, V20, V21, V22, V23, V24, V25, V26, V27, V28, V29, V30, V31, V32, V33, V34, V35, V36, V37, V38, V39, V40, V41, V42, V43, V44, V45,
2006 Feb 01
2
sort columns
Hi. I have a simple (I think) question My dataset have these variables: names(data) [1] "v1" "v2" "v3" "v4" "v5" "v6" "v7" "v8" "v9" "v10" "v11" "v12" "v13" "v14" "v15" "v16" "v17"
2010 Jan 09
3
string functions
Hi! Does anybody know a string function that would calculate how many characters two strings share? I.e. ("Hello World","Hello Peter") would be 7. Thanks. Laetitia
2006 Jan 24
9
Number of replications of a term
Hello, Is there a simple and fast function that returns a vector of the number of replications for each object of a vector ? For example : I have a vector of IDs : ids <- c( "ID1", "ID2", "ID2", "ID3", "ID3","ID3", "ID5") I want the function returns the following vector where each term is the number of replicates for the
2010 Apr 25
3
numerical or not?
Hi, I've had a little problem for several weeks now. It is annoying and therefore I will ask for help now: When I write a script with several iterations, I make it write out a text file to save the data during the run. For example I write: if (i %% 25) write.table(output,"temporary_output.txt") Later on, when I read in this output and want to calculate things, R complains that
2010 Aug 20
3
if-else function
Hi R people! I am looking for some suggestions writing an if-else function. The idea is to characterize different plots containing counts of variables (here parasites). If a plot has a count equal or higher than 4 for any parasite the function should return a 1 else a 0. Later I can loop the function over all plots. Here I have a little subset of my data: VariablePAR Plot1
2003 Apr 28
2
Algorithm did not converge
Help! Being a bit of a novice, please bear with me if this is a stupid question! I am trying to fit a saturated model to some count data that I have: model<-glm(COUNT~SP*LOC*COL*TIME*TREAT,poisson) but R keeps on crashing and coming up with (occasionally before crashing) an error that states: Algorithm did not converge in: (if(is.empty.model(mt)) glm.fit.null else glm.fit)(x = X, y = Y,
2006 Feb 15
2
Setting intial path under windows to MyComputer in Interactive file browser
Hello everyone, How can I specify in tcltk file browser the initial directory to "MyComputer" in Windows where Drives and Partition are accessible? And just a little question if anyone knows, is there a way to use the function choose.files under windows to select a directory? Thanks a lot for your help. Laetitia.
2008 Oct 27
1
Problem with script,
I?m sorry, in my last email I forgot to attach the data I?m using wich is a matrix of 175x175 filled with 0?s and 1?s 0 is the sea 1 is the continental land The script is area.r Thank you very much. Carlos L?pez -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -------------- next part -------------- An embedded and
2005 Jun 04
2
glm with a distribution free family
Dear R users, I am trying to fit a glm with a distribution free family, link = log and variance = constant*mu. I guess I have to use the quasi family but the choices of variance are restricted to constant or mu or mu^2..., I don't know the way to choose the variance that I need, i.e. constant*mu. If you have any ideas or advice, please tell me. Thanks, Laetitia Mestdagh Laetitia Mestdagh
2004 Feb 03
2
Prompt / Console problem
Hi, I have R installed under a Mandrake linux system and I don't have shell utilities any more under my R console such as completion when writing a file path, back and forth in the history, bindkeys... Moreover when I quit R by saving, no .Rhistory file is created while the .Rdata is. I don't get how this work, I thought it was based on the user unix shell but it does not seem. Any
2011 Apr 08
2
lars - lasso problem
hi, I have problem in following code, error is occurred. I have attached my data herewith. and my code is as following, > library(lars) Loaded lars 0.9-8 Warning message: package 'lars' was built under R version 2.12.2 > x<- read.table("D:/spring '11/james reggression/NewFeature.txt") > y<-read.table("D:/spring '11/lars/RFU.txt") > out<-
2010 Jan 11
1
apply a function down each column
Hello World, I have a function that makes pairwise comparisons between two strings. I would like to apply this function to my data (which consists of columns with different strings) in the way that it compares the first with the second entry, and then the third with the fourth, and then the fifth with the sixth, and so on down each column... So (2x-1) and (2x) would be the different entries to be
2008 Jul 29
1
Bug in sd() and var() in handling vectors of NA (R version 2.7.1)?
In the previous versions of R (2.6.1), when a vector of NA was given to the functions 'sd' or 'var' with parameter na.rm = TRUE, it used to return NA. Now (2.7.1) it returns an ERROR : Example in 2.6.1: > sd(c(NA, NA, NA, NA), na.rm = TRUE) [1] NA Example in 2.7.1: > sd(c(NA, NA, NA, NA), na.rm = TRUE) Error in var(x, na.rm = na.rm) : paires d'éléments
2010 May 19
1
sample and rearrange
Dear Wu Gong and Peter Ehlers, thank you very much for your help debugging my script. Now I have a general following up question: Is there a straightforward way to rearrange the following dataset so that all first letters of each column will be combined in one column, all the second letters in a second column, all the third ones in a third column and so on, resulting in 7 columns, i.e. for
2005 May 31
1
GLM question
I am unfamiliar with R and I’m trying to do few statistical things like GLM and GAM with it. I hope my following questions will be clear enough: My datas ( y(i,j ))are run off triangles for example : J=1 J=2 J=3 I=1 1 2 3 I=2 4 5 I=3 6 My model is : E[y(i,j)] =m(i,j) Var[y(i,j)] =constant *m(i,j) Log(m(i,j)) = eta (i,j) eta (i,j) = c + alpha(i)
2010 Mar 08
1
compare tables
Hi! I need some help to finish my script. I have two tables that I combine randomly to produce a third table. This I do for hundreds of iterations. In the output file I get all the simulated tables after each other. It looks like this (in this case 3 iterations): output file: [[1]] [,1] [,2] [,3] [1,] "GM030005" "WI920024" "CCCC" [2,]
2003 Aug 29
3
R and pointer
Hi everyone, I want to write a function that modify directly variables passed as parameters (the equivalent in C language of *ptr/&ptr) so that I don't have to return a list and to reaffect all my variables. Is it possible to do so in R? Thanks a lot. Laetitia Marisa.
2004 Jul 27
1
Display on Windows console from script
Hello, When I launch a script under windows it does not display sequentially my cat calls or maybe the console is not refreshed at every line of my script. For instance with that code cat("\n\n================== IMPORT DATA FROM FILE ===================\n\n") fileschosen <- choose.files(caption="Select gpr files", filters = matrix(c("genepix
2012 Jun 07
1
Abrupt closure of R when using .C function
Hi Everyone, This is my first message on this discussion list. I create a R function which includes a .C function. I didn't get any error neither from "C side", nor from "R side". I tried to put proper type in R. But the problem is that I get an abrupt closure of R, with the following message: " R for Windows GUI front-end encountered a problem and needs to