similar to: help with paste

Displaying 20 results from an estimated 600 matches similar to: "help with paste"

2011 Oct 27
2
help with parallel processing code
Hello R gurus, I have the code below for which i need help and pointers to make it run in parallel on a dual core win7 computer with R 2.13.x, using foreach, iterators,doMC. library(scatterplot3d) # Loads 3D library. library(fields) library(MASS) library(ROCR) library(verification) library(caret) library(gregmisc) ##simulated data d=replicate(9, rnorm(40)+10)
2004 Jun 25
3
String manipulation
Hi, let's see, if someone can help my with this one: I have the string as follows: > str<-("one","two","three") Now I want to concatenate the items to one string, seperateted by space or something else, >str >"one, two, three" If possible without a loop. My actual goal ist to create string like >str.names >"female = names1, male
2013 Sep 05
2
binary symmetric matrix combination
Hi, May be this helps: m1<- as.matrix(read.table(text=" y1 g24 y1 0 1 g24 1 0 ",sep="",header=TRUE)) m2<-as.matrix(read.table(text="y1 c1 c2 l17 ?y1 0 1 1 1 ?c1 1 0 1 1 ?c2 1 1 0 1 ?l17 1 1 1 0",sep="",header=TRUE)) m3<- as.matrix(read.table(text="y1 h4??? s2???? s30 ?y1 0 1 1 1 ?h4 1 0 1 1 ?s2 1 1 0 1 ?s30 1 1 1
2012 Jun 03
2
merging single column from different dataframe
Hi all, probably really simple to solve, but having no background in programming I haven't been able to figure this out: I have two dataframes like df1 <- data.frame(names1=c('aa','ab', 'ac', 'ad'), var1=c(1,5,7,12)) df2 <- data.frame(names2=c('aa', 'ab', 'ac', 'ad', 'ae'), var2=c(3,6,9,12,15)) Now I want merge
2010 Jun 13
1
Boxplot intervals combining names
Hi R users, This seems like a simple problem but I have searched nabble for the answer and can't seem to find it. All I want to do is produce a boxplot where I have two boxes for one Individual but on the xaxis I only have one tick mark centred between the boxes so I can add the Individuals' name. I have 30 IDs and have shown the code I use below for a couple of IDs, I figure the data
2009 Oct 30
2
Names of list members in a plot using sapply
Hi R users: I got this code to generate a graphic for each member of a lists. list1<-list(A=data.frame(x=c(1,2),y=c(5,6)),B=data.frame(x=c(8,9),y=c(12,6))) names1<-names(list1) sapply(1:length(list1),function(i) with(list1[[i]],plot(x,y,type="l",main=paste("Graphic of",names1[i])))) Is there a more elegant solution for not to use two separate lists? I would like to
2011 Nov 07
2
help with formula for clogit
I would like to know if clogit function can be used as below clogit(group~., data=dataframe) When I try to use in above format it takes a long time, I would appreciate some pointers to get multiple combinations tested. set.seed(100) d=data.frame(x=rnorm(20)+5, x1=rnorm(20)+5, x2=rnorm(20)+5, x3=rnorm(20)+5, x4=rnorm(20)+5, x5=rnorm(20)+5, x6=rnorm(20)+5, x7=rnorm(20)+5, x8=rnorm(20)+5,
2012 Feb 27
1
row names of a heatmap on left hand side
Hello R Gurus, I have a matrix for which I am doing a heatmap using heatmap.2. I want to put the rownames on the lefthand side instead of the right side of the heatmap. how can i put the rownames on left hand side: I have already tried axis but could not make it work ccc<-structure(c(1, 0.283300333755851, 0.237863231117007, 0.0148696794159253, -0.0780756406815149, -0.106161465097659,
2010 Dec 22
5
regression
Hi dear all, suppose that s is a statistic code; i have a matrix (x) which has 7 columns (1=x1,2=x23=x3,4=x4,5=x5,6=x6 and7=y) and has 20 rows. i want to do linear reggression like reg<-lm(x[,7]~1+x[,1]+x[,2]+.......+x[,6]) but i want to do delete i th row for nrows times and create regression model like above and compute each models' "s" statistics and list them. but i could
2009 Apr 08
1
Sweave problem, with multicolumn tables from R to LaTeX
Hi there, I have been using the example provided bellow for a while, and It was working without any problem. Nevertheless, just since 2-3 days is not working, probably because I did update.packages(). I have tried to re-install the older versions of the packages Hmisc() and xtable(), but still does not work. Can you run this example, and tell me if you got the same problems? I use
2011 Nov 08
2
match first consecutive list of capitalized words in string
Dear R-Helpers, this is my first post ever to a mailing list, so please feel free to point out any missunderstandings on my side regarding the conventions of this mailing list. My problem: Assuming the following character vector is given: names <- c("filia Maria", "vidua Joh Dirck Kleve (oo 02.02.1732)", "Bernardus Engelb Franciscus Linde j.u.Doktor referendarius
2007 Nov 28
1
ifelse function
Hi there, I need help with IFELSE function. The column g of my dataset pth, pth$g consists of "aa", "ao", "dcl", "iy", "sh". The last few values of pth$g looks like: [4496] sh ao ao sh iy dcl dcl aa iy iy aa sh ao ao Levels: aa ao dcl iy sh I want to convert these values into 1,2,3,4,5. I tried to use a loop and I found the following
2013 Feb 17
2
Loop
Hi all, I want to execute a loop of a program: for (u in Timeframemin:Timeframe){} Imagine that Timeframemin<-10 Timefram<-10000 Is it posible to execute the loop but only proving from 10 to 10000 but jumping 10 each time, for example, execute for 10,20,30.....to Timeframe. Other question is, when a program is "heavy" and has a lot of loops to execute (how can I know where
2008 Feb 21
3
applying a function to data frame columns
useR's, I want to apply this function to the columns of a data frame: u[u >= range(v)[1] & u <= range(v)[2]] where u is the n column data frame under consideration and v is a data frame of values with the same number of columns as u. For example, v1 <- c(1,2,3) v2 <- c(3,4,5) v3 <- c(2,3,4) v <- as.data.frame(cbind(v1,v2,v3)) uk1 <- seq(min(v1) - .5, max(v1) + .5,
2005 Oct 04
2
Need help on ARIMA (time series analysis)
Hi, I am so novice in using R. I have some problems in my R script below which fits time series data and predict it one-step ahead. Here is a brief explanation on what I try to achieve Th16k is time series data (500 data points). The size of window for fitting and predicting is 50 (data points). As you can easily discover from my code, (fixed) window is moving/sliding to get next one-step
2009 Aug 09
3
howto get the number of columns and column names of multiply data frames
Hi, I' ve read in several files with measurements into R data frames(works flawlessly). Each dataframe is named by the location of measurement and contains hundreds of rows and about 50 columns like this dataframe1. date measurment_1 .... mesurement_n 1 2 3 .. .. .. n For further processing I need to check whether or not ncol and colnames are the same for all dataframes. Also I need to
2005 Oct 13
0
Maps package, coloration
I am having some trouble getting the colors correct on county maps using the maps package. I have a data.frame that contains coloration data for every county -- it also contains a variable 'mapm' which fits the 'state,county' format used in the mapping package. I use this to define colors from a range of 1:100. The problem is that the colors seem good for some states/counties,
2005 Nov 24
10
Any change of rsync using threads instead of fork?
On a typical embedded Linux device, with no MMU, there is no fork() or it returns ENOSYS. The nearest replacements are vfork() (which is only useful before exec*()), or to create threads with pthread_create(). rsync would be a very useful program on such devices, and I was a bit disappointed to build it, only to find the compile went fine but it failed at runtime due to ENOSYS. Is there any
2012 Aug 02
4
Subseting
Hi everyone I have banking data set in long format with 4 columns.One of these columns is bank name which consist of 49 banks and I want the data for only 40 banks out of these 49 so can anyone help me on how to get this 40 banks data My data looks like Year Name totalliabilties assets 1990 a 90 10 1991 a 89 48 1992 a 87
2012 Dec 24
2
whats wrong in my codes???
Dear R family,i am trying to plot and save, simultaneously, about 1000. the name of each plot is contained in "names" file. when i run this loop, i get an error. "Error in plot.new() : Unable to open file 'C:/R/SAVEHERE/myplot_Tak.jpg' for writing". could you please correct the mistake in the loop? >names<-(names(sp)) >for(a in seq_along(names)){ >mypath